[U-Boot] Device cleanup before starting OS (Linux)

Simon Glass sjg at chromium.org
Wed Mar 1 05:40:11 UTC 2017


Hi Stefan,

On 28 February 2017 at 09:32, Stefan Roese <sr at denx.de> wrote:
>
> Hi!
>
> I'm currently trying to add some code to stop (DMA) buffer usage
> in the Marvell mvpp2 ethernet driver, that should only be
> executed once, before the OS is started - stop() does not work
> easily for me here. I've found the weak function
> "board_quiesce_devices()", which is already used for
> such cases. But since you are not fond of weak functions
> (I totally agree here, this is far from perfect) and already
> suggested some kind of "finalize" DM API call, I'm wondering
> if I should introduce this new API call for such cases and use
> it in the ethernet driver.
>
> So what is your opinion about this? Should I add such a
> finalize DM function and call it from the arch/.../bootm
> code? Or do you have other suggestions on how to handle
> such driver specific last-stage (pre OS) calls?

Is it possible to use the device's remove() method?

Regards,
Simon


More information about the U-Boot mailing list