]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mvgbe: add support for orion5x GbE controller
authorAlbert Aribaud <albert.aribaud@free.fr>
Mon, 12 Jul 2010 20:24:29 +0000 (22:24 +0200)
committerBen Warren <biggerbadderben@gmail.com>
Tue, 13 Jul 2010 06:40:31 +0000 (23:40 -0700)
Add definitions and initialization in orion5x for mvgbe.
Add orion5x in mvgbe SoC includes.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
arch/arm/cpu/arm926ejs/orion5x/cpu.c
arch/arm/include/asm/arch-kirkwood/kirkwood.h
arch/arm/include/asm/arch-orion5x/orion5x.h
drivers/net/mvgbe.c
drivers/net/mvgbe.h

index 03c6d0677c77de0b7157baf0e9153fa50b1fb3da..f3c1e2192e765c766cc9a66a343156c01bc05660 100644 (file)
@@ -268,3 +268,11 @@ int arch_misc_init(void)
        return 0;
 }
 #endif /* CONFIG_ARCH_MISC_INIT */
+
+#ifdef CONFIG_MVGBE
+int cpu_eth_init(bd_t *bis)
+{
+       mvgbe_initialize(bis);
+       return 0;
+}
+#endif
index 5c2586be43fc0874c3657a784dad09153d2f180d..9edb0be5f5294b6e1b1225d2b6a4b4a118703e78 100644 (file)
 #define KW_EGIGA0_BASE                 (KW_REGISTER(0x72000))
 #define KW_EGIGA1_BASE                 (KW_REGISTER(0x76000))
 
-#define MVGBE0_BASE                    KW_EGIGA0_BASE
-#define MVGBE1_BASE                    KW_EGIGA1_BASE
+/* Kirkwood GbE controller has two ports */
+#define MAX_MVGBE_DEVS 2
+#define MVGBE0_BASE    KW_EGIGA0_BASE
+#define MVGBE1_BASE    KW_EGIGA1_BASE
 
 #if defined (CONFIG_KW88F6281)
 #include <asm/arch/kw88f6281.h>
index 4008c842dffc659f8ad243d07b6f8edda3515f72..d257b66581d948a9e042c4e45960c40fadfe88b1 100644 (file)
 #define ORION5X_USB20_PORT1_BASE               (ORION5X_REGISTER(0xA0000))
 #define ORION5X_EGIGA_BASE                     (ORION5X_REGISTER(0x72000))
 
+/* Orion5x GbE controller has a single port */
+#define MAX_MVGBE_DEVS 1
+#define MVGBE0_BASE    ORION5X_EGIGA_BASE
+
 #define CONFIG_MAX_RAM_BANK_SIZE               (64*1024*1024)
 
 /* include here SoC variants. 5181, 5281, 6183 should go here when
index e44352c676537cbab7c1d89024665e8a70a6434f..cad40237c9337d7628bbb780dfeff50c905a9756 100644 (file)
@@ -38,6 +38,8 @@
 
 #if defined(CONFIG_KIRKWOOD)
 #include <asm/arch/kirkwood.h>
+#elif defined(CONFIG_ORION5X)
+#include <asm/arch/orion5x.h>
 #endif
 
 #include "mvgbe.h"
index 7db5af450e292ba7ea5a6ae38d02a42ddacc027c..3de98d01bd9dc44434b669c716765c76c6f22856 100644 (file)
@@ -28,8 +28,6 @@
 #ifndef __MVGBE_H__
 #define __MVGBE_H__
 
-#define MAX_MVGBE_DEVS 2       /*controller has two ports */
-
 /* PHY_BASE_ADR is board specific and can be configured */
 #if defined (CONFIG_PHY_BASE_ADR)
 #define PHY_BASE_ADR           CONFIG_PHY_BASE_ADR