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

Jon Loeliger
2014-05-27T15:28:22Z

On Sat, May 24, 2014 at 4:21 PM, Simon Glass <sjg@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