From 11c32d7b6274cb0f554943d65bd4a126c4a86dcd Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 22 May 2014 23:25:14 +0200 Subject: video: move Versatile CLCD helpers This moves the Versatile-specific helper code and panel database down into the drivers/video folder next to the CLCD driver itself, preserving the config symbol but also moving the header to platform data. This is necessary to rid the Integrator of this final inclusion dependency and get us one less user of the plat-versatile folder. Cc: Arnd Bergmann Cc: Jean-Christophe Plagniol-Villard Cc: linux-fbdev@vger.kernel.org Cc: Russell King Acked-by: Tomi Valkeinen Signed-off-by: Linus Walleij --- arch/arm/mach-vexpress/ct-ca9x4.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch/arm/mach-vexpress') diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index 86150d7a2e7d..27bea049380a 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -29,8 +30,6 @@ #include #include -#include - static struct map_desc ct_ca9x4_io_desc[] __initdata = { { .virtual = V2T_PERIPH, -- cgit v1.2.3 From ec4c4d877becf1c224f45347f4fc0016765e00d0 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 15 Jul 2014 09:58:06 +0200 Subject: video: fix up versatile CLCD helper move commit 11c32d7b6274cb0f ("video: move Versatile CLCD helpers") moved files out of the plat-versatile directory but in the process got a few of the dependencies wrong: - If CONFIG_FB is not set, the file no longer gets built, resulting in a link error - If CONFIG_FB or CONFIG_FB_ARMCLCD are disabled, we also get a Kconfig warning for incorrect dependencies due to the symbol being 'select'ed from the platform Kconfig. - When the file is not built, we also get a link error for missing symbols. This patch should fix all three, by removing the 'select' statements, changing the Kconfig description of the symbol to be enabled in exactly the right configurations, and adding inline stub functions for the case when the framebuffer driver is disabled. Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij --- arch/arm/Kconfig | 2 -- arch/arm/mach-vexpress/Kconfig | 1 - drivers/video/fbdev/Kconfig | 6 ++---- include/linux/platform_data/video-clcd-versatile.h | 18 ++++++++++++++++++ 4 files changed, 20 insertions(+), 7 deletions(-) (limited to 'arch/arm/mach-vexpress') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c32064de77d8..11f18a04c066 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -332,7 +332,6 @@ config ARCH_REALVIEW select ICST select NEED_MACH_MEMORY_H select PLAT_VERSATILE - select PLAT_VERSATILE_CLCD help This enables support for ARM Ltd RealView boards. @@ -347,7 +346,6 @@ config ARCH_VERSATILE select HAVE_MACH_CLKDEV select ICST select PLAT_VERSATILE - select PLAT_VERSATILE_CLCD select PLAT_VERSATILE_CLOCK select VERSATILE_FPGA_IRQ help diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index d8b9330f896a..e9166dfc4756 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig @@ -13,7 +13,6 @@ menuconfig ARCH_VEXPRESS select ICST select NO_IOPORT_MAP select PLAT_VERSATILE - select PLAT_VERSATILE_CLCD select POWER_RESET select POWER_RESET_VEXPRESS select POWER_SUPPLY diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 92026d31bb48..bdf463072247 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -292,10 +292,8 @@ config FB_ARMCLCD # Helper logic selected only by the ARM Versatile platform family. config PLAT_VERSATILE_CLCD - depends on FB_ARMCLCD - depends on (PLAT_VERSATILE || ARCH_INTEGRATOR) - default y - bool + def_bool ARCH_VERSATILE || ARCH_REALVIEW || ARCH_VEXPRESS + depends on FB_ARMCLCD && FB=y config FB_ACORN bool "Acorn VIDC support" diff --git a/include/linux/platform_data/video-clcd-versatile.h b/include/linux/platform_data/video-clcd-versatile.h index 6bb6a1d2019b..09ccf182af4d 100644 --- a/include/linux/platform_data/video-clcd-versatile.h +++ b/include/linux/platform_data/video-clcd-versatile.h @@ -1,9 +1,27 @@ #ifndef PLAT_CLCD_H #define PLAT_CLCD_H +#ifdef CONFIG_PLAT_VERSATILE_CLCD struct clcd_panel *versatile_clcd_get_panel(const char *); int versatile_clcd_setup_dma(struct clcd_fb *, unsigned long); int versatile_clcd_mmap_dma(struct clcd_fb *, struct vm_area_struct *); void versatile_clcd_remove_dma(struct clcd_fb *); +#else +static inline struct clcd_panel *versatile_clcd_get_panel(const char *s) +{ + return NULL; +} +static inline int versatile_clcd_setup_dma(struct clcd_fb *fb, unsigned long framesize) +{ + return -ENODEV; +} +static inline int versatile_clcd_mmap_dma(struct clcd_fb *fb, struct vm_area_struct *vm) +{ + return -ENODEV; +} +static inline void versatile_clcd_remove_dma(struct clcd_fb *fb) +{ +} +#endif #endif -- cgit v1.2.3