Skip to contentSkip to conversation

Marvell GbE multiple SoC support

PATCH Superseded Albert Aribaud 3 participants 8 messages Jul 12, 2010 – Jul 13, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v4 cover Marvell GbE multiple SoC support

NOTES

1) This patchset will only apply above a previously posted and Acked-by patch available on the mailing list archives e.g. at:
<http://lists.denx.de/pipermail/u-boot/2010-July/073590.html>
("kirkwood_egiga: updates: fix DRAM mapping and typo").

2) This patchset will build for edminiv2 but requires a bugfix patch, also Acked-by and available on archives as well at e.g.
<http://lists.denx.de/pipermail/u-boot/2010-July/073789.html>
("kirkwood_egiga: bugfix: add DMA sequence points").

3) This patchset will only apply above a previously posted, not yet Acked-by patch available on the mailing list archives e.g. at:
<http://lists.denx.de/pipermail/u-boot/2010-July/073838.html>
("kirkwood_egiga: CONFIG_SKIP_LOCAL_MAC_RANDOMIZATION").

PATCHSET HISTORY

V1: First submission.
V2: Reorganization as per Prafulla Wadasakar's suggestion.
Used -C in format-patch to render renames correctly. Removal of DRAM patch posted standalone. Removal of unrelated changes.
V3: Removal of DMA bugfix patch posted standalone
Introduced MAC non-randomization config option Added short description to each patch.
V4: Renaming of mv_egiga to mvgbe throughout.
Removal of MAC non-randomization patch posted standalone. Removal of unrelated edminiv2 changes.
Move of MAX_MVGBE_DEVS from driver to SoC files.

SHORT STORY

This patchset separates the Marvell Gigabit Ethernet (mvgbe) from kirkwood, adds orion5x support in mvgbe, and adds mvgbe support in edminiv2. It has been successfully tested on an OpenRD-Client after each of the four commits and on an EDMini V2 after the last commit; it has been run through checkpatch.pl, with 6 false-positive errors on patch 2 and 1 on patch 4.

LONG STORY

This is a set of four atomic commits.

the first commit renames kirkwood_egiga.[ch] to mvgbe.[ch] in drivers/net/ (also modifies Makefile) to make sur the renaming remains visible in git at 100% similarity.

The second commit removes all dependency of mvgbe on kirkwood. Kirkwood references in all mvgbe symbols are replaced with mvgbe references throughout the source tree. Some cosmetic changes have also been made to minimize checkpatch errors (although 6 false- positives remain).

The third commit adds orion5x support to mvgbe.

The fourth commit adds edminiv2 support for the orion5x GbE controller.

Prior to submission, all commits have been tested on a kirkwood-based OpenRD-Client for regression avoidance, and the last commit has been tested on an orion5x-based ED Mini V2 for functionality validation.

Also, all patches were run through checkpatch.pl --no-tree; there are 6 errors emitted for patch 2, and 1 for patch 4, all corresponding to the same line: in all config files involved, checkpatch.pl erroneously considers "#define CONFIG_MVGBE_PORTS {...}" as a macro expanding to statements whereas it actually expands to an array initializer.

Albert Aribaud (4):
net: rename: kirkwood_egiga as mvgbe
mvgbe: support SoCs other than kirkwood
mvgbe: add support for orion5x GbE controller
edminiv2: add ethernet support

 arch/arm/cpu/arm926ejs/kirkwood/cpu.c         |    4 +-
 arch/arm/cpu/arm926ejs/orion5x/cpu.c          |    8 +
 arch/arm/include/asm/arch-kirkwood/kirkwood.h |    5 +
 arch/arm/include/asm/arch-orion5x/orion5x.h   |    4 +
 board/LaCie/edminiv2/edminiv2.c               |   36 ++
 board/LaCie/edminiv2/edminiv2.h               |   41 ++
 drivers/net/Makefile                          |    2 +-
 drivers/net/kirkwood_egiga.h                  |  505 -------------------------
 drivers/net/{kirkwood_egiga.c => mvgbe.c}     |  350 +++++++++--------
 drivers/net/mvgbe.h                           |  505 +++++++++++++++++++++++++
 include/configs/edminiv2.h                    |   19 +-
 include/configs/guruplug.h                    |    4 +-
 include/configs/km_arm.h                      |    4 +-
 include/configs/mv88f6281gtw_ge.h             |    4 +-
 include/configs/openrd_base.h                 |    4 +-
 include/configs/rd6281a.h                     |    4 +-
 include/configs/sheevaplug.h                  |    4 +-
 include/netdev.h                              |    2 +-
 18 files changed, 815 insertions(+), 690 deletions(-)
 create mode 100644 board/LaCie/edminiv2/edminiv2.h
 delete mode 100644 drivers/net/kirkwood_egiga.h
 rename drivers/net/{kirkwood_egiga.c => mvgbe.c} (63%)
 create mode 100644 drivers/net/mvgbe.h
