[U-Boot] [PATCH 1/4] ARM: Rename kirkwood_egiga driver to egiga

Prafulla Wadaskar prafulla at marvell.com
Mon Jul 5 13:02:20 CEST 2010


 

> -----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: Rename kirkwood_egiga 
> driver to egiga
> 
> The names of the egiga files mention kirkwood
> even though they are not kirkwood-specific - change them.
> 
> Signed-off-by: Albert Aribaud <albert.aribaud at free.fr>
> ---
>  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.

>  delete mode 100644 drivers/net/kirkwood_egiga.c
>  delete mode 100644 drivers/net/kirkwood_egiga.h
> 
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index b75c02f..8853908 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -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

>  COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o
>  COBJS-$(CONFIG_LAN91C96) += lan91c96.o
>  COBJS-$(CONFIG_MACB) += macb.o
> diff --git a/drivers/net/egiga.c b/drivers/net/egiga.c

As suggested by Ben rest should be rename activity than delete/add for 1/x patch 

Regards..
Prafulla . .


More information about the U-Boot mailing list