public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] different definition of struct bd_info between U-Boot and Linux
Date: Thu, 24 May 2007 12:35:12 +0200	[thread overview]
Message-ID: <200705241235.12338.sr@denx.de> (raw)
In-Reply-To: <3623ecc10705230911u5e69888ep286ec3d2f42a6ce2@mail.gmail.com>

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

  reply	other threads:[~2007-05-24 10:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2007-05-24 12:03   ` Linux OneAccess

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200705241235.12338.sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox