diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-28 15:14:38 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-28 15:14:38 -0400 |
commit | b3773301c4290f054aa2aa5379e59a1bf4f78bdf (patch) | |
tree | aac1619d32800393b587bf034c7dadb9e3c24f7b /arch/sh | |
parent | be6786ac738801d39cfd264ec88c352efd029578 (diff) | |
parent | 1a0b1eac5012326e52d1dcf78695ac08f41c37d7 (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')
-rw-r--r-- | arch/sh/boards/mach-ap325rxa/setup.c | 29 | ||||
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 60 | ||||
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/setup.c | 29 | ||||
-rw-r--r-- | arch/sh/boards/mach-migor/setup.c | 58 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7724/setup.c | 54 |
5 files changed, 135 insertions, 95 deletions
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c index 3da116f47f01..00553233a7c5 100644 --- a/arch/sh/boards/mach-ap325rxa/setup.c +++ b/arch/sh/boards/mach-ap325rxa/setup.c | |||
@@ -176,6 +176,21 @@ static void ap320_wvga_power_off(void *board_data) | |||
176 | __raw_writew(0, FPGA_LCDREG); | 176 | __raw_writew(0, FPGA_LCDREG); |
177 | } | 177 | } |
178 | 178 | ||
179 | const static struct fb_videomode ap325rxa_lcdc_modes[] = { | ||
180 | { | ||
181 | .name = "LB070WV1", | ||
182 | .xres = 800, | ||
183 | .yres = 480, | ||
184 | .left_margin = 32, | ||
185 | .right_margin = 160, | ||
186 | .hsync_len = 8, | ||
187 | .upper_margin = 63, | ||
188 | .lower_margin = 80, | ||
189 | .vsync_len = 1, | ||
190 | .sync = 0, /* hsync and vsync are active low */ | ||
191 | }, | ||
192 | }; | ||
193 | |||
179 | static struct sh_mobile_lcdc_info lcdc_info = { | 194 | static struct sh_mobile_lcdc_info lcdc_info = { |
180 | .clock_source = LCDC_CLK_EXTERNAL, | 195 | .clock_source = LCDC_CLK_EXTERNAL, |
181 | .ch[0] = { | 196 | .ch[0] = { |
@@ -183,18 +198,8 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
183 | .bpp = 16, | 198 | .bpp = 16, |
184 | .interface_type = RGB18, | 199 | .interface_type = RGB18, |
185 | .clock_divider = 1, | 200 | .clock_divider = 1, |
186 | .lcd_cfg = { | 201 | .lcd_cfg = ap325rxa_lcdc_modes, |
187 | .name = "LB070WV1", | 202 | .num_cfg = ARRAY_SIZE(ap325rxa_lcdc_modes), |
188 | .xres = 800, | ||
189 | .yres = 480, | ||
190 | .left_margin = 32, | ||
191 | .right_margin = 160, | ||
192 | .hsync_len = 8, | ||
193 | .upper_margin = 63, | ||
194 | .lower_margin = 80, | ||
195 | .vsync_len = 1, | ||
196 | .sync = 0, /* hsync and vsync are active low */ | ||
197 | }, | ||
198 | .lcd_size_cfg = { /* 7.0 inch */ | 203 | .lcd_size_cfg = { /* 7.0 inch */ |
199 | .width = 152, | 204 | .width = 152, |
200 | .height = 91, | 205 | .height = 91, |
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 */ |
234 | const 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 | |||
249 | const 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 | |||
234 | static struct sh_mobile_lcdc_info lcdc_info = { | 264 | static 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 | ||
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c index 68994a163f6c..87d4b90e368c 100644 --- a/arch/sh/boards/mach-kfr2r09/setup.c +++ b/arch/sh/boards/mach-kfr2r09/setup.c | |||
@@ -126,6 +126,21 @@ static struct platform_device kfr2r09_sh_keysc_device = { | |||
126 | }, | 126 | }, |
127 | }; | 127 | }; |
128 | 128 | ||
129 | const static struct fb_videomode kfr2r09_lcdc_modes[] = { | ||
130 | { | ||
131 | .name = "TX07D34VM0AAA", | ||
132 | .xres = 240, | ||
133 | .yres = 400, | ||
134 | .left_margin = 0, | ||
135 | .right_margin = 16, | ||
136 | .hsync_len = 8, | ||
137 | .upper_margin = 0, | ||
138 | .lower_margin = 1, | ||
139 | .vsync_len = 1, | ||
140 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
141 | }, | ||
142 | }; | ||
143 | |||
129 | static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = { | 144 | static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = { |
130 | .clock_source = LCDC_CLK_BUS, | 145 | .clock_source = LCDC_CLK_BUS, |
131 | .ch[0] = { | 146 | .ch[0] = { |
@@ -134,18 +149,8 @@ static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = { | |||
134 | .interface_type = SYS18, | 149 | .interface_type = SYS18, |
135 | .clock_divider = 6, | 150 | .clock_divider = 6, |
136 | .flags = LCDC_FLAGS_DWPOL, | 151 | .flags = LCDC_FLAGS_DWPOL, |
137 | .lcd_cfg = { | 152 | .lcd_cfg = kfr2r09_lcdc_modes, |
138 | .name = "TX07D34VM0AAA", | 153 | .num_cfg = ARRAY_SIZE(kfr2r09_lcdc_modes), |
139 | .xres = 240, | ||
140 | .yres = 400, | ||
141 | .left_margin = 0, | ||
142 | .right_margin = 16, | ||
143 | .hsync_len = 8, | ||
144 | .upper_margin = 0, | ||
145 | .lower_margin = 1, | ||
146 | .vsync_len = 1, | ||
147 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
148 | }, | ||
149 | .lcd_size_cfg = { | 154 | .lcd_size_cfg = { |
150 | .width = 35, | 155 | .width = 35, |
151 | .height = 58, | 156 | .height = 58, |
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index 662debe4ead2..9204cbb87147 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c | |||
@@ -213,51 +213,55 @@ static struct platform_device migor_nand_flash_device = { | |||
213 | } | 213 | } |
214 | }; | 214 | }; |
215 | 215 | ||
216 | const static struct fb_videomode migor_lcd_modes[] = { | ||
217 | { | ||
218 | #if defined(CONFIG_SH_MIGOR_RTA_WVGA) | ||
219 | .name = "LB070WV1", | ||
220 | .xres = 800, | ||
221 | .yres = 480, | ||
222 | .left_margin = 64, | ||
223 | .right_margin = 16, | ||
224 | .hsync_len = 120, | ||
225 | .sync = 0, | ||
226 | #elif defined(CONFIG_SH_MIGOR_QVGA) | ||
227 | .name = "PH240320T", | ||
228 | .xres = 320, | ||
229 | .yres = 240, | ||
230 | .left_margin = 0, | ||
231 | .right_margin = 16, | ||
232 | .hsync_len = 8, | ||
233 | .sync = FB_SYNC_HOR_HIGH_ACT, | ||
234 | #endif | ||
235 | .upper_margin = 1, | ||
236 | .lower_margin = 17, | ||
237 | .vsync_len = 2, | ||
238 | }, | ||
239 | }; | ||
240 | |||
216 | static struct sh_mobile_lcdc_info sh_mobile_lcdc_info = { | 241 | static struct sh_mobile_lcdc_info sh_mobile_lcdc_info = { |
217 | #ifdef CONFIG_SH_MIGOR_RTA_WVGA | 242 | #if defined(CONFIG_SH_MIGOR_RTA_WVGA) |
218 | .clock_source = LCDC_CLK_BUS, | 243 | .clock_source = LCDC_CLK_BUS, |
219 | .ch[0] = { | 244 | .ch[0] = { |
220 | .chan = LCDC_CHAN_MAINLCD, | 245 | .chan = LCDC_CHAN_MAINLCD, |
221 | .bpp = 16, | 246 | .bpp = 16, |
222 | .interface_type = RGB16, | 247 | .interface_type = RGB16, |
223 | .clock_divider = 2, | 248 | .clock_divider = 2, |
224 | .lcd_cfg = { | 249 | .lcd_cfg = migor_lcd_modes, |
225 | .name = "LB070WV1", | 250 | .num_cfg = ARRAY_SIZE(migor_lcd_modes), |
226 | .xres = 800, | ||
227 | .yres = 480, | ||
228 | .left_margin = 64, | ||
229 | .right_margin = 16, | ||
230 | .hsync_len = 120, | ||
231 | .upper_margin = 1, | ||
232 | .lower_margin = 17, | ||
233 | .vsync_len = 2, | ||
234 | .sync = 0, | ||
235 | }, | ||
236 | .lcd_size_cfg = { /* 7.0 inch */ | 251 | .lcd_size_cfg = { /* 7.0 inch */ |
237 | .width = 152, | 252 | .width = 152, |
238 | .height = 91, | 253 | .height = 91, |
239 | }, | 254 | }, |
240 | } | 255 | } |
241 | #endif | 256 | #elif defined(CONFIG_SH_MIGOR_QVGA) |
242 | #ifdef CONFIG_SH_MIGOR_QVGA | ||
243 | .clock_source = LCDC_CLK_PERIPHERAL, | 257 | .clock_source = LCDC_CLK_PERIPHERAL, |
244 | .ch[0] = { | 258 | .ch[0] = { |
245 | .chan = LCDC_CHAN_MAINLCD, | 259 | .chan = LCDC_CHAN_MAINLCD, |
246 | .bpp = 16, | 260 | .bpp = 16, |
247 | .interface_type = SYS16A, | 261 | .interface_type = SYS16A, |
248 | .clock_divider = 10, | 262 | .clock_divider = 10, |
249 | .lcd_cfg = { | 263 | .lcd_cfg = migor_lcd_modes, |
250 | .name = "PH240320T", | 264 | .num_cfg = ARRAY_SIZE(migor_lcd_modes), |
251 | .xres = 320, | ||
252 | .yres = 240, | ||
253 | .left_margin = 0, | ||
254 | .right_margin = 16, | ||
255 | .hsync_len = 8, | ||
256 | .upper_margin = 1, | ||
257 | .lower_margin = 17, | ||
258 | .vsync_len = 2, | ||
259 | .sync = FB_SYNC_HOR_HIGH_ACT, | ||
260 | }, | ||
261 | .lcd_size_cfg = { /* 2.4 inch */ | 265 | .lcd_size_cfg = { /* 2.4 inch */ |
262 | .width = 49, | 266 | .width = 49, |
263 | .height = 37, | 267 | .height = 37, |
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 552ebd9ba82b..fe208d6c8ed0 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c | |||
@@ -144,16 +144,42 @@ static struct platform_device nor_flash_device = { | |||
144 | }; | 144 | }; |
145 | 145 | ||
146 | /* LCDC */ | 146 | /* LCDC */ |
147 | const static struct fb_videomode lcdc_720p_modes[] = { | ||
148 | { | ||
149 | .name = "LB070WV1", | ||
150 | .sync = 0, /* hsync and vsync are active low */ | ||
151 | .xres = 1280, | ||
152 | .yres = 720, | ||
153 | .left_margin = 220, | ||
154 | .right_margin = 110, | ||
155 | .hsync_len = 40, | ||
156 | .upper_margin = 20, | ||
157 | .lower_margin = 5, | ||
158 | .vsync_len = 5, | ||
159 | }, | ||
160 | }; | ||
161 | |||
162 | const static struct fb_videomode lcdc_vga_modes[] = { | ||
163 | { | ||
164 | .name = "LB070WV1", | ||
165 | .sync = 0, /* hsync and vsync are active low */ | ||
166 | .xres = 640, | ||
167 | .yres = 480, | ||
168 | .left_margin = 105, | ||
169 | .right_margin = 50, | ||
170 | .hsync_len = 96, | ||
171 | .upper_margin = 33, | ||
172 | .lower_margin = 10, | ||
173 | .vsync_len = 2, | ||
174 | }, | ||
175 | }; | ||
176 | |||
147 | static struct sh_mobile_lcdc_info lcdc_info = { | 177 | static struct sh_mobile_lcdc_info lcdc_info = { |
148 | .clock_source = LCDC_CLK_EXTERNAL, | 178 | .clock_source = LCDC_CLK_EXTERNAL, |
149 | .ch[0] = { | 179 | .ch[0] = { |
150 | .chan = LCDC_CHAN_MAINLCD, | 180 | .chan = LCDC_CHAN_MAINLCD, |
151 | .bpp = 16, | 181 | .bpp = 16, |
152 | .clock_divider = 1, | 182 | .clock_divider = 1, |
153 | .lcd_cfg = { | ||
154 | .name = "LB070WV1", | ||
155 | .sync = 0, /* hsync and vsync are active low */ | ||
156 | }, | ||
157 | .lcd_size_cfg = { /* 7.0 inch */ | 183 | .lcd_size_cfg = { /* 7.0 inch */ |
158 | .width = 152, | 184 | .width = 152, |
159 | .height = 91, | 185 | .height = 91, |
@@ -909,24 +935,12 @@ static int __init devices_setup(void) | |||
909 | 935 | ||
910 | if (sw & SW41_B) { | 936 | if (sw & SW41_B) { |
911 | /* 720p */ | 937 | /* 720p */ |
912 | lcdc_info.ch[0].lcd_cfg.xres = 1280; | 938 | lcdc_info.ch[0].lcd_cfg = lcdc_720p_modes; |
913 | lcdc_info.ch[0].lcd_cfg.yres = 720; | 939 | lcdc_info.ch[0].num_cfg = ARRAY_SIZE(lcdc_720p_modes); |
914 | lcdc_info.ch[0].lcd_cfg.left_margin = 220; | ||
915 | lcdc_info.ch[0].lcd_cfg.right_margin = 110; | ||
916 | lcdc_info.ch[0].lcd_cfg.hsync_len = 40; | ||
917 | lcdc_info.ch[0].lcd_cfg.upper_margin = 20; | ||
918 | lcdc_info.ch[0].lcd_cfg.lower_margin = 5; | ||
919 | lcdc_info.ch[0].lcd_cfg.vsync_len = 5; | ||
920 | } else { | 940 | } else { |
921 | /* VGA */ | 941 | /* VGA */ |
922 | lcdc_info.ch[0].lcd_cfg.xres = 640; | 942 | lcdc_info.ch[0].lcd_cfg = lcdc_vga_modes; |
923 | lcdc_info.ch[0].lcd_cfg.yres = 480; | 943 | lcdc_info.ch[0].num_cfg = ARRAY_SIZE(lcdc_vga_modes); |
924 | lcdc_info.ch[0].lcd_cfg.left_margin = 105; | ||
925 | lcdc_info.ch[0].lcd_cfg.right_margin = 50; | ||
926 | lcdc_info.ch[0].lcd_cfg.hsync_len = 96; | ||
927 | lcdc_info.ch[0].lcd_cfg.upper_margin = 33; | ||
928 | lcdc_info.ch[0].lcd_cfg.lower_margin = 10; | ||
929 | lcdc_info.ch[0].lcd_cfg.vsync_len = 2; | ||
930 | } | 944 | } |
931 | 945 | ||
932 | if (sw & SW41_A) { | 946 | if (sw & SW41_A) { |