All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 0/19] Create generic board init and move ARM and x86 to it
Date: Sun, 01 Jan 2012 02:54:12 +0100	[thread overview]
Message-ID: <20120101015412.0C222196EDE3@gemini.denx.de> (raw)
In-Reply-To: <CAPnjgZ1Zim6=u3rLcnAKE-0Bw3sO_hRY+U67jkpkNoNi8g7ctw@mail.gmail.com>

Dear Simon Glass,

In message <CAPnjgZ1Zim6=u3rLcnAKE-0Bw3sO_hRY+U67jkpkNoNi8g7ctw@mail.gmail.com> you wrote:
> 
> Also it does depend on expectations. I would hope that moving an
> architecture over would be a fairly small task:
> 
> - getting generic relocation working

I don;t see why this would be a direct prerequisite here.  We want to
have that, no boubt about that.  But it appears to be an unrelated
change to me.

> - adding functions for anything that is missing from board init code

"anything that is missing from board init code" ?

> - removing things which don't work on the architecture?

That would probably reander systems broken that need these things?

> - worrying about differences in ordering between functions

This is indeed the biggest issue.

Keep in mind that my original ida of providing a function call table
was to allow to define this table in a board specific way (i. e. in
the board config file).

[Not that this idea found many friends...]

> > pull out common init code like init_baudrate() and hang() and change the
> > function signatures of the functions that require wrappers and move some
> > #ifdef's into more appropriate locations - One example in board.c:
> 
> Well it seems like a lot of work to refactor each arch/xxx/board.c
> file into functions with a function pointer list, then later remove
> this code function by function.

Would that really be a clever approach?

> My feeling is that with a generic board, it should hopefully be a
> fairly small amount of work for someone familiar with an architecture
> to find the bugs and patch the generic code to suit their
> architecture. It is something that needs to be done once, not every
> time there is a new patch removing (almost) common code.

It is definitely not that easy.  You fix one thing here, and break
another board there.  Ideally you would have to re-test any change on
_all_ boards.

> From previous discussions, if something is optional then the switch
> will never happen. The code you are talking about is sometimes
> identical, sometimes slightly different. In some cases the order is
> different. I see many ways of introducing breakages. I do agree that

And I bet most of them _will_ introduce breakages.

> doing one architecture at a time is best - with the proviso that we
> need to pick archs that have the most features (so ARM and PowerPC I
> suppose) to make sure we are not deluding ourselves as to the
> simplicity of the task.

I would suggest to attempt to merge ARM into PPC.

> So perhaps a generic board init that is the default can be switched
> off on board-by-board basic would be the right approach. Then we can
> flick the switch while providing for those affected to still get work
> done until bugs are reported and found?

Heh!  Board specific init tables!

> > Note that not all arches need and/or use ELF relocation - Attacking this
> > first does not move towards unity of board.c
> 
> It is a feature used by about half, and it does include the complexity
> of jumping from pre-reloc to post-reloc init. I think it was a
> reasonable first target.

What exactly is the problem here?

> Per Wolfgang's request to go with PPC as an early-adopter, this is

No.  It's the other way round.  PPC is what should be adopted to.

> Can anyone recommend a PowerPC board with a quick U-Boot program-run
> cycle that I can easily get that will let me try out things there?

Define "get easily".

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
People have one thing in common: they are all different.

  parent reply	other threads:[~2012-01-01  1:54 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-28  6:35 [U-Boot] [RFC PATCH 0/19] Create generic board init and move ARM and x86 to it Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 01/19] Introduce generic global_data Simon Glass
2011-12-29  7:47   ` Andreas Bießmann
2012-01-07 22:33     ` Simon Glass
2012-01-08 10:48       ` Graeme Russ
2012-01-08 18:13         ` Simon Glass
2012-01-09 11:21           ` Andreas Bießmann
2012-01-09 18:17             ` Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 02/19] Make relocation functions global Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 03/19] Add basic initcall implementation Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 04/19] define CONFIG_SYS_LEGACY_BOARD everywhere Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 05/19] Add generic post-relocation board_r.c Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 06/19] Add generic pre-relocation board_f.c Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 07/19] Add spl load feature Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 08/19] switch ARM over to generic board Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 09/19] arm: Remove unused code in board.c, global_data.h Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 10/19] Add CONFIG_SYS_SYM_OFFSETS to support offset symbols Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 11/19] x86: Remove compiler warning in sc520_timer.c Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 12/19] x86: Remove dead code in eNET Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 13/19] x86: Add processor library and relocation functions Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 14/19] Tidy up asm/generic sections.h to include x86 symbols Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 15/19] Add fields required by x86 to global_data Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 16/19] x86: Change stub example to use asm-generic/sections.h Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 17/19] x86: Add initial memory barrier macros Simon Glass
2011-12-28  6:35 ` [U-Boot] [RFC PATCH 18/19] Bring in x86 to unified board architecture Simon Glass
2011-12-28  6:36 ` [U-Boot] [RFC PATCH 19/19] x86: Remove unused board/global_data code Simon Glass
2011-12-28 17:30 ` [U-Boot] [RFC PATCH 0/19] Create generic board init and move ARM and x86 to it Wolfgang Denk
2011-12-28 18:13   ` Simon Glass
2011-12-30 15:49 ` Graeme Russ
2011-12-31  0:03   ` Wolfgang Denk
2011-12-31  2:02   ` Simon Glass
2011-12-31 11:52     ` Graeme Russ
2012-01-01 23:48       ` Simon Glass
2012-01-02 11:26         ` Graeme Russ
2012-01-02 14:46           ` Wolfgang Denk
2012-01-03  5:33             ` Simon Glass
2012-01-03  8:12               ` Wolfgang Denk
2012-01-03  9:15                 ` Graeme Russ
2012-01-03 15:55                 ` Simon Glass
2012-01-03 22:35                   ` Wolfgang Denk
2012-01-03 22:52                     ` Simon Glass
2012-01-03  5:28           ` Simon Glass
2012-01-01  1:54     ` Wolfgang Denk [this message]
2012-01-01 23:47       ` Simon Glass
2012-01-02  6:50         ` Wolfgang Denk

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=20120101015412.0C222196EDE3@gemini.denx.de \
    --to=wd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.