[PATCH] mtd/memory: omap: Fix build dependencies

Krzysztof Kozlowski krzysztof.kozlowski at canonical.com
Wed Feb 9 06:10:29 PST 2022


On 09/02/2022 14:57, Nishanth Menon wrote:
> On 11:56-20220127, Miquel Raynal wrote:
>> The Omap2 raw NAND controller (MTD_NAND_OMAP2) selects the Omap memory
>> controller (OMAP_GPMC) for the ARCH_K3 platforms and for compile
>> testing.
>>
>> The Omap memory controller (OMAP_GPMC) depends on OF_ADDRESS because the
>> driver uses of_address_to_resource().
>>
>> This may produce the following warning:
>> WARNING: unmet direct dependencies detected for OMAP_GPMC
>> Depends on [n]:
>>   - MEMORY [=y] && OF_ADDRESS [=n]
>> Selected by [m]:
>>   - MTD_NAND_OMAP2 [=m] && MTD [=m] && MTD_RAW_NAND [=m] &&
>>     (ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST [=y]) &&
>>     HAS_IOMEM [=y]
>>
>> As the of_address_to_resource() helper has a dummy implementation
>> returning an error when OF_ADDRESS is not selected, we do not need to
>> select OF_ADDRESS from the OMAP_GPMC Kconfig menu for compile testing
>> purposes. Nor we actually do for K3 platforms, but in order to not break
>> these platforms we can just select OF_ADDRESS from ARCH_K3 directly.
>>
>> Fixes: dbcb124acebd ("mtd: rawnand: omap2: Select GPMC device driver for ARCH_K3")
>> Reported-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
>> Suggested-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
>> Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
>> ---
>>  arch/arm64/Kconfig.platforms | 1 +
>>  drivers/memory/Kconfig       | 1 -
>>  2 files changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
>> index 7d5d58800170..1a0d4b575b95 100644
>> --- a/arch/arm64/Kconfig.platforms
>> +++ b/arch/arm64/Kconfig.platforms
>> @@ -123,6 +123,7 @@ config ARCH_K3
>>  	select TI_SCI_INTR_IRQCHIP
>>  	select TI_SCI_INTA_IRQCHIP
>>  	select TI_K3_SOCINFO
>> +	select OF_ADDRESS
> 
> I understand the build failure, but, I don't see any other SoC selecting
> OF_ADDRESS because a driver has a problem?
> 

The ARM platforms do not need to select OF_ADDRESS because it is always
there. The error looks like a compile test, so is this patch really a
fix for reported error?


Best regards,
Krzysztof



More information about the linux-mtd mailing list