All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] asm-generic/io.h: provide default ioremap/iounmap for !HAS_IOMEM
@ 2016-03-29 18:23 Rob Herring
  2016-03-29 18:23 ` [PATCH 2/2] mfd: remove dependency on HAS_IOMEM Rob Herring
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Rob Herring @ 2016-03-29 18:23 UTC (permalink / raw)
  To: Lee Jones; +Cc: Arnd Bergmann, linux-kernel, linux-arch

Drivers shouldn't have to care about HAS_IOMEM to compile and having to
causes a Kconfig mess:

warning: (MEDIA_SUBDRV_AUTOSELECT && VIDEO_CX231XX && INV_MPU6050_I2C) selects I2C_MUX which has unmet direct dependencies (I2C && HAS_IOMEM)
warning: (ST_IRQCHIP && STMMAC_PLATFORM && DWMAC_IPQ806X && DWMAC_LPC18XX && DWMAC_ROCKCHIP && DWMAC_SOCFPGA && DWMAC_STI && TI_CPSW && PINCTRL_ROCKCHIP && PINCTRL_DOVE && POWER_RESET_KEYSTONE && S3C2410_WATCHDOG && VIDEO_OMAP3 && VIDEO_S5P_FIMC && USB_XHCI_MTK && RTC_DRV_AT91SAM9 && LPC18XX_DMAMUX && VIDEO_OMAP4 && HWSPINLOCK_QCOM && ATMEL_ST && QCOM_GSBI && PHY_HI6220_USB) selects MFD_SYSCON which has unmet direct dependencies (HAS_IOMEM)

Reuse the !MMU variants for !HAS_IOMEM as they are sufficient for our
needs. This fixes build errors for UM allyesconfig:

drivers/mfd/syscon.c:89:2: error: implicit declaration of function 'iounmap' [-Werror=implicit-function-declaration]
     iounmap(base);

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/asm-generic/io.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index eed3bbe..03160b0 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -753,7 +753,7 @@ static inline void *phys_to_virt(unsigned long address)
  * ioremap_*() variant as defined to itself to avoid the default NULL return.
  */
 
-#ifdef CONFIG_MMU
+#if defined(CONFIG_MMU) && defined(CONFIG_HAS_IOMEM)
 
 #ifndef ioremap_uc
 #define ioremap_uc ioremap_uc
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2016-03-31  8:39 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-29 18:23 [PATCH 1/2] asm-generic/io.h: provide default ioremap/iounmap for !HAS_IOMEM Rob Herring
2016-03-29 18:23 ` [PATCH 2/2] mfd: remove dependency on HAS_IOMEM Rob Herring
2016-03-30  4:23   ` Krzysztof Kozlowski
2016-03-29 19:37 ` [PATCH 1/2] asm-generic/io.h: provide default ioremap/iounmap for !HAS_IOMEM Arnd Bergmann
2016-03-29 19:50   ` Richard Weinberger
2016-03-29 20:13   ` Rob Herring
2016-03-30  7:50     ` Richard Weinberger
2016-03-30  8:04       ` Arnd Bergmann
2016-03-30  8:04         ` [uml-devel] " Arnd Bergmann
2016-03-30  8:13         ` Richard Weinberger
2016-03-30  8:13           ` Richard Weinberger
2016-03-30 10:03           ` Arnd Bergmann
2016-03-30 13:29             ` Rob Herring
2016-03-30 13:51               ` Arnd Bergmann
2016-03-30 20:08     ` Geert Uytterhoeven
2016-03-30 20:35       ` Richard Weinberger
2016-03-30 20:38         ` Arnd Bergmann
2016-03-30 21:20       ` Rob Herring
2016-03-31  8:39         ` Geert Uytterhoeven
2016-03-30  4:19 ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.