Re: [PATCH 4/4] ARM: i.MX8M: neuter initcalls when EFI booted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
> ---
>  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 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux