[U-Boot] [RFC PATCH 3/3] arm: bootm: Add dm_pre_os_remove() call to announce_and_cleanup()
Stefan Roese
sr at denx.de
Wed Mar 1 10:23:58 UTC 2017
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 <sr at denx.de>
Cc: Simon Glass <sjg at 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
More information about the U-Boot
mailing list