aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/mach-ecovec24/setup.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-10-28 15:14:38 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-10-28 15:14:38 -0400
commitb3773301c4290f054aa2aa5379e59a1bf4f78bdf (patch)
treeaac1619d32800393b587bf034c7dadb9e3c24f7b /arch/sh/boards/mach-ecovec24/setup.c
parentbe6786ac738801d39cfd264ec88c352efd029578 (diff)
parent1a0b1eac5012326e52d1dcf78695ac08f41c37d7 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/genesis-2.6 into devel-stable
Conflicts: drivers/video/sh_mobile_hdmi.c
Diffstat (limited to 'arch/sh/boards/mach-ecovec24/setup.c')
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c60
1 files changed, 36 insertions, 24 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 71a3368ab1fc..0161deb770cc 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -231,14 +231,41 @@ static struct platform_device usb1_common_device = {
231}; 231};
232 232
233/* LCDC */ 233/* LCDC */
234const static struct fb_videomode ecovec_lcd_modes[] = {
235 {
236 .name = "Panel",
237 .xres = 800,
238 .yres = 480,
239 .left_margin = 220,
240 .right_margin = 110,
241 .hsync_len = 70,
242 .upper_margin = 20,
243 .lower_margin = 5,
244 .vsync_len = 5,
245 .sync = 0, /* hsync and vsync are active low */
246 },
247};
248
249const static struct fb_videomode ecovec_dvi_modes[] = {
250 {
251 .name = "DVI",
252 .xres = 1280,
253 .yres = 720,
254 .left_margin = 220,
255 .right_margin = 110,
256 .hsync_len = 40,
257 .upper_margin = 20,
258 .lower_margin = 5,
259 .vsync_len = 5,
260 .sync = 0, /* hsync and vsync are active low */
261 },
262};
263
234static struct sh_mobile_lcdc_info lcdc_info = { 264static struct sh_mobile_lcdc_info lcdc_info = {
235 .ch[0] = { 265 .ch[0] = {
236 .interface_type = RGB18, 266 .interface_type = RGB18,
237 .chan = LCDC_CHAN_MAINLCD, 267 .chan = LCDC_CHAN_MAINLCD,
238 .bpp = 16, 268 .bpp = 16,
239 .lcd_cfg = {
240 .sync = 0, /* hsync and vsync are active low */
241 },
242 .lcd_size_cfg = { /* 7.0 inch */ 269 .lcd_size_cfg = { /* 7.0 inch */
243 .width = 152, 270 .width = 152,
244 .height = 91, 271 .height = 91,
@@ -1079,33 +1106,18 @@ static int __init arch_setup(void)
1079 if (gpio_get_value(GPIO_PTE6)) { 1106 if (gpio_get_value(GPIO_PTE6)) {
1080 /* DVI */ 1107 /* DVI */
1081 lcdc_info.clock_source = LCDC_CLK_EXTERNAL; 1108 lcdc_info.clock_source = LCDC_CLK_EXTERNAL;
1082 lcdc_info.ch[0].clock_divider = 1, 1109 lcdc_info.ch[0].clock_divider = 1;
1083 lcdc_info.ch[0].lcd_cfg.name = "DVI"; 1110 lcdc_info.ch[0].lcd_cfg = ecovec_dvi_modes;
1084 lcdc_info.ch[0].lcd_cfg.xres = 1280; 1111 lcdc_info.ch[0].num_cfg = ARRAY_SIZE(ecovec_dvi_modes);
1085 lcdc_info.ch[0].lcd_cfg.yres = 720;
1086 lcdc_info.ch[0].lcd_cfg.left_margin = 220;
1087 lcdc_info.ch[0].lcd_cfg.right_margin = 110;
1088 lcdc_info.ch[0].lcd_cfg.hsync_len = 40;
1089 lcdc_info.ch[0].lcd_cfg.upper_margin = 20;
1090 lcdc_info.ch[0].lcd_cfg.lower_margin = 5;
1091 lcdc_info.ch[0].lcd_cfg.vsync_len = 5;
1092 1112
1093 gpio_set_value(GPIO_PTA2, 1); 1113 gpio_set_value(GPIO_PTA2, 1);
1094 gpio_set_value(GPIO_PTU1, 1); 1114 gpio_set_value(GPIO_PTU1, 1);
1095 } else { 1115 } else {
1096 /* Panel */ 1116 /* Panel */
1097
1098 lcdc_info.clock_source = LCDC_CLK_PERIPHERAL; 1117 lcdc_info.clock_source = LCDC_CLK_PERIPHERAL;
1099 lcdc_info.ch[0].clock_divider = 2, 1118 lcdc_info.ch[0].clock_divider = 2;
1100 lcdc_info.ch[0].lcd_cfg.name = "Panel"; 1119 lcdc_info.ch[0].lcd_cfg = ecovec_lcd_modes;
1101 lcdc_info.ch[0].lcd_cfg.xres = 800; 1120 lcdc_info.ch[0].num_cfg = ARRAY_SIZE(ecovec_lcd_modes);
1102 lcdc_info.ch[0].lcd_cfg.yres = 480;
1103 lcdc_info.ch[0].lcd_cfg.left_margin = 220;
1104 lcdc_info.ch[0].lcd_cfg.right_margin = 110;
1105 lcdc_info.ch[0].lcd_cfg.hsync_len = 70;
1106 lcdc_info.ch[0].lcd_cfg.upper_margin = 20;
1107 lcdc_info.ch[0].lcd_cfg.lower_margin = 5;
1108 lcdc_info.ch[0].lcd_cfg.vsync_len = 5;
1109 1121
1110 gpio_set_value(GPIO_PTR1, 1); 1122 gpio_set_value(GPIO_PTR1, 1);
1111 1123