Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113729
b: refs/heads/master
c: 0ed0563
h: refs/heads/master
i:
  113727: f35b0bc
v: v3
  • Loading branch information
Adrian Bunk authored and David S. Miller committed Oct 13, 2008
1 parent 994c0ba commit 2abc936
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1947b36d8f7eb706972bd50fceb063d317d62570
refs/heads/master: 0ed0563e14dcb9986241d30f08ecd33f9bcc3572
26 changes: 13 additions & 13 deletions trunk/drivers/net/bfin_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ static int desc_list_init(void)
* MII operations
*/
/* Wait until the previous MDC/MDIO transaction has completed */
static void mdio_poll(void)
static void bfin_mdio_poll(void)
{
int timeout_cnt = MAX_TIMEOUT_CNT;

Expand All @@ -269,25 +269,25 @@ static void mdio_poll(void)
}

/* Read an off-chip register in a PHY through the MDC/MDIO port */
static int mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum)
static int bfin_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum)
{
mdio_poll();
bfin_mdio_poll();

/* read mode */
bfin_write_EMAC_STAADD(SET_PHYAD((u16) phy_addr) |
SET_REGAD((u16) regnum) |
STABUSY);

mdio_poll();
bfin_mdio_poll();

return (int) bfin_read_EMAC_STADAT();
}

/* Write an off-chip register in a PHY through the MDC/MDIO port */
static int mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum,
u16 value)
static int bfin_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum,
u16 value)
{
mdio_poll();
bfin_mdio_poll();

bfin_write_EMAC_STADAT((u32) value);

Expand All @@ -297,12 +297,12 @@ static int mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum,
STAOP |
STABUSY);

mdio_poll();
bfin_mdio_poll();

return 0;
}

static int mdiobus_reset(struct mii_bus *bus)
static int bfin_mdiobus_reset(struct mii_bus *bus)
{
return 0;
}
Expand Down Expand Up @@ -818,7 +818,7 @@ static void bfin_mac_enable(void)
bfin_write_DMA1_CONFIG(rx_list_head->desc_a.config);

/* Wait MII done */
mdio_poll();
bfin_mdio_poll();

/* We enable only RX here */
/* ASTP : Enable Automatic Pad Stripping
Expand Down Expand Up @@ -1063,9 +1063,9 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev)
goto out_err_mdiobus_alloc;

lp->mii_bus->priv = ndev;
lp->mii_bus->read = mdiobus_read;
lp->mii_bus->write = mdiobus_write;
lp->mii_bus->reset = mdiobus_reset;
lp->mii_bus->read = bfin_mdiobus_read;
lp->mii_bus->write = bfin_mdiobus_write;
lp->mii_bus->reset = bfin_mdiobus_reset;
lp->mii_bus->name = "bfin_mac_mdio";
snprintf(lp->mii_bus->id, MII_BUS_ID_SIZE, "0");
lp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
Expand Down

0 comments on commit 2abc936

Please sign in to comment.