aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-04-30 18:32:38 -0400
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-04-30 18:32:38 -0400
commit4774e2260cf25c54f2188dd0407676e3af6f1f23 (patch)
tree36d362b6f5522e59e663031f4ce2eaf6169b38c3
parented562ab12733ab75437b3390427d41fce9da83c3 (diff)
[PATCH] ARM: IntegratorCP: Fix CLCD MUX selection values
The documentation on these values seems to be rather wrong. These values have been determined by mere trial and error. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c17
-rw-r--r--include/asm-arm/arch-integrator/cm.h6
2 files changed, 19 insertions, 4 deletions
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 68e15c36e336..3b948e8c2751 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -420,7 +420,22 @@ static struct clcd_panel vga = {
420 */ 420 */
421static void cp_clcd_enable(struct clcd_fb *fb) 421static void cp_clcd_enable(struct clcd_fb *fb)
422{ 422{
423 cm_control(CM_CTRL_LCDMUXSEL_MASK, CM_CTRL_LCDMUXSEL_VGA); 423 u32 val;
424
425 if (fb->fb.var.bits_per_pixel <= 8)
426 val = CM_CTRL_LCDMUXSEL_VGA_8421BPP;
427 else if (fb->fb.var.bits_per_pixel <= 16)
428 val = CM_CTRL_LCDMUXSEL_VGA_16BPP;
429 else
430 val = 0; /* no idea for this, don't trust the docs */
431
432 cm_control(CM_CTRL_LCDMUXSEL_MASK|
433 CM_CTRL_LCDEN0|
434 CM_CTRL_LCDEN1|
435 CM_CTRL_STATIC1|
436 CM_CTRL_STATIC2|
437 CM_CTRL_STATIC|
438 CM_CTRL_n24BITEN, val);
424} 439}
425 440
426static unsigned long framesize = SZ_1M; 441static unsigned long framesize = SZ_1M;
diff --git a/include/asm-arm/arch-integrator/cm.h b/include/asm-arm/arch-integrator/cm.h
index d31c1a71f781..1ab353e23595 100644
--- a/include/asm-arm/arch-integrator/cm.h
+++ b/include/asm-arm/arch-integrator/cm.h
@@ -24,9 +24,9 @@ void cm_control(u32, u32);
24#define CM_CTRL_LCDBIASDN (1 << 10) 24#define CM_CTRL_LCDBIASDN (1 << 10)
25#define CM_CTRL_LCDMUXSEL_MASK (7 << 11) 25#define CM_CTRL_LCDMUXSEL_MASK (7 << 11)
26#define CM_CTRL_LCDMUXSEL_GENLCD (1 << 11) 26#define CM_CTRL_LCDMUXSEL_GENLCD (1 << 11)
27#define CM_CTRL_LCDMUXSEL_SHARPLCD1 (3 << 11) 27#define CM_CTRL_LCDMUXSEL_VGA_16BPP (2 << 11)
28#define CM_CTRL_LCDMUXSEL_SHARPLCD2 (4 << 11) 28#define CM_CTRL_LCDMUXSEL_SHARPLCD (3 << 11)
29#define CM_CTRL_LCDMUXSEL_VGA (7 << 11) 29#define CM_CTRL_LCDMUXSEL_VGA_8421BPP (4 << 11)
30#define CM_CTRL_LCDEN0 (1 << 14) 30#define CM_CTRL_LCDEN0 (1 << 14)
31#define CM_CTRL_LCDEN1 (1 << 15) 31#define CM_CTRL_LCDEN1 (1 << 15)
32#define CM_CTRL_STATIC1 (1 << 16) 32#define CM_CTRL_STATIC1 (1 << 16)