linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "David H. Lynch Jr." <dhlii@dlasys.net>
Cc: linuxppc-embedded <linuxppc-embedded@ozlabs.org>
Subject: Re: [PATCH 2/5] [PPC] Merge common virtex header files
Date: Tue, 1 May 2007 00:54:07 -0600	[thread overview]
Message-ID: <528646bc0704302354w88454ddqfe01f35afa9fb204@mail.gmail.com> (raw)
In-Reply-To: <4636C1D7.9090309@dlasys.net>

On 4/30/07, David H. Lynch Jr. <dhlii@dlasys.net> wrote:
> Peter Korsgaard wrote:
> > GL> Alternate suggestion: Can we change virtex support to use the
> > GL> structure defined in ppcboot.h instead?  (I've actually got that
> > GL> change in my tree and was planning on posting it for review today
> > GL> or tomorrow).  bd_t is a stinking ugly mess, but things would be
> > GL> better if we standardize all virtex platforms on the stinking ugly
> > GL> mess shared by almost all the other ppc embedded board ports.
> >
> > That's where the ugly mess pops up - RedBoot uses another
> > (incompatible) bd_t definition than U-boot, E.G:
> >
> > typedef struct bd_info {
> >       unsigned int   bi_tag;        /* Should be 0x42444944 "BDID" */
> >
> snip
> >
> >       int            bi_flashwidth; /* Width (8,16,32,64) */
> >       unsigned char *bi_cmdline;    /* Pointer to command line */
> > } bd_t;
> >
> > I should probably migrate to U-boot anyway, but still ..
> >
>
>     Can we please not standardize on some specific implimentation of
> bd_info ?
>
>     We have our own bootloader - actually a monitor. It does alot of
> things besides boot Linux.
>     and it does so in less than 16K.
>     our bd_info struct is used to pass info to OS's besides Linux.
>     It does not have all the crap the u-boot bd_info has in it that has
> no meaning for us.
>     But it does have some things that are very specific to our
> hardware/firmware.

I understand your concerns.  Here are my thoughts when I put together
this patch:

- Only the ML300 and ML403 board ports are in mainline.  There has
been no serious push to get other Virtex platforms supported from
mainline; so patches need to be applied *regardless* for any boards
other than the ml300 and ml403 ref designs.  Patching to a different
bd_t is trivial.
- Even ml300 and ml403 ports in mainline don't work for anything other
than zImage.  The custom bd_t doesn't buy us anything.
- bd_t is a truly awful solution to the problem of passing information
from bootloader to kernel.  In arch/ppc, we cannot get away from it,
so I want to minimize it's stinkyness as much as possible.  By moving
from the custom virtex bd_t to the one in ppcboot.h at least makes it
work with one of the boot loaders (u-boot).
3. Unfortunately, even in moving to arch/powerpc we're still stuck
with bd_t as long as we continue to support older boot loaders (via
the boot wrapper).  As such, I'm actively discouraging the practice of
board specific bd_t.  Between now and the move to arch/powerpc there
will be plenty of people starting new virtex board ports, and I want
to make it clear that custom bd_t's are strongly discouraged.
However, if you already have a board port w/ a different bd_t, then
it's still no problem.  It is trivial to conditionally omit
#include<ppcboot.h> in favor of a different bd_t.

>     Besides, I am not current on the powerpc tree but isn't this kind of
> thing what device trees are
>     supposed to be about and don't we have to do that anyway to migrate
> to the powerpc tree ?

Yes, the ideal is that a single kernel image will be bootable on any
Virtex FPGA design if it is passed the correct device tree by a
compliant boot loader, but we're not there yet and I don't want to
make the situation any worse between now and then.

Cheers,
g.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

  reply	other threads:[~2007-05-01  6:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-15  7:27 Patchset to establish sanity in Xilinx Virtex support Grant Likely
2007-04-15  7:27 ` [PATCH 1/5] [PPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform Grant Likely
2007-04-15  7:27   ` [PATCH 2/5] [PPC] Merge common virtex header files Grant Likely
2007-04-15  7:27     ` [PATCH 3/5] [PPC] New registration for common Xilinx Virtex ppc405 platform devices Grant Likely
2007-04-15  7:27       ` [PATCH 4/5] [PPC] Stop using ppc_sys for Xilinx Virtex boards Grant Likely
2007-04-15  7:27         ` [PATCH 5/5] [PPC] Add uartlite boot console driver for the zImage wrapper Grant Likely
2007-04-25 12:13           ` Peter Korsgaard
2007-04-25 12:12         ` [PATCH 4/5] [PPC] Stop using ppc_sys for Xilinx Virtex boards Peter Korsgaard
2007-04-25 12:11       ` [PATCH 3/5] [PPC] New registration for common Xilinx Virtex ppc405 platform devices Peter Korsgaard
2007-04-27 18:50         ` Grant Likely
2007-04-25 12:07     ` [PATCH 2/5] [PPC] Merge common virtex header files Peter Korsgaard
2007-04-27 18:49       ` Grant Likely
2007-04-30  4:26         ` Peter Korsgaard
2007-04-30  4:41           ` Grant Likely
2007-05-01  4:35             ` David H. Lynch Jr.
2007-05-01  7:16               ` Grant Likely
2007-05-01  4:28           ` David H. Lynch Jr.
2007-05-01  6:54             ` Grant Likely [this message]
2007-04-15 10:48   ` [PATCH 1/5] [PPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform Dale Farnsworth
2007-04-15 14:20     ` Grant Likely
2007-04-25 12:03   ` Peter Korsgaard

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=528646bc0704302354w88454ddqfe01f35afa9fb204@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=dhlii@dlasys.net \
    --cc=linuxppc-embedded@ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).