Skip to contentSkip to conversation

memory: omap-gpmc: Allow module build

PATCH Applied Roger Quadros 2 participants 6 messages Apr 26, 2022 – Apr 29, 2022

Subsystems (2)
lore
Share & tools
lore

Roger Quadros

author maintainer
#0 lore raw

v4 cover memory: omap-gpmc: Allow module build

Hi,

These patches allow OMAP_GPMC config to be visible in menuconfig and buildable as a module.

cheers,
-roger

Changelog:
v4:
- drop COMPILE_TEST as include/linux/irqdomain.h does not have fallbacks if CONFIG_IRQ_DOMAIN is not available. So build will fail with COMPILE_TEST on platforms not having CONFIG_IRQ_DOMAIN.
- use GPL instead of GPL v2 for MODULE_LICENSE. Fixes checkpatch warning.

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     |  2 +-
 drivers/memory/omap-gpmc.c | 43 ++++++++++++++++++++------------------
 2 files changed, 24 insertions(+), 21 deletions(-)
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

PATCH v4 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 make OMAP_GPMC Kconfig option always visible.

Drop COMPILE_TEST as build fails if IRQ_DOMAIN is not enabled.

---
 drivers/memory/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/memory/Kconfig +1 -1
index 30bff6cb1b8d..da9634daad04 100644
@@ -103,7 +103,7 @@ config TI_EMIF
 	  temperature changes
 
 config OMAP_GPMC
-	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
+	bool "Texas Instruments OMAP SoC GPMC driver"
 	depends on OF_ADDRESS
 	select GPIOLIB
 	help
Signature · 1 line
2.17.1
author maintainer
#2 lore raw

PATCH v4 2/2 memory: omap-gpmc: Allow building as a module

In reply to Roger Quadros

Allow 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
index da9634daad04..b7800b37af78 100644
@@ -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
 	select GPIOLIB
 	help
drivers/memory/omap-gpmc.c +23 -20

76 lines not on this page · raw message

Signature · 1 line
2.17.1
#3 lore raw

Re: [PATCH v4 2/2] memory: omap-gpmc: Allow building as a module

Quoted 6 lines · Roger Quadros

Allow 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.

Quoted 8 lines

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.

Don't
use
some
unusual
wrapping
style.

Read
instead:
https://elixir.bootlin.com/linux/v5.18-rc4/source/Documentation/process/submitting-patches.rst#L586

Best regards,
Krzysztof

author maintainer
#4 lore raw
In reply to Roger Quadros

Hi,

I've asked LKP bot to test my tree.
We should get a report if there are any surprises.

cheers,
-roger

Quoted 31 lines · Roger Quadros

Hi,

These patches allow OMAP_GPMC config to be visible in menuconfig and buildable as a module.

cheers,
-roger

Changelog:
v4:
- drop COMPILE_TEST as include/linux/irqdomain.h does not have fallbacks if CONFIG_IRQ_DOMAIN is not available. So build will fail with COMPILE_TEST on platforms not having CONFIG_IRQ_DOMAIN.
- use GPL instead of GPL v2 for MODULE_LICENSE. Fixes checkpatch warning.

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     |  2 +-
 drivers/memory/omap-gpmc.c | 43 ++++++++++++++++++++------------------
 2 files changed, 24 insertions(+), 21 deletions(-)
#5 lore raw
In reply to Roger Quadros
Quoted 14 lines · Roger Quadros

These patches allow OMAP_GPMC config to be visible in menuconfig and buildable as a module.

cheers,
-roger

Changelog:
v4:
- drop COMPILE_TEST as include/linux/irqdomain.h does not have fallbacks if CONFIG_IRQ_DOMAIN is not available. So build will fail with COMPILE_TEST on platforms not having CONFIG_IRQ_DOMAIN.
- use GPL instead of GPL v2 for MODULE_LICENSE. Fixes checkpatch warning.

Quoted 1 line

[...]

Applied, thanks!

[1/2] memory: omap-gpmc: Make OMAP_GPMC config visible and selectable
(no commit info)
[2/2] memory: omap-gpmc: Allow building as a module
(no commit info)

Best regards,

Signature · 1 line
Krzysztof Kozlowski <[email protected]>