summaryrefslogtreecommitdiffstats
path: root/cpu/arm926ejs/davinci/lxt972.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/lxt972.c
parentfbbb1de369ca7d5ace6f7b0ce9d0aee24a6f457b (diff)
downloadblackbird-obmc-uboot-fcaac589a68115819ddadcf5c18ded9a5f9e2c75.tar.gz
blackbird-obmc-uboot-fcaac589a68115819ddadcf5c18ded9a5f9e2c75.zip
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/lxt972.c')
-rw-r--r--cpu/arm926ejs/davinci/lxt972.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/cpu/arm926ejs/davinci/lxt972.c b/cpu/arm926ejs/davinci/lxt972.c
index 8130b48de0..ce3e41c551 100644
--- a/cpu/arm926ejs/davinci/lxt972.c
+++ b/cpu/arm926ejs/davinci/lxt972.c
@@ -39,9 +39,9 @@ int lxt972_is_phy_connected(int phy_addr)
{
u_int16_t id1, id2;
- if (!dm644x_eth_phy_read(phy_addr, PHY_PHYIDR1, &id1))
+ if (!davinci_eth_phy_read(phy_addr, PHY_PHYIDR1, &id1))
return(0);
- if (!dm644x_eth_phy_read(phy_addr, PHY_PHYIDR2, &id2))
+ if (!davinci_eth_phy_read(phy_addr, PHY_PHYIDR2, &id2))
return(0);
if ((id1 == (0x0013)) && ((id2 & 0xfff0) == 0x78e0))
@@ -55,20 +55,20 @@ int lxt972_get_link_speed(int phy_addr)
u_int16_t stat1, tmp;
volatile emac_regs *emac = (emac_regs *)EMAC_BASE_ADDR;
- if (!dm644x_eth_phy_read(phy_addr, PHY_LXT971_STAT2, &stat1))
+ if (!davinci_eth_phy_read(phy_addr, PHY_LXT971_STAT2, &stat1))
return(0);
if (!(stat1 & PHY_LXT971_STAT2_LINK)) /* link up? */
return(0);
- if (!dm644x_eth_phy_read(phy_addr, PHY_LXT971_DIG_CFG, &tmp))
+ if (!davinci_eth_phy_read(phy_addr, PHY_LXT971_DIG_CFG, &tmp))
return(0);
tmp |= PHY_LXT971_DIG_CFG_MII_DRIVE;
- dm644x_eth_phy_write(phy_addr, PHY_LXT971_DIG_CFG, tmp);
+ davinci_eth_phy_write(phy_addr, PHY_LXT971_DIG_CFG, tmp);
/* Read back */
- if (!dm644x_eth_phy_read(phy_addr, PHY_LXT971_DIG_CFG, &tmp))
+ if (!davinci_eth_phy_read(phy_addr, PHY_LXT971_DIG_CFG, &tmp))
return(0);
/* Speed doesn't matter, there is no setting for it in EMAC... */
@@ -95,7 +95,7 @@ int lxt972_init_phy(int phy_addr)
}
/* Disable PHY Interrupts */
- dm644x_eth_phy_write(phy_addr, PHY_LXT971_INT_ENABLE, 0);
+ davinci_eth_phy_write(phy_addr, PHY_LXT971_INT_ENABLE, 0);
return(ret);
}
@@ -105,16 +105,16 @@ int lxt972_auto_negotiate(int phy_addr)
{
u_int16_t tmp;
- if (!dm644x_eth_phy_read(phy_addr, PHY_BMCR, &tmp))
+ if (!davinci_eth_phy_read(phy_addr, PHY_BMCR, &tmp))
return(0);
/* Restart Auto_negotiation */
tmp |= PHY_BMCR_RST_NEG;
- dm644x_eth_phy_write(phy_addr, PHY_BMCR, tmp);
+ davinci_eth_phy_write(phy_addr, PHY_BMCR, tmp);
/*check AutoNegotiate complete */
udelay (10000);
- if (!dm644x_eth_phy_read(phy_addr, PHY_BMSR, &tmp))
+ if (!davinci_eth_phy_read(phy_addr, PHY_BMSR, &tmp))
return(0);
if (!(tmp & PHY_BMSR_AUTN_COMP))
OpenPOWER on IntegriCloud