summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-04-30 23:32:38 +0100
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-04-30 23:32:38 +0100
commit4774e2260cf25c54f2188dd0407676e3af6f1f23 (patch)
tree36d362b6f5522e59e663031f4ce2eaf6169b38c3 /arch
parented562ab12733ab75437b3390427d41fce9da83c3 (diff)
downloadblackbird-op-linux-4774e2260cf25c54f2188dd0407676e3af6f1f23.tar.gz
blackbird-op-linux-4774e2260cf25c54f2188dd0407676e3af6f1f23.zip
[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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c17
1 files changed, 16 insertions, 1 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 = {
*/
static void cp_clcd_enable(struct clcd_fb *fb)
{
- cm_control(CM_CTRL_LCDMUXSEL_MASK, CM_CTRL_LCDMUXSEL_VGA);
+ u32 val;
+
+ if (fb->fb.var.bits_per_pixel <= 8)
+ val = CM_CTRL_LCDMUXSEL_VGA_8421BPP;
+ else if (fb->fb.var.bits_per_pixel <= 16)
+ val = CM_CTRL_LCDMUXSEL_VGA_16BPP;
+ else
+ val = 0; /* no idea for this, don't trust the docs */
+
+ cm_control(CM_CTRL_LCDMUXSEL_MASK|
+ CM_CTRL_LCDEN0|
+ CM_CTRL_LCDEN1|
+ CM_CTRL_STATIC1|
+ CM_CTRL_STATIC2|
+ CM_CTRL_STATIC|
+ CM_CTRL_n24BITEN, val);
}
static unsigned long framesize = SZ_1M;
OpenPOWER on IntegriCloud