This patch adds a call to dm_pre_os_remove() to announce_and_cleanup()
so that drivers that have the flag DM_FLAG_PRE_OS_REMOVE set may do
some last-stage cleanup before the OS is started.

Signed-off-by: Stefan Roese <s...@denx.de>
Cc: Simon Glass <s...@chromium.org>
---
 arch/arm/lib/bootm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 8125cf023f..84f3415c1e 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -91,6 +91,14 @@ static void announce_and_cleanup(int fake)
 
        board_quiesce_devices();
 
+       /*
+        * Call remove function of all devices with the pre-OS remove flag
+        * set (DM_FLAG_PRE_OS_REMOVE). This may be useful for last-stage
+        * operations, like cancelling of DMA operation or releasing device
+        * internal buffers.
+        */
+       dm_pre_os_remove();
+
        cleanup_before_linux();
 }
 
-- 
2.12.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/listinfo/u-boot

Reply via email to