memory: omap-gpmc: Allow module build
Roger Quadros
maintainerv3 cover memory: omap-gpmc: Allow module build
Hi,
These patches allow OMAP_GPMC config to be visible in menuconfig and buildable as a module.
Changelog:
v3:
- Remove not required MODULE_ALIAS
- Mention in commit message why we need to remove of_match_node() call
v2:
- Allow building as a module
Roger Quadros (2):
memory: omap-gpmc: Make OMAP_GPMC config visible and selectable
memory: omap-gpmc: Allow building as a module
drivers/memory/Kconfig | 4 ++-- drivers/memory/omap-gpmc.c | 43 ++++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 22 deletions(-)
Signature · 1 line
2.17.1
Roger Quadros
maintainerPATCH v3 1/2 memory: omap-gpmc: Make OMAP_GPMC config visible and selectable
So far for armv7 TI platforms, GPMC was being selected by arch/arm/mach-* architecture Kconfig files.
For K3 platforms, GPMC is no longer required for basic boot and cannot be always enabled by default by mach- Kconfig.
We need a way for user (or board defconfig) to enable it if required so ake OMAP_GPMC Kconfig option always visible.
--- drivers/memory/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/memory/Kconfig +2 -2
@@ -103,8 +103,8 @@ config TI_EMIF temperature changes config OMAP_GPMC - bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST - depends on OF_ADDRESS + bool "Texas Instruments OMAP SoC GPMC driver" + depends on OF_ADDRESS || COMPILE_TEST select GPIOLIB help This driver is for the General Purpose Memory Controller (GPMC)
Signature · 1 line
2.17.1
Roger Quadros
maintainerPATCH v3 2/2 memory: omap-gpmc: Allow building as a module
In reply to Roger QuadrosAllow OMAP_GPMC to be built as a module.
When building this driver as a module, the symbol 'of_default_bus_match_table' will not be found as it is not being exported.
The of_match_node() call is redundant anyways as of_platform_default_populate() already takes care of matching with 'of_default_bus_match_table'. So get rid of that call. This will also resolve the module build failure.
Move compatible match table to the end where it is usually expected.
--- drivers/memory/Kconfig | 2 +- drivers/memory/omap-gpmc.c | 43 ++++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 21 deletions(-)
drivers/memory/Kconfig +1 -1
@@ -103,7 +103,7 @@ config TI_EMIF temperature changes config OMAP_GPMC - bool "Texas Instruments OMAP SoC GPMC driver" + tristate "Texas Instruments OMAP SoC GPMC driver" depends on OF_ADDRESS || COMPILE_TEST select GPIOLIB help
drivers/memory/omap-gpmc.c +23 -20
76 lines not on this page · raw message
Signature · 1 line
2.17.1
Re: [PATCH v3 1/2] memory: omap-gpmc: Make OMAP_GPMC config visible and selectable
In reply to Roger QuadrosHi Roger,
[email protected] wrote on Mon, 11 Apr 2022 12:55:15 +0300:
Quoted 8 lines
So far for armv7 TI platforms, GPMC was being selected by
arch/arm/mach-*architectureKconfigfiles.For K3 platforms, GPMC is no longer required for basic boot and cannot be always enabled by default by mach-
Kconfig.We need a way for user (or board defconfig) to enable it if required so ake
OMAP_GPMCKconfigoption always visible.
make
Otherwise,
Quoted 11 lines
Signed-off-by Roger Quadros <[email protected]>--- drivers/memory/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/memory/Kconfig +0
-0
drivers/memory/Kconfig config TI_EMIF · line 110
Quoted 10 lines
drivers/memory/Kconfig +2
-2@@ -103,8 +103,8 @@ config TI_EMIF temperature changes config OMAP_GPMC - bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST - depends on OF_ADDRESS + bool "Texas Instruments OMAP SoC GPMC driver" + depends on OF_ADDRESS || COMPILE_TEST select GPIOLIB help This driver is for the General Purpose Memory Controller (GPMC)
Thanks,
Miquèl
Krzysztof Kozlowski
AppliedQuoted 9 lines · Roger Quadros
These patches allow
OMAP_GPMCconfig to be visible in menuconfig and buildable as a module.Changelog:
v3:
- Remove not requiredMODULE_ALIAS
- Mention in commit message why we need to removeof_match_node()call[...]
Applied, thanks!
[1/2] memory: omap-gpmc: Make OMAP_GPMC config visible and selectable
commit: 656d1be692be78b825954e0a2a47fcae81834633
[2/2] memory: omap-gpmc: Allow building as a module
commit: eb55c7180be67774aa728a3c450de441e0dedb5dBest regards,
Signature · 1 line
Krzysztof Kozlowski <[email protected]>
Quoted 9 lines · Krzysztof Kozlowski
Quoted 8 lines · Roger Quadros
These patches allow
OMAP_GPMCconfig to be visible in menuconfig and buildable as a module.Changelog:
v3:
- Remove not requiredMODULE_ALIAS
- Mention in commit message why we need to removeof_match_node()call
Quoted 8 lines
Quoted 1 line
[...]
Applied, thanks!
[1/2] memory: omap-gpmc: Make
OMAP_GPMCconfig visible and selectablecommit: 656d1be692be78b825954e0a2a47fcae81834633 [2/2] memory: omap-gpmc: Allow building as a module commit: eb55c7180be67774aa728a3c450de441e0dedb5d
And dropped. You have a checkpatch issue:
WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module:
Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity")
#127: FILE: drivers/memory/omap-gpmc.c:2664:
+MODULE_LICENSE("GPL v2");
Best regards,
Krzysztof
Quoted 19 lines · Krzysztof Kozlowski
Quoted 9 lines · Krzysztof Kozlowski
Quoted 8 lines · Roger Quadros
These patches allow
OMAP_GPMCconfig to be visible in menuconfig and buildable as a module.Changelog:
v3:
- Remove not requiredMODULE_ALIAS
- Mention in commit message why we need to removeof_match_node()callQuoted 8 lines
Quoted 1 line
[...]
Applied, thanks!
[1/2] memory: omap-gpmc: Make
OMAP_GPMCconfig visible and selectablecommit: 656d1be692be78b825954e0a2a47fcae81834633 [2/2] memory: omap-gpmc: Allow building as a module commit: eb55c7180be67774aa728a3c450de441e0dedb5d
Quoted 6 lines
And dropped. You have a checkpatch issue:
WARNING: Prefer "GPL" over "GPL v2" - see commit
bf7fbeeae6db("module:
Cure theMODULE_LICENSE"GPL" vs. "GPL v2" bogosity")
#127: FILE:drivers/memory/omap-gpmc.c:2664:
+MODULE_LICENSE("GPL v2");
I kept your first patch (visible/selectable) but I think it should be dropped as well. You need to test it more:
https://krzk.eu/#/builders/63/builds/162
Best regards,
Krzysztof
Roger Quadros
maintainerHi Krzysztof,
Quoted 27 lines · Krzysztof Kozlowski
Quoted 19 lines · Krzysztof Kozlowski
Quoted 9 lines · Krzysztof Kozlowski
Quoted 8 lines · Roger Quadros
These patches allow
OMAP_GPMCconfig to be visible in menuconfig and buildable as a module.Changelog:
v3:
- Remove not requiredMODULE_ALIAS
- Mention in commit message why we need to removeof_match_node()callQuoted 8 lines
Quoted 1 line
[...]
Applied, thanks!
[1/2] memory: omap-gpmc: Make
OMAP_GPMCconfig visible and selectablecommit: 656d1be692be78b825954e0a2a47fcae81834633 [2/2] memory: omap-gpmc: Allow building as a module commit: eb55c7180be67774aa728a3c450de441e0dedb5dQuoted 6 lines
And dropped. You have a checkpatch issue:
WARNING: Prefer "GPL" over "GPL v2" - see commit
bf7fbeeae6db("module:
Cure theMODULE_LICENSE"GPL" vs. "GPL v2" bogosity")
#127: FILE:drivers/memory/omap-gpmc.c:2664:
+MODULE_LICENSE("GPL v2");
Quoted 4 lines
I kept your first patch (visible/selectable) but I think it should be dropped as well. You need to test it more:
Thanks for the report. I will fix the issues.
cheers,
-roger
Roger Quadros
maintainerQuoted 30 lines · Krzysztof Kozlowski
Quoted 19 lines · Krzysztof Kozlowski
Quoted 9 lines · Krzysztof Kozlowski
Quoted 8 lines · Roger Quadros
These patches allow
OMAP_GPMCconfig to be visible in menuconfig and buildable as a module.Changelog:
v3:
- Remove not requiredMODULE_ALIAS
- Mention in commit message why we need to removeof_match_node()callQuoted 8 lines
Quoted 1 line
[...]
Applied, thanks!
[1/2] memory: omap-gpmc: Make
OMAP_GPMCconfig visible and selectablecommit: 656d1be692be78b825954e0a2a47fcae81834633 [2/2] memory: omap-gpmc: Allow building as a module commit: eb55c7180be67774aa728a3c450de441e0dedb5dQuoted 6 lines
And dropped. You have a checkpatch issue:
WARNING: Prefer "GPL" over "GPL v2" - see commit
bf7fbeeae6db("module:
Cure theMODULE_LICENSE"GPL" vs. "GPL v2" bogosity")
#127: FILE:drivers/memory/omap-gpmc.c:2664:
+MODULE_LICENSE("GPL v2");I kept your first patch (visible/selectable) but I think it should be dropped as well. You need to test it more:
Quoted 8 lines
https://krzk.eu/#/builders/63/builds/162
Review
Quoted 5 lines
config
OMAP_GPMC(quoted diff) +2
-2- bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST - depends on OF_ADDRESS + bool "Texas Instruments OMAP SoC GPMC driver" + depends on OF_ADDRESS || COMPILE_TEST
Looks like include/linux/irqdomain.h does not have fallbacks if CONFIG_IRQ_DOMAIN is not enabled.
I'll have to drop COMPILE_TEST and add depends on IRQ_DOMAIN. Is that OK?
cheers,
-roger
Quoted 13 lines · Roger Quadros
Quoted 8 lines
https://krzk.eu/#/builders/63/builds/162
Review
Quoted 5 lines
config
OMAP_GPMC(quoted diff) +2
-2- bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST - depends on OF_ADDRESS + bool "Texas Instruments OMAP SoC GPMC driver" + depends on OF_ADDRESS || COMPILE_TESTLooks like
include/linux/irqdomain.hdoes not have fallbacks ifCONFIG_IRQ_DOMAINis not enabled.
Quoted 2 lines
I'll have to drop
COMPILE_TESTand add depends onIRQ_DOMAIN. Is that OK?
Previously it was building with COMPILE_TEST on sparc, so what else changed?
Best regards,
Krzysztof
Roger Quadros
maintainerQuoted 14 lines · Krzysztof Kozlowski
Quoted 13 lines · Roger Quadros
Quoted 8 lines
https://krzk.eu/#/builders/63/builds/162
Review
Quoted 5 lines
config
OMAP_GPMC(quoted diff) +2
-2- bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST - depends on OF_ADDRESS + bool "Texas Instruments OMAP SoC GPMC driver" + depends on OF_ADDRESS || COMPILE_TESTLooks like
include/linux/irqdomain.hdoes not have fallbacks ifCONFIG_IRQ_DOMAINis not enabled.
Quoted 5 lines
Quoted 2 lines
I'll have to drop
COMPILE_TESTand add depends onIRQ_DOMAIN. Is that OK?Previously it was building with
COMPILE_TESTon sparc, so what else changed?
Previously it was like so
bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST depends on OF_ADDRESS
Means it won't build if OF_ADDRESS is not set even if COMPILE_TEST is set.
And OF_ADDRESS is not set for sparc
config OF_ADDRESS
def_bool y
depends on !SPARC && (HAS_IOMEM || UML)cheers,
-roger
Quoted 11 lines · Roger Quadros
Quoted 2 lines
Previously it was building with
COMPILE_TESTon sparc, so what else changed?Previously it was like so
bool "Texas Instruments OMAP SoC GPMC driver" if
COMPILE_TESTdepends onOF_ADDRESSMeans it won't build if
OF_ADDRESSis not set even ifCOMPILE_TESTis set.And
OF_ADDRESSis not set for sparc
Ah, yes, so dropping COMPILE_TEST seems the solution. There are no other "depends" here.
Best regards,
Krzysztof
Roger Quadros
maintainerQuoted 8 lines · Krzysztof Kozlowski
Quoted 7 lines · Roger Quadros
Quoted 2 lines
Previously it was building with
COMPILE_TESTon sparc, so what else changed?Previously it was like so
bool "Texas Instruments OMAP SoC GPMC driver" if
COMPILE_TESTdepends onOF_ADDRESS
Quoted 7 lines
Quoted 4 lines
Means it won't build if
OF_ADDRESSis not set even ifCOMPILE_TESTis set.And
OF_ADDRESSis not set for sparcAh, yes, so dropping
COMPILE_TESTseems the solution. There are no other "depends" here.
But the build failed at irq_domain_remove() which is only available if IRQ_DOMAIN is enabled.
It could be possible that OF_ADDRESS is enabled but IRQ_DOMAIN is not right?
cheers,
-roger
Quoted 16 lines · Roger Quadros
Quoted 13 lines · Krzysztof Kozlowski
Quoted 11 lines · Roger Quadros
Quoted 2 lines
Previously it was building with
COMPILE_TESTon sparc, so what else changed?Previously it was like so
bool "Texas Instruments OMAP SoC GPMC driver" if
COMPILE_TESTdepends onOF_ADDRESSMeans it won't build if
OF_ADDRESSis not set even ifCOMPILE_TESTis set.And
OF_ADDRESSis not set for sparc
Quoted 7 lines
Quoted 2 lines
Ah, yes, so dropping
COMPILE_TESTseems the solution. There are no other "depends" here.But the build failed at
irq_domain_remove()which is only available ifIRQ_DOMAINis enabled.It could be possible that
OF_ADDRESSis enabled butIRQ_DOMAINis not right?
I must admit I did not dig this that much. OF_ADDRESS has !SPARC dependency, so after removing COMPILE_TEST the issue should not happen on SPARC. What about other platforms? They should behave I think the same as before - fail if they were failing. Nothing gets worse which is my main concern here.
If you have spare time, maybe you could investigate the compile testing on other platforms as well and if something fails, fix it. But it seems it is separate problem.
Best regards,
Krzysztof
Roger Quadros
maintainerQuoted 31 lines · Krzysztof Kozlowski
Quoted 16 lines · Roger Quadros
Quoted 13 lines · Krzysztof Kozlowski
Quoted 11 lines · Roger Quadros
Quoted 2 lines
Previously it was building with
COMPILE_TESTon sparc, so what else changed?Previously it was like so
bool "Texas Instruments OMAP SoC GPMC driver" if
COMPILE_TESTdepends onOF_ADDRESSMeans it won't build if
OF_ADDRESSis not set even ifCOMPILE_TESTis set.And
OF_ADDRESSis not set for sparcQuoted 7 lines
Quoted 2 lines
Ah, yes, so dropping
COMPILE_TESTseems the solution. There are no other "depends" here.But the build failed at
irq_domain_remove()which is only available ifIRQ_DOMAINis enabled.It could be possible that
OF_ADDRESSis enabled butIRQ_DOMAINis not right?I must admit I did not dig this that much.
OF_ADDRESShas !SPARC dependency, so after removingCOMPILE_TESTthe issue should not happen on SPARC. What about other platforms? They should behave I think the same as before - fail if they were failing. Nothing gets worse which is my main concern here.
Quoted 4 lines
If you have spare time, maybe you could investigate the compile testing on other platforms as well and if something fails, fix it. But it seems it is separate problem.
I won't be able to test on all platforms. I'm ok to not add more dependency and just drop COMPILE_TEST.
cheers,
-roger
Quoted 8 lines · Roger Quadros
Quoted 5 lines
If you have spare time, maybe you could investigate the compile testing on other platforms as well and if something fails, fix it. But it seems it is separate problem.
I won't be able to test on all platforms. I'm ok to not add more dependency and just drop
COMPILE_TEST.
I understand that. You can still test 8-12 popular ones on a regular Ubuntu machine (there are like 10 or 12 cross compile toolchains now in standard Ubuntu repos).
Another way is to put your patches on Github and ask kbuild folks to test your trees. I think this was the repo (but double check):
https://github.com/fengguang/lkp-tests
Best regards,
Krzysztof
Quoted 7 lines · Krzysztof Kozlowski
I understand that. You can still test 8-12 popular ones on a regular Ubuntu machine (there are like 10 or 12 cross compile toolchains now in standard Ubuntu repos).
Another way is to put your patches on Github and ask kbuild folks to test your trees. I think this was the repo (but double check):
https://github.com/fengguang/lkp-tests
I think this is correct one:
https://github.com/intel/lkp-tests.git
Best regards,
Krzysztof