Skip to contentSkip to conversation

video: clps711x: Switch CLPS711X boards to use new FB driver

PATCH In review Alexander Shiyan 1 participant 1 message Mar 20, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 video: clps711x: Switch CLPS711X boards to use new FB driver

This patch removes old implementation of Cirrus Logic CLPS711X FB driver and switch current users to use new one.

---
 arch/arm/mach-clps711x/board-autcpu12.c |   2 +-
 arch/arm/mach-clps711x/board-edb7211.c  |   2 +-
 arch/arm/mach-clps711x/board-p720t.c    |   2 +-
 arch/arm/mach-clps711x/devices.c        |  17 ++
 arch/arm/mach-clps711x/devices.h        |   1 +
 drivers/video/fbdev/Kconfig             |  18 +-
 drivers/video/fbdev/Makefile            |   2 +-
 drivers/video/fbdev/clps711xfb.c        | 315 --------------------------------
 8 files changed, 33 insertions(+), 326 deletions(-)
 delete mode 100644 drivers/video/fbdev/clps711xfb.c
arch/arm/mach-clps711x/board-autcpu12.c +1 -1
index d62ca16..c63f872 100644
@@ -249,7 +249,7 @@ static void __init autcpu12_init(void)
 {
 	clps711x_devices_init();
 	platform_device_register(&autcpu12_flash_pdev);
-	platform_device_register_simple("video-clps711x", 0, NULL, 0);
+	clps711x_add_fb(CLPS711X_SRAM_BASE, CLPS711X_SRAM_SIZE);
 	platform_device_register_simple("cs89x0", 0, autcpu12_cs8900_resource,
 					ARRAY_SIZE(autcpu12_cs8900_resource));
 	platform_device_register(&autcpu12_mmgpio_pdev);
arch/arm/mach-clps711x/board-edb7211.c +1 -1
index 0776098..d9293a0 100644
@@ -166,7 +166,7 @@ static void __init edb7211_init_late(void)
 	platform_device_register_data(&platform_bus, "generic-bl", 0,
 				      &edb7211_lcd_backlight_pdata,
 				      sizeof(edb7211_lcd_backlight_pdata));
-	platform_device_register_simple("video-clps711x", 0, NULL, 0);
+	clps711x_add_fb(CLPS711X_SDRAM0_BASE, VIDEORAM_SIZE);
 	platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource,
 					ARRAY_SIZE(edb7211_cs8900_resource));
 	platform_device_register_data(&platform_bus, "i2c-gpio", 0,
arch/arm/mach-clps711x/board-p720t.c +1 -1
index 67b7337..5bc4fa4 100644
@@ -354,7 +354,7 @@ static void __init p720t_init_late(void)
 	platform_device_register_data(&platform_bus, "generic-bl", 0,
 				      &p720t_lcd_backlight_pdata,
 				      sizeof(p720t_lcd_backlight_pdata));
-	platform_device_register_simple("video-clps711x", 0, NULL, 0);
+	clps711x_add_fb(CLPS711X_SRAM_BASE, CLPS711X_SRAM_SIZE);
 	platform_device_register_data(&platform_bus, "leds-gpio", 0,
 				      &p720t_gpio_led_pdata,
 				      sizeof(p720t_gpio_led_pdata));
arch/arm/mach-clps711x/devices.c +17 -0
index 2001488..f644d35 100644
@@ -14,6 +14,23 @@
 
 #include <mach/hardware.h>
 
+void __init clps711x_add_fb(phys_addr_t base, resource_size_t size)
+{
+	struct resource res[2];
+
+	memset(res, 0, sizeof(res));
+
+	res[0].flags = IORESOURCE_MEM;
+	res[0].start = CLPS711X_PHYS_BASE + LCDCON;
+	res[0].end = CLPS711X_PHYS_BASE + FBADDR + 3;
+	res[1].flags = IORESOURCE_MEM;
+	res[1].start = base;
+	res[1].end = base + size - 1;
+
+	platform_device_register_simple("clps711x-fb", PLATFORM_DEVID_NONE,
+					res, ARRAY_SIZE(res));
+}
+
 static const phys_addr_t clps711x_gpios[][2] __initconst = {
 	{ PADR, PADDR },
 	{ PBDR, PBDDR },
arch/arm/mach-clps711x/devices.h +1 -0
index a5efc17..01e7f45 100644
@@ -9,4 +9,5 @@
  * (at your option) any later version.
  */
 
+void clps711x_add_fb(phys_addr_t, resource_size_t);
 void clps711x_devices_init(void);
drivers/video/fbdev/Kconfig +11 -7
index 45fd7f3..d1f6dca 100644
@@ -302,14 +302,18 @@ config FB_ACORN
 	  unsure, say N.
 
 config FB_CLPS711X
-	bool "CLPS711X LCD support"
-	depends on (FB = y) && ARM && ARCH_CLPS711X
-	select FB_CFB_FILLRECT
-	select FB_CFB_COPYAREA
-	select FB_CFB_IMAGEBLIT
+	tristate "CLPS711X LCD support"
+	depends on FB && (ARCH_CLPS711X || COMPILE_TEST)
+	select BACKLIGHT_LCD_SUPPORT
+	select FB_MODE_HELPERS
+	select FB_SYS_FILLRECT
+	select FB_SYS_COPYAREA
+	select FB_SYS_IMAGEBLIT
+	select LCD_CLASS_DEVICE
+	select VIDEOMODE_HELPERS
 	help
-	  Say Y to enable the Framebuffer driver for the CLPS7111 and
-	  EP7212 processors.
+	  Say Y to enable the Framebuffer driver for the Cirrus Logic
+	  CLPS711X CPUs.
 
 config FB_SA1100
 	bool "SA-1100 LCD support"
drivers/video/fbdev/Makefile +1 -1
index 0284f2a..0164bb1 100644
@@ -14,7 +14,7 @@ obj-$(CONFIG_FB_WMT_GE_ROPS)   += wmt_ge_rops.o
 # Hardware specific drivers go first
 obj-$(CONFIG_FB_AMIGA)            += amifb.o c2p_planar.o
 obj-$(CONFIG_FB_ARC)              += arcfb.o
-obj-$(CONFIG_FB_CLPS711X)         += clps711xfb.o
+obj-$(CONFIG_FB_CLPS711X)	  += clps711x-fb.o
 obj-$(CONFIG_FB_CYBER2000)        += cyber2000fb.o
 obj-$(CONFIG_FB_GRVGA)            += grvga.o
 obj-$(CONFIG_FB_PM2)              += pm2fb.o
drivers/video/fbdev/clps711xfb.c deleted +0 -315

315 lines not on this page · raw message

Signature · 1 line
1.8.3.2