#1 lore raw

PATCH v4 1/4 net: rename: kirkwood_egiga as mvgbe

Rename kirkwood_egiga.* to mvgbe.* and adjust makefile and #include accordingly.

---
 drivers/net/Makefile                      |    2 +-
 drivers/net/{kirkwood_egiga.c => mvgbe.c} |    2 +-
 drivers/net/{kirkwood_egiga.h => mvgbe.h} |    0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename drivers/net/{kirkwood_egiga.c => mvgbe.c} (99%)
 rename drivers/net/{kirkwood_egiga.h => mvgbe.h} (100%)
drivers/net/Makefile +1 -1
index b75c02f..5d2da59 100644
@@ -46,13 +46,13 @@ COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o mcfmii.o
 COBJS-$(CONFIG_FTMAC100) += ftmac100.o
 COBJS-$(CONFIG_GRETH) += greth.o
 COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o
-COBJS-$(CONFIG_KIRKWOOD_EGIGA) += kirkwood_egiga.o
 COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o
 COBJS-$(CONFIG_LAN91C96) += lan91c96.o
 COBJS-$(CONFIG_MACB) += macb.o
 COBJS-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o
 COBJS-$(CONFIG_MPC5xxx_FEC) += mpc5xxx_fec.o
 COBJS-$(CONFIG_MPC512x_FEC) += mpc512x_fec.o
+COBJS-$(CONFIG_KIRKWOOD_EGIGA) += mvgbe.o
 COBJS-$(CONFIG_NATSEMI) += natsemi.o
 COBJS-$(CONFIG_DRIVER_NE2000) += ne2000.o ne2000_base.o
 COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o ne2000_base.o
drivers/net/mvgbe.c renamed from drivers/net/kirkwood_egiga.c +1 -1
similarity index 99%
rename from drivers/net/kirkwood_egiga.c
rename to drivers/net/mvgbe.c
index 7aabcef..1efca1e 100644
@@ -36,7 +36,7 @@
 #include <asm/types.h>
 #include <asm/byteorder.h>
 #include <asm/arch/kirkwood.h>
-#include "kirkwood_egiga.h"
+#include "mvgbe.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
drivers/net/mvgbe.h renamed from drivers/net/kirkwood_egiga.h +0 -0
similarity index 100%
rename from drivers/net/kirkwood_egiga.h
rename to drivers/net/mvgbe.h
Signature · 1 line
1.6.4.4
#2 lore raw

PATCH v4 2/4 mvgbe: support SoCs other than kirkwood

Rename all references to kirkwood in mvgbe symbols throughout the whole codebase.

---
 arch/arm/cpu/arm926ejs/kirkwood/cpu.c         |    4 +-
 arch/arm/include/asm/arch-kirkwood/kirkwood.h |    3 +
 drivers/net/Makefile                          |    2 +-
 drivers/net/mvgbe.c                           |  346 ++++++++++---------
 drivers/net/mvgbe.h                           |  474 +++++++++++++------------
 include/configs/guruplug.h                    |    4 +-
 include/configs/km_arm.h                      |    4 +-
 include/configs/mv88f6281gtw_ge.h             |    4 +-
 include/configs/openrd_base.h                 |    4 +-
 include/configs/rd6281a.h                     |    4 +-
 include/configs/sheevaplug.h                  |    4 +-
 include/netdev.h                              |    2 +-
 12 files changed, 439 insertions(+), 416 deletions(-)
arch/arm/cpu/arm926ejs/kirkwood/cpu.c +2 -2
index 6fc3902..c63e864 100644
@@ -378,10 +378,10 @@ int arch_misc_init(void)
 }
 #endif /* CONFIG_ARCH_MISC_INIT */
 
