Message ID | 20140131015457.GA19814@verge.net.au (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Simon, On 31.01.2014 02:55, Simon Horman wrote: > Hi, > > while testing the patches currently queued up up for LTSI 3.10.27 (head > commit: 199a59dc9b62cc27a ("Two Xilinx bugfixes added") I have noticed that > the following patch appears to cause a exynos4_defconfig build to fail. > > The purpose of this email is to document that. > > I do not believe this is a major problem as support for the exynos4 appears > to have been removed from mainline by 6c56c6cd8031e0171 ("gpio: samsung: > Drop support for Exynos SoCs") and the code that fails to compile is > subsequently removed from mainline by 608f9737f1bbe44428ece ("gpio: > samsung: Skip initialization if device tree is present") as it is no longer > used (I assume since Enyons SoC support was removed). > This looks like some Exynos-specific Kconfig entry lacking some dependencies or missing #ifdef in the driver, most likely OF-related. The driver that fails to compile is a legacy GPIO driver used on non-DT Samsung platforms and replaced by pinctrl-samsung on DT-enabled ones. Since Exynos is now DT-only, support for it has been removed from the old driver. Looking at your build error, I'd say the block at line 3015 should also check CONFIG_OF, as a stub for_each_matching_node(), when CONFIG_OF is disabled was added after Linux 3.10. I'm not sure what should be the preferred way to fix this up. Since 3.10 still includes legacy (board file based) support for Exynos, gpio-samsung driver is a must. The two things that come to my mind are: 1) modifying the selects added by offending patch to do so conditionally (if OF), 2) changing the gpio-samsung driver to also check for CONFIG_OF. Best regards, Tomasz > > The patch that causes the build failure, followed by the build failure. > > > From: Doug Anderson <dianders@chromium.org> > > ARM: EXYNOS: Select PINCTRL_EXYNOS for exynos4/5 at chip level > > Previously if you had MACH_EXYNOS5_DT but not MACH_EXYNOS4_DT you'd be > missing the pincontrol definitions. Move PINCTRL selects to the arch > level since we should be enabling the code for all exynos variants. > > Update the PINCTRL descriptions to indicate that PINCTRL_EXYNOS is not > for exynos5440. Also add basic dependencies for the PINCTRL_EXYNOS > kernel config. > > Signed-off-by: Doug Anderson <dianders@chromium.org> > Acked-by: Linus Walleij <linus.walleij@linaro.org> > Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> > (cherry picked from commit 83978253d0c3e12bf81d4b5f419a0200d5cb19a6) > Signed-off-by: Darren Hart <dvhart@linux.intel.com> > > diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig > index 756970f..7fccad0 100644 > --- a/arch/arm/mach-exynos/Kconfig > +++ b/arch/arm/mach-exynos/Kconfig > @@ -17,6 +17,7 @@ config ARCH_EXYNOS4 > select HAVE_ARM_SCU if SMP > select HAVE_SMP > select MIGHT_HAVE_CACHE_L2X0 > + select PINCTRL > help > Samsung EXYNOS4 SoCs based systems > > @@ -24,6 +25,7 @@ config ARCH_EXYNOS5 > bool "SAMSUNG EXYNOS5" > select HAVE_ARM_SCU if SMP > select HAVE_SMP > + select PINCTRL > help > Samsung EXYNOS5 (Cortex-A15) SoC based systems > > @@ -34,6 +36,7 @@ config CPU_EXYNOS4210 > default y > depends on ARCH_EXYNOS4 > select ARM_CPU_SUSPEND if PM > + select PINCTRL_EXYNOS > select PM_GENERIC_DOMAINS > select S5P_PM if PM > select S5P_SLEEP if PM > @@ -45,6 +48,7 @@ config SOC_EXYNOS4212 > bool "SAMSUNG EXYNOS4212" > default y > depends on ARCH_EXYNOS4 > + select PINCTRL_EXYNOS > select S5P_PM if PM > select S5P_SLEEP if PM > select SAMSUNG_DMADEV > @@ -55,6 +59,7 @@ config SOC_EXYNOS4412 > bool "SAMSUNG EXYNOS4412" > default y > depends on ARCH_EXYNOS4 > + select PINCTRL_EXYNOS > select SAMSUNG_DMADEV > help > Enable EXYNOS4412 SoC support > @@ -63,6 +68,7 @@ config SOC_EXYNOS5250 > bool "SAMSUNG EXYNOS5250" > default y > depends on ARCH_EXYNOS5 > + select PINCTRL_EXYNOS > select PM_GENERIC_DOMAINS if PM > select S5P_PM if PM > select S5P_SLEEP if PM > @@ -78,7 +84,6 @@ config SOC_EXYNOS5440 > select ARCH_HAS_OPP > select HAVE_ARM_ARCH_TIMER > select AUTO_ZRELADDR > - select PINCTRL > select PINCTRL_EXYNOS5440 > select PM_OPP > help > @@ -413,8 +418,6 @@ config MACH_EXYNOS4_DT > select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210 > select CPU_EXYNOS4210 > select KEYBOARD_SAMSUNG if INPUT_KEYBOARD > - select PINCTRL > - select PINCTRL_EXYNOS > select S5P_DEV_MFC > select USE_OF > help > diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig > index adeb1fe..6585b37 100644 > --- a/drivers/pinctrl/Kconfig > +++ b/drivers/pinctrl/Kconfig > @@ -219,12 +219,13 @@ config PINCTRL_SAMSUNG > select PINCONF > > config PINCTRL_EXYNOS > - bool "Pinctrl driver data for Samsung EXYNOS SoCs" > - depends on OF && GPIOLIB > + bool "Pinctrl driver data for Samsung EXYNOS SoCs other than 5440" > + depends on OF && GPIOLIB && ARCH_EXYNOS > select PINCTRL_SAMSUNG > > config PINCTRL_EXYNOS5440 > bool "Samsung EXYNOS5440 SoC pinctrl driver" > + depends on SOC_EXYNOS5440 > select PINMUX > select PINCONF > > > # make > ... > drivers/gpio/gpio-samsung.c: In function ‘samsung_gpiolib_init’: > drivers/gpio/gpio-samsung.c:3035:2: error: implicit declaration of function ‘for_each_matching_node’ [-Werror=implicit-function-declaration] > drivers/gpio/gpio-samsung.c:3036:3: error: expected ‘;’ before ‘if’ > cc1: some warnings being treated as errors > make[2]: *** [drivers/gpio/gpio-samsung.o] Error 1 > make[1]: *** [drivers/gpio] Error 2 > make: *** [drivers] Error 2 >
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 756970f..7fccad0 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -17,6 +17,7 @@ config ARCH_EXYNOS4 select HAVE_ARM_SCU if SMP select HAVE_SMP select MIGHT_HAVE_CACHE_L2X0 + select PINCTRL help Samsung EXYNOS4 SoCs based systems @@ -24,6 +25,7 @@ config ARCH_EXYNOS5 bool "SAMSUNG EXYNOS5" select HAVE_ARM_SCU if SMP select HAVE_SMP + select PINCTRL help Samsung EXYNOS5 (Cortex-A15) SoC based systems @@ -34,6 +36,7 @@ config CPU_EXYNOS4210 default y depends on ARCH_EXYNOS4 select ARM_CPU_SUSPEND if PM + select PINCTRL_EXYNOS select PM_GENERIC_DOMAINS select S5P_PM if PM select S5P_SLEEP if PM @@ -45,6 +48,7 @@ config SOC_EXYNOS4212 bool "SAMSUNG EXYNOS4212" default y depends on ARCH_EXYNOS4 + select PINCTRL_EXYNOS select S5P_PM if PM select S5P_SLEEP if PM select SAMSUNG_DMADEV @@ -55,6 +59,7 @@ config SOC_EXYNOS4412 bool "SAMSUNG EXYNOS4412" default y depends on ARCH_EXYNOS4 + select PINCTRL_EXYNOS select SAMSUNG_DMADEV help Enable EXYNOS4412 SoC support @@ -63,6 +68,7 @@ config SOC_EXYNOS5250 bool "SAMSUNG EXYNOS5250" default y depends on ARCH_EXYNOS5 + select PINCTRL_EXYNOS select PM_GENERIC_DOMAINS if PM select S5P_PM if PM select S5P_SLEEP if PM @@ -78,7 +84,6 @@ config SOC_EXYNOS5440 select ARCH_HAS_OPP select HAVE_ARM_ARCH_TIMER select AUTO_ZRELADDR - select PINCTRL select PINCTRL_EXYNOS5440 select PM_OPP help @@ -413,8 +418,6 @@ config MACH_EXYNOS4_DT select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210 select CPU_EXYNOS4210 select KEYBOARD_SAMSUNG if INPUT_KEYBOARD - select PINCTRL - select PINCTRL_EXYNOS select S5P_DEV_MFC select USE_OF help diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index adeb1fe..6585b37 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -219,12 +219,13 @@ config PINCTRL_SAMSUNG select PINCONF config PINCTRL_EXYNOS - bool "Pinctrl driver data for Samsung EXYNOS SoCs" - depends on OF && GPIOLIB + bool "Pinctrl driver data for Samsung EXYNOS SoCs other than 5440" + depends on OF && GPIOLIB && ARCH_EXYNOS select PINCTRL_SAMSUNG config PINCTRL_EXYNOS5440 bool "Samsung EXYNOS5440 SoC pinctrl driver" + depends on SOC_EXYNOS5440 select PINMUX select PINCONF