]> git.sur5r.net Git - u-boot/blobdiff - arch/x86/lib/bootm.c
x86: bootm: Add dm_remove_devices_flags() call to bootm_announce_and_cleanup()
[u-boot] / arch / x86 / lib / bootm.c
index 75bab902251d90d68585a1d0d742c4d0eee8bf98..ecd4f4e6c61fdc9a028598400670435a975ebffd 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <common.h>
 #include <command.h>
+#include <dm/device.h>
+#include <dm/root.h>
 #include <errno.h>
 #include <fdt_support.h>
 #include <image.h>
@@ -46,6 +48,13 @@ void bootm_announce_and_cleanup(void)
 #ifdef CONFIG_BOOTSTAGE_REPORT
        bootstage_report();
 #endif
+
+       /*
+        * Call remove function of all devices with a removal flag set.
+        * This may be useful for last-stage operations, like cancelling
+        * of DMA operation or releasing device internal buffers.
+        */
+       dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL);
 }
 
 #if defined(CONFIG_OF_LIBFDT) && !defined(CONFIG_OF_NO_KERNEL)