All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd/memory: omap: Fix build dependencies
@ 2022-01-27 10:56 ` Miquel Raynal
  0 siblings, 0 replies; 10+ messages in thread
From: Miquel Raynal @ 2022-01-27 10:56 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Krzysztof Kozlowski
  Cc: linux-arm-kernel, Richard Weinberger, Vignesh Raghavendra,
	Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
	Miquel Raynal, Uwe Kleine-König

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@pengutronix.de>
Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Miquel Raynal <miquel.raynal@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
 	help
 	  This enables support for Texas Instruments' K3 multicore SoC
 	  architecture.
diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
index 30bff6cb1b8d..241f0925cbf1 100644
--- a/drivers/memory/Kconfig
+++ b/drivers/memory/Kconfig
@@ -104,7 +104,6 @@ config TI_EMIF
 
 config OMAP_GPMC
 	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
-	depends on OF_ADDRESS
 	select GPIOLIB
 	help
 	  This driver is for the General Purpose Memory Controller (GPMC)
-- 
2.27.0


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] mtd/memory: omap: Fix build dependencies
@ 2022-01-27 10:56 ` Miquel Raynal
  0 siblings, 0 replies; 10+ messages in thread
From: Miquel Raynal @ 2022-01-27 10:56 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Krzysztof Kozlowski
  Cc: linux-arm-kernel, Richard Weinberger, Vignesh Raghavendra,
	Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
	Miquel Raynal, Uwe Kleine-König

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@pengutronix.de>
Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Miquel Raynal <miquel.raynal@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
 	help
 	  This enables support for Texas Instruments' K3 multicore SoC
 	  architecture.
diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
index 30bff6cb1b8d..241f0925cbf1 100644
--- a/drivers/memory/Kconfig
+++ b/drivers/memory/Kconfig
@@ -104,7 +104,6 @@ config TI_EMIF
 
 config OMAP_GPMC
 	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
-	depends on OF_ADDRESS
 	select GPIOLIB
 	help
 	  This driver is for the General Purpose Memory Controller (GPMC)
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] mtd/memory: omap: Fix build dependencies
  2022-01-27 10:56 ` Miquel Raynal
@ 2022-02-09 13:57   ` Nishanth Menon
  -1 siblings, 0 replies; 10+ messages in thread
From: Nishanth Menon @ 2022-02-09 13:57 UTC (permalink / raw)
  To: Miquel Raynal, rogerq
  Cc: Catalin Marinas, Will Deacon, Krzysztof Kozlowski,
	linux-arm-kernel, Richard Weinberger, Vignesh Raghavendra,
	Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
	Uwe Kleine-König

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@pengutronix.de>
> Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Miquel Raynal <miquel.raynal@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?


>  	help
>  	  This enables support for Texas Instruments' K3 multicore SoC
>  	  architecture.
> diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
> index 30bff6cb1b8d..241f0925cbf1 100644
> --- a/drivers/memory/Kconfig
> +++ b/drivers/memory/Kconfig
> @@ -104,7 +104,6 @@ config TI_EMIF
>  
>  config OMAP_GPMC
>  	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
> -	depends on OF_ADDRESS

Thoughts Roger?
>  	select GPIOLIB
>  	help
>  	  This driver is for the General Purpose Memory Controller (GPMC)
> -- 
> 2.27.0
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mtd/memory: omap: Fix build dependencies
@ 2022-02-09 13:57   ` Nishanth Menon
  0 siblings, 0 replies; 10+ messages in thread
From: Nishanth Menon @ 2022-02-09 13:57 UTC (permalink / raw)
  To: Miquel Raynal, rogerq
  Cc: Catalin Marinas, Will Deacon, Krzysztof Kozlowski,
	linux-arm-kernel, Richard Weinberger, Vignesh Raghavendra,
	Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
	Uwe Kleine-König

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@pengutronix.de>
> Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Miquel Raynal <miquel.raynal@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?


>  	help
>  	  This enables support for Texas Instruments' K3 multicore SoC
>  	  architecture.
> diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
> index 30bff6cb1b8d..241f0925cbf1 100644
> --- a/drivers/memory/Kconfig
> +++ b/drivers/memory/Kconfig
> @@ -104,7 +104,6 @@ config TI_EMIF
>  
>  config OMAP_GPMC
>  	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
> -	depends on OF_ADDRESS

Thoughts Roger?
>  	select GPIOLIB
>  	help
>  	  This driver is for the General Purpose Memory Controller (GPMC)
> -- 
> 2.27.0
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mtd/memory: omap: Fix build dependencies
  2022-02-09 13:57   ` Nishanth Menon
