Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163546
b: refs/heads/master
c: ea15edb
h: refs/heads/master
v: v3
  • Loading branch information
Kuninori Morimoto authored and Paul Mundt committed Aug 27, 2009
1 parent add902b commit dff856d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2153ad3294e3e1e89d27a78d65932352b80a4f78
refs/heads/master: ea15edb292197aaf0b137621bafb69f6157f4532
30 changes: 28 additions & 2 deletions trunk/arch/sh/boards/mach-ecovec24/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ static struct sh_mobile_lcdc_info lcdc_info = {
.interface_type = RGB18,
.chan = LCDC_CHAN_MAINLCD,
.bpp = 16,
.clock_divider = 1,
.lcd_cfg = {
.sync = 0, /* hsync and vsync are active low */
},
Expand Down Expand Up @@ -337,6 +336,7 @@ static struct platform_device *ecovec_devices[] __initdata = {
};

#define PORT_HIZA 0xA4050158
#define IODRIVEA 0xA405018A
static int __init devices_setup(void)
{
/* enable SCIFA0 */
Expand Down Expand Up @@ -422,9 +422,13 @@ static int __init devices_setup(void)
gpio_direction_output(GPIO_PTR1, 0);
gpio_direction_output(GPIO_PTA2, 0);

/* I/O buffer drive ability is low */
ctrl_outw((ctrl_inw(IODRIVEA) & ~0x00c0) | 0x0040 , IODRIVEA);

if (gpio_get_value(GPIO_PTE6)) {
/* DVI */
lcdc_info.clock_source = LCDC_CLK_EXTERNAL;
lcdc_info.ch[0].clock_divider = 1,
lcdc_info.ch[0].lcd_cfg.name = "DVI";
lcdc_info.ch[0].lcd_cfg.xres = 1280;
lcdc_info.ch[0].lcd_cfg.yres = 720;
Expand All @@ -439,7 +443,29 @@ static int __init devices_setup(void)
gpio_set_value(GPIO_PTU1, 1);
} else {
/* Panel */
/* not supported */

lcdc_info.clock_source = LCDC_CLK_PERIPHERAL;
lcdc_info.ch[0].clock_divider = 2,
lcdc_info.ch[0].lcd_cfg.name = "Panel";
lcdc_info.ch[0].lcd_cfg.xres = 800;
lcdc_info.ch[0].lcd_cfg.yres = 480;
lcdc_info.ch[0].lcd_cfg.left_margin = 220;
lcdc_info.ch[0].lcd_cfg.right_margin = 110;
lcdc_info.ch[0].lcd_cfg.hsync_len = 70;
lcdc_info.ch[0].lcd_cfg.upper_margin = 20;
lcdc_info.ch[0].lcd_cfg.lower_margin = 5;
lcdc_info.ch[0].lcd_cfg.vsync_len = 5;

gpio_set_value(GPIO_PTR1, 1);

/* FIXME
*
* LCDDON control is needed for Panel,
* but current sh_mobile_lcdc driver doesn't control it.
* It is temporary correspondence
*/
gpio_request(GPIO_PTF4, NULL);
gpio_direction_output(GPIO_PTF4, 1);
}

/* enable CEU0 */
Expand Down

0 comments on commit dff856d

Please sign in to comment.