-#ifdef CONFIG_KIRKWOOD_EGIGA
+#ifdef CONFIG_MVGBE
 int cpu_eth_init(bd_t *bis)
 {
-	kirkwood_egiga_initialize(bis);
+	mvgbe_initialize(bis);
 	return 0;
 }
 #endif
arch/arm/include/asm/arch-kirkwood/kirkwood.h +3 -0
index 2470efb..5c2586b 100644
@@ -60,6 +60,9 @@
 #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
+
 #if defined (CONFIG_KW88F6281)
 #include <asm/arch/kw88f6281.h>
 #elif defined (CONFIG_KW88F6192)
drivers/net/Makefile +1 -1
index 5d2da59..789af83 100644
@@ -52,7 +52,7 @@ COBJS-$(CONFIG_MACB) += macb.o
 COBJS-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o
 COBJS-$(CONFIG_MPC5xxx_FEC) += mpc5xxx_fec.o
 COBJS-$(CONFIG_MPC512x_FEC) += mpc512x_fec.o
-COBJS-$(CONFIG_KIRKWOOD_EGIGA) += mvgbe.o
+COBJS-$(CONFIG_MVGBE) += mvgbe.o
 COBJS-$(CONFIG_NATSEMI) += natsemi.o
 COBJS-$(CONFIG_DRIVER_NE2000) += ne2000.o ne2000_base.o
 COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o ne2000_base.o
drivers/net/mvgbe.c +182 -164

703 lines not on this page · raw message

drivers/net/mvgbe.h +238 -236

597 lines not on this page · raw message

include/configs/guruplug.h +2 -2
index 2fbc6ad..eb3fa57 100644
@@ -172,9 +172,9 @@
 #define CONFIG_NET_MULTI	/* specify more that one ports available */
 #define CONFIG_MII		/* expose smi ove miiphy interface */
 #define CONFIG_CMD_MII
-#define CONFIG_KIRKWOOD_EGIGA	/* Enable kirkwood Gbe Controller Driver */
+#define CONFIG_MVGBE		/* Enable Marvell Gbe Controller Driver */
 #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN	/* detect link using phy */
-#define CONFIG_KIRKWOOD_EGIGA_PORTS	{1,1}	/* enable both ports */
+#define CONFIG_MVGBE_PORTS	{1, 1}	/* enable both ports */
 #define CONFIG_PHY_BASE_ADR	0
 #define CONFIG_ENV_OVERWRITE	/* ethaddr can be reprogrammed */
 #define CONFIG_RESET_PHY_R	/* use reset_phy() to init mv88e1121 PHY */
include/configs/km_arm.h +2 -2
index a928c2c..6519c90 100644
@@ -127,9 +127,9 @@
 #define CONFIG_NETCONSOLE	/* include NetConsole support   */
 #define CONFIG_NET_MULTI	/* specify more that one ports available */
 #define CONFIG_MII		/* expose smi ove miiphy interface */
-#define CONFIG_KIRKWOOD_EGIGA	/* Enable kirkwood Gbe Controller Driver */
+#define CONFIG_MVGBE		/* Enable Marvell Gbe Controller Driver */
 #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN	/* detect link using phy */
-#define CONFIG_KIRKWOOD_EGIGA_PORTS	{1,0}	/* enable port 0 only */
+#define CONFIG_MVGBE_PORTS	{1, 0}	/* enable port 0 only */
 #define CONFIG_PHY_BASE_ADR	0
 #define CONFIG_ENV_OVERWRITE	/* ethaddr can be reprogrammed */
 #define CONFIG_RESET_PHY_R	/* use reset_phy() to init 88E1118 PHY */
include/configs/mv88f6281gtw_ge.h +2 -2
index 96b4d1c..9ef03a6 100644
@@ -172,9 +172,9 @@
 #define CONFIG_NETCONSOLE	/* include NetConsole support   */
 #define CONFIG_NET_MULTI	/* specify more that one ports available */
 #define	CONFIG_MII		/* expose smi ove miiphy interface */
-#define CONFIG_KIRKWOOD_EGIGA	/* Enable kirkwood Gbe Controller Driver */
+#define CONFIG_MVGBE		/* Enable Marvell Gbe Controller Driver */
 #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN	/* detect link using phy */
