From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] arm: bootm: Add dm_remove_devices_flags() call to announce_and_cleanup()
Date: Fri, 10 Mar 2017 14:50:06 +0100 [thread overview]
Message-ID: <20170310135006.14673-3-sr@denx.de> (raw)
In-Reply-To: <20170310135006.14673-1-sr@denx.de>
This patch adds a call to dm_remove_devices_flags() to
announce_and_cleanup() so that drivers that have one of the removal flags
set (e.g. DM_FLAG_ACTIVE_DMA_REMOVE) in their driver struct, may do some
last-stage cleanup before the OS is started.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
---
arch/arm/lib/bootm.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 8125cf023f..426bee6da5 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -14,6 +14,8 @@
#include <common.h>
#include <command.h>
+#include <dm/device.h>
+#include <dm/root.h>
#include <image.h>
#include <u-boot/zlib.h>
#include <asm/byteorder.h>
@@ -91,6 +93,13 @@ static void announce_and_cleanup(int fake)
board_quiesce_devices();
+ /*
+ * 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);
+
cleanup_before_linux();
}
--
2.12.0
next prev parent reply other threads:[~2017-03-10 13:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 13:50 [U-Boot] [PATCH 1/3] dm: core: Add flags parameter to device_remove() Stefan Roese
2017-03-10 13:50 ` [U-Boot] [PATCH 2/3] dm: core: Add dm_remove_devices_flags() and hook it into device_remove() Stefan Roese
2017-03-13 12:33 ` Simon Glass
2017-03-10 13:50 ` Stefan Roese [this message]
2017-03-13 12:34 ` [U-Boot] [PATCH 3/3] arm: bootm: Add dm_remove_devices_flags() call to announce_and_cleanup() Simon Glass
2017-03-13 12:50 ` Stefan Roese
2017-03-13 13:20 ` Stefan Roese
2017-03-13 13:23 ` Simon Glass
2017-03-13 12:33 ` [U-Boot] [PATCH 1/3] dm: core: Add flags parameter to device_remove() Simon Glass
2017-03-13 12:43 ` Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170310135006.14673-3-sr@denx.de \
--to=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox