diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2010-04-13 20:21:15 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-14 11:49:52 (GMT) |
commit | 3d90c508dc6737d5b241a1f8807e1287f015f7f8 (patch) | |
tree | 5bef76067d6c0c385827425ba9edd4659fd12423 /drivers/net/stmmac/stmmac_main.c | |
parent | e326e8503dfc73e4f79d488a78ee3d7cde10081f (diff) | |
download | linux-fsl-qoriq-3d90c508dc6737d5b241a1f8807e1287f015f7f8.tar.xz |
stmmac: get the descriptor structure from platform
Output for chip that uses the Enhanced descriptors:
[snip]
STMMAC driver:
platform registration... done!
DWMAC1000 - user ID: 0x10, Synopsys ID: 0x33
Enhanced descriptor structure
no valid MAC address;please, use ifconfig or nwhwconfig!
eth0 - (dev. name: stmmaceth - id: 0, IRQ #134
IO base addr: 0xfd110000)
STMMAC MII Bus: probed
[snip]
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/stmmac/stmmac_main.c')
-rw-r--r-- | drivers/net/stmmac/stmmac_main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/stmmac/stmmac_main.c b/drivers/net/stmmac/stmmac_main.c index dfeea96..7ac6dde 100644 --- a/drivers/net/stmmac/stmmac_main.c +++ b/drivers/net/stmmac/stmmac_main.c @@ -1581,13 +1581,16 @@ static int stmmac_mac_device_setup(struct net_device *dev) struct mac_device_info *device; - if (priv->is_gmac) { + if (priv->is_gmac) device = dwmac1000_setup(ioaddr); - device->desc = &enh_desc_ops; - } else { + else device = dwmac100_setup(ioaddr); + + if (priv->enh_desc) { + device->desc = &enh_desc_ops; + pr_info("\tEnhanced descriptor structure\n"); + } else device->desc = &ndesc_ops; - } if (!device) return -ENOMEM; @@ -1729,6 +1732,7 @@ static int stmmac_dvr_probe(struct platform_device *pdev) priv->bus_id = plat_dat->bus_id; priv->pbl = plat_dat->pbl; /* TLI */ priv->is_gmac = plat_dat->has_gmac; /* GMAC is on board */ + priv->enh_desc = plat_dat->enh_desc; platform_set_drvdata(pdev, ndev); |