Commit 9dfec4fe authored by Russell King's avatar Russell King

ARM: integrator: switch Integrator platforms to use consolidated CLCD

This switches integrator platforms to use the consolidated CLCD
panel support, including the display capabilities.  These capabilities
prevent the unsupported BGR565 mode being selected, while still
allowing RGB5551, BGR5551 and RGB565 modes.
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 420c34e4
...@@ -13,6 +13,7 @@ config ARCH_INTEGRATOR_CP ...@@ -13,6 +13,7 @@ config ARCH_INTEGRATOR_CP
bool "Support Integrator/CP platform" bool "Support Integrator/CP platform"
select ARCH_CINTEGRATOR select ARCH_CINTEGRATOR
select ARM_TIMER_SP804 select ARM_TIMER_SP804
select PLAT_VERSATILE_CLCD
help help
Include support for the ARM(R) Integrator CP platform. Include support for the ARM(R) Integrator CP platform.
......
...@@ -121,6 +121,7 @@ static struct clcd_panel vga = { ...@@ -121,6 +121,7 @@ static struct clcd_panel vga = {
.height = -1, .height = -1,
.tim2 = TIM2_BCD | TIM2_IPC, .tim2 = TIM2_BCD | TIM2_IPC,
.cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1), .cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1),
.caps = CLCD_CAP_5551,
.connector = IMPD1_CTRL_DISP_VGA, .connector = IMPD1_CTRL_DISP_VGA,
.bpp = 16, .bpp = 16,
.grayscale = 0, .grayscale = 0,
...@@ -149,6 +150,7 @@ static struct clcd_panel svga = { ...@@ -149,6 +150,7 @@ static struct clcd_panel svga = {
.tim2 = TIM2_BCD, .tim2 = TIM2_BCD,
.cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1), .cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1),
.connector = IMPD1_CTRL_DISP_VGA, .connector = IMPD1_CTRL_DISP_VGA,
.caps = CLCD_CAP_5551,
.bpp = 16, .bpp = 16,
.grayscale = 0, .grayscale = 0,
}; };
...@@ -175,6 +177,7 @@ static struct clcd_panel prospector = { ...@@ -175,6 +177,7 @@ static struct clcd_panel prospector = {
.height = -1, .height = -1,
.tim2 = TIM2_BCD, .tim2 = TIM2_BCD,
.cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1), .cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1),
.caps = CLCD_CAP_5551,
.fixedtimings = 1, .fixedtimings = 1,
.connector = IMPD1_CTRL_DISP_LCD, .connector = IMPD1_CTRL_DISP_LCD,
.bpp = 16, .bpp = 16,
...@@ -206,6 +209,7 @@ static struct clcd_panel ltm10c209 = { ...@@ -206,6 +209,7 @@ static struct clcd_panel ltm10c209 = {
.height = -1, .height = -1,
.tim2 = TIM2_BCD, .tim2 = TIM2_BCD,
.cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1), .cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1),
.caps = CLCD_CAP_5551,
.fixedtimings = 1, .fixedtimings = 1,
.connector = IMPD1_CTRL_DISP_LCD, .connector = IMPD1_CTRL_DISP_LCD,
.bpp = 16, .bpp = 16,
...@@ -279,6 +283,7 @@ static void impd1fb_clcd_remove(struct clcd_fb *fb) ...@@ -279,6 +283,7 @@ static void impd1fb_clcd_remove(struct clcd_fb *fb)
static struct clcd_board impd1_clcd_data = { static struct clcd_board impd1_clcd_data = {
.name = "IM-PD/1", .name = "IM-PD/1",
.caps = CLCD_CAP_5551 | CLCD_CAP_888,
.check = clcdfb_check, .check = clcdfb_check,
.decode = clcdfb_decode, .decode = clcdfb_decode,
.disable = impd1fb_clcd_disable, .disable = impd1fb_clcd_disable,
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
#include <asm/hardware/timer-sp.h> #include <asm/hardware/timer-sp.h>
#include <plat/clcd.h>
#include "common.h" #include "common.h"
#define INTCP_PA_FLASH_BASE 0x24000000 #define INTCP_PA_FLASH_BASE 0x24000000
...@@ -449,30 +451,6 @@ static struct amba_device aaci_device = { ...@@ -449,30 +451,6 @@ static struct amba_device aaci_device = {
/* /*
* CLCD support * CLCD support
*/ */
static struct clcd_panel vga = {
.mode = {
.name = "VGA",
.refresh = 60,
.xres = 640,
.yres = 480,
.pixclock = 39721,
.left_margin = 40,
.right_margin = 24,
.upper_margin = 32,
.lower_margin = 11,
.hsync_len = 96,
.vsync_len = 2,
.sync = 0,
.vmode = FB_VMODE_NONINTERLACED,
},
.width = -1,
.height = -1,
.tim2 = TIM2_BCD | TIM2_IPC,
.cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1),
.bpp = 16,
.grayscale = 0,
};
/* /*
* Ensure VGA is selected. * Ensure VGA is selected.
*/ */
...@@ -500,49 +478,24 @@ static void cp_clcd_enable(struct clcd_fb *fb) ...@@ -500,49 +478,24 @@ static void cp_clcd_enable(struct clcd_fb *fb)
CM_CTRL_n24BITEN, val); CM_CTRL_n24BITEN, val);
} }
static unsigned long framesize = SZ_1M;
static int cp_clcd_setup(struct clcd_fb *fb) static int cp_clcd_setup(struct clcd_fb *fb)
{ {
dma_addr_t dma; fb->panel = versatile_clcd_get_panel("VGA");
if (!fb->panel)
fb->panel = &vga; return -EINVAL;
fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, framesize,
&dma, GFP_KERNEL);
if (!fb->fb.screen_base) {
printk(KERN_ERR "CLCD: unable to map framebuffer\n");
return -ENOMEM;
}
fb->fb.fix.smem_start = dma;
fb->fb.fix.smem_len = framesize;
return 0;
}
static int cp_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
{
return dma_mmap_writecombine(&fb->dev->dev, vma,
fb->fb.screen_base,
fb->fb.fix.smem_start,
fb->fb.fix.smem_len);
}
static void cp_clcd_remove(struct clcd_fb *fb) return versatile_clcd_setup_dma(fb, SZ_1M);
{
dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
fb->fb.screen_base, fb->fb.fix.smem_start);
} }
static struct clcd_board clcd_data = { static struct clcd_board clcd_data = {
.name = "Integrator/CP", .name = "Integrator/CP",
.caps = CLCD_CAP_5551 | CLCD_CAP_RGB565 | CLCD_CAP_888,
.check = clcdfb_check, .check = clcdfb_check,
.decode = clcdfb_decode, .decode = clcdfb_decode,
.enable = cp_clcd_enable, .enable = cp_clcd_enable,
.setup = cp_clcd_setup, .setup = cp_clcd_setup,
.mmap = cp_clcd_mmap, .mmap = versatile_clcd_mmap_dma,
.remove = cp_clcd_remove, .remove = versatile_clcd_remove_dma,
}; };
static struct amba_device clcd_device = { static struct amba_device clcd_device = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment