aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-pxa/regs-lcd.h
diff options
context:
space:
mode:
authoreric miao <eric.miao@marvell.com>2008-04-30 03:52:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 11:29:31 -0400
commitce4fb7b892a6d6c6a0f87366b26fd834d2923dd7 (patch)
tree1b30869071a065f24ab0976b23c9c47998022b24 /include/asm-arm/arch-pxa/regs-lcd.h
parent92ac73c1e4b4e039162f5d3980c2da8192b28060 (diff)
pxafb: convert fb driver to use ioremap() and __raw_{readl, writel}
This is part of the effort moving peripheral registers outside of pxa-regs.h, and using ioremap() make it possible the same IP can be re-used on different processors with different registers space As a result, the fixed mapping in pxa_map_io() is removed. The regs-lcd.h can actually moved to where closer to pxafb.c but some of its bit definitions are directly used by various platform code, though this is not a good style. Signed-off-by: eric miao <eric.miao@marvell.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-arm/arch-pxa/regs-lcd.h')
-rw-r--r--include/asm-arm/arch-pxa/regs-lcd.h139
1 files changed, 139 insertions, 0 deletions
diff --git a/include/asm-arm/arch-pxa/regs-lcd.h b/include/asm-arm/arch-pxa/regs-lcd.h
new file mode 100644
index 000000000000..f84dd47be28a
--- /dev/null
+++ b/include/asm-arm/arch-pxa/regs-lcd.h
@@ -0,0 +1,139 @@
1#ifndef __ASM_ARCH_REGS_LCD_H
2#define __ASM_ARCH_REGS_LCD_H
3/*
4 * LCD Controller Registers and Bits Definitions
5 */
6#define LCCR0 (0x000) /* LCD Controller Control Register 0 */
7#define LCCR1 (0x004) /* LCD Controller Control Register 1 */
8#define LCCR2 (0x008) /* LCD Controller Control Register 2 */
9#define LCCR3 (0x00C) /* LCD Controller Control Register 3 */
10#define LCCR4 (0x010) /* LCD Controller Control Register 3 */
11#define DFBR0 (0x020) /* DMA Channel 0 Frame Branch Register */
12#define DFBR1 (0x024) /* DMA Channel 1 Frame Branch Register */
13#define LCSR (0x038) /* LCD Controller Status Register */
14#define LIIDR (0x03C) /* LCD Controller Interrupt ID Register */
15#define TMEDRGBR (0x040) /* TMED RGB Seed Register */
16#define TMEDCR (0x044) /* TMED Control Register */
17
18#define LCCR3_1BPP (0 << 24)
19#define LCCR3_2BPP (1 << 24)
20#define LCCR3_4BPP (2 << 24)
21#define LCCR3_8BPP (3 << 24)
22#define LCCR3_16BPP (4 << 24)
23
24#define LCCR3_PDFOR_0 (0 << 30)
25#define LCCR3_PDFOR_1 (1 << 30)
26#define LCCR3_PDFOR_2 (2 << 30)
27#define LCCR3_PDFOR_3 (3 << 30)
28
29#define LCCR4_PAL_FOR_0 (0 << 15)
30#define LCCR4_PAL_FOR_1 (1 << 15)
31#define LCCR4_PAL_FOR_2 (2 << 15)
32#define LCCR4_PAL_FOR_MASK (3 << 15)
33
34#define FDADR0 (0x200) /* DMA Channel 0 Frame Descriptor Address Register */
35#define FSADR0 (0x204) /* DMA Channel 0 Frame Source Address Register */
36#define FIDR0 (0x208) /* DMA Channel 0 Frame ID Register */
37#define LDCMD0 (0x20C) /* DMA Channel 0 Command Register */
38#define FDADR1 (0x210) /* DMA Channel 1 Frame Descriptor Address Register */
39#define FSADR1 (0x214) /* DMA Channel 1 Frame Source Address Register */
40#define FIDR1 (0x218) /* DMA Channel 1 Frame ID Register */
41#define LDCMD1 (0x21C) /* DMA Channel 1 Command Register */
42
43#define LCCR0_ENB (1 << 0) /* LCD Controller enable */
44#define LCCR0_CMS (1 << 1) /* Color/Monochrome Display Select */
45#define LCCR0_Color (LCCR0_CMS*0) /* Color display */
46#define LCCR0_Mono (LCCR0_CMS*1) /* Monochrome display */
47#define LCCR0_SDS (1 << 2) /* Single/Dual Panel Display Select */
48#define LCCR0_Sngl (LCCR0_SDS*0) /* Single panel display */
49#define LCCR0_Dual (LCCR0_SDS*1) /* Dual panel display */
50
51#define LCCR0_LDM (1 << 3) /* LCD Disable Done Mask */
52#define LCCR0_SFM (1 << 4) /* Start of frame mask */
53#define LCCR0_IUM (1 << 5) /* Input FIFO underrun mask */
54#define LCCR0_EFM (1 << 6) /* End of Frame mask */
55#define LCCR0_PAS (1 << 7) /* Passive/Active display Select */
56#define LCCR0_Pas (LCCR0_PAS*0) /* Passive display (STN) */
57#define LCCR0_Act (LCCR0_PAS*1) /* Active display (TFT) */
58#define LCCR0_DPD (1 << 9) /* Double Pixel Data (monochrome) */
59#define LCCR0_4PixMono (LCCR0_DPD*0) /* 4-Pixel/clock Monochrome display */
60#define LCCR0_8PixMono (LCCR0_DPD*1) /* 8-Pixel/clock Monochrome display */
61#define LCCR0_DIS (1 << 10) /* LCD Disable */
62#define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */
63#define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */
64#define LCCR0_PDD_S 12
65#define LCCR0_BM (1 << 20) /* Branch mask */
66#define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */
67#define LCCR0_LCDT (1 << 22) /* LCD panel type */
68#define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */
69#define LCCR0_CMDIM (1 << 24) /* Command interrupt mask */
70#define LCCR0_OUC (1 << 25) /* Overlay Underlay control bit */
71#define LCCR0_LDDALT (1 << 26) /* LDD alternate mapping control */
72
73#define LCCR1_PPL Fld (10, 0) /* Pixels Per Line - 1 */
74#define LCCR1_DisWdth(Pixel) (((Pixel) - 1) << FShft (LCCR1_PPL))
75
76#define LCCR1_HSW Fld (6, 10) /* Horizontal Synchronization */
77#define LCCR1_HorSnchWdth(Tpix) (((Tpix) - 1) << FShft (LCCR1_HSW))
78
79#define LCCR1_ELW Fld (8, 16) /* End-of-Line pixel clock Wait - 1 */
80#define LCCR1_EndLnDel(Tpix) (((Tpix) - 1) << FShft (LCCR1_ELW))
81
82#define LCCR1_BLW Fld (8, 24) /* Beginning-of-Line pixel clock */
83#define LCCR1_BegLnDel(Tpix) (((Tpix) - 1) << FShft (LCCR1_BLW))
84
85#define LCCR2_LPP Fld (10, 0) /* Line Per Panel - 1 */
86#define LCCR2_DisHght(Line) (((Line) - 1) << FShft (LCCR2_LPP))
87
88#define LCCR2_VSW Fld (6, 10) /* Vertical Synchronization pulse - 1 */
89#define LCCR2_VrtSnchWdth(Tln) (((Tln) - 1) << FShft (LCCR2_VSW))
90
91#define LCCR2_EFW Fld (8, 16) /* End-of-Frame line clock Wait */
92#define LCCR2_EndFrmDel(Tln) ((Tln) << FShft (LCCR2_EFW))
93
94#define LCCR2_BFW Fld (8, 24) /* Beginning-of-Frame line clock */
95#define LCCR2_BegFrmDel(Tln) ((Tln) << FShft (LCCR2_BFW))
96
97#define LCCR3_API (0xf << 16) /* AC Bias pin trasitions per interrupt */
98#define LCCR3_API_S 16
99#define LCCR3_VSP (1 << 20) /* vertical sync polarity */
100#define LCCR3_HSP (1 << 21) /* horizontal sync polarity */
101#define LCCR3_PCP (1 << 22) /* Pixel Clock Polarity (L_PCLK) */
102#define LCCR3_PixRsEdg (LCCR3_PCP*0) /* Pixel clock Rising-Edge */
103#define LCCR3_PixFlEdg (LCCR3_PCP*1) /* Pixel clock Falling-Edge */
104
105#define LCCR3_OEP (1 << 23) /* Output Enable Polarity */
106#define LCCR3_OutEnH (LCCR3_OEP*0) /* Output Enable active High */
107#define LCCR3_OutEnL (LCCR3_OEP*1) /* Output Enable active Low */
108
109#define LCCR3_DPC (1 << 27) /* double pixel clock mode */
110#define LCCR3_PCD Fld (8, 0) /* Pixel Clock Divisor */
111#define LCCR3_PixClkDiv(Div) (((Div) << FShft (LCCR3_PCD)))
112
113#define LCCR3_BPP Fld (3, 24) /* Bit Per Pixel */
114#define LCCR3_Bpp(Bpp) (((Bpp) << FShft (LCCR3_BPP)))
115
116#define LCCR3_ACB Fld (8, 8) /* AC Bias */
117#define LCCR3_Acb(Acb) (((Acb) << FShft (LCCR3_ACB)))
118
119#define LCCR3_HorSnchH (LCCR3_HSP*0) /* HSP Active High */
120#define LCCR3_HorSnchL (LCCR3_HSP*1) /* HSP Active Low */
121
122#define LCCR3_VrtSnchH (LCCR3_VSP*0) /* VSP Active High */
123#define LCCR3_VrtSnchL (LCCR3_VSP*1) /* VSP Active Low */
124
125#define LCSR_LDD (1 << 0) /* LCD Disable Done */
126#define LCSR_SOF (1 << 1) /* Start of frame */
127#define LCSR_BER (1 << 2) /* Bus error */
128#define LCSR_ABC (1 << 3) /* AC Bias count */
129#define LCSR_IUL (1 << 4) /* input FIFO underrun Lower panel */
130#define LCSR_IUU (1 << 5) /* input FIFO underrun Upper panel */
131#define LCSR_OU (1 << 6) /* output FIFO underrun */
132#define LCSR_QD (1 << 7) /* quick disable */
133#define LCSR_EOF (1 << 8) /* end of frame */
134#define LCSR_BS (1 << 9) /* branch status */
135#define LCSR_SINT (1 << 10) /* subsequent interrupt */
136
137#define LDCMD_PAL (1 << 26) /* instructs DMA to load palette buffer */
138
139#endif /* __ASM_ARCH_REGS_LCD_H */