[U-Boot] [PATCH V2 5/6] mv_egiga: add support for orion5x egiga controller

Albert Aribaud albert.aribaud at free.fr
Fri Jul 9 08:34:18 CEST 2010


Signed-off-by: Albert Aribaud <albert.aribaud at free.fr>
---
 arch/arm/cpu/arm926ejs/orion5x/cpu.c        |    8 ++++++++
 arch/arm/include/asm/arch-orion5x/orion5x.h |    5 +++++
 drivers/net/mv_egiga.c                      |    2 ++
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/orion5x/cpu.c b/arch/arm/cpu/arm926ejs/orion5x/cpu.c
index 03c6d06..fc9455e 100644
--- a/arch/arm/cpu/arm926ejs/orion5x/cpu.c
+++ b/arch/arm/cpu/arm926ejs/orion5x/cpu.c
@@ -268,3 +268,11 @@ int arch_misc_init(void)
 	return 0;
 }
 #endif /* CONFIG_ARCH_MISC_INIT */
+
+#ifdef CONFIG_MV_EGIGA
+int cpu_eth_init(bd_t *bis)
+{
+	mv_egiga_initialize(bis);
+	return 0;
+}
+#endif
diff --git a/arch/arm/include/asm/arch-orion5x/orion5x.h b/arch/arm/include/asm/arch-orion5x/orion5x.h
index 4008c84..6783b74 100644
--- a/arch/arm/include/asm/arch-orion5x/orion5x.h
+++ b/arch/arm/include/asm/arch-orion5x/orion5x.h
@@ -56,6 +56,11 @@
 #define ORION5X_USB20_PORT1_BASE		(ORION5X_REGISTER(0xA0000))
 #define ORION5X_EGIGA_BASE			(ORION5X_REGISTER(0x72000))
 
+/* Oron5x has one Marvell egiga controller */
+#if defined (CONFIG_MV_EGIGA)
+#define MV_EGIGA0_BASE				ORION5X_EGIGA_BASE
+#endif
+
 #define CONFIG_MAX_RAM_BANK_SIZE		(64*1024*1024)
 
 /* include here SoC variants. 5181, 5281, 6183 should go here when
diff --git a/drivers/net/mv_egiga.c b/drivers/net/mv_egiga.c
index 9db24ba..83741fe 100644
--- a/drivers/net/mv_egiga.c
+++ b/drivers/net/mv_egiga.c
@@ -38,6 +38,8 @@
 
 #if defined (CONFIG_KIRKWOOD)
 #include <asm/arch/kirkwood.h>
+#elif defined (CONFIG_ORION5X)
+#include <asm/arch/orion5x.h>
 #endif
 
 #include "mv_egiga.h"
-- 
1.6.4.4



More information about the U-Boot mailing list