summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/miiphyutil.c25
-rw-r--r--include/miiphy.h3
-rw-r--r--net/Kconfig11
-rw-r--r--net/net.c35
4 files changed, 0 insertions, 74 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, &reg);
- if (miiphy_read(devname, addr, MII_BMSR, &reg)) {
- 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
diff --git a/include/miiphy.h b/include/miiphy.h
index 96afe5f4030..817d77add37 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -29,9 +29,6 @@ int miiphy_reset(const char *devname, unsigned char addr);
int miiphy_speed(const char *devname, unsigned char addr);
int miiphy_duplex(const char *devname, unsigned char addr);
int miiphy_is_1000base_x(const char *devname, unsigned char addr);
-#ifdef CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-int miiphy_link(const char *devname, unsigned char addr);
-#endif
int miiphy_set_current_dev(const char *devname);
const char *miiphy_get_current_dev(void);
diff --git a/net/Kconfig b/net/Kconfig
index 42fcba5323f..e45ceb25106 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -53,17 +53,6 @@ config NET_MAXDEFRAG
used for reassembly, and thus an upper bound for the size of
IP datagrams that can be received.
-config SYS_FAULT_ECHO_LINK_DOWN
- bool "Echo the inverted Ethernet link state to the fault LED"
- help
- Echo the inverted Ethernet link state to the fault LED. Note, if
- this option is active, then CONFIG_SYS_FAULT_MII_ADDR also needs to
- be configured.
-
-config SYS_FAULT_MII_ADDR
- hex "MII address of the PHY to check for the Ethernet link state"
- depends on SYS_FAULT_ECHO_LINK_DOWN && LED_STATUS_RED_ENABLE
-
config TFTP_WINDOWSIZE
int "TFTP window size"
default 1
diff --git a/net/net.c b/net/net.c
index f579f6ac5bc..44ce0ba4011 100644
--- a/net/net.c
+++ b/net/net.c
@@ -88,15 +88,9 @@
#include <image.h>
#include <led.h>
#include <log.h>
-#if defined(CONFIG_LED_STATUS)
-#include <miiphy.h>
-#endif
#include <net.h>
#include <net6.h>
#include <ndisc.h>
-#if defined(CONFIG_LED_STATUS)
-#include <status_led.h>
-#endif
#include <watchdog.h>
#include <linux/compiler.h>
#include <net/fastboot_udp.h>
@@ -615,19 +609,6 @@ restart:
break;
}
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
-#if defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN) && \
- defined(CONFIG_LED_STATUS) && \
- defined(CONFIG_LED_STATUS_RED)
- /*
- * Echo the inverted link state to the fault LED.
- */
- if (miiphy_link(eth_get_dev()->name, CONFIG_SYS_FAULT_MII_ADDR))
- status_led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_OFF);
- else
- status_led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_ON);
-#endif /* CONFIG_SYS_FAULT_ECHO_LINK_DOWN, ... */
-#endif /* CONFIG_MII, ... */
#ifdef CONFIG_USB_KEYBOARD
net_busy_flag = 1;
#endif
@@ -688,22 +669,6 @@ restart:
((get_timer(0) - time_start) > time_delta)) {
thand_f *x;
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
-#if defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN) && \
- defined(CONFIG_LED_STATUS) && \
- defined(CONFIG_LED_STATUS_RED)
- /*
- * Echo the inverted link state to the fault LED.
- */
- if (miiphy_link(eth_get_dev()->name,
- CONFIG_SYS_FAULT_MII_ADDR))
- status_led_set(CONFIG_LED_STATUS_RED,
- CONFIG_LED_STATUS_OFF);
- else
- status_led_set(CONFIG_LED_STATUS_RED,
- CONFIG_LED_STATUS_ON);
-#endif /* CONFIG_SYS_FAULT_ECHO_LINK_DOWN, ... */
-#endif /* CONFIG_MII, ... */
debug_cond(DEBUG_INT_STATE, "--- net_loop timeout\n");
x = time_handler;
time_handler = (thand_f *)0;