make egiga common to kirkwood and orion5x
Subsystems (2)
cover make egiga common to kirkwood and orion5x
Republishing the patchset as a submission as the RFC did not meet any comment so far.
SHORT STORY
This patchset separates egiga from kirkwood then adds orion5x support in egiga. It has been duly, and successfully, tested on an OpenRD-Client after each of the four commits and on an EDMini V2 after the last commit.
LONG STORY
This is a set of four atomic commits.
the first commit separates the file renames from the content changes so that the renaming remains visible in git at 100% similarity.
The second commit removes functional dependencies (calls to kirkwood functions from egiga; these were RAM base and size functions, actually accessible via the global gd variable, just like other drivers do).
The third commit deals with mostly cosmetic changes by removing any "KIRKWOOD", "KW", "kirkwood" or "kw" from egiga symbols which are not actually kirkwood-related, and renames kirkwood_egiga_initialize to egiga_initialize in the egiga driver, in netdev.h and in cpu.c of the kirkwood SoC support code.
These three commits together perform the separation of egiga from kirkwood.
The last commit adds the actual orion5s support. Note that it contains an important change to egiga: the addition of the 'volatile' qualifier to members of the structs representing egiga registers and descriptors.
This was needed on orion5x, as without the volatile qualifiers, reads and writes th these structs could happen in unexpected order; in egiga_send() this caused the egiga DMA engine to get started before the DMA TX descriptor was actually filled in, with the effect that the actual sent packet was all zeroes. I cannot explain why this did not happen on kirkwood, except that maybe the CPU speed difference made it possible for the core to finish writing the descriptor before the DMA engine could start.
All commits were tested on a kirkwood-based OpenRD Client for regression avoidance; the last commit was also tested on an orion5x-based ED Mini V2 for functionality validation.
Albert Aribaud (4):
ARM: Rename kirkwood_egiga driver to egiga
egiga: Remove functional dependency on kirkwood
egiga: remove references to kirkwood SoC
egiga: add support for orion5x
arch/arm/cpu/arm926ejs/kirkwood/cpu.c | 4 +- arch/arm/cpu/arm926ejs/orion5x/cpu.c | 18 + arch/arm/include/asm/arch-kirkwood/kirkwood.h | 10 + arch/arm/include/asm/arch-orion5x/orion5x.h | 5 + board/LaCie/edminiv2/edminiv2.c | 36 ++ board/LaCie/edminiv2/edminiv2.h | 41 ++ drivers/net/Makefile | 2 +- drivers/net/egiga.c | 728 +++++++++++++++++++++++++ drivers/net/egiga.h | 505 +++++++++++++++++ drivers/net/kirkwood_egiga.c | 719 ------------------------ drivers/net/kirkwood_egiga.h | 505 ----------------- include/configs/edminiv2.h | 30 +- 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 +- 19 files changed, 1382 insertions(+), 1247 deletions(-) create mode 100644 board/LaCie/edminiv2/edminiv2.h create mode 100644 drivers/net/egiga.c create mode 100644 drivers/net/egiga.h delete mode 100644 drivers/net/kirkwood_egiga.c delete mode 100644 drivers/net/kirkwood_egiga.h
PATCH 1/4 ARM: Rename kirkwood_egiga driver to egiga
The names of the egiga files mention kirkwood even though they are not kirkwood-specific - change them.
--- drivers/net/Makefile | 2 +- drivers/net/egiga.c | 719 ++++++++++++++++++++++++++++++++++++++++++ drivers/net/egiga.h | 505 +++++++++++++++++++++++++++++ drivers/net/kirkwood_egiga.c | 719 ------------------------------------------ drivers/net/kirkwood_egiga.h | 505 ----------------------------- 5 files changed, 1225 insertions(+), 1225 deletions(-) create mode 100644 drivers/net/egiga.c create mode 100644 drivers/net/egiga.h delete mode 100644 drivers/net/kirkwood_egiga.c delete mode 100644 drivers/net/kirkwood_egiga.h
drivers/net/Makefile +1 -1
@@ -46,7 +46,7 @@ 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_KIRKWOOD_EGIGA) += egiga.o COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o COBJS-$(CONFIG_LAN91C96) += lan91c96.o COBJS-$(CONFIG_MACB) += macb.o
drivers/net/egiga.c new file +719 -0
719 lines not on this page · raw message
drivers/net/egiga.h new file +505 -0
505 lines not on this page · raw message
drivers/net/kirkwood_egiga.c deleted +0 -719
719 lines not on this page · raw message
drivers/net/kirkwood_egiga.h deleted +0 -505
505 lines not on this page · raw message
Signature · 1 line
1.6.4.4
PATCH 2/4 egiga: Remove functional dependency on kirkwood
Set DRAM windows by using gd as other drivers do,
instead of calling kirkwood-specific functions.
--- drivers/net/egiga.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/egiga.c +4 -2
@@ -38,6 +38,8 @@#include <asm/arch/kirkwood.h> #include "egiga.h" +DECLARE_GLOBAL_DATA_PTR ; +#define KIRKWOOD_PHY_ADR_REQUEST 0xee#define KWGBE_SMI_REG (((struct kwgbe_registers *)KW_EGIGA0_BASE)->smi)
@@ -246,8 +248,8 @@ static void set_dram_access(struct kwgbe_registers *regs) win_param.access_ctrl =EWIN_ACCESS_FULL ; win_param.high_addr =0 ;/* Get bank base */ - win_param.base_addr =kw_sdram_bar (i); - win_param.size =kw_sdram_bs (i);/* Get bank size */ + win_param.base_addr = gd->bd->bi_dram[i].start; + win_param.size = gd->bd->bi_dram[i].size;if (win_param.size ==0 ) win_param.enable =0 ;else
Signature · 1 line
1.6.4.4
PATCH 3/4 egiga: remove references to kirkwood SoC
Macros, types, variables, functions in egiga refer to kirkwood even though they are not kirkwood-specific. Rename them, across the whole source tree when necessary.
--- arch/arm/cpu/arm926ejs/kirkwood/cpu.c | 4 +- arch/arm/include/asm/arch-kirkwood/kirkwood.h | 10 + drivers/net/Makefile | 2 +- drivers/net/egiga.c | 321 +++++++++--------- drivers/net/egiga.h | 466 ++++++++++++------------ 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, 422 insertions(+), 407 deletions(-)
arch/arm/cpu/arm926ejs/kirkwood/cpu.c +2 -2
@@ -378,10 +378,10 @@ int arch_misc_init(void) }#endif /* CONFIG_ARCH_MISC_INIT */ -#ifdef CONFIG_KIRKWOOD_EGIGA +#ifdef CONFIG_EGIGA int cpu_eth_init (bd_t *bis) { -kirkwood_egiga_initialize (bis); +egiga_initialize (bis);return 0 ; }#endif
arch/arm/include/asm/arch-kirkwood/kirkwood.h +10 -0
@@ -60,6 +60,16 @@#define KW_EGIGA0_BASE (KW_REGISTER(0x72000))#define KW_EGIGA1_BASE (KW_REGISTER(0x76000)) +/* +* If board supports the EGIGA driver, then EGIGA0 and EGIGA1 +* must be defined. +*/ + +#if defined(CONFIG_EGIGA ) +#define EGIGA0_BASE KW_EGIGA0_BASE +#define EGIGA1_BASE KW_EGIGA1_BASE +#endif +#if defined (CONFIG_KW88F6281 )#include <asm/arch/kw88f6281.h> #elif defined (CONFIG_KW88F6192 )
drivers/net/Makefile +1 -1
@@ -38,6 +38,7 @@ COBJS-$(CONFIG_DRIVER_DM9000) += dm9000x.o COBJS-$(CONFIG_DNET) += dnet.o COBJS-$(CONFIG_E1000) += e1000.o COBJS-$(CONFIG_EEPRO100) += eepro100.o +COBJS-$(CONFIG_EGIGA) += egiga.o COBJS-$(CONFIG_ENC28J60) += enc28j60.o COBJS-$(CONFIG_EP93XX) += ep93xx_eth.o COBJS-$(CONFIG_ETHOC) += ethoc.o
@@ -46,7 +47,6 @@ 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) += egiga.o COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o COBJS-$(CONFIG_LAN91C96) += lan91c96.o COBJS-$(CONFIG_MACB) += macb.o
drivers/net/egiga.c +163 -158
677 lines not on this page · raw message
drivers/net/egiga.h +233 -233
587 lines not on this page · raw message
include/configs/guruplug.h +2 -2
@@ -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_EGIGA /* Enable kirkwood 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_EGIGA_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
@@ -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_EGIGA /* Enable kirkwood 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_EGIGA_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
@@ -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_EGIGA /* Enable kirkwood 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_EGIGA_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
@@ -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_EGIGA /* Enable kirkwood 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_EGIGA_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
@@ -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_EGIGA /* Enable kirkwood Gbe Controller Driver */ +#define CONFIG_EGIGA_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
@@ -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_EGIGA /* Enable kirkwood 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_EGIGA_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
@@ -52,6 +52,7 @@ int davinci_emac_initialize(void);int dnet_eth_initialize (int id,void *regs,unsigned int phy_addr);int e1000_initialize (bd_t *bis);int eepro100_initialize (bd_t *bis); +int egiga_initialize (bd_t *bis);int ep93xx_eth_initialize (u8 dev_num,int base_addr);int ethoc_initialize (u8 dev_num,int base_addr);int eth_3com_initialize (bd_t * bis);
@@ -61,7 +62,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);
Signature · 1 line
1.6.4.4
PATCH 4/4 egiga: add support for orion5x
Now that egiga is detached from kirkwood, we can add support for orion5x. This requires making the structures representing egiga registers and descriptors volatile, otherwise writes to them happen in the wrong order -- this did not affect kirkwood but does affect orion5x.
--- arch/arm/cpu/arm926ejs/orion5x/cpu.c | 18 +++ arch/arm/include/asm/arch-orion5x/orion5x.h | 5 + board/LaCie/edminiv2/edminiv2.c | 36 +++++ board/LaCie/edminiv2/edminiv2.h | 41 ++++++ drivers/net/egiga.c | 4 +- drivers/net/egiga.h | 198 +++++++++++++------------- include/configs/edminiv2.h | 30 +++- 7 files changed, 225 insertions(+), 107 deletions(-) create mode 100644 board/LaCie/edminiv2/edminiv2.h
arch/arm/cpu/arm926ejs/orion5x/cpu.c +18 -0
@@ -268,3 +268,21 @@ int arch_misc_init(void) return 0; }#endif /* CONFIG_ARCH_MISC_INIT */ + +#ifdef CONFIG_EGIGA +int cpu_eth_init (bd_t *bis) +{ +egiga_initialize (bis); +return 0 ; +} + +/* +* Generates a non-random hex number just to make egiga.c happy +* if a MAC address has to be generated +*/ +unsigned char get_random_hex (void ) +{ +static unsigned char seed =0 ; +return seed++; +} +#endif
arch/arm/include/asm/arch-orion5x/orion5x.h +5 -0
@@ -56,6 +56,11 @@#define ORION5X_USB20_PORT1_BASE (ORION5X_REGISTER(0xA0000))#define ORION5X_EGIGA_BASE (ORION5X_REGISTER(0x72000)) +/* EGIGA expects EGIGA0 #define'd */ +#if defined (CONFIG_EGIGA ) +#define 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
board/LaCie/edminiv2/edminiv2.c +36 -0
@@ -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" , + __FUNCTION__); +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 |= (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
drivers/net/egiga.c +3 -1
@@ -37,6 +37,8 @@#include <asm/byteorder.h> #if defined (CONFIG_KIRKWOOD )#include <asm/arch/kirkwood.h> +#elif definedCONFIG_ORION5X +#include <asm/arch/orion5x.h> #endif #include "egiga.h"
@@ -273,7 +275,7 @@ static void set_dram_access(struct egiga_registers *regs) win_param.attrib =EBAR_DRAM_CS3 ;break ;default : -/* invalide bank, disable access */ +/* invalid bank, disable access */ win_param.enable =0 ; win_param.attrib =0 ;break ;
drivers/net/egiga.h +99 -99
222 lines not on this page · raw message
include/configs/edminiv2.h +23 -7
@@ -60,7 +60,7 @@#define ORION5X_MPP0_7 0x00000003#define ORION5X_MPP8_15 0x55550000 -#define ORION5X_MPP16_23 0x00000000 +#define ORION5X_MPP16_23 0x00005555/* * Board-specific values for Orion5x GPIO low level init:
@@ -110,6 +110,14 @@#define CONFIG_SYS_FLASH_SECTSZ \ {16384, 8192, 8192, 32768, \ 65536, 65536, 65536, 65536, 65536, 65536, 65536} +/* +* Ethernet +*/ + +#define CONFIG_EGIGA /* Enable Egiga Gbe Controller Driver */ +#define CONFIG_EGIGA_PORTS {1,0}/* enable port 0 only */ +#define CONFIG_PHY_BASE_ADR 0x8 +#define CONFIG_RESET_PHY_R /* use reset_phy() to init mv8831116 PHY */ /* auto boot */ #define CONFIG_BOOTDELAY 3/* default enable autoboot */
@@ -131,12 +139,20 @@* Commands configuration - using default command set for now */ #include <config_cmd_default.h> -/* -* Disabling some default commands for staggered bring-up -*/ -#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 */ +#define CONFIG_CMD_AUTOSCRIPT +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_ENV +#define CONFIG_CMD_MII +#define CONFIG_CMD_PING + +#ifdef CONFIG_CMD_NET +#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 */ +#define CONFIG_EGIGA_INIT /* Enable GbePort0/1 for kernel */ +#endif /* * Environment variables configurations
Signature · 1 line
1.6.4.4
PATCH 4/4 egiga: add support for orion5x
Prefer subject : Orion5X: add egiga driver support
Quoted 35 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: Friday, July 02, 2010 10:23 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 4/4] egiga: add support for orion5xNow that egiga is detached from kirkwood, we can add support for orion5x. This requires making the structures representing egiga registers and descriptors volatile, otherwise writes to them happen in the wrong order -- this did not affect kirkwood but does affect orion5x.
Signed-off-by Albert Aribaud <[email protected]>--- arch/arm/cpu/arm926ejs/orion5x/cpu.c | 18 +++ arch/arm/include/asm/arch-orion5x/orion5x.h | 5 + board/LaCie/edminiv2/edminiv2.c | 36 +++++ board/LaCie/edminiv2/edminiv2.h | 41 ++++++ drivers/net/egiga.c | 4 +- drivers/net/egiga.h | 198 +++++++++++++------------- include/configs/edminiv2.h | 30 +++- 7 files changed, 225 insertions(+), 107 deletions(-) create mode 100644 board/LaCie/edminiv2/edminiv2.harch/arm/cpu/arm926ejs/orion5x/cpu.c +0
-0@@ -268,3 +268,21 @@ int arch_misc_init(void) return 0; }#endif /* CONFIG_ARCH_MISC_INIT */
arch/arm/cpu/arm926ejs/orion5x/cpu.c int arch_misc_init(void) · line 280
Quoted 10 lines
arch/arm/cpu/arm926ejs/orion5x/cpu.c +10
-0+ +#ifdef CONFIG_EGIGA +int cpu_eth_init (bd_t *bis) +{ +egiga_initialize (bis); +return 0 ; +} + +/* +* Generates a non-random hex number just to make egiga.c happy
Do not make anybody happy
This is misleading for generic code,
instead you can eliminate this support under CONFIG_SYS_GEN_RANDOM_MAC macro
Quoted 42 lines
arch/arm/cpu/arm926ejs/orion5x/cpu.c +8
-0+* if a MAC address has to be generated +*/ +unsigned char get_random_hex (void ) +{ +static unsigned char seed =0 ; +return seed++; +} +#endif arch/arm/include/asm/arch-orion5x/orion5x.h +5
-0@@ -56,6 +56,11 @@#define ORION5X_USB20_PORT1_BASE (ORION5X_REGISTER(0xA0000))#define ORION5X_EGIGA_BASE (ORION5X_REGISTER(0x72000)) +/* EGIGA expects EGIGA0 #define'd */ +#if defined (CONFIG_EGIGA ) +#define 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
board/LaCie/edminiv2/edminiv2.c +1
-0@@ -27,6 +27,7 @@#include <common.h> #include <miiphy.h> #include <asm/arch/orion5x.h> +#include "edminiv2.h" DECLARE_GLOBAL_DATA_PTR ;
board/LaCie/edminiv2/edminiv2.c int board_init(void) · line 93
Quoted 3 lines
board/LaCie/edminiv2/edminiv2.c +0
-0@@ -90,3 +91,38 @@ int board_init(void)return 0 ; }
Its better if you abstract reset_phy out from here, it is irreverent to patch subject. secondly it should go as patch for board support (will be picked by different custodians)
Quoted 97 lines
board/LaCie/edminiv2/edminiv2.c +35
-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" , + __FUNCTION__); +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 |= (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@@ -0,0 +1,41 @@ +/* +* (C) Copyright 2009 +* Net Insight <www.netinsight.net> +* Written-by: Simon Kagstrom <[email protected]> +* +* Based on sheevaplug.h: +* (C) Copyright 2009 +* Marvell Semiconductor <www.marvell.com> +* Written-by: Prafulla Wadaskar <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +* MA 02110-1301 USA +*/ + +#ifndef __EDMINIV2_BASE_H +#define __EDMINIV2_BASE_H + +/* PHY related */ +#define MV88E1116_LED_FCTRL_REG 10 +#define MV88E1116_CPRSP_CR3_REG 21 +#define MV88E1116_MAC_CTRL_REG 21 +#define MV88E1116_PGADR_REG 22 +#define MV88E1116_RGMII_TXTM_CTRL (1 << 4) +#define MV88E1116_RGMII_RXTM_CTRL (1 << 5) + +#endif /* __EDMINIV2_BASE_H */ drivers/net/egiga.c +2
-0@@ -37,6 +37,8 @@#include <asm/byteorder.h> #if defined (CONFIG_KIRKWOOD )#include <asm/arch/kirkwood.h> +#elif definedCONFIG_ORION5X +#include <asm/arch/orion5x.h> #endif #include "egiga.h"
drivers/net/egiga.c static void set_dram_access(struct · line 279
Quoted 6 lines
drivers/net/egiga.c +1
-1@@ -273,7 +275,7 @@ static void set_dram_access(struct egiga_registers *regs) win_param.attrib = EBAR_DRAM_CS3;break ;default : -/* invalide bank, disable access */ +/* invalid bank, disable access */
do not mix this, make this change as part of patch 1/4
Quoted 8 lines
drivers/net/egiga.c +0
-0win_param.enable =0 ; win_param.attrib =0 ;drivers/net/egiga.c +0
-0break ;drivers/net/egiga.h +0
-0
drivers/net/egiga.h line 346
Quoted 7 lines
drivers/net/egiga.h +2
-2@@ -342,13 +342,13 @@/* structures represents Controller registers */ struct egiga_barsz { -u32 bar; -u32 size; +volatile u32 bar; +volatile u32 size;
As you said in 0/4,
abstract volatile change as separate patch, this can be on the last patch in series. Since most of the places registers are accessed through volatile pointers, may be for DMA programming it is missing somewhere,
this need to be debugged instead of making volatile everywhere.
...snip...
Quoted 26 lines
drivers/net/egiga.h +0
-0/* port device data struct */ include/configs/edminiv2.h +9
-1@@ -60,7 +60,7 @@#define ORION5X_MPP0_7 0x00000003#define ORION5X_MPP8_15 0x55550000 -#define ORION5X_MPP16_23 0x00000000 +#define ORION5X_MPP16_23 0x00005555/* * Board-specific values for Orion5x GPIO low level init: @@ -110,6 +110,14 @@#define CONFIG_SYS_FLASH_SECTSZ \ {16384, 8192, 8192, 32768, \ 65536, 65536, 65536, 65536, 65536, 65536, 65536} +/* +* Ethernet +*/ + +#define CONFIG_EGIGA /* Enable Egiga Gbe Controller Driver */ +#define CONFIG_EGIGA_PORTS {1,0}/* enable port 0 only */ +#define CONFIG_PHY_BASE_ADR 0x8 +#define CONFIG_RESET_PHY_R /* use reset_phy() to init
Quoted 1 line
mv8831116 PHY */
Please move these definitions below inside #ifdef CONFIG_CMD_NET
Quoted 8 lines
/* auto boot */
#defineCONFIG_BOOTDELAY3 /* default enable autoboot */include/configs/edminiv2.h +0
-1@@ -131,12 +139,20 @@* Commands configuration - using default command set for now */ #include <config_cmd_default.h> -/*
include/configs/edminiv2.h line 146
Quoted 10 lines
include/configs/edminiv2.h +5
-5-* Disabling some default commands for staggered bring-up -*/ -#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 */ +#define CONFIG_CMD_AUTOSCRIPT +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_ENV +#define CONFIG_CMD_MII +#define CONFIG_CMD_PING
These are irrelevant to the patch subject, post separate patch for this also check sheevaplug.h for making use of config_cmd_default.h (if not used)
include/configs/edminiv2.h line 155
Quoted 12 lines
include/configs/edminiv2.h +4
-0+ +#ifdef CONFIG_CMD_NET +#define CONFIG_NETCONSOLE /* include NetConsole support */ +#define CONFIG_NET_MULTI /* specify more that one ports available */
+#defineCONFIG_MII/* expose smi ove
miiphy interface */
+#defineCONFIG_SYS_FAULT_ECHO_LINK_DOWN/* detect link
using phy */include/configs/edminiv2.h +3
-0+#define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */ +#define CONFIG_EGIGA_INIT /* Enable GbePort0/1 for kernel */ +#endif
regards..
Prafulla . .
PATCH 3/4 egiga: remove references to kirkwood SoC
In reply to Albert AribaudQuoted 9 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: Friday, July 02, 2010 10:23 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 3/4] egiga: remove references to kirkwood SoC
Quoted 4 lines
Macros, types, variables, functions in egiga
refer to kirkwood even though they are not
kirkwood-specific. Rename them, across the
whole source tree when necessary.
NAK, as commented for Patch 1/4
you can address it more like splitting a driver into generic and specific interfaces and then adding new support
Regards..
Prafulla ..
PATCH 3/4 egiga: remove references to kirkwood SoC
Le 05/07/2010 13:02, Prafulla Wadaskar a ?crit :
Quoted 7 lines
Quoted 7 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: Friday, July 02, 2010 10:23 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 3/4] egiga: remove references to kirkwood SoC
Quoted 8 lines
Quoted 4 lines
Macros, types, variables, functions in egiga
refer to kirkwood even though they are not
kirkwood-specific. Rename them, across the
whole source tree when necessary.NAK, as commented for Patch 1/4
you can address it more like splitting a driver into generic and specific interfaces and then adding new support
I'm not sure I get your meaning here. Do you suggest I submit not four but only two patches, one with all egiga-out-of-kirkwood changes and one with orion5x support? Or is is something else entirely?
Quoted 2 lines
Regards..
Prafulla ..
Amicalement,
Signature · 1 line
Albert.
PATCH 3/4 egiga: remove references to kirkwood SoC
Quoted 27 lines
-----Original Message-----
From: Albert ARIBAUD [mailto:albert.aribaud at free.fr]
Sent: Monday, July 05, 2010 5:12 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 3/4] egiga: remove references to kirkwood SoCLe 05/07/2010 13:02, Prafulla Wadaskar a ?crit :
Quoted 6 lines
Quoted 6 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: Friday, July 02, 2010 10:23 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 3/4] egiga: remove references tokirkwood SoC
Quoted 8 lines
Quoted 5 lines
Macros, types, variables, functions in egiga
refer to kirkwood even though they are not
kirkwood-specific. Rename them, across the
whole source tree when necessary.NAK, as commented for Patch 1/4
you can address it more like splitting a driver into
Quoted 8 lines
generic and specific interfaces
Quoted 1 line
and then adding new support
I'm not sure I get your meaning here. Do you suggest I submit not four
but only two patches, one with all egiga-out-of-kirkwood changes and one
with orion5x support? Or is is something else entirely?
I have clarified it in earlier email, hope it is clear now
Regards..
Prafulla . .
PATCH 2/4 egiga: Remove functional dependency on kirkwood
In reply to Albert AribaudQuoted 40 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: Friday, July 02, 2010 10:23 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 2/4] egiga: Remove functional dependency on kirkwoodSet DRAM windows by using gd as other drivers do,
instead of calling kirkwood-specific functions.Signed-off-by Albert Aribaud <[email protected]>--- drivers/net/egiga.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)drivers/net/egiga.c +2
-2@@ -38,6 +38,8 @@#include <asm/arch/kirkwood.h> #include "egiga.h" +DECLARE_GLOBAL_DATA_PTR ; +#define KIRKWOOD_PHY_ADR_REQUEST 0xee#define KWGBE_SMI_REG (((struct kwgbe_registers *)KW_EGIGA0_BASE)->smi)@@ -246,8 +248,8 @@ static void set_dram_access(struct kwgbe_registers *regs) win_param.access_ctrl = EWIN_ACCESS_FULL; win_param.high_addr =0 ;/* Get bank base */ - win_param.base_addr =kw_sdram_bar (i); - win_param.size =kw_sdram_bs (i);/* Get bank size */
drivers/net/egiga.c static void set_dram_access(struct kwgbe_registers *regs) · line 255
Quoted 5 lines
drivers/net/egiga.c +2
-0+ win_param.base_addr = gd->bd->bi_dram[i].start; + win_param.size = gd->bd->bi_dram[i].size;if (win_param.size ==0 ) win_param.enable =0 ;else
this is good patch indeed to make the driver more generic, which is independent of this activity please post this patch for current version i.e. kirkwood_egiga.c
Regards..
Prafulla . .
PATCH 2/4 egiga: Remove functional dependency on kirkwood
Le 05/07/2010 13:03, Prafulla Wadaskar a ?crit :
Quoted 48 lines
Quoted 39 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: Friday, July 02, 2010 10:23 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 2/4] egiga: Remove functional dependency on kirkwoodSet DRAM windows by using gd as other drivers do,
instead of calling kirkwood-specific functions.Signed-off-by Albert Aribaud<[email protected]>--- drivers/net/egiga.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)drivers/net/egiga.c +2
-2@@ -38,6 +38,8 @@#include <asm/arch/kirkwood.h> #include "egiga.h" +DECLARE_GLOBAL_DATA_PTR ; +#define KIRKWOOD_PHY_ADR_REQUEST 0xee#define KWGBE_SMI_REG (((struct kwgbe_registers *)KW_EGIGA0_BASE)->smi)@@ -246,8 +248,8 @@ static void set_dram_access(struct kwgbe_registers *regs) win_param.access_ctrl = EWIN_ACCESS_FULL; win_param.high_addr =0 ;/* Get bank base */ - win_param.base_addr =kw_sdram_bar (i); - win_param.size =kw_sdram_bs (i);/* Get bank size */
drivers/net/egiga.c static void set_dram_access(struct kwgbe_registers *regs) · line 255
Quoted 5 lines
drivers/net/egiga.c +2
-0+ win_param.base_addr = gd->bd->bi_dram[i].start; + win_param.size = gd->bd->bi_dram[i].size;if (win_param.size ==0 ) win_param.enable =0 ;else this is good patch indeed to make the driver more generic, which is independent of this activity please post this patch for current version i.e.
kirkwood_egiga.c
Quoted 2 lines
Regards..
Prafulla . .
There is also a similar fix (move from kw_sdram_{bar,bs} to gd) to be done on drivers/usb/host/ehci-kirkwood.c, apparently. As I wasn't planning supporting USB with this patchset, I'd ignored it, but if you want I can submit a separate patch for it too.
Amicalement,
Signature · 1 line
Albert.
PATCH 2/4 egiga: Remove functional dependency on kirkwood
Quoted 60 lines
-----Original Message-----
From: Albert ARIBAUD [mailto:albert.aribaud at free.fr]
Sent: Monday, July 05, 2010 11:30 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de
Subject: Re: [PATCH 2/4] egiga: Remove functional dependency on kirkwoodLe 05/07/2010 13:03, Prafulla Wadaskar a ?crit :
Quoted 31 lines
Quoted 31 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: Friday, July 02, 2010 10:23 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 2/4] egiga: Remove functional dependency on kirkwoodSet DRAM windows by using gd as other drivers do,
instead of calling kirkwood-specific functions.Signed-off-by Albert Aribaud<[email protected]>--- drivers/net/egiga.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)drivers/net/egiga.c +2
-0@@ -38,6 +38,8 @@#include <asm/arch/kirkwood.h> #include "egiga.h" +DECLARE_GLOBAL_DATA_PTR ; +#define KIRKWOOD_PHY_ADR_REQUEST 0xee#define KWGBE_SMI_REG (((struct kwgbe_registers *)KW_EGIGA0_BASE)->smi)Quoted 15 lines
drivers/net/egiga.c static void set_dram_access(struct kwgbe_registers *regs) · line 255
Quoted 13 lines
drivers/net/egiga.c +0
-2@@ -246,8 +248,8 @@ static void set_dram_access(struct kwgbe_registers *regs) win_param.access_ctrl = EWIN_ACCESS_FULL; win_param.high_addr =0 ;/* Get bank base */ - win_param.base_addr =kw_sdram_bar (i); - win_param.size =kw_sdram_bs (i);/* Get bank size */
drivers/net/egiga.c +2
-0+ win_param.base_addr = gd->bd->bi_dram[i].start; + win_param.size = gd->bd->bi_dram[i].size;if (win_param.size ==0 ) win_param.enable =0 ;else this is good patch indeed to make the driver more generic,
which is independent of this activity
Quoted 2 lines
please post this patch for current version i.e.
kirkwood_egiga.c
Quoted 8 lines
Quoted 2 lines
Regards..
Prafulla . .There is also a similar fix (move from kw_sdram_{bar,bs} to gd) to be done on
drivers/usb/host/ehci-kirkwood.c, apparently. As I wasn't planning supporting USB with this patchset, I'd ignored it, but if you
want I can submit a separate patch for it too.
I know, I checked this, I was planning to post patches for the same, if you wish, you are welcomed !!!
Regards..
Prafulla . .
PATCH 1/4 ARM: Rename kirkwood_egiga driver to egiga
In reply to Albert AribaudHi Albert,
Quoted 4 lines · Albert Aribaud
The names of the egiga files mention kirkwood even though they are not kirkwood-specific - change them.
I'm not a git expert so there may be a better way than this, but we want this to show up as a rename, rather than an add/delete. I would accomplish this using 'git mv', followed by 'git format-patch -C'
regards,
Ben
PATCH 1/4 ARM: Rename kirkwood_egiga driver to egiga
Le 02/07/2010 19:20, Ben Warren a ?crit :
Quoted 6 lines
Hi Albert,
Quoted 3 lines · Albert Aribaud
The names of the egiga files mention kirkwood even though they are not kirkwood-specific - change them.
Quoted 6 lines
I'm not a git expert so there may be a better way than this, but we want this to show up as a rename, rather than an add/delete. I would accomplish this using 'git mv', followed by 'git format-patch -C'
regards,
Ben
Thanks Ben -- I am no git expert as well, so I did not know about the -C option. I will use it for subsequent patch versions.
Amicalement,
Signature · 1 line
Albert.
PATCH 1/4 ARM: Rename kirkwood_egiga driver to egiga
In reply to Albert AribaudQuoted 14 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: Friday, July 02, 2010 10:23 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 1/4] ARM: Renamekirkwood_egigadriver to egigaThe names of the egiga files mention kirkwood even though they are not kirkwood-specific - change them.
Signed-off-by Albert Aribaud <[email protected]>
Quoted 11 lines
--- drivers/net/Makefile | 2 +- drivers/net/egiga.c | 719 ++++++++++++++++++++++++++++++++++++++++++ drivers/net/egiga.h | 505 +++++++++++++++++++++++++++++ drivers/net/kirkwood_egiga.c | 719 ------------------------------------------ drivers/net/kirkwood_egiga.h | 505 ----------------------------- 5 files changed, 1225 insertions(+), 1225 deletions(-) create mode 100644 drivers/net/egiga.c create mode 100644 drivers/net/egiga.h
if it is generic gigabit Ethernet driver abstraction, could be applicable to any kind of SOC then the same egiga is relevant. which is not the case here if it is Marvell specific then the name should be like- mv_egiga
I think we should sync on the arch first, that would same lot of coding/review efforts I have below mentioned architecture for this driver -
1. Abstract generic SoC independent driver skeleton into mv"_egiga.c/h
2. Abstract and put Kirkwood specific functions is arch/arm/cpu/kirkwood/egiga.c
3. Create and put Orion specific functions is arch/arm/cpu/orion5x/egiga.c
4. Use common APIs/Macros to call SoC specific functions in generic driver
5. same strategy should be applied for header files abstraction.
drivers/net/Makefile COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o mcfmii.o · line 49
Quoted 13 lines
delete mode 100644 drivers/net/kirkwood_egiga.c delete mode 100644 drivers/net/kirkwood_egiga.hdrivers/net/Makefile +1
-1@@ -46,7 +46,7 @@ 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_KIRKWOOD_EGIGA) += egiga.o
there should be generic CONFIG to address this build, and CONFIG_KIRKWOOD_EGIGA should address its SOC specific dependency, you have done this in patch 3/4
drivers/net/egiga.c
Quoted 4 lines
drivers/net/Makefile +0
-0COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o COBJS-$(CONFIG_LAN91C96) += lan91c96.o COBJS-$(CONFIG_MACB) += macb.odrivers/net/egiga.c +0
-0
As suggested by Ben rest should be rename activity than delete/add for 1/x patch
Regards..
Prafulla . .
PATCH 1/4 ARM: Rename kirkwood_egiga driver to egiga
Le 05/07/2010 13:02, Prafulla Wadaskar a ?crit :
Quoted 2 lines
if it is generic gigabit Ethernet driver abstraction, could be applicable to any kind of SOC then the same egiga is relevant. which is not the case here if it is Marvell specific then the name should be like-
mv_egiga
As it is Marvell-IP specific, I'll rename it to mv_egiga.
Quoted 7 lines
I think we should sync on the arch first, that would same lot of coding/review efforts I have below mentioned architecture for this driver -
1. Abstract generic SoC independent driver skeleton into mv"_egiga.c/h
2. Abstract and put Kirkwood specific functions isarch/arm/cpu/kirkwood/egiga.c
3. Create and put Orion specific functions isarch/arm/cpu/orion5x/egiga.c
4. Use common APIs/Macros to call SoC specific functions in generic driver
5. same strategy should be applied for header files abstraction.
Agree.
Quoted 2 lines
there should be generic CONFIG to address this build, and
CONFIG_KIRKWOOD_EGIGAshould address its SOC specific dependency, you have done this in patch 3/4
Yes, I have. Do you mean you would prefer everything--file renaming, symbol renaming--in a single commit?
Quoted 1 line
As suggested by Ben rest should be rename activity than delete/add for 1/x patch
Ok.
Thanks for the feedback. I'll provide an updated patchset once I get your answer to my question above.
Amicalement,
Signature · 1 line
Albert.
PATCH 1/4 ARM: Rename kirkwood_egiga driver to egiga
Quoted 34 lines
-----Original Message-----
From: Albert ARIBAUD [mailto:albert.aribaud at free.fr]
Sent: Monday, July 05, 2010 5:06 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 1/4] ARM: Renamekirkwood_egigadriver to egigaLe 05/07/2010 13:02, Prafulla Wadaskar a ?crit :
Quoted 1 line
if it is generic gigabit Ethernet driver abstraction, could
be applicable to any kind of SOC then the same egiga is relevant. which is not the case here
Quoted 1 line
if it is Marvell specific then the name should be like-
mv_egigaAs it is Marvell-IP specific, I'll rename it to
mv_egiga.Quoted 1 line
I think we should sync on the arch first, that would same
lot of coding/review efforts
Quoted 2 lines
I have below mentioned architecture for this driver -
1. Abstract generic SoC independent driver skeleton intomv"_egiga.c/h
Quoted 1 line
2. Abstract and put Kirkwood specific functions is
arch/arm/cpu/kirkwood/egiga.cQuoted 1 line
3. Create and put Orion specific functions is
arch/arm/cpu/orion5x/egiga.cQuoted 1 line
4. Use common APIs/Macros to call SoC specific functions in
generic driver
Quoted 1 line
5. same strategy should be applied for header files abstraction.
Agree.
Quoted 7 lines
Quoted 1 line
there should be generic CONFIG to address this build, and
CONFIG_KIRKWOOD_EGIGAQuoted 1 line
should address its SOC specific dependency, you have done
this in patch 3/4
Yes, I have. Do you mean you would prefer everything--file renaming, symbol renaming--in a single commit?
Ideally, patch should be small as per functionality and objective,
that gives better understanding even for someone who is not directly related. also it is easier to be get accepted acked faster.
I feel you should create a patches as below:
standalone patches
1. kirkwood_egiga: Updates: using global data ptr for DRAM configuration and cosmetic fix
2. edbiniv2: board configuration cleanup and enhancements
patch series:
1. [1/5] net: rename: kirkwood_egiga as mv_egiga
2. [2/5] net: mv_egiga: Split SoC specific (Kirkwood) code to support other SoCs
3. [3/5] net: mv_egiga: add support for orion5x gigabit Ethernet controller
5. [4/5] net" mv_egiga: bugfix: DMA issued fixed using volatile
5. [5/5] edminiv2: add Ethernet support
Regards..
Prafulla. .
PATCH 1/4 ARM: Rename kirkwood_egiga driver to egiga
Le 05/07/2010 14:01, Prafulla Wadaskar a ?crit :
Quoted 6 lines
I feel you should create a patches as below:
standalone patches
1.kirkwood_egiga: Updates: using global data ptr for DRAM configuration and cosmetic fix
2. edbiniv2: board configuration cleanup and enhancements
Quoted 6 lines
patch series:
1. [1/5] net: rename:kirkwood_egigaasmv_egiga
2. [2/5] net:mv_egiga: Split SoC specific (Kirkwood) code to support other SoCs
3. [3/5] net:mv_egiga: add support for orion5x gigabit Ethernet controller
5. [4/5] net"mv_egiga: bugfix: DMA issued fixed using volatile
5. [5/5] edminiv2: add Ethernet support
Ok--I'll re-post the independent patches and patch series as suggested later today.
Thanks for the guidance!
Amicalement,
Signature · 1 line
Albert.