Thread (23 messages) 23 messages, 7 authors, 2024-10-08
STALE625d REVIEWED: 1 (0M)

[PATCH v8 13/14] mtd: Add HAS_IOMEM || INDIRECT_IOMEM dependency

From: Julian Vetter <hidden>
Date: 2024-10-08 07:55:03
Also in: linux-alpha, linux-arch, linux-arm-msm, linux-m68k, linux-s390, linux-sh, linux-sound, linux-um, lkml, loongarch
Subsystem: memory technology devices (mtd), the rest · Maintainers: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, Linus Torvalds

The UM arch doesn't have HAS_IOMEM=y, so the build fails because the
functions memcpy_fromio and memcpy_toio are not defined anymore. These
functions are only build for targets which have HAS_IOMEM=y or
INDIRECT_IOMEM=y. So, depend on either of the two.

Reviewed-by: Yann Sionneau <redacted>
Signed-off-by: Julian Vetter <redacted>
---
Changes for v8:
- New patch
---
 drivers/mtd/chips/Kconfig | 4 ++++
 drivers/mtd/lpddr/Kconfig | 1 +
 2 files changed, 5 insertions(+)
diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig
index 19726ebd973d..78afe7ccf005 100644
--- a/drivers/mtd/chips/Kconfig
+++ b/drivers/mtd/chips/Kconfig
@@ -4,6 +4,7 @@ menu "RAM/ROM/Flash chip drivers"
 
 config MTD_CFI
 	tristate "Detect flash chips by Common Flash Interface (CFI) probe"
+	depends on HAS_IOMEM || INDIRECT_IOMEM
 	select MTD_GEN_PROBE
 	select MTD_CFI_UTIL
 	help
@@ -16,6 +17,7 @@ config MTD_CFI
 
 config MTD_JEDECPROBE
 	tristate "Detect non-CFI AMD/JEDEC-compatible flash chips"
+	depends on HAS_IOMEM || INDIRECT_IOMEM
 	select MTD_GEN_PROBE
 	select MTD_CFI_UTIL
 	help
@@ -211,12 +213,14 @@ config MTD_CFI_UTIL
 
 config MTD_RAM
 	tristate "Support for RAM chips in bus mapping"
+	depends on HAS_IOMEM || INDIRECT_IOMEM
 	help
 	  This option enables basic support for RAM chips accessed through
 	  a bus mapping driver.
 
 config MTD_ROM
 	tristate "Support for ROM chips in bus mapping"
+	depends on HAS_IOMEM || INDIRECT_IOMEM
 	help
 	  This option enables basic support for ROM chips accessed through
 	  a bus mapping driver.
diff --git a/drivers/mtd/lpddr/Kconfig b/drivers/mtd/lpddr/Kconfig
index 0395aa6b68f1..f35dd8052abc 100644
--- a/drivers/mtd/lpddr/Kconfig
+++ b/drivers/mtd/lpddr/Kconfig
@@ -4,6 +4,7 @@ menu "LPDDR & LPDDR2 PCM memory drivers"
 
 config MTD_LPDDR
 	tristate "Support for LPDDR flash chips"
+	depends on HAS_IOMEM || INDIRECT_IOMEM
 	select MTD_QINFO_PROBE
 	help
 	  This option enables support of LPDDR (Low power double data rate)
-- 
2.34.1





Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help