diff options
author | Hugo Villeneuve <hugo.villeneuve@lyrtech.com> | 2008-09-12 02:20:47 +0200 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2008-09-12 02:20:47 +0200 |
commit | b5b0344957d32e3d07a8dd72fce64fb48e680ba4 (patch) | |
tree | e2a83ceaa0cef7024e040198a6855e3bb5ab26b5 /cpu/arm926ejs | |
parent | 03db53335c8eba656a7c44d1555b1a4514383e33 (diff) | |
download | u-boot-b5b0344957d32e3d07a8dd72fce64fb48e680ba4.tar.gz u-boot-b5b0344957d32e3d07a8dd72fce64fb48e680ba4.tar.bz2 u-boot-b5b0344957d32e3d07a8dd72fce64fb48e680ba4.zip |
ARM DaVinci: Remove duplicate code in cpu/arm926ejs/davinci/dp83848.c
ARM DaVinci: Remove duplicate code in cpu/arm926ejs/davinci/dp83848.c
Signed-off-by: Hugo Villeneuve <hugo.villeneuve@lyrtech.com>
Diffstat (limited to 'cpu/arm926ejs')
-rw-r--r-- | cpu/arm926ejs/davinci/dp83848.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/cpu/arm926ejs/davinci/dp83848.c b/cpu/arm926ejs/davinci/dp83848.c index 59f039b7c3..c71c685f72 100644 --- a/cpu/arm926ejs/davinci/dp83848.c +++ b/cpu/arm926ejs/davinci/dp83848.c @@ -64,29 +64,16 @@ int dp83848_get_link_speed(int phy_addr) return(0); /* Speed doesn't matter, there is no setting for it in EMAC... */ - if (tmp & DP83848_SPEED) { - if (tmp & DP83848_DUPLEX) { - /* set DM644x EMAC for Full Duplex */ - emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE | EMAC_MACCONTROL_FULLDUPLEX_ENABLE; - } else { - /*set DM644x EMAC for Half Duplex */ - emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE; - } - - return(1); + if (tmp & DP83848_DUPLEX) { + /* set DM644x EMAC for Full Duplex */ + emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE | + EMAC_MACCONTROL_FULLDUPLEX_ENABLE; } else { - if (tmp & DP83848_DUPLEX) { - /* set DM644x EMAC for Full Duplex */ - emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE | EMAC_MACCONTROL_FULLDUPLEX_ENABLE; - } else { - /*set DM644x EMAC for Half Duplex */ - emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE; - } - - return(1); + /*set DM644x EMAC for Half Duplex */ + emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE; } - return(0); + return(1); } |