diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2010-11-23 21:37:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-24 14:14:24 -0500 |
commit | 9dfeb4d953f914bd3bb56ce60e22ee84687399ce (patch) | |
tree | 37d9d33974944cb219e911e0aa965d337fee2ed7 /drivers/net/stmmac/stmmac_mdio.c | |
parent | b340007f79941297c44a7dfba4d3c587ff81590f (diff) |
stmmac: tidy-up stmmac_priv structure
This patch tidies-up the stmmac_priv structure
that had many fileds alredy defined in the
plat_stmmacenet_data structure.
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_mdio.c')
-rw-r--r-- | drivers/net/stmmac/stmmac_mdio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/stmmac/stmmac_mdio.c b/drivers/net/stmmac/stmmac_mdio.c index d7441616357d..234b4068a1fc 100644 --- a/drivers/net/stmmac/stmmac_mdio.c +++ b/drivers/net/stmmac/stmmac_mdio.c | |||
@@ -53,7 +53,7 @@ static int stmmac_mdio_read(struct mii_bus *bus, int phyaddr, int phyreg) | |||
53 | int data; | 53 | int data; |
54 | u16 regValue = (((phyaddr << 11) & (0x0000F800)) | | 54 | u16 regValue = (((phyaddr << 11) & (0x0000F800)) | |
55 | ((phyreg << 6) & (0x000007C0))); | 55 | ((phyreg << 6) & (0x000007C0))); |
56 | regValue |= MII_BUSY | ((priv->mii_clk_csr & 7) << 2); | 56 | regValue |= MII_BUSY | ((priv->plat->clk_csr & 7) << 2); |
57 | 57 | ||
58 | do {} while (((readl(priv->ioaddr + mii_address)) & MII_BUSY) == 1); | 58 | do {} while (((readl(priv->ioaddr + mii_address)) & MII_BUSY) == 1); |
59 | writel(regValue, priv->ioaddr + mii_address); | 59 | writel(regValue, priv->ioaddr + mii_address); |
@@ -85,7 +85,7 @@ static int stmmac_mdio_write(struct mii_bus *bus, int phyaddr, int phyreg, | |||
85 | (((phyaddr << 11) & (0x0000F800)) | ((phyreg << 6) & (0x000007C0))) | 85 | (((phyaddr << 11) & (0x0000F800)) | ((phyreg << 6) & (0x000007C0))) |
86 | | MII_WRITE; | 86 | | MII_WRITE; |
87 | 87 | ||
88 | value |= MII_BUSY | ((priv->mii_clk_csr & 7) << 2); | 88 | value |= MII_BUSY | ((priv->plat->clk_csr & 7) << 2); |
89 | 89 | ||
90 | 90 | ||
91 | /* Wait until any existing MII operation is complete */ | 91 | /* Wait until any existing MII operation is complete */ |
@@ -114,7 +114,7 @@ static int stmmac_mdio_reset(struct mii_bus *bus) | |||
114 | 114 | ||
115 | if (priv->phy_reset) { | 115 | if (priv->phy_reset) { |
116 | pr_debug("stmmac_mdio_reset: calling phy_reset\n"); | 116 | pr_debug("stmmac_mdio_reset: calling phy_reset\n"); |
117 | priv->phy_reset(priv->bsp_priv); | 117 | priv->phy_reset(priv->plat->bsp_priv); |
118 | } | 118 | } |
119 | 119 | ||
120 | /* This is a workaround for problems with the STE101P PHY. | 120 | /* This is a workaround for problems with the STE101P PHY. |
@@ -157,7 +157,7 @@ int stmmac_mdio_register(struct net_device *ndev) | |||
157 | new_bus->read = &stmmac_mdio_read; | 157 | new_bus->read = &stmmac_mdio_read; |
158 | new_bus->write = &stmmac_mdio_write; | 158 | new_bus->write = &stmmac_mdio_write; |
159 | new_bus->reset = &stmmac_mdio_reset; | 159 | new_bus->reset = &stmmac_mdio_reset; |
160 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", priv->bus_id); | 160 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", priv->plat->bus_id); |
161 | new_bus->priv = ndev; | 161 | new_bus->priv = ndev; |
162 | new_bus->irq = irqlist; | 162 | new_bus->irq = irqlist; |
163 | new_bus->phy_mask = priv->phy_mask; | 163 | new_bus->phy_mask = priv->phy_mask; |