[U-Boot] [PATCH] net: Fix faulty definition of uec_initialize()

The correct definition is in drivers/qe/uec.h so just include that one instead.
Signed-off-by: Joakim Tjernlund Joakim.Tjernlund@transmode.se ---
This is only compile tested on my board but hopefully it will do. If not, I urge Freescale to clean up this mess.
include/netdev.h | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/include/netdev.h b/include/netdev.h index 882642a..0873baf 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -83,12 +83,10 @@ int skge_initialize(bd_t *bis); int smc911x_initialize(u8 dev_num, int base_addr); int smc91111_initialize(u8 dev_num, int base_addr); int tsi108_eth_initialize(bd_t *bis); -int uec_initialize(int index); -int uec_standard_init(bd_t *bis); int uli526x_initialize(bd_t *bis); int sh_eth_initialize(bd_t *bis); int dm9000_initialize(bd_t *bis); - +#include "../drivers/qe/uec.h" /* Boards with PCI network controllers can call this from their board_eth_init() * function to initialize whatever's on board. * Return value is total # of devices found */

On Mon, Aug 9, 2010 at 3:15 PM, Joakim Tjernlund wrote:
The correct definition is in drivers/qe/uec.h so just include that one instead.
... except that bleeds a ton of crap from uec.h into the global namespace for everyone. better would be to move the prototype out of uec.h and into netdev.h and make sure uec.h includes netdev.h. -mike

On 8/9/2010 1:18 PM, Mike Frysinger wrote:
On Mon, Aug 9, 2010 at 3:15 PM, Joakim Tjernlund wrote:
The correct definition is in drivers/qe/uec.h so just include that one instead.
... except that bleeds a ton of crap from uec.h into the global namespace for everyone. better would be to move the prototype out of uec.h and into netdev.h and make sure uec.h includes netdev.h. -mike _______
Agreed. Please find a way to have UEC-related stuff only on boards that care about it.
regards, Ben

Ben Warren biggerbadderben@gmail.com wrote on 2010/08/09 22:54:10:
On 8/9/2010 1:18 PM, Mike Frysinger wrote:
On Mon, Aug 9, 2010 at 3:15 PM, Joakim Tjernlund wrote:
The correct definition is in drivers/qe/uec.h so just include that one instead.
... except that bleeds a ton of crap from uec.h into the global namespace for everyone. better would be to move the prototype out of uec.h and into netdev.h and make sure uec.h includes netdev.h.
hmm, then the public include file for UEC users become "../drivers/uec.h" while every one else uses netdev.h, doesn't seem the right way go
BTW, UEC users needs the macro STD_UEC_INFO() too.
-mike _______
Agreed. Please find a way to have UEC-related stuff only on boards that care about it.
OK, but I will let Freescale sort this out. I just wanted to fix the compile breakage I noticed while upgrading my board to latest u-boot(still in progress)

On Tue, Aug 10, 2010 at 1:52 AM, Joakim Tjernlund wrote:
Ben Warren wrote on 2010/08/09 22:54:10:
On 8/9/2010 1:18 PM, Mike Frysinger wrote:
On Mon, Aug 9, 2010 at 3:15 PM, Joakim Tjernlund wrote:
The correct definition is in drivers/qe/uec.h so just include that one instead.
... except that bleeds a ton of crap from uec.h into the global namespace for everyone. better would be to move the prototype out of uec.h and into netdev.h and make sure uec.h includes netdev.h.
hmm, then the public include file for UEC users become "../drivers/uec.h" while every one else uses netdev.h, doesn't seem the right way go
which isnt uncommon today. simply grep the tree for "include.*drivers/net/". while i agree it isnt exactly a great idea, there is no clean standard today in u-boot for drivers to expose their internals to random consumers. some drivers dump their header files into include/, so personally, i prefer the include ../driver/net/.. style over that.
BTW, UEC users needs the macro STD_UEC_INFO() too.
emphasis on "UEC users" and not "everyone". -mike

vapierfilter@gmail.com wrote on 2010/08/10 08:04:02:
On Tue, Aug 10, 2010 at 1:52 AM, Joakim Tjernlund wrote:
Ben Warren wrote on 2010/08/09 22:54:10:
On 8/9/2010 1:18 PM, Mike Frysinger wrote:
On Mon, Aug 9, 2010 at 3:15 PM, Joakim Tjernlund wrote:
The correct definition is in drivers/qe/uec.h so just include that one instead.
... except that bleeds a ton of crap from uec.h into the global namespace for everyone. better would be to move the prototype out of uec.h and into netdev.h and make sure uec.h includes netdev.h.
hmm, then the public include file for UEC users become "../drivers/uec.h" while every one else uses netdev.h, doesn't seem the right way go
which isnt uncommon today. simply grep the tree for "include.*drivers/net/". while i agree it isnt exactly a great idea, there is no clean standard today in u-boot for drivers to expose their internals to random consumers. some drivers dump their header files into include/, so personally, i prefer the include ../driver/net/.. style over that.
I see, but that defeats the purpose of netdev.h I think. Oh well, just gonna have to live with that then.
Jocke

The correct definition is in drivers/qe/uec.h so just remove this one.
Signed-off-by: Joakim Tjernlund Joakim.Tjernlund@transmode.se --- include/netdev.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/include/netdev.h b/include/netdev.h index 882642a..65833e2 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -83,7 +83,6 @@ int skge_initialize(bd_t *bis); int smc911x_initialize(u8 dev_num, int base_addr); int smc91111_initialize(u8 dev_num, int base_addr); int tsi108_eth_initialize(bd_t *bis); -int uec_initialize(int index); int uec_standard_init(bd_t *bis); int uli526x_initialize(bd_t *bis); int sh_eth_initialize(bd_t *bis);

Hi Jocke,
On 8/19/2010 12:37 AM, Joakim Tjernlund wrote:
The correct definition is in drivers/qe/uec.h so just remove this one.
Signed-off-by: Joakim TjernlundJoakim.Tjernlund@transmode.se
include/netdev.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/include/netdev.h b/include/netdev.h index 882642a..65833e2 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -83,7 +83,6 @@ int skge_initialize(bd_t *bis); int smc911x_initialize(u8 dev_num, int base_addr); int smc91111_initialize(u8 dev_num, int base_addr); int tsi108_eth_initialize(bd_t *bis); -int uec_initialize(int index); int uec_standard_init(bd_t *bis); int uli526x_initialize(bd_t *bis); int sh_eth_initialize(bd_t *bis);
Applied to net/next
regards, Ben
participants (4)
-
Ben Warren
-
Joakim Tjernlund
-
Joakim Tjernlund
-
Mike Frysinger