mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-11 05:02:26 -04:00
Remove duplicate code in cpu/arm926ejs/davinci/lxt972.c.
Remove duplicate code in cpu/arm926ejs/davinci/lxt972.c. Remove duplicate code in a if/else block in cpu/arm926ejs/davinci/lxt972.c. Fixed style issues. Signed-off-by: Hugo Villeneuve <hugo.villeneuve@lyrtech.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
parent
fec61431a0
commit
63676841ca
@ -71,31 +71,17 @@ int lxt972_get_link_speed(int phy_addr)
|
||||
if (!dm644x_eth_phy_read(phy_addr, PHY_LXT971_DIG_CFG, &tmp))
|
||||
return(0);
|
||||
|
||||
|
||||
/* Speed doesn't matter, there is no setting for it in EMAC... */
|
||||
if (stat1 & PHY_LXT971_STAT2_100BTX) {
|
||||
if (stat1 & PHY_LXT971_STAT2_DUPLEX_MODE) {
|
||||
/* set DM644x EMAC for Full Duplex */
|
||||
emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE | EMAC_MACCONTROL_FULLDUPLEX_ENABLE;
|
||||
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);
|
||||
} else {
|
||||
if (stat1 & PHY_LXT971_STAT2_DUPLEX_MODE) {
|
||||
/* 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);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@ -119,7 +105,6 @@ int lxt972_auto_negotiate(int phy_addr)
|
||||
{
|
||||
u_int16_t tmp;
|
||||
|
||||
|
||||
if (!dm644x_eth_phy_read(phy_addr, PHY_BMCR, &tmp))
|
||||
return(0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user