[U-Boot] [PATCH v2 5/5] arm: pxa: init ethaddr for LP-8x4x using DT
Sergei Ianovich
ynvich at gmail.com
Tue Dec 17 02:03:44 CET 2013
When DT define aliases for etherner0 and ethernet1, U-Boot
automatically patched MAC addresses using ethaddr and eth1addr
environment variables respectively.
Custom initialization is no longer needed.
Signed-off-by: Sergei Ianovich <ynvich at gmail.com>
CC: Marek Vasut <marex at denx.de>
---
Changes v1..v2
* use alias instead of manual updating as suggested by Marek Vasut
board/icpdas/lp8x4x/lp8x4x.c | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/board/icpdas/lp8x4x/lp8x4x.c b/board/icpdas/lp8x4x/lp8x4x.c
index 0888960..a7a2e21 100644
--- a/board/icpdas/lp8x4x/lp8x4x.c
+++ b/board/icpdas/lp8x4x/lp8x4x.c
@@ -114,25 +114,8 @@ int usb_board_stop(void)
#endif
#ifdef CONFIG_DRIVER_DM9000
-void lp8x4x_eth1_mac_init(void)
-{
- u8 eth1addr[8];
- int i;
- u8 reg;
-
- eth_getenv_enetaddr_by_index("eth", 1, eth1addr);
- if (!is_valid_ether_addr(eth1addr))
- return;
-
- for (i = 0, reg = 0x10; i < 6; i++, reg++) {
- writeb(reg, (u8 *)(DM9000_IO_2));
- writeb(eth1addr[i], (u8 *)(DM9000_DATA_2));
- }
-}
-
int board_eth_init(bd_t *bis)
{
- lp8x4x_eth1_mac_init();
return dm9000_initialize(bis);
}
#endif
--
1.8.5.1
More information about the U-Boot
mailing list