-#define CONFIG_KIRKWOOD_EGIGA_PORTS	{1,0}	/* enable port 0 only */
+#define CONFIG_MVGBE_PORTS	{1, 0}	/* enable port 0 only */
 #define CONFIG_ENV_OVERWRITE	/* ethaddr can be reprogrammed */
 #endif /* CONFIG_CMD_NET */
 
include/configs/openrd_base.h +2 -2
index d2f4502..52fa73d 100644
@@ -183,9 +183,9 @@
 #define CONFIG_NETCONSOLE	/* include NetConsole support   */
 #define CONFIG_NET_MULTI	/* specify more that one ports available */
 #define	CONFIG_MII		/* expose smi ove miiphy interface */
-#define CONFIG_KIRKWOOD_EGIGA	/* Enable kirkwood Gbe Controller Driver */
+#define CONFIG_MVGBE		/* Enable Marvell Gbe Controller Driver */
 #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN	/* detect link using phy */
-#define CONFIG_KIRKWOOD_EGIGA_PORTS	{1,0}	/* enable port 0 only */
+#define CONFIG_MVGBE_PORTS	{1, 0}	/* enable port 0 only */
 #define CONFIG_PHY_BASE_ADR	0x8
 #define CONFIG_ENV_OVERWRITE	/* ethaddr can be reprogrammed */
 #define CONFIG_RESET_PHY_R	/* use reset_phy() to init mv8831116 PHY */
include/configs/rd6281a.h +2 -2
index 3d8e25c..5857301 100644
@@ -171,8 +171,8 @@
 #define CONFIG_NETCONSOLE	/* include NetConsole support */
 #define CONFIG_NET_MULTI	/* specify more that one ports available */
 #define CONFIG_MII		/* expose smi ove miiphy interface */
-#define CONFIG_KIRKWOOD_EGIGA	/* Enable kirkwood Gbe Controller Driver */
-#define CONFIG_KIRKWOOD_EGIGA_PORTS	{1,1}	/* enable both ports */
+#define CONFIG_MVGBE		/* Enable Marvell Gbe Controller Driver */
+#define CONFIG_MVGBE_PORTS	{1, 1}	/* enable both ports */
 #define CONFIG_MV88E61XX_MULTICHIP_ADRMODE
 #define CONFIG_DIS_AUTO_NEG_SPEED_GMII /*Disable Auto speed negociation */
 #define CONFIG_PHY_SPEED	_1000BASET	/*Force PHYspeed to 1GBPs */
include/configs/sheevaplug.h +2 -2
index e9edc44..c5de86e 100644
@@ -174,9 +174,9 @@
 #define CONFIG_NETCONSOLE	/* include NetConsole support   */
 #define CONFIG_NET_MULTI	/* specify more that one ports available */
 #define	CONFIG_MII		/* expose smi ove miiphy interface */
-#define CONFIG_KIRKWOOD_EGIGA	/* Enable kirkwood Gbe Controller Driver */
+#define CONFIG_MVGBE		/* Enable Marvell Gbe Controller Driver */
 #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN	/* detect link using phy */
-#define CONFIG_KIRKWOOD_EGIGA_PORTS	{1,0}	/* enable port 0 only */
+#define CONFIG_MVGBE_PORTS	{1, 0}	/* enable port 0 only */
 #define CONFIG_PHY_BASE_ADR	0
 #define CONFIG_ENV_OVERWRITE	/* ethaddr can be reprogrammed */
 #define CONFIG_RESET_PHY_R	/* use reset_phy() to init mv8831116 PHY */
include/netdev.h +1 -1
index 882642a..7866c67 100644
@@ -61,7 +61,6 @@ int ftmac100_initialize(bd_t *bits);
 int greth_initialize(bd_t *bis);
 void gt6426x_eth_initialize(bd_t *bis);
 int inca_switch_initialize(bd_t *bis);
-int kirkwood_egiga_initialize(bd_t *bis);
 int lan91c96_initialize(u8 dev_num, int base_addr);
 int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
 int mcdmafec_initialize(bd_t *bis);
@@ -70,6 +69,7 @@ int mpc512x_fec_initialize(bd_t *bis);
 int mpc5xxx_fec_initialize(bd_t *bis);
 int mpc8220_fec_initialize(bd_t *bis);
 int mpc82xx_scc_enet_initialize(bd_t *bis);
