aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-01-26 11:29:10 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2009-03-13 05:34:23 -0400
commit1d0f98709347c4babac08dd933466674e089f188 (patch)
tree1fed1ad460d5a49f53f03c636e9dcf80db7ccdd8 /drivers
parentca489f8e4ac1127e6aee1ffcdaea29858f89506c (diff)
imxfb: add mx27 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/imxfb.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index 5c61286d7ff5..9dd27576db71 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -43,7 +43,12 @@
43 43
44#define LCDC_SIZE 0x04 44#define LCDC_SIZE 0x04
45#define SIZE_XMAX(x) ((((x) >> 4) & 0x3f) << 20) 45#define SIZE_XMAX(x) ((((x) >> 4) & 0x3f) << 20)
46
47#ifdef CONFIG_ARCH_MX1
46#define SIZE_YMAX(y) ((y) & 0x1ff) 48#define SIZE_YMAX(y) ((y) & 0x1ff)
49#else
50#define SIZE_YMAX(y) ((y) & 0x3ff)
51#endif
47 52
48#define LCDC_VPW 0x08 53#define LCDC_VPW 0x08
49#define VPW_VPW(x) ((x) & 0x3ff) 54#define VPW_VPW(x) ((x) & 0x3ff)
@@ -53,7 +58,12 @@
53#define CPOS_CC0 (1<<30) 58#define CPOS_CC0 (1<<30)
54#define CPOS_OP (1<<28) 59#define CPOS_OP (1<<28)
55#define CPOS_CXP(x) (((x) & 3ff) << 16) 60#define CPOS_CXP(x) (((x) & 3ff) << 16)
61
62#ifdef CONFIG_ARCH_MX1
56#define CPOS_CYP(y) ((y) & 0x1ff) 63#define CPOS_CYP(y) ((y) & 0x1ff)
64#else
65#define CPOS_CYP(y) ((y) & 0x3ff)
66#endif
57 67
58#define LCDC_LCWHB 0x10 68#define LCDC_LCWHB 0x10
59#define LCWHB_BK_EN (1<<31) 69#define LCWHB_BK_EN (1<<31)
@@ -62,9 +72,16 @@
62#define LCWHB_BD(x) ((x) & 0xff) 72#define LCWHB_BD(x) ((x) & 0xff)
63 73
64#define LCDC_LCHCC 0x14 74#define LCDC_LCHCC 0x14
75
76#ifdef CONFIG_ARCH_MX1
65#define LCHCC_CUR_COL_R(r) (((r) & 0x1f) << 11) 77#define LCHCC_CUR_COL_R(r) (((r) & 0x1f) << 11)
66#define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 5) 78#define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 5)
67#define LCHCC_CUR_COL_B(b) ((b) & 0x1f) 79#define LCHCC_CUR_COL_B(b) ((b) & 0x1f)
80#else
81#define LCHCC_CUR_COL_R(r) (((r) & 0x3f) << 12)
82#define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 6)
83#define LCHCC_CUR_COL_B(b) ((b) & 0x3f)
84#endif
68 85
69#define LCDC_PCR 0x18 86#define LCDC_PCR 0x18
70 87
@@ -91,7 +108,13 @@
91/* bit fields in imxfb.h */ 108/* bit fields in imxfb.h */
92 109
93#define LCDC_RMCR 0x34 110#define LCDC_RMCR 0x34
111
112#ifdef CONFIG_ARCH_MX1
94#define RMCR_LCDC_EN (1<<1) 113#define RMCR_LCDC_EN (1<<1)
114#else
115#define RMCR_LCDC_EN 0
116#endif
117
95#define RMCR_SELF_REF (1<<0) 118#define RMCR_SELF_REF (1<<0)
96 119
97#define LCDC_LCDICR 0x38 120#define LCDC_LCDICR 0x38
@@ -365,10 +388,6 @@ static void imxfb_enable_controller(struct imxfb_info *fbi)
365{ 388{
366 pr_debug("Enabling LCD controller\n"); 389 pr_debug("Enabling LCD controller\n");
367 390
368 /* initialize LCDC */
369 writel(readl(fbi->regs + LCDC_RMCR) & ~RMCR_LCDC_EN,
370 fbi->regs + LCDC_RMCR); /* just to be safe... */
371
372 writel(fbi->screen_dma, fbi->regs + LCDC_SSA); 391 writel(fbi->screen_dma, fbi->regs + LCDC_SSA);
373 392
374 /* physical screen start address */ 393 /* physical screen start address */