[U-Boot] [PATCH] ppc: transform init_sequence into a function.

Wolfgang Denk wd at denx.de
Fri Nov 27 21:18:28 CET 2009


Dear Joakim Tjernlund,

In message <OF012B1DA7.446FFBCD-ONC125767B.004DD4EE-C125767B.00508FF3 at transmode.se> you wrote:
>
> > You know that I'm a really big fan of small code, and I tend to
> > accept a certain amount of ugliness if it saves memory. But here I
> > just disagree.
> 
> I think most of the ugliness comes from the #ifdef hell in this list.
> replacing the #ifdefs is another matter so looking behind
> the #ifdef mess, I don't think it looks too bad.

Well, remove the #ifdef's from the pointer array, and it will be
beautiful, too?

> > This is much more ugly, and I cannot see why it would be easier to
> > debug.
> 
> You can set breakpoints anywhere you like. When it crashes in here
> somewhere, it isn't easy to tell where it did so.

Umm... you can set breakpoints on any of the functions now, too?
And printing the funtion pointer will show you easily where you are,
right?

> There is one more minor advantage too. When bringing up a board, relocation
> may be off and you will get an very early crash, avoiding relocs here might
> get you a bit further, possibly making it easier to pin point the problem.
> This is all speculation though.

Of all the problems I ever had with bringing up new  hardware,  relo-
cation  has  never  been  one  of them. Relocation is pretty hardware
indepentent - either it works, or it doesn't.

> Anyhow, I don't feel too strongly about this. If you want to drop it, I won't
> cry :)

I am not convinced yet that the new code is actually an improvement.
Changing the array of pointers into a list of function calls does not
solve any of the real issues we have with the init seuqnece - like
that some board need the PCI initialization early, and others later,
etc.

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
In an organization, each person rises to the level of his own  incom-
petency                                         - The Peter Principle


More information about the U-Boot mailing list