Make it possible to enable just one of the two ethernet interfaces on
the ATSTK1000. This is necessary for LCD support since MACB1 conflicts
with the LCD controller.

Signed-off-by: Haavard Skinnemoen <[EMAIL PROTECTED]>
---
 board/atmel/atstk1000/atstk1000.c |    8 +++++++-
 include/configs/atstk1002.h       |    3 +++
 include/configs/atstk1006.h       |    3 +++
 3 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/board/atmel/atstk1000/atstk1000.c 
b/board/atmel/atstk1000/atstk1000.c
index 7be3993..31174d3 100644
--- a/board/atmel/atstk1000/atstk1000.c
+++ b/board/atmel/atstk1000/atstk1000.c
@@ -79,8 +79,10 @@ int board_early_init_f(void)
 
        portmux_enable_ebi(sdram_config.data_bits, 23, 0, PORTMUX_DRIVE_HIGH);
        portmux_enable_usart1(PORTMUX_DRIVE_MIN);
-#if defined(CONFIG_MACB)
+#if defined(CONFIG_ATSTK1000_MACB0)
        portmux_enable_macb0(PORTMUX_MACB_MII, PORTMUX_DRIVE_LOW);
+#endif
+#if defined(CONFIG_ATSTK1000_MACB1)
        portmux_enable_macb1(PORTMUX_MACB_MII, PORTMUX_DRIVE_LOW);
 #endif
 #if defined(CONFIG_MMC)
@@ -122,8 +124,12 @@ extern int macb_eth_initialize(int id, void *regs, 
unsigned int phy_addr);
 #ifdef CONFIG_CMD_NET
 int board_eth_init(bd_t *bi)
 {
+#ifdef CONFIG_ATSTK1000_MACB0
        macb_eth_initialize(0, (void *)MACB0_BASE, bi->bi_phy_id[0]);
+#endif
+#ifdef CONFIG_ATSTK1000_MACB1
        macb_eth_initialize(1, (void *)MACB1_BASE, bi->bi_phy_id[1]);
+#endif
        return 0;
 }
 #endif
diff --git a/include/configs/atstk1002.h b/include/configs/atstk1002.h
index 85cedb2..4509416 100644
--- a/include/configs/atstk1002.h
+++ b/include/configs/atstk1002.h
@@ -149,6 +149,9 @@
 
 #define CONFIG_ATMEL_USART             1
 #define CONFIG_MACB                    1
+/* Enable both MACs by default */
+#define CONFIG_ATSTK1000_MACB0         1
+#define CONFIG_ATSTK1000_MACB1         1
 #define CONFIG_PORTMUX_PIO             1
 #define CFG_NR_PIOS                    5
 #define CFG_HSDRAMC                    1
diff --git a/include/configs/atstk1006.h b/include/configs/atstk1006.h
index d4b2f12..8a6c044 100644
--- a/include/configs/atstk1006.h
+++ b/include/configs/atstk1006.h
@@ -149,6 +149,9 @@
 
 #define CONFIG_ATMEL_USART             1
 #define CONFIG_MACB                    1
+/* Enable both MACs by default */
+#define CONFIG_ATSTK1000_MACB0         1
+#define CONFIG_ATSTK1000_MACB1         1
 #define CONFIG_PORTMUX_PIO             1
 #define CFG_NR_PIOS                    5
 #define CFG_HSDRAMC                    1
-- 
1.5.6.3

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to