[U-Boot] [RFC PATCH 05/22] sandbox: Remove all drivers before exit

Jon Loeliger loeliger at gmail.com
Tue May 27 17:28:22 CEST 2014


On Sat, May 24, 2014 at 4:21 PM, Simon Glass <sjg at chromium.org> wrote:
> Drivers are supposed to be able to close down cleanly. To set a good example,
> make sandbox shut down its driver model drivers and remove them before exit.

Right.  But we should be careful here...

> It may be desirable to do the same more generally once driver model is more
> widely-used. This could be done during bootm, before U-Boot jumps to the OS.
> It seems far too early to make this change.

Some drivers should probably NOT be shut down prior to bootm handing
off to some other OS.   It could be that their sole purpose for starting and
running was to enable some continued driver state for the OS.

I'm thinking of some clock, or PHY or maybe some aspect of the ARM SCU
that should be "left running".

So maybe if there is a general "shutdown" pass, there might be a need for
a flag to indicate that it is/isn't OK to do so at OS-hand-off time.

jdl


More information about the U-Boot mailing list