From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood
Date: Sun, 11 Jul 2010 23:23:44 -0700 [thread overview]
Message-ID: <4C3AB4F0.7090503@gmail.com> (raw)
In-Reply-To: <F766E4F80769BD478052FB6533FA745D19A4A5D5F6@SC-VEXCH4.marvell.com>
On 7/11/2010 10:45 PM, Prafulla Wadaskar wrote:
>
>
>> -----Original Message-----
>> From: u-boot-bounces at lists.denx.de
>> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Albert Aribaud
>> Sent: Sunday, July 11, 2010 1:32 PM
>> To: u-boot at 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.aribaud@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
huh? The name is consistent with the rest of his work, and *if* the
code really increases in size, I can't imagine that 3 chars really
matters...
>> 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
Same comment as above. Clarity is king.
> 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 at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
next prev parent reply other threads:[~2010-07-12 6:23 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-11 8:01 [U-Boot] [PATCH V3 0/5] Marvell egiga multiple SoC support Albert Aribaud
2010-07-11 8:01 ` [U-Boot] [PATCH V3 1/5] net: rename: kirkwood_egiga as mv_egiga Albert Aribaud
2010-07-11 8:01 ` [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood Albert Aribaud
2010-07-11 8:01 ` [U-Boot] [PATCH V3 3/5] mv_egiga: CONFIG_SKIP_LOCAL_MAC_RANDOMIZATION Albert Aribaud
2010-07-11 8:01 ` [U-Boot] [PATCH V3 4/5] mv_egiga: add support for orion5x egiga controller Albert Aribaud
2010-07-11 8:01 ` [U-Boot] [PATCH V3 5/5] edminiv2: add ethernet support Albert Aribaud
2010-07-12 6:00 ` Prafulla Wadaskar
2010-07-12 6:14 ` Albert ARIBAUD
2010-07-12 6:31 ` Ben Warren
2010-07-12 6:05 ` [U-Boot] [PATCH V3 4/5] mv_egiga: add support for orion5x egiga controller Prafulla Wadaskar
2010-07-12 5:53 ` [U-Boot] [PATCH V3 3/5] mv_egiga: CONFIG_SKIP_LOCAL_MAC_RANDOMIZATION Prafulla Wadaskar
2010-07-12 5:45 ` [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood Prafulla Wadaskar
2010-07-12 6:23 ` Ben Warren [this message]
2010-07-12 6:53 ` Prafulla Wadaskar
2010-07-12 8:53 ` Albert ARIBAUD
2010-07-12 14:19 ` Ben Warren
2010-07-12 15:54 ` Albert ARIBAUD
2010-07-12 16:27 ` Albert ARIBAUD
2010-07-12 5:49 ` Prafulla Wadaskar
2010-07-12 8:56 ` Albert ARIBAUD
2010-07-12 14:23 ` Ben Warren
2010-07-13 5:38 ` Prafulla Wadaskar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C3AB4F0.7090503@gmail.com \
--to=biggerbadderben@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox