diff options
author | Magnus Damm <damm@igel.co.jp> | 2008-10-09 05:48:16 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-10-19 22:38:50 -0400 |
commit | f400f510df4e29bd00ffe07981ec703070cb9e19 (patch) | |
tree | bcaed0cec48f1110296a81de80d870b5c3ccd5a2 | |
parent | 7994b1c55ec19238067a47f09b0463db3a48c33c (diff) |
video: add sh_mobile_lcdc platform flags
Add platform data flags for detailed lcd display configuration.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 5 | ||||
-rw-r--r-- | include/video/sh_mobile_lcdc.h | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 399a8a75ab0b..efff672fd7b8 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -262,6 +262,11 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) | |||
262 | tmp = ch->ldmt1r_value; | 262 | tmp = ch->ldmt1r_value; |
263 | tmp |= (lcd_cfg->sync & FB_SYNC_VERT_HIGH_ACT) ? 0 : 1 << 28; | 263 | tmp |= (lcd_cfg->sync & FB_SYNC_VERT_HIGH_ACT) ? 0 : 1 << 28; |
264 | tmp |= (lcd_cfg->sync & FB_SYNC_HOR_HIGH_ACT) ? 0 : 1 << 27; | 264 | tmp |= (lcd_cfg->sync & FB_SYNC_HOR_HIGH_ACT) ? 0 : 1 << 27; |
265 | tmp |= (ch->cfg.flags & LCDC_FLAGS_DWPOL) ? 1 << 26 : 0; | ||
266 | tmp |= (ch->cfg.flags & LCDC_FLAGS_DIPOL) ? 1 << 25 : 0; | ||
267 | tmp |= (ch->cfg.flags & LCDC_FLAGS_DAPOL) ? 1 << 24 : 0; | ||
268 | tmp |= (ch->cfg.flags & LCDC_FLAGS_HSCNT) ? 1 << 17 : 0; | ||
269 | tmp |= (ch->cfg.flags & LCDC_FLAGS_DWCNT) ? 1 << 16 : 0; | ||
265 | lcdc_write_chan(ch, LDMT1R, tmp); | 270 | lcdc_write_chan(ch, LDMT1R, tmp); |
266 | 271 | ||
267 | /* setup SYS bus */ | 272 | /* setup SYS bus */ |
diff --git a/include/video/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h index bfb42dbc5cc8..1a4bc6ada606 100644 --- a/include/video/sh_mobile_lcdc.h +++ b/include/video/sh_mobile_lcdc.h | |||
@@ -28,6 +28,12 @@ enum { LCDC_CHAN_DISABLED = 0, | |||
28 | 28 | ||
29 | enum { LCDC_CLK_BUS, LCDC_CLK_PERIPHERAL, LCDC_CLK_EXTERNAL }; | 29 | enum { LCDC_CLK_BUS, LCDC_CLK_PERIPHERAL, LCDC_CLK_EXTERNAL }; |
30 | 30 | ||
31 | #define LCDC_FLAGS_DWPOL (1 << 0) /* Rising edge dot clock data latch */ | ||
32 | #define LCDC_FLAGS_DIPOL (1 << 1) /* Active low display enable polarity */ | ||
33 | #define LCDC_FLAGS_DAPOL (1 << 2) /* Active low display data polarity */ | ||
34 | #define LCDC_FLAGS_HSCNT (1 << 3) /* Disable HSYNC during VBLANK */ | ||
35 | #define LCDC_FLAGS_DWCNT (1 << 4) /* Disable dotclock during blanking */ | ||
36 | |||
31 | struct sh_mobile_lcdc_sys_bus_cfg { | 37 | struct sh_mobile_lcdc_sys_bus_cfg { |
32 | unsigned long ldmt2r; | 38 | unsigned long ldmt2r; |
33 | unsigned long ldmt3r; | 39 | unsigned long ldmt3r; |
@@ -57,6 +63,7 @@ struct sh_mobile_lcdc_chan_cfg { | |||
57 | int bpp; | 63 | int bpp; |
58 | int interface_type; /* selects RGBn or SYSn I/F, see above */ | 64 | int interface_type; /* selects RGBn or SYSn I/F, see above */ |
59 | int clock_divider; | 65 | int clock_divider; |
66 | unsigned long flags; /* LCDC_FLAGS_... */ | ||
60 | struct fb_videomode lcd_cfg; | 67 | struct fb_videomode lcd_cfg; |
61 | struct sh_mobile_lcdc_lcd_size_cfg lcd_size_cfg; | 68 | struct sh_mobile_lcdc_lcd_size_cfg lcd_size_cfg; |
62 | struct sh_mobile_lcdc_board_cfg board_cfg; | 69 | struct sh_mobile_lcdc_board_cfg board_cfg; |