[U-Boot-Users] U-Boot-NG ?

Sascha Hauer
2007-07-04T11:46:59Z

On Wed, Jul 04, 2007 at 01:13:03AM +0200, Wolfgang Denk wrote:
> In message <fa686aa40707031559x4d9c3af8t92dacad96681e1f@mail.gmail.com> you wrote:
> >
> > > > Sorry; let me be more specific; any objection to moving device
> > > > initialization to *after* relocation to RAM. I'm not asking about
> > > > removing console output.
> > >
> > > Yes, I *do* object. Please see previous messages.
> > >
> > > You know how much I'm fighting over a few bytes memory footprint here
> > > and there, but this is something that is so vitally important for
> > > porting U-Boot to green hardware that I am happy to "waste" whatever
> > > it needs in terms of memory for this feature.
> >
> > But why does this affect device initialization? To get to running in
> > RAM; there needs to be three things: RAM initialized correctly, code
> > copied and basic console output for progress metering. Why do devices
> > not related to these three things matter? Why can't they be deferred
> > until after relocation to RAM?
>
> Sorry, I misread your statement above (didn't see the "I'm not asking
> about removing console output." part of it.).
>
> > I say don't get distracted with non-essential peripherals when the
> > first priority is to get into RAM.
>
> I agree 100%. What I would like to have in a new version is that
> devices only get initialized before they are actually used in U-Boot,
> and get deiniztialized (shut down completely) after being used (not
> doing the latter is a continuing PITA in the current code).

My tree already has a device structure containing the usual probe
function. This should only make sure that the device is registered
and can be used, but actual initialization can be defered. The thing
currently missing is a tree structure for devices. They are all in one
simple linked list, so you cannot make sure that the devices get
de-initialized in the correct order.

btw I know one exception to the only-initialized-when-used rule. We
often need to initialize the MAC Address in ethernet devices, even when
they are not used.

Regards,
Sascha

--
Pengutronix - Linux Solutions for Science and Industry
Entwicklungszentrum Nord http://www.pengutronix.de