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

Stefan Roese sr at denx.de
Tue Feb 28 16:32:36 UTC 2017


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?

Thanks,
Stefan


More information about the U-Boot mailing list