aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx/mach-mini6410.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c64xx/mach-mini6410.c')
-rw-r--r--arch/arm/mach-s3c64xx/mach-mini6410.c82
1 files changed, 44 insertions, 38 deletions
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
index c34c2ab22ead..34f51950b46e 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
@@ -151,41 +151,49 @@ static struct s3c2410_platform_nand mini6410_nand_info = {
151 .sets = mini6410_nand_sets, 151 .sets = mini6410_nand_sets,
152}; 152};
153 153
154static struct s3c_fb_pd_win mini6410_fb_win[] = { 154static struct s3c_fb_pd_win mini6410_lcd_type0_fb_win = {
155 { 155 .win_mode = { /* 4.3" 480x272 */
156 .win_mode = { /* 4.3" 480x272 */ 156 .left_margin = 3,
157 .left_margin = 3, 157 .right_margin = 2,
158 .right_margin = 2, 158 .upper_margin = 1,
159 .upper_margin = 1, 159 .lower_margin = 1,
160 .lower_margin = 1, 160 .hsync_len = 40,
161 .hsync_len = 40, 161 .vsync_len = 1,
162 .vsync_len = 1, 162 .xres = 480,
163 .xres = 480, 163 .yres = 272,
164 .yres = 272,
165 },
166 .max_bpp = 32,
167 .default_bpp = 16,
168 }, {
169 .win_mode = { /* 7.0" 800x480 */
170 .left_margin = 8,
171 .right_margin = 13,
172 .upper_margin = 7,
173 .lower_margin = 5,
174 .hsync_len = 3,
175 .vsync_len = 1,
176 .xres = 800,
177 .yres = 480,
178 },
179 .max_bpp = 32,
180 .default_bpp = 16,
181 }, 164 },
165 .max_bpp = 32,
166 .default_bpp = 16,
182}; 167};
183 168
184static struct s3c_fb_platdata mini6410_lcd_pdata __initdata = { 169static struct s3c_fb_pd_win mini6410_lcd_type1_fb_win = {
185 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, 170 .win_mode = { /* 7.0" 800x480 */
186 .win[0] = &mini6410_fb_win[0], 171 .left_margin = 8,
187 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 172 .right_margin = 13,
188 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, 173 .upper_margin = 7,
174 .lower_margin = 5,
175 .hsync_len = 3,
176 .vsync_len = 1,
177 .xres = 800,
178 .yres = 480,
179 },
180 .max_bpp = 32,
181 .default_bpp = 16,
182};
183
184static struct s3c_fb_platdata mini6410_lcd_pdata[] __initdata = {
185 {
186 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
187 .win[0] = &mini6410_lcd_type0_fb_win,
188 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
189 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
190 }, {
191 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
192 .win[0] = &mini6410_lcd_type1_fb_win,
193 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
194 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
195 },
196 { },
189}; 197};
190 198
191static void mini6410_lcd_power_set(struct plat_lcd_data *pd, 199static void mini6410_lcd_power_set(struct plat_lcd_data *pd,
@@ -283,7 +291,7 @@ static void mini6410_parse_features(
283 "screen type already set\n", f); 291 "screen type already set\n", f);
284 } else { 292 } else {
285 int li = f - '0'; 293 int li = f - '0';
286 if (li >= ARRAY_SIZE(mini6410_fb_win)) 294 if (li >= ARRAY_SIZE(mini6410_lcd_pdata))
287 printk(KERN_INFO "MINI6410: '%c' out " 295 printk(KERN_INFO "MINI6410: '%c' out "
288 "of range LCD mode\n", f); 296 "of range LCD mode\n", f);
289 else { 297 else {
@@ -307,14 +315,12 @@ static void __init mini6410_machine_init(void)
307 /* Parse the feature string */ 315 /* Parse the feature string */
308 mini6410_parse_features(&features, mini6410_features_str); 316 mini6410_parse_features(&features, mini6410_features_str);
309 317
310 mini6410_lcd_pdata.win[0] = &mini6410_fb_win[features.lcd_index];
311
312 printk(KERN_INFO "MINI6410: selected LCD display is %dx%d\n", 318 printk(KERN_INFO "MINI6410: selected LCD display is %dx%d\n",
313 mini6410_lcd_pdata.win[0]->win_mode.xres, 319 mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.xres,
314 mini6410_lcd_pdata.win[0]->win_mode.yres); 320 mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.yres);
315 321
316 s3c_nand_set_platdata(&mini6410_nand_info); 322 s3c_nand_set_platdata(&mini6410_nand_info);
317 s3c_fb_set_platdata(&mini6410_lcd_pdata); 323 s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]);
318 s3c24xx_ts_set_platdata(NULL); 324 s3c24xx_ts_set_platdata(NULL);
319 325
320 /* configure nCS1 width to 16 bits */ 326 /* configure nCS1 width to 16 bits */