aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx/mach-real6410.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c64xx/mach-real6410.c')
-rw-r--r--arch/arm/mach-s3c64xx/mach-real6410.c90
1 files changed, 52 insertions, 38 deletions
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index b92d8e17d502..326b21604bc3 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -106,41 +106,57 @@ static struct platform_device real6410_device_eth = {
106 }, 106 },
107}; 107};
108 108
109static struct s3c_fb_pd_win real6410_fb_win[] = { 109static struct s3c_fb_pd_win real6410_lcd_type0_fb_win = {
110 .max_bpp = 32,
111 .default_bpp = 16,
112 .xres = 480,
113 .yres = 272,
114};
115
116static struct fb_videomode real6410_lcd_type0_timing = {
117 /* 4.3" 480x272 */
118 .left_margin = 3,
119 .right_margin = 2,
120 .upper_margin = 1,
121 .lower_margin = 1,
122 .hsync_len = 40,
123 .vsync_len = 1,
124};
125
126static struct s3c_fb_pd_win real6410_lcd_type1_fb_win = {
127 .max_bpp = 32,
128 .default_bpp = 16,
129 .xres = 800,
130 .yres = 480,
131};
132
133static struct fb_videomode real6410_lcd_type1_timing = {
134 /* 7.0" 800x480 */
135 .left_margin = 8,
136 .right_margin = 13,
137 .upper_margin = 7,
138 .lower_margin = 5,
139 .hsync_len = 3,
140 .vsync_len = 1,
141 .xres = 800,
142 .yres = 480,
143};
144
145static struct s3c_fb_platdata real6410_lcd_pdata[] __initdata = {
110 { 146 {
111 .win_mode = { /* 4.3" 480x272 */ 147 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
112 .left_margin = 3, 148 .vtiming = &real6410_lcd_type0_timing,
113 .right_margin = 2, 149 .win[0] = &real6410_lcd_type0_fb_win,
114 .upper_margin = 1, 150 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
115 .lower_margin = 1, 151 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
116 .hsync_len = 40,
117 .vsync_len = 1,
118 .xres = 480,
119 .yres = 272,
120 },
121 .max_bpp = 32,
122 .default_bpp = 16,
123 }, { 152 }, {
124 .win_mode = { /* 7.0" 800x480 */ 153 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
125 .left_margin = 8, 154 .vtiming = &real6410_lcd_type1_timing,
126 .right_margin = 13, 155 .win[0] = &real6410_lcd_type1_fb_win,
127 .upper_margin = 7, 156 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
128 .lower_margin = 5, 157 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
129 .hsync_len = 3,
130 .vsync_len = 1,
131 .xres = 800,
132 .yres = 480,
133 },
134 .max_bpp = 32,
135 .default_bpp = 16,
136 }, 158 },
137}; 159 { },
138
139static struct s3c_fb_platdata real6410_lcd_pdata __initdata = {
140 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
141 .win[0] = &real6410_fb_win[0],
142 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
143 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
144}; 160};
145 161
146static struct mtd_partition real6410_nand_part[] = { 162static struct mtd_partition real6410_nand_part[] = {
@@ -253,7 +269,7 @@ static void real6410_parse_features(
253 "screen type already set\n", f); 269 "screen type already set\n", f);
254 } else { 270 } else {
255 int li = f - '0'; 271 int li = f - '0';
256 if (li >= ARRAY_SIZE(real6410_fb_win)) 272 if (li >= ARRAY_SIZE(real6410_lcd_pdata))
257 printk(KERN_INFO "REAL6410: '%c' out " 273 printk(KERN_INFO "REAL6410: '%c' out "
258 "of range LCD mode\n", f); 274 "of range LCD mode\n", f);
259 else { 275 else {
@@ -277,13 +293,11 @@ static void __init real6410_machine_init(void)
277 /* Parse the feature string */ 293 /* Parse the feature string */
278 real6410_parse_features(&features, real6410_features_str); 294 real6410_parse_features(&features, real6410_features_str);
279 295
280 real6410_lcd_pdata.win[0] = &real6410_fb_win[features.lcd_index];
281
282 printk(KERN_INFO "REAL6410: selected LCD display is %dx%d\n", 296 printk(KERN_INFO "REAL6410: selected LCD display is %dx%d\n",
283 real6410_lcd_pdata.win[0]->win_mode.xres, 297 real6410_lcd_pdata[features.lcd_index].win[0]->xres,
284 real6410_lcd_pdata.win[0]->win_mode.yres); 298 real6410_lcd_pdata[features.lcd_index].win[0]->yres);
285 299
286 s3c_fb_set_platdata(&real6410_lcd_pdata); 300 s3c_fb_set_platdata(&real6410_lcd_pdata[features.lcd_index]);
287 s3c_nand_set_platdata(&real6410_nand_info); 301 s3c_nand_set_platdata(&real6410_nand_info);
288 s3c24xx_ts_set_platdata(NULL); 302 s3c24xx_ts_set_platdata(NULL);
289 303