@ 2022-02-09 14:10     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-09 14:10 UTC (permalink / raw)
  To: Nishanth Menon, Miquel Raynal, rogerq
  Cc: Catalin Marinas, Will Deacon, linux-arm-kernel,
	Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Uwe Kleine-König

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@pengutronix.de>
>> Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>> Signed-off-by: Miquel Raynal <miquel.raynal@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

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mtd/memory: omap: Fix build dependencies
@ 2022-02-09 14:10     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-09 14:10 UTC (permalink / raw)
  To: Nishanth Menon, Miquel Raynal, rogerq
  Cc: Catalin Marinas, Will Deacon, linux-arm-kernel,
	Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Uwe Kleine-König

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@pengutronix.de>
>> Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>> Signed-off-by: Miquel Raynal <miquel.raynal@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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mtd/memory: omap: Fix build dependencies
  2022-02-09 13:57   ` Nishanth Menon
@ 2022-02-09 14:39     ` Roger Quadros
  -1 siblings, 0 replies; 10+ messages in thread
From: Roger Quadros @ 2022-02-09 14:39 UTC (permalink / raw)
  To: Nishanth Menon, Miquel Raynal
  Cc: Catalin Marinas, Will Deacon, Krzysztof Kozlowski,
	linux-arm-kernel, Richard Weinberger, Vignesh Raghavendra,
	Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
	Uwe Kleine-König

Hi,

On 09/02/2022 15: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@pengutronix.de>
>> Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>> Signed-off-by: Miquel Raynal <miquel.raynal@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?
> 
> 
>>  	help
>>  	  This enables support for Texas Instruments' K3 multicore SoC
>>  	  architecture.
>> diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
>> index 30bff6cb1b8d..241f0925cbf1 100644
>> --- a/drivers/memory/Kconfig
>> +++ b/drivers/memory/Kconfig
>> @@ -104,7 +104,6 @@ config TI_EMIF
>>  
>>  config OMAP_GPMC
>>  	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
>> -	depends on OF_ADDRESS
> 
> Thoughts Roger?

OMAP_GPMC is not visible entry so someone has to select it.
We first tried selecting it in ARCH_K3 but that was not accepted for fair reason.
Then we tried to select it from MTD_NAND_OMAP2 and it caused the issue this patch is trying to fix.

Only other option left is to make OMAP_GPMC a visible entry and just mark MTD_NAND_OMAP2 to depend on it?
The relevant SoC defconfig files can enable OMAP_GPMC and MTD_NAND_OMAP2.

Does this sound ok?

>>  	select GPIOLIB
>>  	help
>>  	  This driver is for the General Purpose Memory Controller (GPMC)
>> -- 
>> 2.27.0
>>
>>
>> ______________________________________________________
>> Linux MTD discussion mailing list
>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 

cheers,
-roger

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mtd/memory: omap: Fix build dependencies
@ 2022-02-09 14:39     ` Roger Quadros
  0 siblings, 0 replies; 10+ messages in thread
From: Roger Quadros @ 2022-02-09 14:39 UTC (permalink / raw)
  To: Nishanth Menon, Miquel Raynal
  Cc: Catalin Marinas, Will Deacon, Krzysztof Kozlowski,
	linux-arm-kernel, Richard Weinberger, Vignesh Raghavendra,
	Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
	Uwe Kleine-König

Hi,

On 09/02/2022 15: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@pengutronix.de>
>> Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>> Signed-off-by: Miquel Raynal <miquel.raynal@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?
> 
> 
>>  	help
>>  	  This enables support for Texas Instruments' K3 multicore SoC
>>  	  architecture.
>> diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
>> index 30bff6cb1b8d..241f0925cbf1 100644
>> --- a/drivers/memory/Kconfig
>> +++ b/drivers/memory/Kconfig
>> @@ -104,7 +104,6 @@ config TI_EMIF
>>  
>>  config OMAP_GPMC
>>  	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
>> -	depends on OF_ADDRESS
> 
> Thoughts Roger?

OMAP_GPMC is not visible entry so someone has to select it.
We first tried selecting it in ARCH_K3 but that was not accepted for fair reason.
Then we tried to select it from MTD_NAND_OMAP2 and it caused the issue this patch is trying to fix.

Only other option left is to make OMAP_GPMC a visible entry and just mark MTD_NAND_OMAP2 to depend on it?
The relevant SoC defconfig files can enable OMAP_GPMC and MTD_NAND_OMAP2.

Does this sound ok?

>>  	select GPIOLIB
>>  	help
>>  	  This driver is for the General Purpose Memory Controller (GPMC)
>> -- 
>> 2.27.0
>>
>>
>> ______________________________________________________
>> Linux MTD discussion mailing list
>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 

cheers,
-roger

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mtd/memory: omap: Fix build dependencies
  2022-02-09 14:39     ` Roger Quadros
