diff options
| author | Quentin Schulz <[email protected]> | 2025-11-19 17:43:48 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-12-05 10:34:52 -0600 |
| commit | 715107089fb8823a4419f3a3bf2f26816450324c (patch) | |
| tree | a0919f157498cd1d160ee873801e021008be00e7 /common | |
| parent | 914acbdba3c128a035da4ab371efef1e91cebdfe (diff) | |
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 <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'common')
| -rw-r--r-- | common/miiphyutil.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/common/miiphyutil.c b/common/miiphyutil.c index 274e88a4921..dd4cc3c2e4e 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -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 |
