summaryrefslogtreecommitdiff
path: root/cpu/arm926ejs/davinci/dp83848.c
diff options
context:
space:
mode:
authorSandeep Paulraj <s-paulraj@ti.com>2008-08-31 00:39:46 +0200
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-08-31 00:39:46 +0200
commitfcaac589a68115819ddadcf5c18ded9a5f9e2c75 (patch)
tree9c2b32763db364f6265221e7c70977b03448b633 /cpu/arm926ejs/davinci/dp83848.c
parentfbbb1de369ca7d5ace6f7b0ce9d0aee24a6f457b (diff)
downloadu-boot-imx-fcaac589a68115819ddadcf5c18ded9a5f9e2c75.zip
u-boot-imx-fcaac589a68115819ddadcf5c18ded9a5f9e2c75.tar.gz
u-boot-imx-fcaac589a68115819ddadcf5c18ded9a5f9e2c75.tar.bz2
ARM DaVinci: Changing function names for EMAC driver
DM644x is just one of a series of DaVinci chips that use the EMAC driver. By replacing all the function names that start with dm644x_* to davinci_* we make these function more portable. I have tested this change on my EVM. DM6467 is another DaVinci SOC which uses the EMAC driver and i will be sending patches that add DaVinci DM6467 support to the list soon. Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'cpu/arm926ejs/davinci/dp83848.c')
-rw-r--r--cpu/arm926ejs/davinci/dp83848.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/cpu/arm926ejs/davinci/dp83848.c b/cpu/arm926ejs/davinci/dp83848.c
index 2aa9ef1..59f039b 100644
--- a/cpu/arm926ejs/davinci/dp83848.c
+++ b/cpu/arm926ejs/davinci/dp83848.c
@@ -38,9 +38,9 @@ int dp83848_is_phy_connected(int phy_addr)
{
u_int16_t id1, id2;
- if (!dm644x_eth_phy_read(phy_addr, DP83848_PHYID1_REG, &id1))
+ if (!davinci_eth_phy_read(phy_addr, DP83848_PHYID1_REG, &id1))
return(0);
- if (!dm644x_eth_phy_read(phy_addr, DP83848_PHYID2_REG, &id2))
+ if (!davinci_eth_phy_read(phy_addr, DP83848_PHYID2_REG, &id2))
return(0);
if ((id1 == DP83848_PHYID1_OUI) && (id2 == DP83848_PHYID2_OUI))
@@ -54,13 +54,13 @@ int dp83848_get_link_speed(int phy_addr)
u_int16_t tmp;
volatile emac_regs* emac = (emac_regs *)EMAC_BASE_ADDR;
- if (!dm644x_eth_phy_read(phy_addr, DP83848_STAT_REG, &tmp))
+ if (!davinci_eth_phy_read(phy_addr, DP83848_STAT_REG, &tmp))
return(0);
if (!(tmp & DP83848_LINK_STATUS)) /* link up? */
return(0);
- if (!dm644x_eth_phy_read(phy_addr, DP83848_PHY_STAT_REG, &tmp))
+ if (!davinci_eth_phy_read(phy_addr, DP83848_PHY_STAT_REG, &tmp))
return(0);
/* Speed doesn't matter, there is no setting for it in EMAC... */
@@ -101,7 +101,7 @@ int dp83848_init_phy(int phy_addr)
}
/* Disable PHY Interrupts */
- dm644x_eth_phy_write(phy_addr, DP83848_PHY_INTR_CTRL_REG, 0);
+ davinci_eth_phy_write(phy_addr, DP83848_PHY_INTR_CTRL_REG, 0);
return(ret);
}
@@ -112,13 +112,13 @@ int dp83848_auto_negotiate(int phy_addr)
u_int16_t tmp;
- if (!dm644x_eth_phy_read(phy_addr, DP83848_CTL_REG, &tmp))
+ if (!davinci_eth_phy_read(phy_addr, DP83848_CTL_REG, &tmp))
return(0);
/* Restart Auto_negotiation */
tmp &= ~DP83848_AUTONEG; /* remove autonegotiation enable */
tmp |= DP83848_ISOLATE; /* Electrically isolate PHY */
- dm644x_eth_phy_write(phy_addr, DP83848_CTL_REG, tmp);
+ davinci_eth_phy_write(phy_addr, DP83848_CTL_REG, tmp);
/* Set the Auto_negotiation Advertisement Register
* MII advertising for Next page, 100BaseTxFD and HD,
@@ -126,23 +126,23 @@ int dp83848_auto_negotiate(int phy_addr)
*/
tmp = DP83848_NP | DP83848_TX_FDX | DP83848_TX_HDX |
DP83848_10_FDX | DP83848_10_HDX | DP83848_AN_IEEE_802_3;
- dm644x_eth_phy_write(phy_addr, DP83848_ANA_REG, tmp);
+ davinci_eth_phy_write(phy_addr, DP83848_ANA_REG, tmp);
/* Read Control Register */
- if (!dm644x_eth_phy_read(phy_addr, DP83848_CTL_REG, &tmp))
+ if (!davinci_eth_phy_read(phy_addr, DP83848_CTL_REG, &tmp))
return(0);
tmp |= DP83848_SPEED_SELECT | DP83848_AUTONEG | DP83848_DUPLEX_MODE;
- dm644x_eth_phy_write(phy_addr, DP83848_CTL_REG, tmp);
+ davinci_eth_phy_write(phy_addr, DP83848_CTL_REG, tmp);
/* Restart Auto_negotiation */
tmp |= DP83848_RESTART_AUTONEG;
- dm644x_eth_phy_write(phy_addr, DP83848_CTL_REG, tmp);
+ davinci_eth_phy_write(phy_addr, DP83848_CTL_REG, tmp);
/*check AutoNegotiate complete */
udelay(10000);
- if (!dm644x_eth_phy_read(phy_addr, DP83848_STAT_REG, &tmp))
+ if (!davinci_eth_phy_read(phy_addr, DP83848_STAT_REG, &tmp))
return(0);
if (!(tmp & DP83848_AUTONEG_COMP))