@ 2022-02-09 15:21       ` Nishanth Menon
  -1 siblings, 0 replies; 10+ messages in thread
From: Nishanth Menon @ 2022-02-09 15:21 UTC (permalink / raw)
  To: Roger Quadros
  Cc: Miquel Raynal, Catalin Marinas, Will Deacon, Krzysztof Kozlowski,
	linux-arm-kernel, Richard Weinberger, Vignesh Raghavendra,
	Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
	Uwe Kleine-König

On 16:39-20220209, Roger Quadros wrote:
> >>  config OMAP_GPMC
> >>  	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
> >> -	depends on OF_ADDRESS
> > 
> > Thoughts Roger?
> 
> OMAP_GPMC is not visible entry so someone has to select it.
> We first tried selecting it in ARCH_K3 but that was not accepted for fair reason.
> Then we tried to select it from MTD_NAND_OMAP2 and it caused the issue this patch is trying to fix.
> 
> Only other option left is to make OMAP_GPMC a visible entry and just mark MTD_NAND_OMAP2 to depend on it?
> The relevant SoC defconfig files can enable OMAP_GPMC and MTD_NAND_OMAP2.
> 
> Does this sound ok?

Given that of_address.h is handling OF_ADDRESS smartly, and the fact
that there are quite the many drivers that are actually OF only, I am
not entirely sure why the dependency is needed in Kconfig, but that is
just me..

I'd suggest to see with the randconfig that Randy provided in [1]


[1] https://lore.kernel.org/all/b18fc937-9cc2-bb7b-fb58-3ba2555371c7@infradead.org/

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mtd/memory: omap: Fix build dependencies
@ 2022-02-09 15:21       ` Nishanth Menon
  0 siblings, 0 replies; 10+ messages in thread
From: Nishanth Menon @ 2022-02-09 15:21 UTC (permalink / raw)
  To: Roger Quadros
  Cc: Miquel Raynal, Catalin Marinas, Will Deacon, Krzysztof Kozlowski,
	linux-arm-kernel, Richard Weinberger, Vignesh Raghavendra,
	Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
	Uwe Kleine-König

On 16:39-20220209, Roger Quadros wrote:
> >>  config OMAP_GPMC
> >>  	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
> >> -	depends on OF_ADDRESS
> > 
> > Thoughts Roger?
> 
> OMAP_GPMC is not visible entry so someone has to select it.
> We first tried selecting it in ARCH_K3 but that was not accepted for fair reason.
> Then we tried to select it from MTD_NAND_OMAP2 and it caused the issue this patch is trying to fix.
> 
> Only other option left is to make OMAP_GPMC a visible entry and just mark MTD_NAND_OMAP2 to depend on it?
> The relevant SoC defconfig files can enable OMAP_GPMC and MTD_NAND_OMAP2.
> 
> Does this sound ok?

Given that of_address.h is handling OF_ADDRESS smartly, and the fact
that there are quite the many drivers that are actually OF only, I am
not entirely sure why the dependency is needed in Kconfig, but that is
just me..

I'd suggest to see with the randconfig that Randy provided in [1]


[1] https://lore.kernel.org/all/b18fc937-9cc2-bb7b-fb58-3ba2555371c7@infradead.org/

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-02-09 15:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 10:56 [PATCH] mtd/memory: omap: Fix build dependencies Miquel Raynal
2022-01-27 10:56 ` Miquel Raynal
2022-02-09 13:57 ` Nishanth Menon
2022-02-09 13:57   ` Nishanth Menon
2022-02-09 14:10   ` Krzysztof Kozlowski
2022-02-09 14:10     ` Krzysztof Kozlowski
2022-02-09 14:39   ` Roger Quadros
2022-02-09 14:39     ` Roger Quadros
2022-02-09 15:21     ` Nishanth Menon
2022-02-09 15:21       ` Nishanth Menon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.