* [PATCH] mtd: onenand: omap2: add dependency on GPMC
@ 2022-11-04 19:49 Krzysztof Kozlowski
2022-11-07 8:44 ` Roger Quadros
0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-04 19:49 UTC (permalink / raw)
To: Kyungmin Park, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Krzysztof Kozlowski, Roger Quadros,
linux-mtd, linux-kernel
Cc: kernel test robot
OMAP2 OneNAND driver uses gpmc_omap_onenand_set_timings() provided by
OMAP GPMC driver, so the latter cannot be module if OneNAND driver is
built-in:
/usr/bin/arm-linux-gnueabi-ld: drivers/mtd/nand/onenand/onenand_omap2.o: in function `omap2_onenand_probe':
onenand_omap2.c:(.text+0x520): undefined reference to `gpmc_omap_onenand_set_timings'
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 854fd9209b20 ("memory: omap-gpmc: Allow building as a module")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/mtd/nand/onenand/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/nand/onenand/Kconfig b/drivers/mtd/nand/onenand/Kconfig
index 34d9a7a82ad4..fa94c514626d 100644
--- a/drivers/mtd/nand/onenand/Kconfig
+++ b/drivers/mtd/nand/onenand/Kconfig
@@ -26,6 +26,7 @@ config MTD_ONENAND_OMAP2
tristate "OneNAND on OMAP2/OMAP3 support"
depends on ARCH_OMAP2 || ARCH_OMAP3 || (COMPILE_TEST && ARM)
depends on OF || COMPILE_TEST
+ depends on OMAP_GPMC || !OMAP_GPMC
help
Support for a OneNAND flash device connected to an OMAP2/OMAP3 SoC
via the GPMC memory controller.
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mtd: onenand: omap2: add dependency on GPMC
2022-11-04 19:49 [PATCH] mtd: onenand: omap2: add dependency on GPMC Krzysztof Kozlowski
@ 2022-11-07 8:44 ` Roger Quadros
2022-11-07 8:55 ` Krzysztof Kozlowski
0 siblings, 1 reply; 4+ messages in thread
From: Roger Quadros @ 2022-11-07 8:44 UTC (permalink / raw)
To: Krzysztof Kozlowski, Kyungmin Park, Miquel Raynal,
Richard Weinberger, Vignesh Raghavendra, linux-mtd, linux-kernel
Cc: kernel test robot
Hello Krzysztof,
On 04/11/2022 21:49, Krzysztof Kozlowski wrote:
> OMAP2 OneNAND driver uses gpmc_omap_onenand_set_timings() provided by
> OMAP GPMC driver, so the latter cannot be module if OneNAND driver is
> built-in:
>
> /usr/bin/arm-linux-gnueabi-ld: drivers/mtd/nand/onenand/onenand_omap2.o: in function `omap2_onenand_probe':
> onenand_omap2.c:(.text+0x520): undefined reference to `gpmc_omap_onenand_set_timings'
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 854fd9209b20 ("memory: omap-gpmc: Allow building as a module")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> drivers/mtd/nand/onenand/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/nand/onenand/Kconfig b/drivers/mtd/nand/onenand/Kconfig
> index 34d9a7a82ad4..fa94c514626d 100644
> --- a/drivers/mtd/nand/onenand/Kconfig
> +++ b/drivers/mtd/nand/onenand/Kconfig
> @@ -26,6 +26,7 @@ config MTD_ONENAND_OMAP2
> tristate "OneNAND on OMAP2/OMAP3 support"
> depends on ARCH_OMAP2 || ARCH_OMAP3 || (COMPILE_TEST && ARM)
> depends on OF || COMPILE_TEST
> + depends on OMAP_GPMC || !OMAP_GPMC
Why did you add !OMAP_GPMC?
If OMAP_GPMC is not set we don't want to be able to build this driver correct?
> help
> Support for a OneNAND flash device connected to an OMAP2/OMAP3 SoC
> via the GPMC memory controller.
cheers,
-roger
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mtd: onenand: omap2: add dependency on GPMC
2022-11-07 8:44 ` Roger Quadros
@ 2022-11-07 8:55 ` Krzysztof Kozlowski
2022-11-07 9:01 ` Roger Quadros
0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-07 8:55 UTC (permalink / raw)
To: Roger Quadros, Kyungmin Park, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, linux-mtd, linux-kernel
Cc: kernel test robot
On 07/11/2022 09:44, Roger Quadros wrote:
> Hello Krzysztof,
>
> On 04/11/2022 21:49, Krzysztof Kozlowski wrote:
>> OMAP2 OneNAND driver uses gpmc_omap_onenand_set_timings() provided by
>> OMAP GPMC driver, so the latter cannot be module if OneNAND driver is
>> built-in:
>>
>> /usr/bin/arm-linux-gnueabi-ld: drivers/mtd/nand/onenand/onenand_omap2.o: in function `omap2_onenand_probe':
>> onenand_omap2.c:(.text+0x520): undefined reference to `gpmc_omap_onenand_set_timings'
>>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Fixes: 854fd9209b20 ("memory: omap-gpmc: Allow building as a module")
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>> drivers/mtd/nand/onenand/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mtd/nand/onenand/Kconfig b/drivers/mtd/nand/onenand/Kconfig
>> index 34d9a7a82ad4..fa94c514626d 100644
>> --- a/drivers/mtd/nand/onenand/Kconfig
>> +++ b/drivers/mtd/nand/onenand/Kconfig
>> @@ -26,6 +26,7 @@ config MTD_ONENAND_OMAP2
>> tristate "OneNAND on OMAP2/OMAP3 support"
>> depends on ARCH_OMAP2 || ARCH_OMAP3 || (COMPILE_TEST && ARM)
>> depends on OF || COMPILE_TEST
>> + depends on OMAP_GPMC || !OMAP_GPMC
>
> Why did you add !OMAP_GPMC?
>
> If OMAP_GPMC is not set we don't want to be able to build this driver correct?
It will build fine because of stubs, so building is not a problem. We
just want to forbid having this built-in if OMAP_GPMC is a module. The
question is whether this is a runtime dependency as well?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mtd: onenand: omap2: add dependency on GPMC
2022-11-07 8:55 ` Krzysztof Kozlowski
@ 2022-11-07 9:01 ` Roger Quadros
0 siblings, 0 replies; 4+ messages in thread
From: Roger Quadros @ 2022-11-07 9:01 UTC (permalink / raw)
To: Krzysztof Kozlowski, Kyungmin Park, Miquel Raynal,
Richard Weinberger, Vignesh Raghavendra, linux-mtd, linux-kernel
Cc: kernel test robot
On 07/11/2022 10:55, Krzysztof Kozlowski wrote:
> On 07/11/2022 09:44, Roger Quadros wrote:
>> Hello Krzysztof,
>>
>> On 04/11/2022 21:49, Krzysztof Kozlowski wrote:
>>> OMAP2 OneNAND driver uses gpmc_omap_onenand_set_timings() provided by
>>> OMAP GPMC driver, so the latter cannot be module if OneNAND driver is
>>> built-in:
>>>
>>> /usr/bin/arm-linux-gnueabi-ld: drivers/mtd/nand/onenand/onenand_omap2.o: in function `omap2_onenand_probe':
>>> onenand_omap2.c:(.text+0x520): undefined reference to `gpmc_omap_onenand_set_timings'
>>>
>>> Reported-by: kernel test robot <lkp@intel.com>
>>> Fixes: 854fd9209b20 ("memory: omap-gpmc: Allow building as a module")
>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>> ---
>>> drivers/mtd/nand/onenand/Kconfig | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/mtd/nand/onenand/Kconfig b/drivers/mtd/nand/onenand/Kconfig
>>> index 34d9a7a82ad4..fa94c514626d 100644
>>> --- a/drivers/mtd/nand/onenand/Kconfig
>>> +++ b/drivers/mtd/nand/onenand/Kconfig
>>> @@ -26,6 +26,7 @@ config MTD_ONENAND_OMAP2
>>> tristate "OneNAND on OMAP2/OMAP3 support"
>>> depends on ARCH_OMAP2 || ARCH_OMAP3 || (COMPILE_TEST && ARM)
>>> depends on OF || COMPILE_TEST
>>> + depends on OMAP_GPMC || !OMAP_GPMC
>>
>> Why did you add !OMAP_GPMC?
>>
>> If OMAP_GPMC is not set we don't want to be able to build this driver correct?
>
> It will build fine because of stubs, so building is not a problem. We
> just want to forbid having this built-in if OMAP_GPMC is a module. The
> question is whether this is a runtime dependency as well?
Yes, there is a runtime dependency. Without the OMAP_GPMC driver
this MTD_ONENAND_OMAP2 will not work.
cheers,
-roger
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-07 9:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-04 19:49 [PATCH] mtd: onenand: omap2: add dependency on GPMC Krzysztof Kozlowski
2022-11-07 8:44 ` Roger Quadros
2022-11-07 8:55 ` Krzysztof Kozlowski
2022-11-07 9:01 ` Roger Quadros
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox