From: Hugo Villeneuve Date: Fri, 12 Sep 2008 00:20:47 +0000 (+0200) Subject: ARM DaVinci: Remove duplicate code in cpu/arm926ejs/davinci/dp83848.c X-Git-Tag: v2008.10-rc2~10^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5b0344957d32e3d07a8dd72fce64fb48e680ba4;p=platform%2Fkernel%2Fu-boot.git 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 --- diff --git a/cpu/arm926ejs/davinci/dp83848.c b/cpu/arm926ejs/davinci/dp83848.c index 59f039b..c71c685 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); }