Skip to contentSkip to conversation

drivers: rtc: Make xilinx zynqmp driver depend on HAS_IOMEM

PATCH Applied David Gow 2 participants 2 messages Jan 27, 2021 – Feb 2, 2021 Real time clock (RTC)

lore
Share & tools
lore

David Gow

author
#0 lore raw

PATCH 1/1 drivers: rtc: Make xilinx zynqmp driver depend on HAS_IOMEM

The Xilinx zynqmp RTC 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 09ef18bcd5ac ("rtc: use devm_platform_ioremap_resource() to simplify code")
---
 drivers/rtc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/Kconfig +1 -1
index 6123f9f4fbc9..474d95184f20 100644
@@ -1300,7 +1300,7 @@ config RTC_DRV_OPAL
 
 config RTC_DRV_ZYNQMP
 	tristate "Xilinx Zynq Ultrascale+ MPSoC RTC"
-	depends on OF
+	depends on OF && HAS_IOMEM
 	help
 	  If you say yes here you get support for the RTC controller found on
 	  Xilinx Zynq Ultrascale+ MPSoC.
Signature · 1 line
2.30.0.280.ga3ce27912f-goog
maintainer Applied
#1 lore raw
Quoted 8 lines · David Gow

The Xilinx zynqmp RTC 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.

[...]

Applied, thanks!

[1/1] drivers: rtc: Make xilinx zynqmp driver depend on HAS_IOMEM

      commit: ddd0521549a975e6148732d6ca6b89ffa862c0e5

Best regards,

Signature · 1 line
Alexandre Belloni <[email protected]>