summaryrefslogtreecommitdiff
path: root/include/linux/amba/clcd.h
diff options
context:
space:
mode:
authorNathan Scott <nathans@bruce>2006-03-22 07:31:14 +0300
committerNathan Scott <nathans@bruce>2006-03-22 07:31:14 +0300
commit4d74f423c722b8cadfabe087369200013b217b67 (patch)
treed62facddfdb0dfd89f3e61f4fc699cf2feb4b082 /include/linux/amba/clcd.h
parentbb19fba1937cb6ab2bb98ac893365f6ebf88ef1b (diff)
parente952f31bce6e9f64db01f607abc46529ba57ac9e (diff)
downloadlinux-4d74f423c722b8cadfabe087369200013b217b67.tar.xz
Merge HEAD from ../linux-2.6
Diffstat (limited to 'include/linux/amba/clcd.h')
-rw-r--r--include/linux/amba/clcd.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h
index 6b8d73dc1ab0..9cf64b1b688b 100644
--- a/include/linux/amba/clcd.h
+++ b/include/linux/amba/clcd.h
@@ -54,6 +54,7 @@
#define CNTL_LCDBPP4 (2 << 1)
#define CNTL_LCDBPP8 (3 << 1)
#define CNTL_LCDBPP16 (4 << 1)
+#define CNTL_LCDBPP16_565 (6 << 1)
#define CNTL_LCDBPP24 (5 << 1)
#define CNTL_LCDBW (1 << 4)
#define CNTL_LCDTFT (1 << 5)
@@ -209,7 +210,16 @@ static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs)
val |= CNTL_LCDBPP8;
break;
case 16:
- val |= CNTL_LCDBPP16;
+ /*
+ * PL110 cannot choose between 5551 and 565 modes in
+ * its control register
+ */
+ if ((fb->dev->periphid & 0x000fffff) == 0x00041110)
+ val |= CNTL_LCDBPP16;
+ else if (fb->fb.var.green.length == 5)
+ val |= CNTL_LCDBPP16;
+ else
+ val |= CNTL_LCDBPP16_565;
break;
case 32:
val |= CNTL_LCDBPP24;