public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] MPC83xx and uec
@ 2009-09-22  7:27 Joakim Tjernlund
  2009-09-22 11:02 ` Joakim Tjernlund
  0 siblings, 1 reply; 8+ messages in thread
From: Joakim Tjernlund @ 2009-09-22  7:27 UTC (permalink / raw)
  To: u-boot


I can't find a way to get at uec_info_t/STD_UEC_INFO from my board_eth_init() in current u-boot. Am I missing something?
Also
 drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
 include/netdev.h:int uec_initialize(int index);
different prototypes for the same function.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC83xx and uec
  2009-09-22  7:27 [U-Boot] MPC83xx and uec Joakim Tjernlund
@ 2009-09-22 11:02 ` Joakim Tjernlund
  2009-09-22 13:51   ` Anton Vorontsov
  0 siblings, 1 reply; 8+ messages in thread
From: Joakim Tjernlund @ 2009-09-22 11:02 UTC (permalink / raw)
  To: u-boot

>
>
> I can't find a way to get at uec_info_t/STD_UEC_INFO from my board_eth_init()
> in current u-boot. Am I missing something?
> Also
>  drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
>  include/netdev.h:int uec_initialize(int index);
> different prototypes for the same function.

BTW, I am looking for a way to swap the order of ethernet interfaces:
static uec_info_t uec_info[] = {
#ifdef CONFIG_UEC_ETH1
	STD_UEC_INFO(1),	/* UEC1 */
#endif
#ifdef CONFIG_UEC_ETH2
	STD_UEC_INFO(2),	/* UEC2 */
#endif
#ifdef CONFIG_UEC_ETH3
	STD_UEC_INFO(3),	/* UEC3 */
#endif
};

Sometimes I want ETH2 to be the first and ETH1 the second I/F and I do this
dynamically depending on actual HW detected.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC83xx and uec
  2009-09-22 11:02 ` Joakim Tjernlund
@ 2009-09-22 13:51   ` Anton Vorontsov
  2009-09-22 14:03     ` Joakim Tjernlund
  0 siblings, 1 reply; 8+ messages in thread
From: Anton Vorontsov @ 2009-09-22 13:51 UTC (permalink / raw)
  To: u-boot

On Tue, Sep 22, 2009 at 01:02:27PM +0200, Joakim Tjernlund wrote:
> >
> >
> > I can't find a way to get at uec_info_t/STD_UEC_INFO from my board_eth_init()
> > in current u-boot. Am I missing something?
> > Also
> >  drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
> >  include/netdev.h:int uec_initialize(int index);
> > different prototypes for the same function.
> 
> BTW, I am looking for a way to swap the order of ethernet interfaces:
> static uec_info_t uec_info[] = {
> #ifdef CONFIG_UEC_ETH1
> 	STD_UEC_INFO(1),	/* UEC1 */
> #endif
> #ifdef CONFIG_UEC_ETH2
> 	STD_UEC_INFO(2),	/* UEC2 */
> #endif
> #ifdef CONFIG_UEC_ETH3
> 	STD_UEC_INFO(3),	/* UEC3 */
> #endif
> };

Works for me:

http://lists.denx.de/pipermail/u-boot/2009-September/060821.html

You'll also need this patch:

http://lists.denx.de/pipermail/u-boot/2009-September/060819.html

-- 
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC83xx and uec
  2009-09-22 13:51   ` Anton Vorontsov
@ 2009-09-22 14:03     ` Joakim Tjernlund
  2009-09-22 14:14       ` Anton Vorontsov
  0 siblings, 1 reply; 8+ messages in thread
From: Joakim Tjernlund @ 2009-09-22 14:03 UTC (permalink / raw)
  To: u-boot



Anton Vorontsov <avorontsov@ru.mvista.com> wrote on 22/09/2009 15:51:17:

> From:
>
> Anton Vorontsov <avorontsov@ru.mvista.com>
>
> To:
>
> Joakim Tjernlund <joakim.tjernlund@transmode.se>
>
> Cc:
>
> u-boot at lists.denx.de, kim.phillips at freescale.com
>
> Date:
>
> 22/09/2009 15:51
>
> Subject:
>
> Re: [U-Boot] MPC83xx and uec
>
> On Tue, Sep 22, 2009 at 01:02:27PM +0200, Joakim Tjernlund wrote:
> > >
> > >
> > > I can't find a way to get at uec_info_t/STD_UEC_INFO from my board_eth_init()
> > > in current u-boot. Am I missing something?
> > > Also
> > >  drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
> > >  include/netdev.h:int uec_initialize(int index);
> > > different prototypes for the same function.
> >
> > BTW, I am looking for a way to swap the order of ethernet interfaces:
> > static uec_info_t uec_info[] = {
> > #ifdef CONFIG_UEC_ETH1
> >    STD_UEC_INFO(1),   /* UEC1 */
> > #endif
> > #ifdef CONFIG_UEC_ETH2
> >    STD_UEC_INFO(2),   /* UEC2 */
> > #endif
> > #ifdef CONFIG_UEC_ETH3
> >    STD_UEC_INFO(3),   /* UEC3 */
> > #endif
> > };
>
> Works for me:
>
> http://lists.denx.de/pipermail/u-boot/2009-September/060821.html

Right, but I don't consider a include as this:
  +#include "../../../drivers/qe/uec.h"
as the correct way of getting of required data types and macros.
Consider that uec_initialize() is exported by netdev.h (although with the
wrong prototype ATM). As far as I can tell, I should only have to include
netdev.h to get the required types and macros.

  Jocke

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC83xx and uec
  2009-09-22 14:03     ` Joakim Tjernlund
