From: Simon Glass Date: Sun, 24 Jan 2021 14:32:47 -0700 Subject: [PATCH v5 8/9] arm: Remove vital devices last In-Reply-To: <20210124213248.3715556-1-sjg@chromium.org> References: <20210124213248.3715556-1-sjg@chromium.org> Message-ID: <20210124213248.3715556-9-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Changes in v5: - Add patch to remove vital devices last arch/arm/lib/bootm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 1206e306db6..f46d51d6553 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -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(); -- 2.30.0.280.ga3ce27912f-goog