aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/amba/clcd.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-02-12 09:32:01 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-03-14 15:42:44 -0400
commit3f17522ce461a31e7ced6311b28fcf5b8a763316 (patch)
treef2fde33f7e2887ad99b7579c9c05a30a424a31f2 /include/linux/amba/clcd.h
parent1027247f6eb727db6c600b9eb02796f0766ae704 (diff)
Video: ARM CLCD: Better fix for swapped IENB and CNTL registers
On PL111, as found on Realview and other platforms, these registers are always arranged as CNTL then IENB. On PL110, these registers are IENB then CNTL, except on Versatile platforms. Re-arrange the handling of these register swaps so that PL111 always gets it right without resorting to ifdefs, leaving the only case needing special handling being PL110 on Versatile. Fill out amba/clcd.h with the PL110/PL111 register definition differences in case someone tries to use the PL110 specific definitions on PL111. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/linux/amba/clcd.h')
-rw-r--r--include/linux/amba/clcd.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h
index 29c0448265cf..ca16c3801a1e 100644
--- a/include/linux/amba/clcd.h
+++ b/include/linux/amba/clcd.h
@@ -21,22 +21,21 @@
21#define CLCD_UBAS 0x00000010 21#define CLCD_UBAS 0x00000010
22#define CLCD_LBAS 0x00000014 22#define CLCD_LBAS 0x00000014
23 23
24#if !defined(CONFIG_ARCH_VERSATILE) && !defined(CONFIG_ARCH_REALVIEW) 24#define CLCD_PL110_IENB 0x00000018
25#define CLCD_IENB 0x00000018 25#define CLCD_PL110_CNTL 0x0000001c
26#define CLCD_CNTL 0x0000001c 26#define CLCD_PL110_STAT 0x00000020
27#else 27#define CLCD_PL110_INTR 0x00000024
28/* 28#define CLCD_PL110_UCUR 0x00000028
29 * Someone rearranged these two registers on the Versatile 29#define CLCD_PL110_LCUR 0x0000002C
30 * platform... 30
31 */ 31#define CLCD_PL111_CNTL 0x00000018
32#define CLCD_IENB 0x0000001c 32#define CLCD_PL111_IENB 0x0000001c
33#define CLCD_CNTL 0x00000018 33#define CLCD_PL111_RIS 0x00000020
34#endif 34#define CLCD_PL111_MIS 0x00000024
35 35#define CLCD_PL111_ICR 0x00000028
36#define CLCD_STAT 0x00000020 36#define CLCD_PL111_UCUR 0x0000002c
37#define CLCD_INTR 0x00000024 37#define CLCD_PL111_LCUR 0x00000030
38#define CLCD_UCUR 0x00000028 38
39#define CLCD_LCUR 0x0000002C
40#define CLCD_PALL 0x00000200 39#define CLCD_PALL 0x00000200
41#define CLCD_PALETTE 0x00000200 40#define CLCD_PALETTE 0x00000200
42 41
@@ -147,6 +146,8 @@ struct clcd_fb {
147 struct clcd_board *board; 146 struct clcd_board *board;
148 void *board_data; 147 void *board_data;
149 void __iomem *regs; 148 void __iomem *regs;
149 u16 off_ienb;
150 u16 off_cntl;
150 u32 clcd_cntl; 151 u32 clcd_cntl;
151 u32 cmap[16]; 152 u32 cmap[16];
152}; 153};