net: remove unreachable legacy LED code
The code is guarded by a condition none of the defconfigs meet (that is CONFIG_SYS_FAULT_ECHO_LINK_DOWN and CONFIG_LED_STATUS_RED both enabled), so we can remove the unreachable code sections. When doing that, there's no caller for miiphy_link anymore, so it can be removed. This in turns makes CONFIG_SYS_FAULT_ECHO_LINK_DOWN and CONFIG_SYS_FAULT_MII_ADDR unused so they are removed as well. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -523,28 +523,3 @@ int miiphy_is_1000base_x(const char *devname, unsigned char addr)
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYS_FAULT_ECHO_LINK_DOWN
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Determine link status
|
||||
*/
|
||||
int miiphy_link(const char *devname, unsigned char addr)
|
||||
{
|
||||
unsigned short reg;
|
||||
|
||||
/* dummy read; needed to latch some phys */
|
||||
(void)miiphy_read(devname, addr, MII_BMSR, ®);
|
||||
if (miiphy_read(devname, addr, MII_BMSR, ®)) {
|
||||
puts("MII_BMSR read failed, assuming no link\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Determine if a link is active */
|
||||
if ((reg & BMSR_LSTATUS) != 0) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user