summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSuriyan Ramasami <suriyan.r@gmail.com>2013-10-07 20:30:58 -0700
committerMarek Vasut <marex@denx.de>2013-10-20 23:42:40 +0200
commit98f686c26f99776fafca55dbff6eb24045fa4108 (patch)
tree8c746d15ad3452341e3356f3b14e9ccc750e00fc /drivers
parent16297cfb2a20c9d89834cd9e31edac5184a777a1 (diff)
downloadu-boot-imx-98f686c26f99776fafca55dbff6eb24045fa4108.zip
u-boot-imx-98f686c26f99776fafca55dbff6eb24045fa4108.tar.gz
u-boot-imx-98f686c26f99776fafca55dbff6eb24045fa4108.tar.bz2
usb:smsx95xx LED activity for USB net driver
Add LED activity for SMSX95XX USB Ether driver. Signed-off-by: “Suriyan Ramasami" <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/eth/smsc95xx.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index 15fd9a9..7bf0a34 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -14,6 +14,12 @@
/* SMSC LAN95xx based USB 2.0 Ethernet Devices */
+/* LED defines */
+#define LED_GPIO_CFG (0x24)
+#define LED_GPIO_CFG_SPD_LED (0x01000000)
+#define LED_GPIO_CFG_LNK_LED (0x00100000)
+#define LED_GPIO_CFG_FDX_LED (0x00010000)
+
/* Tx command words */
#define TX_CMD_A_FIRST_SEG_ 0x00002000
#define TX_CMD_A_LAST_SEG_ 0x00001000
@@ -591,6 +597,14 @@ static int smsc95xx_init(struct eth_device *eth, bd_t *bd)
return ret;
debug("ID_REV = 0x%08x\n", read_buf);
+ /* Configure GPIO pins as LED outputs */
+ write_buf = LED_GPIO_CFG_SPD_LED | LED_GPIO_CFG_LNK_LED |
+ LED_GPIO_CFG_FDX_LED;
+ ret = smsc95xx_write_reg(dev, LED_GPIO_CFG, write_buf);
+ if (ret < 0)
+ return ret;
+ debug("LED_GPIO_CFG set\n");
+
/* Init Tx */
write_buf = 0;
ret = smsc95xx_write_reg(dev, FLOW, write_buf);