+int mvgbe_initialize(bd_t *bis);
 int natsemi_initialize(bd_t *bis);
 int npe_initialize(bd_t *bis);
 int ns8382x_initialize(bd_t *bis);
Signature · 1 line
1.6.4.4
#3 lore raw

PATCH v4 3/4 mvgbe: add support for orion5x GbE controller

Add definitions and initialization in orion5x for mvgbe. Add orion5x in mvgbe SoC includes.

---
 arch/arm/cpu/arm926ejs/orion5x/cpu.c          |    8 ++++++++
 arch/arm/include/asm/arch-kirkwood/kirkwood.h |    6 ++++--
 arch/arm/include/asm/arch-orion5x/orion5x.h   |    4 ++++
 drivers/net/mvgbe.c                           |    2 ++
 drivers/net/mvgbe.h                           |    2 --
 5 files changed, 18 insertions(+), 4 deletions(-)
arch/arm/cpu/arm926ejs/orion5x/cpu.c +8 -0
index 03c6d06..f3c1e21 100644
@@ -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
arch/arm/include/asm/arch-kirkwood/kirkwood.h +4 -2
index 5c2586b..9edb0be 100644
@@ -60,8 +60,10 @@
 #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>
arch/arm/include/asm/arch-orion5x/orion5x.h +4 -0
index 4008c84..d257b66 100644
@@ -56,6 +56,10 @@
 #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
drivers/net/mvgbe.c +2 -0
index e44352c..cad4023 100644
@@ -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"
drivers/net/mvgbe.h +0 -2
index 7db5af4..3de98d0 100644
@@ -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
Signature · 1 line
1.6.4.4
#4 lore raw

PATCH v4 4/4 edminiv2: add ethernet support

Add edminiv2 board support for mv_egiga.
Add edminiv2 config to enable mv_egiga.

---
 board/LaCie/edminiv2/edminiv2.c |   36 ++++++++++++++++++++++++++++++++++
 board/LaCie/edminiv2/edminiv2.h |   41 +++++++++++++++++++++++++++++++++++++++
 include/configs/edminiv2.h      |   19 ++++++++++++++---
 3 files changed, 92 insertions(+), 4 deletions(-)
 create mode 100644 board/LaCie/edminiv2/edminiv2.h
board/LaCie/edminiv2/edminiv2.c +36 -0
index 54c0ffe..bb388ed 100644
@@ -27,6 +27,7 @@
 #include <common.h>
 #include <miiphy.h>
 #include <asm/arch/orion5x.h>
+#include "edminiv2.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -90,3 +91,38 @@ int board_init(void)
 
 	return 0;
 }
+
+#if defined(CONFIG_CMD_NET) && defined(CONFIG_RESET_PHY_R)
+/* Configure and enable MV88E1116 PHY */
+void reset_phy(void)
+{
+	u16 reg;
+	u16 devadr;
+	char *name = "egiga0";
+
+	if (miiphy_set_current_dev(name))
+		return;
+
+	/* command to read PHY dev address */
+	if (miiphy_read(name, 0xEE, 0xEE, (u16 *) &devadr)) {
+		printf("Err..%s could not read PHY dev address\n",
+			__func__);
+		return;
+	}
+
+	/*
+	 * Enable RGMII delay on Tx and Rx for CPU port
+	 * Ref: sec 4.7.2 of chip datasheet
+	 */
+	miiphy_write(name, devadr, MV88E1116_PGADR_REG, 2);
+	miiphy_read(name, devadr, MV88E1116_MAC_CTRL_REG, &reg);
+	reg |= (MV88E1116_RGMII_RXTM_CTRL | MV88E1116_RGMII_TXTM_CTRL);
+	miiphy_write(name, devadr, MV88E1116_MAC_CTRL_REG, reg);
+	miiphy_write(name, devadr, MV88E1116_PGADR_REG, 0);
+
+	/* reset the phy */
+	miiphy_reset(name, devadr);
+
+	printf("88E1116 Initialized on %s\n", name);
+}
+#endif /* CONFIG_RESET_PHY_R */
board/LaCie/edminiv2/edminiv2.h new file +41 -0

41 lines not on this page · raw message

