linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: omap2: Prevent invalid configuration and build error
@ 2022-01-18 12:35 Roger Quadros
  2022-01-18 15:28 ` Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Roger Quadros @ 2022-01-18 12:35 UTC (permalink / raw)
  To: miquel.raynal, krzysztof.kozlowski
  Cc: vigneshr, nm, linux-mtd, linux-kernel, Roger Quadros

We need to select MEMORY as well otherwise OMAP_GPMC will not be built.
For simplicity let's select MEMORY and OMAP_GPMC unconditionally as
this driver depends on OMAP_GPMC driver and uses symbols from there.

Fixes: dbcb124acebd ("mtd: rawnand: omap2: Select GPMC device driver for ARCH_K3")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 drivers/mtd/nand/raw/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index 20408b7db540..d986ab4e4c35 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -42,7 +42,8 @@ config MTD_NAND_OMAP2
 	tristate "OMAP2, OMAP3, OMAP4 and Keystone NAND controller"
 	depends on ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
 	depends on HAS_IOMEM
-	select OMAP_GPMC if ARCH_K3
+	select MEMORY
+	select OMAP_GPMC
 	help
 	  Support for NAND flash on Texas Instruments OMAP2, OMAP3, OMAP4
 	  and Keystone platforms.
-- 
2.17.1


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

* Re: [PATCH] mtd: rawnand: omap2: Prevent invalid configuration and build error
  2022-01-18 12:35 [PATCH] mtd: rawnand: omap2: Prevent invalid configuration and build error Roger Quadros
@ 2022-01-18 15:28 ` Krzysztof Kozlowski
  2022-01-23 15:23 ` Miquel Raynal
  2022-02-19 15:08 ` Guenter Roeck
  2 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-01-18 15:28 UTC (permalink / raw)
  To: Roger Quadros, miquel.raynal; +Cc: vigneshr, nm, linux-mtd, linux-kernel

On 18/01/2022 13:35, Roger Quadros wrote:
> We need to select MEMORY as well otherwise OMAP_GPMC will not be built.
> For simplicity let's select MEMORY and OMAP_GPMC unconditionally as
> this driver depends on OMAP_GPMC driver and uses symbols from there.
> 
> Fixes: dbcb124acebd ("mtd: rawnand: omap2: Select GPMC device driver for ARCH_K3")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Roger Quadros <rogerq@kernel.org>
> ---
>  drivers/mtd/nand/raw/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

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

* Re: [PATCH] mtd: rawnand: omap2: Prevent invalid configuration and build error
  2022-01-18 12:35 [PATCH] mtd: rawnand: omap2: Prevent invalid configuration and build error Roger Quadros
  2022-01-18 15:28 ` Krzysztof Kozlowski
@ 2022-01-23 15:23 ` Miquel Raynal
  2022-01-23 15:33   ` Miquel Raynal
  2022-02-19 15:08 ` Guenter Roeck
  2 siblings, 1 reply; 6+ messages in thread
From: Miquel Raynal @ 2022-01-23 15:23 UTC (permalink / raw)
  To: Roger Quadros, miquel.raynal, krzysztof.kozlowski
  Cc: vigneshr, nm, linux-mtd, linux-kernel

On Tue, 2022-01-18 at 12:35:25 UTC, Roger Quadros wrote:
> We need to select MEMORY as well otherwise OMAP_GPMC will not be built.
> For simplicity let's select MEMORY and OMAP_GPMC unconditionally as
> this driver depends on OMAP_GPMC driver and uses symbols from there.
> 
> Fixes: dbcb124acebd ("mtd: rawnand: omap2: Select GPMC device driver for ARCH_K3")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Roger Quadros <rogerq@kernel.org>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel

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

* Re: [PATCH] mtd: rawnand: omap2: Prevent invalid configuration and build error
  2022-01-23 15:23 ` Miquel Raynal
@ 2022-01-23 15:33   ` Miquel Raynal
  0 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2022-01-23 15:33 UTC (permalink / raw)
  To: Roger Quadros, miquel.raynal, krzysztof.kozlowski
  Cc: vigneshr, nm, linux-mtd, linux-kernel


miquel.raynal@bootlin.com wrote on Sun, 23 Jan 2022 16:23:01 +0100:

> On Tue, 2022-01-18 at 12:35:25 UTC, Roger Quadros wrote:
> > We need to select MEMORY as well otherwise OMAP_GPMC will not be built.
> > For simplicity let's select MEMORY and OMAP_GPMC unconditionally as
> > this driver depends on OMAP_GPMC driver and uses symbols from there.
> > 
> > Fixes: dbcb124acebd ("mtd: rawnand: omap2: Select GPMC device driver for ARCH_K3")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Roger Quadros <rogerq@kernel.org>
> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>  
> 
> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Pushed on mtd/fixes, actually.

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

* Re: [PATCH] mtd: rawnand: omap2: Prevent invalid configuration and build error
  2022-01-18 12:35 [PATCH] mtd: rawnand: omap2: Prevent invalid configuration and build error Roger Quadros
  2022-01-18 15:28 ` Krzysztof Kozlowski
  2022-01-23 15:23 ` Miquel Raynal
@ 2022-02-19 15:08 ` Guenter Roeck
  2022-02-19 19:11   ` Roger Quadros
  2 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2022-02-19 15:08 UTC (permalink / raw)
  To: Roger Quadros
  Cc: miquel.raynal, krzysztof.kozlowski, vigneshr, nm, linux-mtd,
	linux-kernel

On Tue, Jan 18, 2022 at 02:35:25PM +0200, Roger Quadros wrote:
> We need to select MEMORY as well otherwise OMAP_GPMC will not be built.
> For simplicity let's select MEMORY and OMAP_GPMC unconditionally as
> this driver depends on OMAP_GPMC driver and uses symbols from there.
> 
> Fixes: dbcb124acebd ("mtd: rawnand: omap2: Select GPMC device driver for ARCH_K3")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Roger Quadros <rogerq@kernel.org>

This patch ignores OMAP_GPMC dependencies and results in:

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]

when configuring sparc64:allmodconfig, and in the following
build failure when trying to build that image.

Building sparc64:allmodconfig ... failed
--------------
Error log:
<stdin>:1517:2: warning: #warning syscall clone3 not implemented [-Wcpp]
sparc64-linux-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child':
omap-gpmc.c:(.text.unlikely+0x14c4): undefined reference to `of_platform_device_create'

Guenter

> ---
>  drivers/mtd/nand/raw/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
> index 20408b7db540..d986ab4e4c35 100644
> --- a/drivers/mtd/nand/raw/Kconfig
> +++ b/drivers/mtd/nand/raw/Kconfig
> @@ -42,7 +42,8 @@ config MTD_NAND_OMAP2
>  	tristate "OMAP2, OMAP3, OMAP4 and Keystone NAND controller"
>  	depends on ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
>  	depends on HAS_IOMEM
> -	select OMAP_GPMC if ARCH_K3
> +	select MEMORY
> +	select OMAP_GPMC
>  	help
>  	  Support for NAND flash on Texas Instruments OMAP2, OMAP3, OMAP4
>  	  and Keystone platforms.
> -- 
> 2.17.1
> 

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

* Re: [PATCH] mtd: rawnand: omap2: Prevent invalid configuration and build error
  2022-02-19 15:08 ` Guenter Roeck
@ 2022-02-19 19:11   ` Roger Quadros
  0 siblings, 0 replies; 6+ messages in thread
From: Roger Quadros @ 2022-02-19 19:11 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: miquel.raynal, krzysztof.kozlowski, vigneshr, nm, linux-mtd,
	linux-kernel

Hi,

On 19/02/2022 17:08, Guenter Roeck wrote:
> On Tue, Jan 18, 2022 at 02:35:25PM +0200, Roger Quadros wrote:
>> We need to select MEMORY as well otherwise OMAP_GPMC will not be built.
>> For simplicity let's select MEMORY and OMAP_GPMC unconditionally as
>> this driver depends on OMAP_GPMC driver and uses symbols from there.
>>
>> Fixes: dbcb124acebd ("mtd: rawnand: omap2: Select GPMC device driver for ARCH_K3")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Roger Quadros <rogerq@kernel.org>
> 
> This patch ignores OMAP_GPMC dependencies and results in:
> 
> 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]
> 
> when configuring sparc64:allmodconfig, and in the following
> build failure when trying to build that image.
> 
> Building sparc64:allmodconfig ... failed
> --------------
> Error log:
> <stdin>:1517:2: warning: #warning syscall clone3 not implemented [-Wcpp]
> sparc64-linux-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child':
> omap-gpmc.c:(.text.unlikely+0x14c4): undefined reference to `of_platform_device_create'
> 
> Guenter
> 
>> ---
>>  drivers/mtd/nand/raw/Kconfig | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
>> index 20408b7db540..d986ab4e4c35 100644
>> --- a/drivers/mtd/nand/raw/Kconfig
>> +++ b/drivers/mtd/nand/raw/Kconfig
>> @@ -42,7 +42,8 @@ config MTD_NAND_OMAP2
>>  	tristate "OMAP2, OMAP3, OMAP4 and Keystone NAND controller"
>>  	depends on ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
>>  	depends on HAS_IOMEM
>> -	select OMAP_GPMC if ARCH_K3
>> +	select MEMORY
>> +	select OMAP_GPMC

I think selecting these was a bad idea in the first place. I'll send out a patch to remove the selects.
This driver should depend on them instead.

We will figure out how to enable OMAP_GPMC for K3 architecture some other way.

>>  	help
>>  	  Support for NAND flash on Texas Instruments OMAP2, OMAP3, OMAP4
>>  	  and Keystone platforms.
>> -- 
>> 2.17.1
>>

cheers,
-roger

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

end of thread, other threads:[~2022-02-19 19:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18 12:35 [PATCH] mtd: rawnand: omap2: Prevent invalid configuration and build error Roger Quadros
2022-01-18 15:28 ` Krzysztof Kozlowski
2022-01-23 15:23 ` Miquel Raynal
2022-01-23 15:33   ` Miquel Raynal
2022-02-19 15:08 ` Guenter Roeck
2022-02-19 19:11   ` Roger Quadros

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).