Skip to contentSkip to conversation

soc: litex: Properly depend on HAS_IOMEM

PATCH In review David Gow 2 participants 4 messages Jan 27, 2021 Litex platform

lore
Share & tools
lore

David Gow

author
#0 lore raw

PATCH 1/1 soc: litex: Properly depend on HAS_IOMEM

The LiteX SOC controller driver makes use of IOMEM functions like devm_platform_ioremap_resource(), which are only available if CONFIG_HAS_IOMEM is defined.

This causes the driver not to be enable under make ARCH=um allyesconfig, even though it won't build.

By adding a dependency on HAS_IOMEM, the driver will not be enabled on architectures which don't support it.

Fixes 22447a99c97e ("drivers/soc/litex: add LiteX SoC Controller driver")
---
 drivers/soc/litex/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/litex/Kconfig +1 -0
index 7c6b009b6f6c..7a7c38282e11 100644
@@ -8,6 +8,7 @@ config LITEX
 config LITEX_SOC_CONTROLLER
 	tristate "Enable LiteX SoC Controller driver"
 	depends on OF || COMPILE_TEST
+	depends on HAS_IOMEM
 	select LITEX
 	help
 	  This option enables the SoC Controller Driver which verifies
Signature · 1 line
2.30.0.280.ga3ce27912f-goog
#1 lore raw
Quoted 6 lines · David Gow

The LiteX SOC controller driver makes use of IOMEM functions like devm_platform_ioremap_resource(), which are only available if CONFIG_HAS_IOMEM is defined.

This causes the driver not to be enable under make ARCH=um allyesconfig, even though it won't build.

Is this wording correct? I suspect it causes to driver TO BE enabled.

Quoted 6 lines

By adding a dependency on HAS_IOMEM, the driver will not be enabled on architectures which don't support it.

Fixes 22447a99c97e ("drivers/soc/litex: add LiteX SoC Controller driver")

This looks ok to me. I can queue it for 5.11 fixes, if you can help with the wording above.

-Stafford

Quoted 19 lines
---
 drivers/soc/litex/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/litex/Kconfig +1 -0
index 7c6b009b6f6c..7a7c38282e11 100644
@@ -8,6 +8,7 @@ config LITEX
 config LITEX_SOC_CONTROLLER
 	tristate "Enable LiteX SoC Controller driver"
 	depends on OF || COMPILE_TEST
+	depends on HAS_IOMEM
 	select LITEX
 	help
 	  This option enables the SoC Controller Driver which verifies
Signature · 1 line
2.30.0.280.ga3ce27912f-goog
author
#2 lore raw
Quoted 11 lines · Stafford Horne
Quoted 6 lines · David Gow

The LiteX SOC controller driver makes use of IOMEM functions like devm_platform_ioremap_resource(), which are only available if CONFIG_HAS_IOMEM is defined.

This causes the driver not to be enable under make ARCH=um allyesconfig, even though it won't build.

Is this wording correct? I suspect it causes to driver TO BE enabled.

Whoops! Yes: that should be "causes the driver to be enabled" -- sorry about that.

Let me know if you want me to re-send it with the fixed wording, or if you just want to fix that yourself.

Quoted 9 lines
Quoted 6 lines

By adding a dependency on HAS_IOMEM, the driver will not be enabled on architectures which don't support it.

Fixes 22447a99c97e ("drivers/soc/litex: add LiteX SoC Controller driver")

This looks ok to me. I can queue it for 5.11 fixes, if you can help with the wording above.

Thanks: that'd be great!

Cheers,
-- David

Quoted 22 lines

-Stafford

Quoted 19 lines
---
 drivers/soc/litex/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/litex/Kconfig +1 -1
index 7c6b009b6f6c..7a7c38282e11 100644
@@ -8,6 +8,7 @@ config LITEX
 config LITEX_SOC_CONTROLLER
      tristate "Enable LiteX SoC Controller driver"
      depends on OF || COMPILE_TEST
+     depends on HAS_IOMEM
      select LITEX
      help
        This option enables the SoC Controller Driver which verifies
--

2.30.0.280.ga3ce27912f-goog

#3 lore raw
Quoted 10 lines · David Gow
Quoted 9 lines · Stafford Horne
Quoted 6 lines · David Gow

The LiteX SOC controller driver makes use of IOMEM functions like devm_platform_ioremap_resource(), which are only available if CONFIG_HAS_IOMEM is defined.

This causes the driver not to be enable under make ARCH=um allyesconfig, even though it won't build.

Quoted 8 lines
Quoted 2 lines

Is this wording correct? I suspect it causes to driver TO BE enabled.

Whoops! Yes: that should be "causes the driver to be enabled" -- sorry about that.

Let me know if you want me to re-send it with the fixed wording, or if you just want to fix that yourself.

OK, I'll fix it.

Quoted 11 lines
Quoted 9 lines
Quoted 6 lines

By adding a dependency on HAS_IOMEM, the driver will not be enabled on architectures which don't support it.

Fixes 22447a99c97e ("drivers/soc/litex: add LiteX SoC Controller driver")

This looks ok to me. I can queue it for 5.11 fixes, if you can help with the wording above.

Thanks: that'd be great!

No problem.

-Stafford