@ 2009-09-22 14:14       ` Anton Vorontsov
  2009-09-22 16:55         ` Ben Warren
  0 siblings, 1 reply; 8+ messages in thread
From: Anton Vorontsov @ 2009-09-22 14:14 UTC (permalink / raw)
  To: u-boot

On Tue, Sep 22, 2009 at 04:03:16PM +0200, Joakim Tjernlund wrote:
[...]
> > > > Also
> > > >  drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
> > > >  include/netdev.h:int uec_initialize(int index);
> > > > different prototypes for the same function.
> > >
> > > BTW, I am looking for a way to swap the order of ethernet interfaces:
> > > static uec_info_t uec_info[] = {
> > > #ifdef CONFIG_UEC_ETH1
> > >    STD_UEC_INFO(1),   /* UEC1 */
> > > #endif
> > > #ifdef CONFIG_UEC_ETH2
> > >    STD_UEC_INFO(2),   /* UEC2 */
> > > #endif
> > > #ifdef CONFIG_UEC_ETH3
> > >    STD_UEC_INFO(3),   /* UEC3 */
> > > #endif
> > > };
> >
> > Works for me:
> >
> > http://lists.denx.de/pipermail/u-boot/2009-September/060821.html
> 
> Right, but I don't consider a include as this:
>   +#include "../../../drivers/qe/uec.h"
> as the correct way of getting of required data types and macros.
> Consider that uec_initialize() is exported by netdev.h (although with the
> wrong prototype ATM). As far as I can tell, I should only have to include
> netdev.h to get the required types and macros.

Not sure if having all-in-one netdev header is a good idea.
It might be a good idea to move uec.h to "include/" though.

-- 
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC83xx and uec
  2009-09-22 14:14       ` Anton Vorontsov
@ 2009-09-22 16:55         ` Ben Warren
  2009-09-22 18:44           ` Joakim Tjernlund
  2009-10-22  8:31           ` Joakim Tjernlund
  0 siblings, 2 replies; 8+ messages in thread
From: Ben Warren @ 2009-09-22 16:55 UTC (permalink / raw)
  To: u-boot

Anton Vorontsov wrote:
> On Tue, Sep 22, 2009 at 04:03:16PM +0200, Joakim Tjernlund wrote:
> [...]
>   
>>>>> Also
>>>>>  drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
>>>>>  include/netdev.h:int uec_initialize(int index);
>>>>> different prototypes for the same function.
>>>>>           
>>>> BTW, I am looking for a way to swap the order of ethernet interfaces:
>>>> static uec_info_t uec_info[] = {
>>>> #ifdef CONFIG_UEC_ETH1
>>>>    STD_UEC_INFO(1),   /* UEC1 */
>>>> #endif
>>>> #ifdef CONFIG_UEC_ETH2
>>>>    STD_UEC_INFO(2),   /* UEC2 */
>>>> #endif
>>>> #ifdef CONFIG_UEC_ETH3
>>>>    STD_UEC_INFO(3),   /* UEC3 */
>>>> #endif
>>>> };
>>>>         
>>> Works for me:
>>>
>>> http://lists.denx.de/pipermail/u-boot/2009-September/060821.html
>>>       
>> Right, but I don't consider a include as this:
>>   +#include "../../../drivers/qe/uec.h"
>> as the correct way of getting of required data types and macros.
>> Consider that uec_initialize() is exported by netdev.h (although with the
>> wrong prototype ATM). As far as I can tell, I should only have to include
>> netdev.h to get the required types and macros.
>>     
>
> Not sure if having all-in-one netdev header is a good idea.
> It might be a good idea to move uec.h to "include/" though.
>
>   
This needs to be cleaned up.  THE prototype for the global initialize() 
function needs to be in netdev.h and nowhere else.

BTW - can't you effectively swap the order of the Ethernet interfaces at 
runtime using the 'ethprime' environment variable?

regards,
Ben

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC83xx and uec
  2009-09-22 16:55         ` Ben Warren
@ 2009-09-22 18:44           ` Joakim Tjernlund
  2009-10-22  8:31           ` Joakim Tjernlund
  1 sibling, 0 replies; 8+ messages in thread
From: Joakim Tjernlund @ 2009-09-22 18:44 UTC (permalink / raw)
  To: u-boot

Ben Warren <biggerbadderben@gmail.com> wrote on 22/09/2009 18:55:22:
>
> Anton Vorontsov wrote:
> > On Tue, Sep 22, 2009 at 04:03:16PM +0200, Joakim Tjernlund wrote:
> > [...]
> >
> >>>>> Also
> >>>>>  drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
> >>>>>  include/netdev.h:int uec_initialize(int index);
> >>>>> different prototypes for the same function.
> >>>>>
> >>>> BTW, I am looking for a way to swap the order of ethernet interfaces:
> >>>> static uec_info_t uec_info[] = {
> >>>> #ifdef CONFIG_UEC_ETH1
> >>>>    STD_UEC_INFO(1),   /* UEC1 */
> >>>> #endif
> >>>> #ifdef CONFIG_UEC_ETH2
> >>>>    STD_UEC_INFO(2),   /* UEC2 */
> >>>> #endif
> >>>> #ifdef CONFIG_UEC_ETH3
> >>>>    STD_UEC_INFO(3),   /* UEC3 */
> >>>> #endif
> >>>> };
> >>>>
> >>> Works for me:
> >>>
> >>> http://lists.denx.de/pipermail/u-boot/2009-September/060821.html
> >>>
> >> Right, but I don't consider a include as this:
> >>   +#include "../../../drivers/qe/uec.h"
> >> as the correct way of getting of required data types and macros.
> >> Consider that uec_initialize() is exported by netdev.h (although with the
> >> wrong prototype ATM). As far as I can tell, I should only have to include
> >> netdev.h to get the required types and macros.
> >>
> >
> > Not sure if having all-in-one netdev header is a good idea.
> > It might be a good idea to move uec.h to "include/" though.
> >
> >
> This needs to be cleaned up.  THE prototype for the global initialize()
> function needs to be in netdev.h and nowhere else.
>
> BTW - can't you effectively swap the order of the Ethernet interfaces at
> runtime using the 'ethprime' environment variable?

I did this quite some time ago so memory isn't fresh, but at time
I looked high and low(including ethprime) and nothing worked all the way so I
ended up swapping by patching generic code instead. Now I can do the
same in board code, but current u-boot is a bit fuzzy in this area.

  Jocke

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC83xx and uec
  2009-09-22 16:55         ` Ben Warren
  2009-09-22 18:44           ` Joakim Tjernlund
@ 2009-10-22  8:31           ` Joakim Tjernlund
  1 sibling, 0 replies; 8+ messages in thread
From: Joakim Tjernlund @ 2009-10-22  8:31 UTC (permalink / raw)
  To: u-boot

Ben Warren <biggerbadderben@gmail.com> wrote on 22/09/2009 18:55:22:
>
> Anton Vorontsov wrote:
> > On Tue, Sep 22, 2009 at 04:03:16PM +0200, Joakim Tjernlund wrote:
> > [...]
> >
> >>>>> Also
> >>>>>  drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
> >>>>>  include/netdev.h:int uec_initialize(int index);
> >>>>> different prototypes for the same function.
> >>>>>
> >>>> BTW, I am looking for a way to swap the order of ethernet interfaces:
> >>>> static uec_info_t uec_info[] = {
> >>>> #ifdef CONFIG_UEC_ETH1
> >>>>    STD_UEC_INFO(1),   /* UEC1 */
> >>>> #endif
> >>>> #ifdef CONFIG_UEC_ETH2
> >>>>    STD_UEC_INFO(2),   /* UEC2 */
> >>>> #endif
> >>>> #ifdef CONFIG_UEC_ETH3
> >>>>    STD_UEC_INFO(3),   /* UEC3 */
> >>>> #endif
> >>>> };
> >>>>
> >>> Works for me:
> >>>
> >>> http://lists.denx.de/pipermail/u-boot/2009-September/060821.html
> >>>
> >> Right, but I don't consider a include as this:
> >>   +#include "../../../drivers/qe/uec.h"
> >> as the correct way of getting of required data types and macros.
> >> Consider that uec_initialize() is exported by netdev.h (although with the
> >> wrong prototype ATM). As far as I can tell, I should only have to include
> >> netdev.h to get the required types and macros.
> >>
> >
> > Not sure if having all-in-one netdev header is a good idea.
> > It might be a good idea to move uec.h to "include/" though.
> >
> >
> This needs to be cleaned up.  THE prototype for the global initialize()
> function needs to be in netdev.h and nowhere else.

Does not seem like this has been cleaned up yet.

    Jocke

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-10-22  8:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-22  7:27 [U-Boot] MPC83xx and uec Joakim Tjernlund
2009-09-22 11:02 ` Joakim Tjernlund
2009-09-22 13:51   ` Anton Vorontsov
2009-09-22 14:03     ` Joakim Tjernlund
2009-09-22 14:14       ` Anton Vorontsov
2009-09-22 16:55         ` Ben Warren
2009-09-22 18:44           ` Joakim Tjernlund
2009-10-22  8:31           ` Joakim Tjernlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox