[PATCH master 2/2] ARM: omap: fix cpu_is_omap on CONFIG_ARM_MULTIARCH configurations

Roland Hieber r.hieber at pengutronix.de
Tue May 20 05:29:32 PDT 2025


On Tue, May 20, 2025 at 02:17:38PM +0200, Ahmad Fatoum wrote:
> Normally, <mach/omap/generic.h> would only be included if we are running
> on some OMAP SoC. This doesn't hold true anymore with CONFIG_ARM_MULTIARCH
> or CONFIG_BOARD_ARM_GENERIC_DT, because we could have CONFIG_ARCH_AM33XX
> enabled, but running on some other SoC, which the header doesn't know about.
> 
> This cpu_type scheme is only used on one other SoC and that's the i.MX
> and there, there is a final #ifdef clause to fix this, so follow suit.
> 
> Reported-by: Roland Hieber <r.hieber at pengutronix.de>
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>

Thanks!

Tested-by: Roland Hieber <rhi at pengutronix.de>

> ---
>  include/mach/omap/generic.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/include/mach/omap/generic.h b/include/mach/omap/generic.h
> index 2961c530bc93..9802087bf295 100644
> --- a/include/mach/omap/generic.h
> +++ b/include/mach/omap/generic.h
> @@ -56,6 +56,15 @@ extern unsigned int __omap_cpu_type;
>  # define cpu_is_am33xx()	(0)
>  #endif
>  
> +#if defined(CONFIG_ARCH_MULTIARCH) || defined(CONFIG_BOARD_ARM_GENERIC_DT)
> +# ifdef omap_cpu_type
> +#  undef omap_cpu_type
> +#  define omap_cpu_type __omap_cpu_type
> +# else
> +#  define omap_cpu_type 0
> +# endif
> +#endif
> +
>  #ifdef omap_cpu_type
>  #define cpu_is_omap()			(omap_cpu_type > 0)
>  #else
> -- 
> 2.39.5
> 
> 
> 

-- 
Roland Hieber, Pengutronix e.K.          | rhi at pengutronix.de          |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list