From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: [PATCH 4/4] ARM: i.MX8M: neuter initcalls when EFI booted
Date: Wed, 14 Aug 2024 11:14:34 +0200 [thread overview]
Message-ID: <22b84d30-0f41-4592-ad89-1a8c8b6c5308@pengutronix.de> (raw)
In-Reply-To: <20240809141755.312665-4-a.fatoum@pengutronix.de>
On 09.08.24 16:17, Ahmad Fatoum wrote:
> When enabling EFI payload support in a build that has i.MX boards
> enabled, booting the EFI payload reports some failed initcalls.
>
> Disable them if we don't probe from device tree or aren't on an
> i.MX system.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> arch/arm/mach-imx/imx.c | 11 ++++++-----
> arch/arm/mach-imx/scratch.c | 4 ++++
> 2 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-imx/imx.c b/arch/arm/mach-imx/imx.c
> index f3491c6df7fa..2522ce04e6f5 100644
> --- a/arch/arm/mach-imx/imx.c
> +++ b/arch/arm/mach-imx/imx.c
> @@ -89,11 +89,12 @@ static int imx_init(void)
> struct device_node *root;
>
> root = of_get_root_node();
> - if (root) {
> - __imx_cpu_type = imx_soc_from_dt();
> - if (!__imx_cpu_type)
> - return 0;
> - }
> + if (!root)
> + return 0;
> +
> + __imx_cpu_type = imx_soc_from_dt();
> + if (!__imx_cpu_type)
> + return 0;
>
> /*
> * Don't add new SoCs to this list, instead use the new
> diff --git a/arch/arm/mach-imx/scratch.c b/arch/arm/mach-imx/scratch.c
> index b7280ff60952..e12d3401a854 100644
> --- a/arch/arm/mach-imx/scratch.c
> +++ b/arch/arm/mach-imx/scratch.c
> @@ -8,6 +8,7 @@
> #include <mach/imx/imx9-regs.h>
> #include <mach/imx/esdctl.h>
> #include <mach/imx/scratch.h>
> +#include <mach/imx/generic.h>
> #include <memory.h>
> #include <tee/optee.h>
> #include <pbl.h>
> @@ -95,6 +96,9 @@ const struct optee_header *imx_scratch_get_optee_hdr(void)
>
> static int imx8m_reserve_scratch_area(void)
> {
> + if (!__imx_cpu_type)
> + return 0;
> +
> return request_barebox_region("scratch area",
> (ulong)arm_mem_scratch_get(),
> sizeof(struct imx_scratch_space)) ? 0 : -EINVAL;
Will remove this hunk in v2. We reserve the whole barebox memory region now,
so this can be dropped.
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-08-14 9:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-09 14:17 [PATCH 1/4] ARM: add ARM32/ARM64 symbols for use in generic code Ahmad Fatoum
2024-08-09 14:17 ` [PATCH 2/4] efi: payload: force PBL_FULLY_PIC for ARM64 Ahmad Fatoum
2024-08-09 14:17 ` [PATCH 3/4] efi: payload: alert user if CONFIG_FS_EFI is missing Ahmad Fatoum
2024-08-09 14:17 ` [PATCH 4/4] ARM: i.MX8M: neuter initcalls when EFI booted Ahmad Fatoum
2024-08-14 9:14 ` Ahmad Fatoum [this message]
2024-08-14 9:13 ` (subset) [PATCH 1/4] ARM: add ARM32/ARM64 symbols for use in generic code Sascha Hauer
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=22b84d30-0f41-4592-ad89-1a8c8b6c5308@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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