diff options
Diffstat (limited to 'arch/arm/mach-s3c64xx/mach-mini6410.c')
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-mini6410.c | 92 |
1 files changed, 54 insertions, 38 deletions
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index f8ea61ea3b33..5539a255a704 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c | |||
@@ -140,41 +140,59 @@ static struct s3c2410_platform_nand mini6410_nand_info = { | |||
140 | .sets = mini6410_nand_sets, | 140 | .sets = mini6410_nand_sets, |
141 | }; | 141 | }; |
142 | 142 | ||
143 | static struct s3c_fb_pd_win mini6410_fb_win[] = { | 143 | static struct s3c_fb_pd_win mini6410_lcd_type0_fb_win = { |
144 | .max_bpp = 32, | ||
145 | .default_bpp = 16, | ||
146 | .xres = 480, | ||
147 | .yres = 272, | ||
148 | }; | ||
149 | |||
150 | static struct fb_videomode mini6410_lcd_type0_timing = { | ||
151 | /* 4.3" 480x272 */ | ||
152 | .left_margin = 3, | ||
153 | .right_margin = 2, | ||
154 | .upper_margin = 1, | ||
155 | .lower_margin = 1, | ||
156 | .hsync_len = 40, | ||
157 | .vsync_len = 1, | ||
158 | .xres = 480, | ||
159 | .yres = 272, | ||
160 | }; | ||
161 | |||
162 | static struct s3c_fb_pd_win mini6410_lcd_type1_fb_win = { | ||
163 | .max_bpp = 32, | ||
164 | .default_bpp = 16, | ||
165 | .xres = 800, | ||
166 | .yres = 480, | ||
167 | }; | ||
168 | |||
169 | static struct fb_videomode mini6410_lcd_type1_timing = { | ||
170 | /* 7.0" 800x480 */ | ||
171 | .left_margin = 8, | ||
172 | .right_margin = 13, | ||
173 | .upper_margin = 7, | ||
174 | .lower_margin = 5, | ||
175 | .hsync_len = 3, | ||
176 | .vsync_len = 1, | ||
177 | .xres = 800, | ||
178 | .yres = 480, | ||
179 | }; | ||
180 | |||
181 | static struct s3c_fb_platdata mini6410_lcd_pdata[] __initdata = { | ||
144 | { | 182 | { |
145 | .win_mode = { /* 4.3" 480x272 */ | 183 | .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, |
146 | .left_margin = 3, | 184 | .vtiming = &mini6410_lcd_type0_timing, |
147 | .right_margin = 2, | 185 | .win[0] = &mini6410_lcd_type0_fb_win, |
148 | .upper_margin = 1, | 186 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, |
149 | .lower_margin = 1, | 187 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, |
150 | .hsync_len = 40, | ||
151 | .vsync_len = 1, | ||
152 | .xres = 480, | ||
153 | .yres = 272, | ||
154 | }, | ||
155 | .max_bpp = 32, | ||
156 | .default_bpp = 16, | ||
157 | }, { | 188 | }, { |
158 | .win_mode = { /* 7.0" 800x480 */ | 189 | .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, |
159 | .left_margin = 8, | 190 | .vtiming = &mini6410_lcd_type1_timing, |
160 | .right_margin = 13, | 191 | .win[0] = &mini6410_lcd_type1_fb_win, |
161 | .upper_margin = 7, | 192 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, |
162 | .lower_margin = 5, | 193 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, |
163 | .hsync_len = 3, | ||
164 | .vsync_len = 1, | ||
165 | .xres = 800, | ||
166 | .yres = 480, | ||
167 | }, | ||
168 | .max_bpp = 32, | ||
169 | .default_bpp = 16, | ||
170 | }, | 194 | }, |
171 | }; | 195 | { }, |
172 | |||
173 | static struct s3c_fb_platdata mini6410_lcd_pdata __initdata = { | ||
174 | .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, | ||
175 | .win[0] = &mini6410_fb_win[0], | ||
176 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, | ||
177 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
178 | }; | 196 | }; |
179 | 197 | ||
180 | static void mini6410_lcd_power_set(struct plat_lcd_data *pd, | 198 | static void mini6410_lcd_power_set(struct plat_lcd_data *pd, |
@@ -272,7 +290,7 @@ static void mini6410_parse_features( | |||
272 | "screen type already set\n", f); | 290 | "screen type already set\n", f); |
273 | } else { | 291 | } else { |
274 | int li = f - '0'; | 292 | int li = f - '0'; |
275 | if (li >= ARRAY_SIZE(mini6410_fb_win)) | 293 | if (li >= ARRAY_SIZE(mini6410_lcd_pdata)) |
276 | printk(KERN_INFO "MINI6410: '%c' out " | 294 | printk(KERN_INFO "MINI6410: '%c' out " |
277 | "of range LCD mode\n", f); | 295 | "of range LCD mode\n", f); |
278 | else { | 296 | else { |
@@ -296,14 +314,12 @@ static void __init mini6410_machine_init(void) | |||
296 | /* Parse the feature string */ | 314 | /* Parse the feature string */ |
297 | mini6410_parse_features(&features, mini6410_features_str); | 315 | mini6410_parse_features(&features, mini6410_features_str); |
298 | 316 | ||
299 | mini6410_lcd_pdata.win[0] = &mini6410_fb_win[features.lcd_index]; | ||
300 | |||
301 | printk(KERN_INFO "MINI6410: selected LCD display is %dx%d\n", | 317 | printk(KERN_INFO "MINI6410: selected LCD display is %dx%d\n", |
302 | mini6410_lcd_pdata.win[0]->win_mode.xres, | 318 | mini6410_lcd_pdata[features.lcd_index].win[0]->xres, |
303 | mini6410_lcd_pdata.win[0]->win_mode.yres); | 319 | mini6410_lcd_pdata[features.lcd_index].win[0]->yres); |
304 | 320 | ||
305 | s3c_nand_set_platdata(&mini6410_nand_info); | 321 | s3c_nand_set_platdata(&mini6410_nand_info); |
306 | s3c_fb_set_platdata(&mini6410_lcd_pdata); | 322 | s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]); |
307 | s3c24xx_ts_set_platdata(NULL); | 323 | s3c24xx_ts_set_platdata(NULL); |
308 | 324 | ||
309 | /* configure nCS1 width to 16 bits */ | 325 | /* configure nCS1 width to 16 bits */ |