include/configs/edminiv2.h +15 -4
index c3d95a0..055931c 100644
@@ -131,12 +131,23 @@
  * Commands configuration - using default command set for now
  */
 #include <config_cmd_default.h>
+
 /*
- * Disabling some default commands for staggered bring-up
+ * Network
  */
-#undef CONFIG_CMD_BOOTD	/* no bootd since no net */
-#undef CONFIG_CMD_NET	/* no net since no eth */
-#undef CONFIG_CMD_NFS	/* no NFS since no net */
+
+#ifdef CONFIG_CMD_NET
+#define CONFIG_MVGBE				/* Enable Marvell GbE Driver */
+#define CONFIG_MVGBE_PORTS	{1}		/* enable port 0 only */
+#define CONFIG_SKIP_LOCAL_MAC_RANDOMIZATION	/* don't randomize MAC */
+#define CONFIG_PHY_BASE_ADR	0x8
+#define CONFIG_RESET_PHY_R	/* use reset_phy() to init mv8831116 PHY */
+#define CONFIG_NETCONSOLE	/* include NetConsole support   */
+#define CONFIG_NET_MULTI	/* specify more that one ports available */
+#define	CONFIG_MII		/* expose smi ove miiphy interface */
+#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN	/* detect link using phy */
+#define CONFIG_ENV_OVERWRITE	/* ethaddr can be reprogrammed */
+#endif
 
 /*
  *  Environment variables configurations
Signature · 1 line
1.6.4.4
#5 lore raw

v4 cover Marvell GbE multiple SoC support

In reply to Albert Aribaud
Quoted 103 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Albert Aribaud
Sent: Tuesday, July 13, 2010 1:54 AM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH V4 0/4] Marvell GbE multiple SoC support

NOTES

1) This patchset will only apply above a previously posted and Acked-by patch available on the mailing list archives e.g. at:
<http://lists.denx.de/pipermail/u-boot/2010-July/073590.html>
("kirkwood_egiga: updates: fix DRAM mapping and typo").

2) This patchset will build for edminiv2 but requires a bugfix patch, also Acked-by and available on archives as well at e.g.
<http://lists.denx.de/pipermail/u-boot/2010-July/073789.html>
("kirkwood_egiga: bugfix: add DMA sequence points").

3) This patchset will only apply above a previously posted, not yet Acked-by patch available on the mailing list archives e.g. at:
<http://lists.denx.de/pipermail/u-boot/2010-July/073838.html>
("kirkwood_egiga: CONFIG_SKIP_LOCAL_MAC_RANDOMIZATION").

PATCHSET HISTORY

V1: First submission.
V2: Reorganization as per Prafulla Wadasakar's suggestion.
Used -C in format-patch to render renames correctly. Removal of DRAM patch posted standalone. Removal of unrelated changes.
V3: Removal of DMA bugfix patch posted standalone
Introduced MAC non-randomization config option Added short description to each patch.
V4: Renaming of mv_egiga to mvgbe throughout.
Removal of MAC non-randomization patch posted standalone. Removal of unrelated edminiv2 changes.
Move of MAX_MVGBE_DEVS from driver to SoC files.

SHORT STORY

This patchset separates the Marvell Gigabit Ethernet (mvgbe) from kirkwood, adds orion5x support in mvgbe, and adds mvgbe support in edminiv2. It has been successfully tested on an OpenRD-Client after each of the four commits and on an EDMini V2 after the last commit; it has been run through checkpatch.pl, with 6 false-positive errors on patch 2 and 1 on patch 4.

LONG STORY

This is a set of four atomic commits.

the first commit renames kirkwood_egiga.[ch] to mvgbe.[ch] in drivers/net/ (also modifies Makefile) to make sur the renaming remains visible in git at 100% similarity.

The second commit removes all dependency of mvgbe on kirkwood. Kirkwood references in all mvgbe symbols are replaced with mvgbe references throughout the source tree. Some cosmetic changes have also been made to minimize checkpatch errors (although 6 false- positives remain).

The third commit adds orion5x support to mvgbe.

The fourth commit adds edminiv2 support for the orion5x GbE controller.

Prior to submission, all commits have been tested on a kirkwood-based OpenRD-Client for regression avoidance, and the last commit has been tested on an orion5x-based ED Mini V2 for functionality validation.

Also, all patches were run through checkpatch.pl --no-tree; there are 6 errors emitted for patch 2, and 1 for patch 4, all corresponding to the same line: in all config files involved, checkpatch.pl erroneously considers "#define CONFIG_MVGBE_PORTS {...}" as a macro expanding to statements whereas it actually expands to an array initializer.

Albert Aribaud (4):
net: rename: kirkwood_egiga as mvgbe
mvgbe: support SoCs other than kirkwood
mvgbe: add support for orion5x GbE controller
edminiv2: add ethernet support

 arch/arm/cpu/arm926ejs/kirkwood/cpu.c         |    4 +-
 arch/arm/cpu/arm926ejs/orion5x/cpu.c          |    8 +
 arch/arm/include/asm/arch-kirkwood/kirkwood.h |    5 +
 arch/arm/include/asm/arch-orion5x/orion5x.h   |    4 +
 board/LaCie/edminiv2/edminiv2.c               |   36 ++
 board/LaCie/edminiv2/edminiv2.h               |   41 ++
 drivers/net/Makefile                          |    2 +-
 drivers/net/kirkwood_egiga.h                  |  505 
-------------------------
 drivers/net/{kirkwood_egiga.c => mvgbe.c}     |  350 
+++++++++--------
 drivers/net/mvgbe.h                           |  505 
+++++++++++++++++++++++++
 include/configs/edminiv2.h                    |   19 +-
 include/configs/guruplug.h                    |    4 +-
 include/configs/km_arm.h                      |    4 +-
 include/configs/mv88f6281gtw_ge.h             |    4 +-
 include/configs/openrd_base.h                 |    4 +-
Quoted 9 lines
 include/configs/rd6281a.h                     |    4 +-
 include/configs/sheevaplug.h                  |    4 +-
 include/netdev.h                              |    2 +-
 18 files changed, 815 insertions(+), 690 deletions(-)
 create mode 100644 board/LaCie/edminiv2/edminiv2.h
 delete mode 100644 drivers/net/kirkwood_egiga.h
 rename drivers/net/{kirkwood_egiga.c => mvgbe.c} (63%)
 create mode 100644 drivers/net/mvgbe.h

Regards..
Prafulla . .

#6 lore raw

v4 cover Marvell GbE multiple SoC support

In reply to Albert Aribaud

Hi Albert,

Quoted 19 lines · Albert Aribaud

NOTES

1) This patchset will only apply above a previously posted and Acked-by patch available on the mailing list archives e.g. at:
<http://lists.denx.de/pipermail/u-boot/2010-July/073590.html>
("kirkwood_egiga: updates: fix DRAM mapping and typo").

2) This patchset will build for edminiv2 but requires a bugfix patch, also Acked-by and available on archives as well at e.g.
<http://lists.denx.de/pipermail/u-boot/2010-July/073789.html>
("kirkwood_egiga: bugfix: add DMA sequence points").

3) This patchset will only apply above a previously posted, not yet Acked-by patch available on the mailing list archives e.g. at:
<http://lists.denx.de/pipermail/u-boot/2010-July/073838.html>
("kirkwood_egiga: CONFIG_SKIP_LOCAL_MAC_RANDOMIZATION").

PATCHSET HISTORY

Quoted 12 lines

V1: First submission.
V2: Reorganization as per Prafulla Wadasakar's suggestion.
Used -C in format-patch to render renames correctly. Removal of DRAM patch posted standalone. Removal of unrelated changes.
V3: Removal of DMA bugfix patch posted standalone
Introduced MAC non-randomization config option Added short description to each patch.
V4: Renaming of mv_egiga to mvgbe throughout.
Removal of MAC non-randomization patch posted standalone. Removal of unrelated edminiv2 changes.
Move of MAX_MVGBE_DEVS from driver to SoC files.

Patchset v4 has been applied to net repo.

thanks,
Ben

#7 lore raw

v4 cover Marvell GbE multiple SoC support

Le 13/07/2010 08:05, Prafulla Wadaskar a ?crit :

Quoted 1 line

Le 13/07/2010 08:46, Ben Warren a ?crit :

Quoted 1 line

Patchset v4 has been applied to net repo.

Thanks to both of you.

Amicalement,

Signature · 1 line
Albert.