> -----Original Message----- > From: u-boot-boun...@lists.denx.de > [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Albert Aribaud > Sent: Sunday, July 11, 2010 1:32 PM > To: u-boot@lists.denx.de > Subject: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other > than kirkwood > > Rename all references to kirkwood in mv_egiga symbols > throughout the whole codebase. > > Signed-off-by: Albert Aribaud <albert.arib...@free.fr> > --- > arch/arm/cpu/arm926ejs/kirkwood/cpu.c | 4 +- > arch/arm/include/asm/arch-kirkwood/kirkwood.h | 5 + > drivers/net/Makefile | 2 +- > drivers/net/mv_egiga.c | 322 > +++++++++--------- > drivers/net/mv_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, 418 insertions(+), 407 deletions(-) > > diff --git a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c > b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c > index 6fc3902..786ffc6 100644 > --- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c > +++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c > @@ -378,10 +378,10 @@ int arch_misc_init(void) > } > #endif /* CONFIG_ARCH_MISC_INIT */ > > -#ifdef CONFIG_KIRKWOOD_EGIGA > +#ifdef CONFIG_MV_EGIGA > int cpu_eth_init(bd_t *bis) > { > - kirkwood_egiga_initialize(bis); > + mv_egiga_initialize(bis); > return 0; > } > #endif > diff --git a/arch/arm/include/asm/arch-kirkwood/kirkwood.h > b/arch/arm/include/asm/arch-kirkwood/kirkwood.h > index 2470efb..9200605 100644 > --- a/arch/arm/include/asm/arch-kirkwood/kirkwood.h > +++ b/arch/arm/include/asm/arch-kirkwood/kirkwood.h > @@ -60,6 +60,11 @@ > #define KW_EGIGA0_BASE (KW_REGISTER(0x72000)) > #define KW_EGIGA1_BASE (KW_REGISTER(0x76000)) > > +#if defined (CONFIG_MV_EGIGA)
I think you don't need ifdef here > +#define MV_EGIGA0_BASE KW_EGIGA0_BASE > +#define MV_EGIGA1_BASE KW_EGIGA1_BASE > +#endif > + > #if defined (CONFIG_KW88F6281) > #include <asm/arch/kw88f6281.h> > #elif defined (CONFIG_KW88F6192) > diff --git a/drivers/net/Makefile b/drivers/net/Makefile > index 1599c26..04f8de0 100644 > --- a/drivers/net/Makefile > +++ b/drivers/net/Makefile > @@ -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) += mv_egiga.o > +COBJS-$(CONFIG_MV_EGIGA) += mv_egiga.o > COBJS-$(CONFIG_NATSEMI) += natsemi.o > COBJS-$(CONFIG_DRIVER_NE2000) += ne2000.o ne2000_base.o > COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o ne2000_base.o > diff --git a/drivers/net/mv_egiga.c b/drivers/net/mv_egiga.c > index b7ecc9d..4fecf1e 100644 > --- a/drivers/net/mv_egiga.c > +++ b/drivers/net/mv_egiga.c > @@ -35,13 +35,17 @@ > #include <asm/errno.h> > #include <asm/types.h> > #include <asm/byteorder.h> > + > +#if defined (CONFIG_KIRKWOOD) > #include <asm/arch/kirkwood.h> > +#endif > + > #include "mv_egiga.h" > > DECLARE_GLOBAL_DATA_PTR; > > -#define KIRKWOOD_PHY_ADR_REQUEST 0xee > -#define KWGBE_SMI_REG (((struct kwgbe_registers > *)KW_EGIGA0_BASE)->smi) > +#define MV_PHY_ADR_REQUEST 0xee > +#define MV_EGIGA_SMI_REG (((struct mv_egiga_registers > *)MV_EGIGA0_BASE)->smi) > > /* > * smi_reg_read - miiphy_read callback function. > @@ -51,16 +55,16 @@ DECLARE_GLOBAL_DATA_PTR; > static int smi_reg_read(char *devname, u8 phy_adr, u8 > reg_ofs, u16 * data) > { > struct eth_device *dev = eth_get_dev_by_name(devname); > - struct kwgbe_device *dkwgbe = to_dkwgbe(dev); > - struct kwgbe_registers *regs = dkwgbe->regs; > + struct mv_egiga_device *dmvegiga = to_mv_egiga(dev); > + struct mv_egiga_registers *regs = dmvegiga->regs; I suggest to keep name as mvgbe here instead of mv_egiga, 3 additional chars, increases overall code size > u32 smi_reg; > u32 timeout; > > /* Phyadr read request */ > - if (phy_adr == KIRKWOOD_PHY_ADR_REQUEST && > - reg_ofs == KIRKWOOD_PHY_ADR_REQUEST) { > + if (phy_adr == MV_PHY_ADR_REQUEST && > + reg_ofs == MV_PHY_ADR_REQUEST) { > /* */ > - *data = (u16) (KWGBEREG_RD(regs->phyadr) & PHYADR_MASK); > + *data = (u16) (MV_EGIGA_REG_RD(regs->phyadr) & Same here, pls use MVGBEREG instead of MV_EGIGA_REG, 4 extra chars Pls just replace kw/KW by mv/MV to avoide indentation issues I think these are the only changes in this patch (i.e. find and replace), are there any other? Regards.. Prafulla . . _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot