Re: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood

2010-07-12 Thread Ben Warren
  On 7/11/2010 10:45 PM, Prafulla Wadaskar wrote:


 -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 Aribaudalbert.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)
   #includeasm/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 @@
   #includeasm/errno.h
   #includeasm/types.h
   #includeasm/byteorder.h
 +
 +#if defined (CONFIG_KIRKWOOD)
   #includeasm/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 

Re: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood

2010-07-12 Thread Prafulla Wadaskar
 

 -Original Message-
 From: Ben Warren [mailto:biggerbadder...@gmail.com] 
 Sent: Monday, July 12, 2010 11:54 AM
 To: Prafulla Wadaskar
 Cc: Albert Aribaud; u-boot@lists.denx.de
 Subject: Re: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs 
 other than kirkwood
 
   On 7/11/2010 10:45 PM, Prafulla Wadaskar wrote:
 
 
  -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
...snip...
 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...

That's true.
But if we can do it why to avoid it? again it helps to keep same indentation 
(keeping them below 80char size)

Regards..
Prafulla . .
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood

2010-07-12 Thread Albert ARIBAUD
Le 12/07/2010 08:53, Prafulla Wadaskar a écrit :
 -  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...

 That's true.
 But if we can do it why to avoid it? again it helps to keep same indentation 
 (keeping them below 80char size)

I don't think I changed indentation here, and the issue is about line 
lengths, right?

Initially I chose mv egiga because the file names used egiga while the 
code used gbe, and I wanted clarity, so I decided to keep only one of 
egiga and gbe. Now which one I should keep is not really important to 
me, and a Google search for marvell egiga vs marvell gbe indicates gbe 
appears much more frequently, so someone looking into this will probably 
know GbE more than egiga.

I suggest that:

- I switch the file names from mv_egiga to mvgbe (to be consistent 
with Prafulla's comment on mv_sata becoming mvsata), and

- I replace mv_egiga/MV_EGIGA symbols with mvgbe/MVGBE.

That will retain (as much) clarity and uniformity (as egiga does), which 
is what I think Ben is looking for, and it'll keep name length at a 
minimum, which should satisfy Prafulla.

Ben, Prafulla (and others as well, of course), do you agree?

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood

2010-07-12 Thread Albert ARIBAUD
Le 12/07/2010 07:49, Prafulla Wadaskar a écrit :


 -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 Aribaudalbert.arib...@free.fr
 ---

 Pls break this patch as-
   arch/arm/cpu/arm926ejs/kirkwood/cpu.c |4 +-
   arch/arm/include/asm/arch-kirkwood/kirkwood.h |5 +
 Kirkwood SOC specific

   drivers/net/Makefile  |2 +-
   drivers/net/mv_egiga.c|  322
 +-
   drivers/net/mv_egiga.h|  466
   include/netdev.h  |2 +-
 Net: driver specific for net repo

 
   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 +-

 Board updates
 In the same order, so that it is easier to pick them separately by net and 
 Marvell repos.

 Regards..
 Prafulla . .

If I split this patch, it will not build correctly any more.

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood

2010-07-12 Thread Ben Warren
Hi Albert,

On Mon, Jul 12, 2010 at 1:53 AM, Albert ARIBAUD albert.arib...@free.frwrote:

 Le 12/07/2010 08:53, Prafulla Wadaskar a écrit :

 -   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...


 That's true.
 But if we can do it why to avoid it? again it helps to keep same
 indentation (keeping them below 80char size)


 I don't think I changed indentation here, and the issue is about line
 lengths, right?

 Initially I chose mv egiga because the file names used egiga while the code
 used gbe, and I wanted clarity, so I decided to keep only one of egiga and
 gbe. Now which one I should keep is not really important to me, and a Google
 search for marvell egiga vs marvell gbe indicates gbe appears much more
 frequently, so someone looking into this will probably know GbE more than
 egiga.

 I suggest that:

 - I switch the file names from mv_egiga to mvgbe (to be consistent with
 Prafulla's comment on mv_sata becoming mvsata), and

 - I replace mv_egiga/MV_EGIGA symbols with mvgbe/MVGBE.

 That will retain (as much) clarity and uniformity (as egiga does), which is
 what I think Ben is looking for, and it'll keep name length at a minimum,
 which should satisfy Prafulla.

 Ben, Prafulla (and others as well, of course), do you agree?

OK with me.



Amicalement,
 --
 Albert.

regards,
Ben
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood

2010-07-12 Thread Ben Warren
Hi Albert,

On Mon, Jul 12, 2010 at 1:56 AM, Albert ARIBAUD albert.arib...@free.frwrote:

 Le 12/07/2010 07:49, Prafulla Wadaskar a écrit :
 
 
  -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 Aribaudalbert.arib...@free.fr
  ---
 
  Pls break this patch as-
arch/arm/cpu/arm926ejs/kirkwood/cpu.c |4 +-
arch/arm/include/asm/arch-kirkwood/kirkwood.h |5 +
  Kirkwood SOC specific
 
drivers/net/Makefile  |2 +-
drivers/net/mv_egiga.c|  322
  +-
drivers/net/mv_egiga.h|  466
include/netdev.h  |2 +-
  Net: driver specific for net repo
 
  
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 +-
 
  Board updates
  In the same order, so that it is easier to pick them separately by net
 and Marvell repos.
 
  Regards..
  Prafulla . .

 If I split this patch, it will not build correctly any more.

 Usually, these should be split up.  In this case, the dependencies are
significant, so just leave it as-is.  If Prafulla ACKs, I'll pull the whole
group into the net repo.

 Amicalement,
 --
 Albert.

regards,
Ben

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood

2010-07-12 Thread Albert ARIBAUD
Le 12/07/2010 16:19, Ben Warren a écrit :
 I suggest that:

 - I switch the file names from mv_egiga to mvgbe (to be consistent
 with Prafulla's comment on mv_sata becoming mvsata), and

 - I replace mv_egiga/MV_EGIGA symbols with mvgbe/MVGBE.

 That will retain (as much) clarity and uniformity (as egiga does),
 which is what I think Ben is looking for, and it'll keep name length
 at a minimum, which should satisfy Prafulla.

 Ben, Prafulla (and others as well, of course), do you agree?

 OK with me.

Thanks Ben. I assume Prafulla will agree too. I'll regenerate a patch 
set with all changes requested by Prafulla, keeping the symbol-change in 
a single patch as discussed elsewhere in this thread.

Note that the last patch of the series (edminiv2 support) will only 
build above the CONFIG_SKIP_LOCAL_MAC_RANDOMIZATION patch that I posted 
separately.

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood

2010-07-12 Thread Albert ARIBAUD
Le 12/07/2010 07:45, Prafulla Wadaskar a écrit :

 --- a/arch/arm/include/asm/arch-kirkwood/kirkwood.h
 +++ b/arch/arm/include/asm/arch-kirkwood/kirkwood.h

 +#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

Actually the ifdef is intended to make sure these symbols do not get 
defined uselessly for kirkwood boards that don't have Ethernet support. 
Granted, their being defined without being used is no big deal.

However the whole thing about the egiga driver supporting one or two 
ports could be streamlined (e.g., one might define KIRKWOOD_EGIGAn_BASE 
while not enabling port n in CONFIG_KIRKWOOD_EGIGA_PORTS) and integrate 
the suggestion about the PHYs that occurred some time ago:

http://lists.denx.de/pipermail/u-boot/2010-June/073138.html

So I'll leave that one to a later patch set.

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood

2010-07-12 Thread Prafulla Wadaskar
 

 -Original Message-
 From: Ben Warren [mailto:biggerbadder...@gmail.com] 
 Sent: Monday, July 12, 2010 7:54 PM
 To: Albert ARIBAUD
 Cc: Prafulla Wadaskar; u-boot@lists.denx.de
 Subject: Re: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs 
 other than kirkwood
 
 Hi Albert,
 
 
 On Mon, Jul 12, 2010 at 1:56 AM, Albert ARIBAUD 
 albert.arib...@free.fr wrote:
 
 
   Le 12/07/2010 07:49, Prafulla Wadaskar a écrit :
   
   
   
-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 Aribaudalbert.arib...@free.fr
---
   
   
Pls break this patch as-
   
  arch/arm/cpu/arm926ejs/kirkwood/cpu.c |4 +-
  arch/arm/include/asm/arch-kirkwood/kirkwood.h |5 +
   
Kirkwood SOC specific
   
   
  drivers/net/Makefile  |2 +-
  drivers/net/mv_egiga.c|  322
+-
  drivers/net/mv_egiga.h|  466
   
  include/netdev.h  |2 +-
Net: driver specific for net repo
   
   

  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 +-
   
   
Board updates
In the same order, so that it is easier to pick them 
 separately by net and Marvell repos.
   
Regards..
Prafulla . .
   
   If I split this patch, it will not build correctly any more.
   
   
 
 Usually, these should be split up.  In this case, the 
 dependencies are significant, so just leave it as-is.  If 
 Prafulla ACKs, I'll pull the whole group into the net repo. 

Ack
Hi Ben, its good if you pull entire patch series.

Regards..
Prafulla . .
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood

2010-07-11 Thread Prafulla Wadaskar
 

 -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

Re: [U-Boot] [PATCH V3 2/5] mv_egiga: support SoCs other than kirkwood

2010-07-11 Thread Prafulla Wadaskar
 

 -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
 ---

Pls break this patch as-
  arch/arm/cpu/arm926ejs/kirkwood/cpu.c |4 +-
  arch/arm/include/asm/arch-kirkwood/kirkwood.h |5 +
Kirkwood SOC specific

  drivers/net/Makefile  |2 +-
  drivers/net/mv_egiga.c|  322 
 +-
  drivers/net/mv_egiga.h|  466
  include/netdev.h  |2 +-
Net: driver specific for net repo
 
 
  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 +-

Board updates
In the same order, so that it is easier to pick them separately by net and 
Marvell repos.

Regards..
Prafulla . .
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot