public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] different definition of struct bd_info between U-Boot and Linux
@ 2007-05-23 16:11 Linux OneAccess
  2007-05-24 10:35 ` Stefan Roese
  0 siblings, 1 reply; 3+ messages in thread
From: Linux OneAccess @ 2007-05-23 16:11 UTC (permalink / raw)
  To: u-boot

Hi all,

I was figuring out how to pass board info from U-Boot to Linux and
I saw that Linux references the bd_info structure.

I'm not sure, however, which definition to use:
In U-Boot, struct bd_info is defined in include/asm/u-boot.h
In Linux, it's defined in include/asm-ppc/ppcboot.h.

These two are somewhat different (different #ifdefs) which means
the first few members (RAM size and such) are the same, but from
then on it can diverge.

Furthermore, in Linux there are several boards that define their
own structure for this. Should we use the ppcboot.h definition,
or is it there an intention to push the u-boot.h to the Linux tree one day?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070523/bee420f8/attachment.htm 

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

* [U-Boot-Users] different definition of struct bd_info between U-Boot and Linux
  2007-05-23 16:11 [U-Boot-Users] different definition of struct bd_info between U-Boot and Linux Linux OneAccess
@ 2007-05-24 10:35 ` Stefan Roese
  2007-05-24 12:03   ` Linux OneAccess
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Roese @ 2007-05-24 10:35 UTC (permalink / raw)
  To: u-boot

On Wednesday 23 May 2007, Linux OneAccess wrote:
> I was figuring out how to pass board info from U-Boot to Linux and
> I saw that Linux references the bd_info structure.
>
> I'm not sure, however, which definition to use:
> In U-Boot, struct bd_info is defined in include/asm/u-boot.h
> In Linux, it's defined in include/asm-ppc/ppcboot.h.
>
> These two are somewhat different (different #ifdefs) which means
> the first few members (RAM size and such) are the same, but from
> then on it can diverge.

Yes, this is quite a mess. One of the reasons that this bd_info structure 
will "die" with the end of the arch/ppc support in the Linux kernel (I assume 
you know of the arch/ppc -> arch/powerpc merge). In arch/powerpc another 
mechanism is used to pass information from the bootloader to the linux 
kernel.

> Furthermore, in Linux there are several boards that define their
> own structure for this. Should we use the ppcboot.h definition,
> or is it there an intention to push the u-boot.h to the Linux tree one day?

This depends on the PPC platform you are using. What PPC platform are you 
talking about? MPC8xx, PPC4xx? MPC8xxx is quite dead in arch/ppc already for 
example and you should start your board port in arch/powerpc. If it's PPC4xx, 
then you should probably still use bd_info in arch/ppc, and it really doesn't 
matter how you hack the bd_info in the kernel, since it has to be moved to 
arch/powerpc in the future anyway. I would suggest to define a "own" board 
specific bd_info for now, to not pollute the asm-ppc/ppcboot.h with further 
#ifdefs.

Hope this helps.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

* [U-Boot-Users] different definition of struct bd_info between U-Boot and Linux
  2007-05-24 10:35 ` Stefan Roese
@ 2007-05-24 12:03   ` Linux OneAccess
  0 siblings, 0 replies; 3+ messages in thread
From: Linux OneAccess @ 2007-05-24 12:03 UTC (permalink / raw)
  To: u-boot

On 5/24/07, Stefan Roese <sr@denx.de> wrote:
>
> On Wednesday 23 May 2007, Linux OneAccess wrote:
> > I was figuring out how to pass board info from U-Boot to Linux and
> > I saw that Linux references the bd_info structure.
> >
> > I'm not sure, however, which definition to use:
> > In U-Boot, struct bd_info is defined in include/asm/u-boot.h
> > In Linux, it's defined in include/asm-ppc/ppcboot.h.
> > ...
> > Furthermore, in Linux there are several boards that define their
> > own structure for this. Should we use the ppcboot.h definition,
> > or is it there an intention to push the u-boot.h to the Linux tree one
> day?
>
> This depends on the PPC platform you are using. What PPC platform are you
> talking about? MPC8xx, PPC4xx? MPC8xxx is quite dead in arch/ppc already
> for
> example and you should start your board port in arch/powerpc. If it's
> PPC4xx,
> then you should probably still use bd_info in arch/ppc, and it really
> doesn't
> matter how you hack the bd_info in the kernel, since it has to be moved to
> arch/powerpc in the future anyway. I would suggest to define a "own" board
> specific bd_info for now, to not pollute the asm-ppc/ppcboot.h with
> further
> #ifdefs.


It's an MPC8280.
I agree it's best for now to pass the info our own way.

> Hope this helps.
>
> Best regards,
> Stefan
>
Thanks for helping,

Marnix Coppens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070524/8bfa5755/attachment.htm 

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

end of thread, other threads:[~2007-05-24 12:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-23 16:11 [U-Boot-Users] different definition of struct bd_info between U-Boot and Linux Linux OneAccess
2007-05-24 10:35 ` Stefan Roese
2007-05-24 12:03   ` Linux OneAccess

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