From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 01/13] arm: stm32mp: Remove DM_FLAG_PRE_RELOC flag
Date: Wed, 24 Oct 2018 06:36:28 -0700 [thread overview]
Message-ID: <1540388200-3956-2-git-send-email-bmeng.cn@gmail.com> (raw)
In-Reply-To: <1540388200-3956-1-git-send-email-bmeng.cn@gmail.com>
When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be
bound before relocation. However due to a bug in the DM core,
the flag only takes effect when devices are statically declared
via U_BOOT_DEVICE(). This bug has been fixed recently by commit
"dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in
lists_bind_fdt()", but with the fix, it has a side effect that
all existing drivers that declared DM_FLAG_PRE_RELOC flag will
be bound before relocation now. This may expose potential boot
failure on some boards due to insufficient memory during the
pre-relocation stage.
To mitigate this potential impact, the following changes are
implemented:
- Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver
only supports configuration from device tree (OF_CONTROL)
- Keep DM_FLAG_PRE_RELOC flag in the driver only if the device
is statically declared via U_BOOT_DEVICE()
- Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for
drivers that support both statically declared devices and
configuration from device tree
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---
arch/arm/mach-stm32mp/bsec.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-stm32mp/bsec.c b/arch/arm/mach-stm32mp/bsec.c
index 0e152ef..d087a31 100644
--- a/arch/arm/mach-stm32mp/bsec.c
+++ b/arch/arm/mach-stm32mp/bsec.c
@@ -417,7 +417,6 @@ U_BOOT_DRIVER(stm32mp_bsec) = {
.ofdata_to_platdata = stm32mp_bsec_ofdata_to_platdata,
.platdata_auto_alloc_size = sizeof(struct stm32mp_bsec_platdata),
.ops = &stm32mp_bsec_ops,
- .flags = DM_FLAG_PRE_RELOC,
};
/* bsec IP is not present in device tee, manage IP address by platdata */
--
2.7.4
next prev parent reply other threads:[~2018-10-24 13:36 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-24 13:36 [U-Boot] [PATCH 00/13] dm: DM_FLAG_PRE_RELOC flag clean up Bin Meng
2018-10-24 13:36 ` Bin Meng [this message]
2018-10-25 3:28 ` [U-Boot] [PATCH 01/13] arm: stm32mp: Remove DM_FLAG_PRE_RELOC flag Simon Glass
2018-10-29 17:15 ` Patrick DELAUNAY
2018-11-06 22:42 ` sjg at google.com
2018-10-24 13:36 ` [U-Boot] [PATCH 02/13] clk: Remove DM_FLAG_PRE_RELOC flag in various drivers Bin Meng
2018-10-25 3:28 ` Simon Glass
2018-11-06 22:42 ` sjg at google.com
2018-10-24 13:36 ` [U-Boot] [PATCH 03/13] gpio: " Bin Meng
2018-10-25 3:28 ` Simon Glass
2018-10-29 17:20 ` Patrick DELAUNAY
2018-11-06 22:42 ` sjg at google.com
2018-10-24 13:36 ` [U-Boot] [PATCH 04/13] i2c: omap24xx: Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check Bin Meng
2018-10-25 3:28 ` Simon Glass
2018-11-06 22:42 ` sjg at google.com
2018-10-24 13:36 ` [U-Boot] [PATCH 05/13] mmc: omap: " Bin Meng
2018-10-25 3:28 ` Simon Glass
2018-11-06 22:42 ` sjg at google.com
2018-10-24 13:36 ` [U-Boot] [PATCH 06/13] pinctrl: Remove DM_FLAG_PRE_RELOC flag in various drivers Bin Meng
2018-10-25 3:28 ` Simon Glass
2018-11-06 22:42 ` sjg at google.com
2018-10-24 13:36 ` [U-Boot] [PATCH 07/13] ram: bmips: Remove DM_FLAG_PRE_RELOC flag Bin Meng
2018-10-25 3:28 ` Simon Glass
2018-11-06 22:42 ` sjg at google.com
2018-10-24 13:36 ` [U-Boot] [PATCH 08/13] timer: Remove DM_FLAG_PRE_RELOC flag in various drivers Bin Meng
2018-10-25 3:28 ` Simon Glass
2018-11-06 22:42 ` sjg at google.com
2018-10-24 13:36 ` [U-Boot] [PATCH 09/13] serial: " Bin Meng
2018-10-25 3:28 ` Simon Glass
2018-11-06 22:42 ` sjg at google.com
2018-12-10 17:26 ` Igor Opaniuk
2018-12-12 7:34 ` Shawn Guo
2018-10-24 13:36 ` [U-Boot] [PATCH 10/13] sysreset: " Bin Meng
2018-10-25 3:29 ` Simon Glass
2018-11-06 22:42 ` sjg at google.com
2018-10-24 13:36 ` [U-Boot] [PATCH 11/13] video: simplefb: Remove DM_FLAG_PRE_RELOC flag Bin Meng
2018-10-25 3:29 ` Simon Glass
2018-11-06 22:42 ` sjg at google.com
2018-10-24 13:36 ` [U-Boot] [PATCH 12/13] watchdog: Remove DM_FLAG_PRE_RELOC flag in various drivers Bin Meng
2018-10-25 3:29 ` Simon Glass
2018-11-06 22:42 ` sjg at google.com
2018-10-24 13:36 ` [U-Boot] [PATCH 13/13] dm: doc: Update description of pre-relocation support Bin Meng
2018-10-25 3:29 ` Simon Glass
2018-11-06 22:42 ` sjg at google.com
2018-10-24 16:26 ` [U-Boot] [PATCH 00/13] dm: DM_FLAG_PRE_RELOC flag clean up Stephen Warren
2018-10-28 13:30 ` Adam Ford
2018-11-02 2:25 ` Bin Meng
2018-11-03 6:08 ` Simon Glass
2018-11-03 9:48 ` Bin Meng
2018-11-04 22:00 ` Simon Glass
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=1540388200-3956-2-git-send-email-bmeng.cn@gmail.com \
--to=bmeng.cn@gmail.com \
--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