From: Stefan Roese Date: Wed, 1 Mar 2017 11:23:58 +0100 Subject: [U-Boot] [RFC PATCH 3/3] arm: bootm: Add dm_pre_os_remove() call to announce_and_cleanup() In-Reply-To: <20170301102358.9127-1-sr@denx.de> References: <20170301102358.9127-1-sr@denx.de> Message-ID: <20170301102358.9127-3-sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Cc: Simon Glass --- 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