resend#3 [PATCH 6/8] ColdFire: Add MCF547x_8x FEC driver
Subsystems (2)
--- drivers/net/Makefile | 1 + drivers/net/fsl_mcdmafec.c | 583 ++++++++++++++++++++++++++++++++++++++++++++ net/eth.c | 4 + 3 files changed, 588 insertions(+), 0 deletions(-) create mode 100644 drivers/net/fsl_mcdmafec.c
drivers/net/Makefile +1 -0
@@ -33,6 +33,7 @@ COBJS-y += dm9000x.o COBJS-y += e1000.o COBJS-y += eepro100.o COBJS-y += enc28j60.o +COBJS-y += fsl_mcdmafec.o COBJS-y += inca-ip_sw.o COBJS-y += ks8695eth.o COBJS-y += lan91c96.o
drivers/net/fsl_mcdmafec.c new file +583 -0
583 lines not on this page · raw message
net/eth.c +4 -0
@@ -61,6 +61,7 @@ extern int uec_initialize(int);extern int bfin_EMAC_initialize (bd_t *);extern int atstk1000_eth_initialize (bd_t *);extern int mcffec_initialize (bd_t *); +extern int mcdmafec_initialize (bd_t *);#ifdef CONFIG_API extern void (*push_packet)(volatile void *,int );
@@ -272,6 +273,9 @@ int eth_initialize(bd_t *bis)#if defined(CONFIG_MCFFEC )mcffec_initialize (bis);#endif +#if defined(CONFIG_FSLDMAFEC ) +mcdmafec_initialize (bis); +#endif if (!eth_devices) {puts ("No ethernet found.\n" );
Signature · 1 line
1.5.2
Hi Tsi-Chung,
Tsi-Chung Liew wrote:
<snip>
drivers/net/fsl_mcdmafec.c line 120
Quoted 6 lines
drivers/net/fsl_mcdmafec.c new file +5
-0+ +static int fec_send (struct eth_device *dev,volatile void *packet,int length); +static int fec_recv (struct eth_device *dev); +static int fec_init (struct eth_device *dev,bd_t * bd); +static void fec_halt (struct eth_device *dev);
You don't need these prototypes.
drivers/net/fsl_mcdmafec.c line 131
Quoted 12 lines
drivers/net/fsl_mcdmafec.c new file +11
-0+extern int fecpin_setclear (struct eth_device *dev,int setclear); + +#ifdef CFG_DISCOVER_PHY +extern void mii_init (void ); +extern uint mii_send (uint mii_cmd); +extern int mii_discover_phy (struct eth_device *dev); +extern int mcffec_miiphy_read (char *devname,unsigned char addr, +unsigned char reg,unsigned short *value); +extern int mcffec_miiphy_write (char *devname,unsigned char addr, +unsigned char reg,unsigned short value); +#endif
There's no need to #ifdef prototypes, and the extern'ed ones are in header files that
you've included (or should be).
Since this patch relies on others in the series, it doesn' t make sense for me to apply it.
John, if the code compiles fine with these removed, please add this to the patch and apply:
Thanks very much for your contribution, Tsi-Chung.
regards,
Ben
Ben,
The prototypes have place in include/asm-m68k/fsl_mcdmafec.h.
Regards,
TsiChung
-----Original Message-----
From: Ben Warren [mailto:biggerbadderben at gmail.com]
Sent: Wednesday, January 16, 2008 8:33 PM
To: Liew Tsi Chung
Cc: U-Boot-Users; Wolfgang Denx; Rigby John
Subject: Re: [U-Boot-Users] resend#3 [PATCH 6/8] ColdFire: Add MCF547x_8x FEC driver
Hi Tsi-Chung,
Tsi-Chung Liew wrote:
<snip>
Review
Quoted 6 lines
(quoted diff) +5
-0+ +static int fec_send(struct eth_device *dev, volatile void *packet, +int length); static int fec_recv(struct eth_device *dev); static int +fec_init(struct eth_device *dev, bd_t * bd); static void +fec_halt(struct eth_device *dev);
You don't need these prototypes.
drivers/net/fsl_mcdmafec.c line 128
Quoted 8 lines
drivers/net/fsl_mcdmafec.c new file +8
-0+extern int fecpin_setclear (struct eth_device *dev,int setclear); + +#ifdef CFG_DISCOVER_PHY +extern void mii_init (void ); +extern uint mii_send (uint mii_cmd); +extern int mii_discover_phy (struct eth_device *dev);extern int +mcffec_miiphy_read (char *devname,unsigned char addr, +unsigned char reg,unsigned short *value);
extern int
Review
Quoted 2 lines
(quoted diff) +2
-0+mcffec_miiphy_write(char *devname, unsigned char addr, + unsigned char reg, unsigned short value);
#endif
Quoted 1 line
There's no need to #ifdef prototypes, and the extern'ed ones are in header files that you've included (or should be).
Since this patch relies on others in the series, it doesn' t make sense for me to apply it.
John, if the code compiles fine with these removed, please add this to the patch and apply:
Thanks very much for your contribution, Tsi-Chung.
regards,
Ben
Quoted 8 lines · Liew Tsi Chung
Ben,
The prototypes have place in
include/asm-m68k/fsl_mcdmafec.h.Regards,
TsiChung
Right, so there's no need to mention them in C code. Less is more, as they say.
regards,
Ben
Ben,
Quoted 2 lines
Right, so there's no need to mention them in C code. Less is more, as they say.
Agree.
So, everything ok now?
Regards,
TsiChung
-----Original Message-----
From: Ben Warren [mailto:biggerbadderben at gmail.com]
Sent: Thursday, January 17, 2008 12:27 PM
To: Liew Tsi Chung
Cc: U-Boot-Users; Wolfgang Denx; Rigby John
Subject: Re: [U-Boot-Users] resend#3 [PATCH 6/8] ColdFire: Add MCF547x_8x FEC driver
Quoted 8 lines · Liew Tsi Chung
Ben,
The prototypes have place in
include/asm-m68k/fsl_mcdmafec.h.Regards,
TsiChung
Right, so there's no need to mention them in C code. Less is more, as they say.
regards,
Ben
Quoted 11 lines · Liew Tsi Chung
Ben,
Quoted 3 lines
Right, so there's no need to mention them in C code. Less is more, as they say.
Agree.
So, everything ok now?
I haven't seen the patch that removes the prototypes, but it's quite possible I looked past it. In a previous e-mail I added a 'signed-off-by' that John Rigby can add to the patch commit. I consider this to be a Coldfire patch because it's dependent on other patches in the series and I have no way of testing it.
I hope that's OK.
regards,
Ben
Quoted 29 lines
Regards,
TsiChung-----Original Message-----
From: Ben Warren [mailto:biggerbadderben at gmail.com]
Sent: Thursday, January 17, 2008 12:27 PM
To: Liew Tsi Chung
Cc: U-Boot-Users; Wolfgang Denx; Rigby John
Subject: Re: [U-Boot-Users] resend#3 [PATCH 6/8] ColdFire: AddMCF547x_8xFEC driverQuoted 9 lines · Liew Tsi Chung
Ben,
The prototypes have place in
include/asm-m68k/fsl_mcdmafec.h.Regards,
TsiChungRight, so there's no need to mention them in C code. Less is more, as they say.
regards,
Ben