]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: Remove vital devices last
authorSimon Glass <sjg@chromium.org>
Sun, 24 Jan 2021 21:32:47 +0000 (14:32 -0700)
committerSimon Glass <sjg@chromium.org>
Wed, 3 Feb 2021 10:38:41 +0000 (03:38 -0700)
Update announce_and_cleanup() to remove all devices, with the vital ones
being removed last.

This is an extra patch on top of the recent RFC:

   http://patchwork.ozlabs.org/project/uboot/list/?series=223280

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/arm/lib/bootm.c

index 1206e306db65a2ed49e07ac7429bfcb710fc831b..f46d51d6553aad0ce18519cb31529ea2b3559a2a 100644 (file)
@@ -119,6 +119,9 @@ static void announce_and_cleanup(int fake)
         * 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 | DM_REMOVE_NON_VITAL);
+
+       /* Remove all active vital devices next */
        dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL);
 
        cleanup_before_linux();