public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ppc: transform init_sequence into a function.
Date: Fri, 27 Nov 2009 21:18:28 +0100	[thread overview]
Message-ID: <20091127201828.3CF70C88C6@gemini.denx.de> (raw)
In-Reply-To: <OF012B1DA7.446FFBCD-ONC125767B.004DD4EE-C125767B.00508FF3@transmode.se>

Dear Joakim Tjernlund,

In message <OF012B1DA7.446FFBCD-ONC125767B.004DD4EE-C125767B.00508FF3@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

  reply	other threads:[~2009-11-27 20:18 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OF012B1DA7.446FFBCD-ONC125767B.004DD4EE-C125767B.00508FF3@trans mode.se>
2009-11-27 10:32 ` [U-Boot] [PATCH] ppc: transform init_sequence into a function Joakim Tjernlund
2009-11-27 14:06   ` Wolfgang Denk
2009-11-27 14:39     ` Joakim Tjernlund
2009-11-27 20:18       ` Wolfgang Denk [this message]
2009-11-28 13:56         ` Joakim Tjernlund
2009-11-30 12:36         ` Joakim Tjernlund
2009-11-30 21:02           ` Wolfgang Denk
2009-11-30 22:27             ` Joakim Tjernlund
2009-11-30 23:27               ` Wolfgang Denk
2009-12-01 10:43                 ` Detlev Zundel
     [not found]     ` <OF012B1DA7.446FFBCD-ONC125767B.004DD4EE-C125767B.00508FF3@tran smode.se>
2009-11-27 14:54       ` Alessandro Rubini
2009-11-27 15:01         ` Joakim Tjernlund
2010-12-06 17:59 Joakim Tjernlund
2010-12-06 20:09 ` Wolfgang Denk
2010-12-06 20:42   ` Joakim Tjernlund
2010-12-06 21:33     ` Scott Wood
2010-12-06 22:36       ` Graeme Russ
2010-12-06 22:49         ` Scott Wood
2010-12-06 23:04           ` Graeme Russ
2010-12-06 23:12             ` Scott Wood
2010-12-06 23:13             ` Wolfgang Denk
2010-12-07  0:07           ` Joakim Tjernlund
2010-12-07  0:21             ` Scott Wood
2010-12-07  0:41               ` Joakim Tjernlund
2010-12-07  0:59                 ` Scott Wood
2010-12-06 23:09         ` Wolfgang Denk
2010-12-06 22:36     ` Wolfgang Denk
2010-12-06 23:06       ` Graeme Russ
2010-12-07  0:32       ` Joakim Tjernlund
2010-12-07  6:34         ` Wolfgang Denk
2010-12-07  9:08           ` Joakim Tjernlund
2010-12-07 13:07             ` Wolfgang Denk
2010-12-07 13:57               ` Joakim Tjernlund

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=20091127201828.3CF70C88C6@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox