[PATCH] ARM: omap1: set ARCH_OMAP1_ANY for ARCH_OMAP1

Randy Dunlap rdunlap at infradead.org
Sun Nov 6 16:55:08 PST 2022



On 11/6/22 03:32, Arnd Bergmann wrote:
> On Sun, Nov 6, 2022, at 11:37, Arnd Bergmann wrote:
>> On Sun, Nov 6, 2022, at 11:26, Russell King (Oracle) wrote:
>>> On Sun, Nov 06, 2022 at 08:43:50AM +0100, Arnd Bergmann wrote:
>>>> --- a/arch/arm/mach-omap1/Kconfig
>>>> +++ b/arch/arm/mach-omap1/Kconfig
>>>> @@ -49,7 +49,7 @@ config ARCH_OMAP1_ANY
>>>>         select ARCH_OMAP
>>>>         def_bool ARCH_OMAP730 || ARCH_OMAP850 || ARCH_OMAP15XX || ARCH_OMAP16XX
>>>>  
>>>> -config ARCH_OMAP
>>>> +config ARCH_OMAP1_ANY
>>>
>>> This patch can't be right - look at the first line of context above, you
>>> have symbols that select ARCH_OMAP and you've just removed the
>>> definition of ARCH_OMAP.
>>
>> Right, I misread this, I thought this was an 'if ARCH_OMAP' block
>> instead of the Kconfig symbol. Part of the problem is now is
>> possibly that there are two symbols with that name now, I'll have
>> to try to reproduce the problem first and then see what caused it
>> originally.
> 
> It seems the root cause was actually 804f7f19c2e2 ("fbdev: omap:
> avoid using mach/*.h files"), where I started allowing building with
> CONFIG_COMPILE_TEST, but this fails when ARCH_OMAP1_ANY is disabled,
> as Randy correctly found.
> 
> We could tighten this gain by adding something like
> 
>      depends on ARCH_OMAP1_ANY || !OMAP_MUX
> 
> to still allow compile-testing but specifically avoiding the
> broken case. I think we have the same problem in the pcmcia and
> spi-uwire drivers, so maybe something like this would be
> a better approach:
> 
> --- a/include/linux/soc/ti/omap1-mux.h
> +++ b/include/linux/soc/ti/omap1-mux.h
> @@ -302,7 +302,7 @@ enum omap1xxx_index {
>  
>  };
>  
> -#ifdef CONFIG_OMAP_MUX
> +#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_ARCH_OMAP1_ANY)
>  extern int omap_cfg_reg(unsigned long reg_cfg);
>  #else
>  static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; }

That seems to work. Push it into -next and see what happens. :)

-- 
~Randy



More information about the linux-arm-kernel mailing list