aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-06-01 19:57:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-01 19:57:51 -0400
commit804ce9866d56130032c9c8afc90a1297b7deed56 (patch)
tree6dd70984f411d2a3624d3f8db7facc3d6396b9ad /arch
parentf5e7e844a571124ffc117d4696787d6afc4fc5ae (diff)
parentc895305e806b4346006d3cfba2b432d52268ecd3 (diff)
Merge tag 'fbdev-updates-for-3.5' of git://github.com/schandinat/linux-2.6
Pull fbdev updates from Florian Tobias Schandinat: - driver for AUO-K1900 and AUO-K1901 epaper controller - large updates for OMAP (e.g. decouple HDMI audio and video) - some updates for Exynos and SH Mobile - various other small fixes and cleanups * tag 'fbdev-updates-for-3.5' of git://github.com/schandinat/linux-2.6: (130 commits) video: bfin_adv7393fb: Fix cleanup code video: exynos_dp: reduce delay time when configuring video setting video: exynos_dp: move sw reset prioir to enabling sw defined function video: exynos_dp: use devm_ functions fb: handle NULL pointers in framebuffer release OMAPDSS: HDMI: OMAP4: Update IRQ flags for the HPD IRQ request OMAPDSS: Apply VENC timings even if panel is disabled OMAPDSS: VENC/DISPC: Delay dividing Y resolution for managers connected to VENC OMAPDSS: DISPC: Support rotation through TILER OMAPDSS: VRFB: remove compiler warnings when CONFIG_BUG=n OMAPFB: remove compiler warnings when CONFIG_BUG=n OMAPDSS: remove compiler warnings when CONFIG_BUG=n OMAPDSS: DISPC: fix usage of dispc_ovl_set_accu_uv OMAPDSS: use DSI_FIFO_BUG workaround only for manual update displays OMAPDSS: DSI: Support command mode interleaving during video mode blanking periods OMAPDSS: DISPC: Update Accumulator configuration for chroma plane drivers/video: fsl-diu-fb: don't initialize the THRESHOLDS registers video: exynos mipi dsi: support reverse panel type video: exynos mipi dsi: Properly interpret the interrupt source flags video: exynos mipi dsi: Avoid races in probe() ...
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-exynos/mach-nuri.c26
-rw-r--r--arch/arm/mach-exynos/mach-origen.c24
-rw-r--r--arch/arm/mach-exynos/mach-smdkv310.c28
-rw-r--r--arch/arm/mach-exynos/mach-universal_c210.c26
-rw-r--r--arch/arm/mach-omap2/display.c196
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2416.c27
-rw-r--r--arch/arm/mach-s3c64xx/mach-anw6410.c25
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c25
-rw-r--r--arch/arm/mach-s3c64xx/mach-hmt.c24
-rw-r--r--arch/arm/mach-s3c64xx/mach-mini6410.c92
-rw-r--r--arch/arm/mach-s3c64xx/mach-real6410.c90
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq5.c26
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq7.c26
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6410.c25
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6440.c24
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6450.c24
-rw-r--r--arch/arm/mach-s5pc100/mach-smdkc100.c27
-rw-r--r--arch/arm/mach-s5pv210/mach-aquila.c36
-rw-r--r--arch/arm/mach-s5pv210/mach-goni.c26
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkv210.c24
-rw-r--r--arch/arm/plat-samsung/include/plat/fb.h11
21 files changed, 527 insertions, 305 deletions
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index 972983e392bc..656f8fc9addd 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -237,25 +237,29 @@ static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
237#else 237#else
238/* Frame Buffer */ 238/* Frame Buffer */
239static struct s3c_fb_pd_win nuri_fb_win0 = { 239static struct s3c_fb_pd_win nuri_fb_win0 = {
240 .win_mode = {
241 .left_margin = 64,
242 .right_margin = 16,
243 .upper_margin = 64,
244 .lower_margin = 1,
245 .hsync_len = 48,
246 .vsync_len = 3,
247 .xres = 1024,
248 .yres = 600,
249 .refresh = 60,
250 },
251 .max_bpp = 24, 240 .max_bpp = 24,
252 .default_bpp = 16, 241 .default_bpp = 16,
242 .xres = 1024,
243 .yres = 600,
253 .virtual_x = 1024, 244 .virtual_x = 1024,
254 .virtual_y = 2 * 600, 245 .virtual_y = 2 * 600,
255}; 246};
256 247
248static struct fb_videomode nuri_lcd_timing = {
249 .left_margin = 64,
250 .right_margin = 16,
251 .upper_margin = 64,
252 .lower_margin = 1,
253 .hsync_len = 48,
254 .vsync_len = 3,
255 .xres = 1024,
256 .yres = 600,
257 .refresh = 60,
258};
259
257static struct s3c_fb_platdata nuri_fb_pdata __initdata = { 260static struct s3c_fb_platdata nuri_fb_pdata __initdata = {
258 .win[0] = &nuri_fb_win0, 261 .win[0] = &nuri_fb_win0,
262 .vtiming = &nuri_lcd_timing,
259 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB | 263 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
260 VIDCON0_CLKSEL_LCD, 264 VIDCON0_CLKSEL_LCD,
261 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, 265 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index a7f7fd567dde..f5572be9d7bf 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -604,24 +604,28 @@ static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
604}; 604};
605#else 605#else
606static struct s3c_fb_pd_win origen_fb_win0 = { 606static struct s3c_fb_pd_win origen_fb_win0 = {
607 .win_mode = { 607 .xres = 1024,
608 .left_margin = 64, 608 .yres = 600,
609 .right_margin = 16,
610 .upper_margin = 64,
611 .lower_margin = 16,
612 .hsync_len = 48,
613 .vsync_len = 3,
614 .xres = 1024,
615 .yres = 600,
616 },
617 .max_bpp = 32, 609 .max_bpp = 32,
618 .default_bpp = 24, 610 .default_bpp = 24,
619 .virtual_x = 1024, 611 .virtual_x = 1024,
620 .virtual_y = 2 * 600, 612 .virtual_y = 2 * 600,
621}; 613};
622 614
615static struct fb_videomode origen_lcd_timing = {
616 .left_margin = 64,
617 .right_margin = 16,
618 .upper_margin = 64,
619 .lower_margin = 16,
620 .hsync_len = 48,
621 .vsync_len = 3,
622 .xres = 1024,
623 .yres = 600,
624};
625
623static struct s3c_fb_platdata origen_lcd_pdata __initdata = { 626static struct s3c_fb_platdata origen_lcd_pdata __initdata = {
624 .win[0] = &origen_fb_win0, 627 .win[0] = &origen_fb_win0,
628 .vtiming = &origen_lcd_timing,
625 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 629 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
626 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC | 630 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
627 VIDCON1_INV_VCLK, 631 VIDCON1_INV_VCLK,
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index 70df1a0c2118..262e9e446a96 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -178,22 +178,26 @@ static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
178}; 178};
179#else 179#else
180static struct s3c_fb_pd_win smdkv310_fb_win0 = { 180static struct s3c_fb_pd_win smdkv310_fb_win0 = {
181 .win_mode = { 181 .max_bpp = 32,
182 .left_margin = 13, 182 .default_bpp = 24,
183 .right_margin = 8, 183 .xres = 800,
184 .upper_margin = 7, 184 .yres = 480,
185 .lower_margin = 5, 185};
186 .hsync_len = 3, 186
187 .vsync_len = 1, 187static struct fb_videomode smdkv310_lcd_timing = {
188 .xres = 800, 188 .left_margin = 13,
189 .yres = 480, 189 .right_margin = 8,
190 }, 190 .upper_margin = 7,
191 .max_bpp = 32, 191 .lower_margin = 5,
192 .default_bpp = 24, 192 .hsync_len = 3,
193 .vsync_len = 1,
194 .xres = 800,
195 .yres = 480,
193}; 196};
194 197
195static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = { 198static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = {
196 .win[0] = &smdkv310_fb_win0, 199 .win[0] = &smdkv310_fb_win0,
200 .vtiming = &smdkv310_lcd_timing,
197 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 201 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
198 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, 202 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
199 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, 203 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 083b44de9c10..cd92fa86ba41 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -843,25 +843,29 @@ static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
843#else 843#else
844/* Frame Buffer */ 844/* Frame Buffer */
845static struct s3c_fb_pd_win universal_fb_win0 = { 845static struct s3c_fb_pd_win universal_fb_win0 = {
846 .win_mode = {
847 .left_margin = 16,
848 .right_margin = 16,
849 .upper_margin = 2,
850 .lower_margin = 28,
851 .hsync_len = 2,
852 .vsync_len = 1,
853 .xres = 480,
854 .yres = 800,
855 .refresh = 55,
856 },
857 .max_bpp = 32, 846 .max_bpp = 32,
858 .default_bpp = 16, 847 .default_bpp = 16,
848 .xres = 480,
849 .yres = 800,
859 .virtual_x = 480, 850 .virtual_x = 480,
860 .virtual_y = 2 * 800, 851 .virtual_y = 2 * 800,
861}; 852};
862 853
854static struct fb_videomode universal_lcd_timing = {
855 .left_margin = 16,
856 .right_margin = 16,
857 .upper_margin = 2,
858 .lower_margin = 28,
859 .hsync_len = 2,
860 .vsync_len = 1,
861 .xres = 480,
862 .yres = 800,
863 .refresh = 55,
864};
865
863static struct s3c_fb_platdata universal_lcd_pdata __initdata = { 866static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
864 .win[0] = &universal_fb_win0, 867 .win[0] = &universal_fb_win0,
868 .vtiming = &universal_lcd_timing,
865 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB | 869 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
866 VIDCON0_CLKSEL_LCD, 870 VIDCON0_CLKSEL_LCD,
867 .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN 871 .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index db5a88a36c63..54d49ddb9b81 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -180,16 +180,133 @@ static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask)
180 omap4_dsi_mux_pads(dsi_id, 0); 180 omap4_dsi_mux_pads(dsi_id, 0);
181} 181}
182 182
183static int omap_dss_set_min_bus_tput(struct device *dev, unsigned long tput)
184{
185 return omap_pm_set_min_bus_tput(dev, OCP_INITIATOR_AGENT, tput);
186}
187
188static struct platform_device *create_dss_pdev(const char *pdev_name,
189 int pdev_id, const char *oh_name, void *pdata, int pdata_len,
190 struct platform_device *parent)
191{
192 struct platform_device *pdev;
193 struct omap_device *od;
194 struct omap_hwmod *ohs[1];
195 struct omap_hwmod *oh;
196 int r;
197
198 oh = omap_hwmod_lookup(oh_name);
199 if (!oh) {
200 pr_err("Could not look up %s\n", oh_name);
201 r = -ENODEV;
202 goto err;
203 }
204
205 pdev = platform_device_alloc(pdev_name, pdev_id);
206 if (!pdev) {
207 pr_err("Could not create pdev for %s\n", pdev_name);
208 r = -ENOMEM;
209 goto err;
210 }
211
212 if (parent != NULL)
213 pdev->dev.parent = &parent->dev;
214
215 if (pdev->id != -1)
216 dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id);
217 else
218 dev_set_name(&pdev->dev, "%s", pdev->name);
219
220 ohs[0] = oh;
221 od = omap_device_alloc(pdev, ohs, 1, NULL, 0);
222 if (!od) {
223 pr_err("Could not alloc omap_device for %s\n", pdev_name);
224 r = -ENOMEM;
225 goto err;
226 }
227
228 r = platform_device_add_data(pdev, pdata, pdata_len);
229 if (r) {
230 pr_err("Could not set pdata for %s\n", pdev_name);
231 goto err;
232 }
233
234 r = omap_device_register(pdev);
235 if (r) {
236 pr_err("Could not register omap_device for %s\n", pdev_name);
237 goto err;
238 }
239
240 return pdev;
241
242err:
243 return ERR_PTR(r);
244}
245
246static struct platform_device *create_simple_dss_pdev(const char *pdev_name,
247 int pdev_id, void *pdata, int pdata_len,
248 struct platform_device *parent)
249{
250 struct platform_device *pdev;
251 int r;
252
253 pdev = platform_device_alloc(pdev_name, pdev_id);
254 if (!pdev) {
255 pr_err("Could not create pdev for %s\n", pdev_name);
256 r = -ENOMEM;
257 goto err;
258 }
259
260 if (parent != NULL)
261 pdev->dev.parent = &parent->dev;
262
263 if (pdev->id != -1)
264 dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id);
265 else
266 dev_set_name(&pdev->dev, "%s", pdev->name);
267
268 r = platform_device_add_data(pdev, pdata, pdata_len);
269 if (r) {
270 pr_err("Could not set pdata for %s\n", pdev_name);
271 goto err;
272 }
273
274 r = omap_device_register(pdev);
275 if (r) {
276 pr_err("Could not register omap_device for %s\n", pdev_name);
277 goto err;
278 }
279
280 return pdev;
281
282err:
283 return ERR_PTR(r);
284}
285
183int __init omap_display_init(struct omap_dss_board_info *board_data) 286int __init omap_display_init(struct omap_dss_board_info *board_data)
184{ 287{
185 int r = 0; 288 int r = 0;
186 struct omap_hwmod *oh;
187 struct platform_device *pdev; 289 struct platform_device *pdev;
188 int i, oh_count; 290 int i, oh_count;
189 struct omap_display_platform_data pdata;
190 const struct omap_dss_hwmod_data *curr_dss_hwmod; 291 const struct omap_dss_hwmod_data *curr_dss_hwmod;
292 struct platform_device *dss_pdev;
293
294 /* create omapdss device */
295
296 board_data->dsi_enable_pads = omap_dsi_enable_pads;
297 board_data->dsi_disable_pads = omap_dsi_disable_pads;
298 board_data->get_context_loss_count = omap_pm_get_dev_context_loss_count;
299 board_data->set_min_bus_tput = omap_dss_set_min_bus_tput;
300
301 omap_display_device.dev.platform_data = board_data;
302
303 r = platform_device_register(&omap_display_device);
304 if (r < 0) {
305 pr_err("Unable to register omapdss device\n");
306 return r;
307 }
191 308
192 memset(&pdata, 0, sizeof(pdata)); 309 /* create devices for dss hwmods */
193 310
194 if (cpu_is_omap24xx()) { 311 if (cpu_is_omap24xx()) {
195 curr_dss_hwmod = omap2_dss_hwmod_data; 312 curr_dss_hwmod = omap2_dss_hwmod_data;
@@ -202,39 +319,58 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
202 oh_count = ARRAY_SIZE(omap4_dss_hwmod_data); 319 oh_count = ARRAY_SIZE(omap4_dss_hwmod_data);
203 } 320 }
204 321
205 if (board_data->dsi_enable_pads == NULL) 322 /*
206 board_data->dsi_enable_pads = omap_dsi_enable_pads; 323 * First create the pdev for dss_core, which is used as a parent device
207 if (board_data->dsi_disable_pads == NULL) 324 * by the other dss pdevs. Note: dss_core has to be the first item in
208 board_data->dsi_disable_pads = omap_dsi_disable_pads; 325 * the hwmod list.
209 326 */
210 pdata.board_data = board_data; 327 dss_pdev = create_dss_pdev(curr_dss_hwmod[0].dev_name,
211 pdata.board_data->get_context_loss_count = 328 curr_dss_hwmod[0].id,
212 omap_pm_get_dev_context_loss_count; 329 curr_dss_hwmod[0].oh_name,
213 330 board_data, sizeof(*board_data),
214 for (i = 0; i < oh_count; i++) { 331 NULL);
215 oh = omap_hwmod_lookup(curr_dss_hwmod[i].oh_name); 332
216 if (!oh) { 333 if (IS_ERR(dss_pdev)) {
217 pr_err("Could not look up %s\n", 334 pr_err("Could not build omap_device for %s\n",
218 curr_dss_hwmod[i].oh_name); 335 curr_dss_hwmod[0].oh_name);
219 return -ENODEV; 336
337 return PTR_ERR(dss_pdev);
338 }
339
340 for (i = 1; i < oh_count; i++) {
341 pdev = create_dss_pdev(curr_dss_hwmod[i].dev_name,
342 curr_dss_hwmod[i].id,
343 curr_dss_hwmod[i].oh_name,
344 board_data, sizeof(*board_data),
345 dss_pdev);
346
347 if (IS_ERR(pdev)) {
348 pr_err("Could not build omap_device for %s\n",
349 curr_dss_hwmod[i].oh_name);
350
351 return PTR_ERR(pdev);
220 } 352 }
353 }
221 354
222 pdev = omap_device_build(curr_dss_hwmod[i].dev_name, 355 /* Create devices for DPI and SDI */
223 curr_dss_hwmod[i].id, oh, &pdata,
224 sizeof(struct omap_display_platform_data),
225 NULL, 0, 0);
226 356
227 if (WARN((IS_ERR(pdev)), "Could not build omap_device for %s\n", 357 pdev = create_simple_dss_pdev("omapdss_dpi", -1,
228 curr_dss_hwmod[i].oh_name)) 358 board_data, sizeof(*board_data), dss_pdev);
229 return -ENODEV; 359 if (IS_ERR(pdev)) {
360 pr_err("Could not build platform_device for omapdss_dpi\n");
361 return PTR_ERR(pdev);
230 } 362 }
231 omap_display_device.dev.platform_data = board_data;
232 363
233 r = platform_device_register(&omap_display_device); 364 if (cpu_is_omap34xx()) {
234 if (r < 0) 365 pdev = create_simple_dss_pdev("omapdss_sdi", -1,
235 printk(KERN_ERR "Unable to register OMAP-Display device\n"); 366 board_data, sizeof(*board_data), dss_pdev);
367 if (IS_ERR(pdev)) {
368 pr_err("Could not build platform_device for omapdss_sdi\n");
369 return PTR_ERR(pdev);
370 }
371 }
236 372
237 return r; 373 return 0;
238} 374}
239 375
240static void dispc_disable_outputs(void) 376static void dispc_disable_outputs(void)
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c
index 30a44f806e01..c3100a044fbe 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c
@@ -148,23 +148,25 @@ static struct s3c24xx_hsudc_platdata smdk2416_hsudc_platdata = {
148 148
149static struct s3c_fb_pd_win smdk2416_fb_win[] = { 149static struct s3c_fb_pd_win smdk2416_fb_win[] = {
150 [0] = { 150 [0] = {
151 /* think this is the same as the smdk6410 */
152 .win_mode = {
153 .pixclock = 41094,
154 .left_margin = 8,
155 .right_margin = 13,
156 .upper_margin = 7,
157 .lower_margin = 5,
158 .hsync_len = 3,
159 .vsync_len = 1,
160 .xres = 800,
161 .yres = 480,
162 },
163 .default_bpp = 16, 151 .default_bpp = 16,
164 .max_bpp = 32, 152 .max_bpp = 32,
153 .xres = 800,
154 .yres = 480,
165 }, 155 },
166}; 156};
167 157
158static struct fb_videomode smdk2416_lcd_timing = {
159 .pixclock = 41094,
160 .left_margin = 8,
161 .right_margin = 13,
162 .upper_margin = 7,
163 .lower_margin = 5,
164 .hsync_len = 3,
165 .vsync_len = 1,
166 .xres = 800,
167 .yres = 480,
168};
169
168static void s3c2416_fb_gpio_setup_24bpp(void) 170static void s3c2416_fb_gpio_setup_24bpp(void)
169{ 171{
170 unsigned int gpio; 172 unsigned int gpio;
@@ -187,6 +189,7 @@ static void s3c2416_fb_gpio_setup_24bpp(void)
187 189
188static struct s3c_fb_platdata smdk2416_fb_platdata = { 190static struct s3c_fb_platdata smdk2416_fb_platdata = {
189 .win[0] = &smdk2416_fb_win[0], 191 .win[0] = &smdk2416_fb_win[0],
192 .vtiming = &smdk2416_lcd_timing,
190 .setup_gpio = s3c2416_fb_gpio_setup_24bpp, 193 .setup_gpio = s3c2416_fb_gpio_setup_24bpp,
191 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 194 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
192 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, 195 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c
index 314df0518afd..ffa29ddfdfce 100644
--- a/arch/arm/mach-s3c64xx/mach-anw6410.c
+++ b/arch/arm/mach-s3c64xx/mach-anw6410.c
@@ -134,24 +134,27 @@ static struct platform_device anw6410_lcd_powerdev = {
134}; 134};
135 135
136static struct s3c_fb_pd_win anw6410_fb_win0 = { 136static struct s3c_fb_pd_win anw6410_fb_win0 = {
137 /* this is to ensure we use win0 */
138 .win_mode = {
139 .left_margin = 8,
140 .right_margin = 13,
141 .upper_margin = 7,
142 .lower_margin = 5,
143 .hsync_len = 3,
144 .vsync_len = 1,
145 .xres = 800,
146 .yres = 480,
147 },
148 .max_bpp = 32, 137 .max_bpp = 32,
149 .default_bpp = 16, 138 .default_bpp = 16,
139 .xres = 800,
140 .yres = 480,
141};
142
143static struct fb_videomode anw6410_lcd_timing = {
144 .left_margin = 8,
145 .right_margin = 13,
146 .upper_margin = 7,
147 .lower_margin = 5,
148 .hsync_len = 3,
149 .vsync_len = 1,
150 .xres = 800,
151 .yres = 480,
150}; 152};
151 153
152/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */ 154/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
153static struct s3c_fb_platdata anw6410_lcd_pdata __initdata = { 155static struct s3c_fb_platdata anw6410_lcd_pdata __initdata = {
154 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, 156 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
157 .vtiming = &anw6410_lcd_timing,
155 .win[0] = &anw6410_fb_win0, 158 .win[0] = &anw6410_fb_win0,
156 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 159 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
157 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, 160 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 6b20a71d7dbf..d0c352d861f8 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -151,26 +151,29 @@ static struct platform_device crag6410_lcd_powerdev = {
151 151
152/* 640x480 URT */ 152/* 640x480 URT */
153static struct s3c_fb_pd_win crag6410_fb_win0 = { 153static struct s3c_fb_pd_win crag6410_fb_win0 = {
154 /* this is to ensure we use win0 */
155 .win_mode = {
156 .left_margin = 150,
157 .right_margin = 80,
158 .upper_margin = 40,
159 .lower_margin = 5,
160 .hsync_len = 40,
161 .vsync_len = 5,
162 .xres = 640,
163 .yres = 480,
164 },
165 .max_bpp = 32, 154 .max_bpp = 32,
166 .default_bpp = 16, 155 .default_bpp = 16,
156 .xres = 640,
157 .yres = 480,
167 .virtual_y = 480 * 2, 158 .virtual_y = 480 * 2,
168 .virtual_x = 640, 159 .virtual_x = 640,
169}; 160};
170 161
162static struct fb_videomode crag6410_lcd_timing = {
163 .left_margin = 150,
164 .right_margin = 80,
165 .upper_margin = 40,
166 .lower_margin = 5,
167 .hsync_len = 40,
168 .vsync_len = 5,
169 .xres = 640,
170 .yres = 480,
171};
172
171/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */ 173/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
172static struct s3c_fb_platdata crag6410_lcd_pdata __initdata = { 174static struct s3c_fb_platdata crag6410_lcd_pdata __initdata = {
173 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, 175 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
176 .vtiming = &crag6410_lcd_timing,
174 .win[0] = &crag6410_fb_win0, 177 .win[0] = &crag6410_fb_win0,
175 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 178 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
176 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, 179 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
index 1bf6b9da20fc..689088162f77 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c64xx/mach-hmt.c
@@ -129,23 +129,27 @@ static struct platform_device hmt_backlight_device = {
129}; 129};
130 130
131static struct s3c_fb_pd_win hmt_fb_win0 = { 131static struct s3c_fb_pd_win hmt_fb_win0 = {
132 .win_mode = {
133 .left_margin = 8,
134 .right_margin = 13,
135 .upper_margin = 7,
136 .lower_margin = 5,
137 .hsync_len = 3,
138 .vsync_len = 1,
139 .xres = 800,
140 .yres = 480,
141 },
142 .max_bpp = 32, 132 .max_bpp = 32,
143 .default_bpp = 16, 133 .default_bpp = 16,
134 .xres = 800,
135 .yres = 480,
136};
137
138static struct fb_videomode hmt_lcd_timing = {
139 .left_margin = 8,
140 .right_margin = 13,
141 .upper_margin = 7,
142 .lower_margin = 5,
143 .hsync_len = 3,
144 .vsync_len = 1,
145 .xres = 800,
146 .yres = 480,
144}; 147};
145 148
146/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */ 149/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
147static struct s3c_fb_platdata hmt_lcd_pdata __initdata = { 150static struct s3c_fb_platdata hmt_lcd_pdata __initdata = {
148 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, 151 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
152 .vtiming = &hmt_lcd_timing,
149 .win[0] = &hmt_fb_win0, 153 .win[0] = &hmt_fb_win0,
150 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 154 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
151 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, 155 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
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
143static struct s3c_fb_pd_win mini6410_fb_win[] = { 143static 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
150static 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
162static 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
169static 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
181static 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
173static 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
180static void mini6410_lcd_power_set(struct plat_lcd_data *pd, 198static 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 */
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
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
index c5021d0335c6..d6266d8b43c9 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq5.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq5.c
@@ -108,23 +108,27 @@ static struct platform_device smartq5_buttons_device = {
108}; 108};
109 109
110static struct s3c_fb_pd_win smartq5_fb_win0 = { 110static struct s3c_fb_pd_win smartq5_fb_win0 = {
111 .win_mode = {
112 .left_margin = 216,
113 .right_margin = 40,
114 .upper_margin = 35,
115 .lower_margin = 10,
116 .hsync_len = 1,
117 .vsync_len = 1,
118 .xres = 800,
119 .yres = 480,
120 .refresh = 80,
121 },
122 .max_bpp = 32, 111 .max_bpp = 32,
123 .default_bpp = 16, 112 .default_bpp = 16,
113 .xres = 800,
114 .yres = 480,
115};
116
117static struct fb_videomode smartq5_lcd_timing = {
118 .left_margin = 216,
119 .right_margin = 40,
120 .upper_margin = 35,
121 .lower_margin = 10,
122 .hsync_len = 1,
123 .vsync_len = 1,
124 .xres = 800,
125 .yres = 480,
126 .refresh = 80,
124}; 127};
125 128
126static struct s3c_fb_platdata smartq5_lcd_pdata __initdata = { 129static struct s3c_fb_platdata smartq5_lcd_pdata __initdata = {
127 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, 130 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
131 .vtiming = &smartq5_lcd_timing,
128 .win[0] = &smartq5_fb_win0, 132 .win[0] = &smartq5_fb_win0,
129 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 133 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
130 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC | 134 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c
index aa9072a4cbef..0957d2a980e1 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq7.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq7.c
@@ -124,23 +124,27 @@ static struct platform_device smartq7_buttons_device = {
124}; 124};
125 125
126static struct s3c_fb_pd_win smartq7_fb_win0 = { 126static struct s3c_fb_pd_win smartq7_fb_win0 = {
127 .win_mode = {
128 .left_margin = 3,
129 .right_margin = 5,
130 .upper_margin = 1,
131 .lower_margin = 20,
132 .hsync_len = 10,
133 .vsync_len = 3,
134 .xres = 800,
135 .yres = 480,
136 .refresh = 80,
137 },
138 .max_bpp = 32, 127 .max_bpp = 32,
139 .default_bpp = 16, 128 .default_bpp = 16,
129 .xres = 800,
130 .yres = 480,
131};
132
133static struct fb_videomode smartq7_lcd_timing = {
134 .left_margin = 3,
135 .right_margin = 5,
136 .upper_margin = 1,
137 .lower_margin = 20,
138 .hsync_len = 10,
139 .vsync_len = 3,
140 .xres = 800,
141 .yres = 480,
142 .refresh = 80,
140}; 143};
141 144
142static struct s3c_fb_platdata smartq7_lcd_pdata __initdata = { 145static struct s3c_fb_platdata smartq7_lcd_pdata __initdata = {
143 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, 146 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
147 .vtiming = &smartq7_lcd_timing,
144 .win[0] = &smartq7_fb_win0, 148 .win[0] = &smartq7_fb_win0,
145 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 149 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
146 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC | 150 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index d44319b09412..df3103d450e2 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -146,26 +146,29 @@ static struct platform_device smdk6410_lcd_powerdev = {
146}; 146};
147 147
148static struct s3c_fb_pd_win smdk6410_fb_win0 = { 148static struct s3c_fb_pd_win smdk6410_fb_win0 = {
149 /* this is to ensure we use win0 */
150 .win_mode = {
151 .left_margin = 8,
152 .right_margin = 13,
153 .upper_margin = 7,
154 .lower_margin = 5,
155 .hsync_len = 3,
156 .vsync_len = 1,
157 .xres = 800,
158 .yres = 480,
159 },
160 .max_bpp = 32, 149 .max_bpp = 32,
161 .default_bpp = 16, 150 .default_bpp = 16,
151 .xres = 800,
152 .yres = 480,
162 .virtual_y = 480 * 2, 153 .virtual_y = 480 * 2,
163 .virtual_x = 800, 154 .virtual_x = 800,
164}; 155};
165 156
157static struct fb_videomode smdk6410_lcd_timing = {
158 .left_margin = 8,
159 .right_margin = 13,
160 .upper_margin = 7,
161 .lower_margin = 5,
162 .hsync_len = 3,
163 .vsync_len = 1,
164 .xres = 800,
165 .yres = 480,
166};
167
166/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */ 168/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
167static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = { 169static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = {
168 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, 170 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
171 .vtiming = &smdk6410_lcd_timing,
169 .win[0] = &smdk6410_fb_win0, 172 .win[0] = &smdk6410_fb_win0,
170 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 173 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
171 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, 174 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
index a40e325d62c8..92fefad505cc 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
@@ -103,22 +103,26 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
103 103
104/* Frame Buffer */ 104/* Frame Buffer */
105static struct s3c_fb_pd_win smdk6440_fb_win0 = { 105static struct s3c_fb_pd_win smdk6440_fb_win0 = {
106 .win_mode = {
107 .left_margin = 8,
108 .right_margin = 13,
109 .upper_margin = 7,
110 .lower_margin = 5,
111 .hsync_len = 3,
112 .vsync_len = 1,
113 .xres = 800,
114 .yres = 480,
115 },
116 .max_bpp = 32, 106 .max_bpp = 32,
117 .default_bpp = 24, 107 .default_bpp = 24,
108 .xres = 800,
109 .yres = 480,
110};
111
112static struct fb_videomode smdk6440_lcd_timing = {
113 .left_margin = 8,
114 .right_margin = 13,
115 .upper_margin = 7,
116 .lower_margin = 5,
117 .hsync_len = 3,
118 .vsync_len = 1,
119 .xres = 800,
120 .yres = 480,
118}; 121};
119 122
120static struct s3c_fb_platdata smdk6440_lcd_pdata __initdata = { 123static struct s3c_fb_platdata smdk6440_lcd_pdata __initdata = {
121 .win[0] = &smdk6440_fb_win0, 124 .win[0] = &smdk6440_fb_win0,
125 .vtiming = &smdk6440_lcd_timing,
122 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 126 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
123 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, 127 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
124 .setup_gpio = s5p64x0_fb_gpio_setup_24bpp, 128 .setup_gpio = s5p64x0_fb_gpio_setup_24bpp,
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
index efb69e2f2afe..e2335ecf6eae 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
@@ -121,22 +121,26 @@ static struct s3c2410_uartcfg smdk6450_uartcfgs[] __initdata = {
121 121
122/* Frame Buffer */ 122/* Frame Buffer */
123static struct s3c_fb_pd_win smdk6450_fb_win0 = { 123static struct s3c_fb_pd_win smdk6450_fb_win0 = {
124 .win_mode = {
125 .left_margin = 8,
126 .right_margin = 13,
127 .upper_margin = 7,
128 .lower_margin = 5,
129 .hsync_len = 3,
130 .vsync_len = 1,
131 .xres = 800,
132 .yres = 480,
133 },
134 .max_bpp = 32, 124 .max_bpp = 32,
135 .default_bpp = 24, 125 .default_bpp = 24,
126 .xres = 800,
127 .yres = 480,
128};
129
130static struct fb_videomode smdk6450_lcd_timing = {
131 .left_margin = 8,
132 .right_margin = 13,
133 .upper_margin = 7,
134 .lower_margin = 5,
135 .hsync_len = 3,
136 .vsync_len = 1,
137 .xres = 800,
138 .yres = 480,
136}; 139};
137 140
138static struct s3c_fb_platdata smdk6450_lcd_pdata __initdata = { 141static struct s3c_fb_platdata smdk6450_lcd_pdata __initdata = {
139 .win[0] = &smdk6450_fb_win0, 142 .win[0] = &smdk6450_fb_win0,
143 .vtiming = &smdk6450_lcd_timing,
140 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 144 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
141 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, 145 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
142 .setup_gpio = s5p64x0_fb_gpio_setup_24bpp, 146 .setup_gpio = s5p64x0_fb_gpio_setup_24bpp,
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
index 674d22992f3c..0c3ae38d27ca 100644
--- a/arch/arm/mach-s5pc100/mach-smdkc100.c
+++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
@@ -136,24 +136,27 @@ static struct platform_device smdkc100_lcd_powerdev = {
136 136
137/* Frame Buffer */ 137/* Frame Buffer */
138static struct s3c_fb_pd_win smdkc100_fb_win0 = { 138static struct s3c_fb_pd_win smdkc100_fb_win0 = {
139 /* this is to ensure we use win0 */
140 .win_mode = {
141 .left_margin = 8,
142 .right_margin = 13,
143 .upper_margin = 7,
144 .lower_margin = 5,
145 .hsync_len = 3,
146 .vsync_len = 1,
147 .xres = 800,
148 .yres = 480,
149 .refresh = 80,
150 },
151 .max_bpp = 32, 139 .max_bpp = 32,
152 .default_bpp = 16, 140 .default_bpp = 16,
141 .xres = 800,
142 .yres = 480,
143};
144
145static struct fb_videomode smdkc100_lcd_timing = {
146 .left_margin = 8,
147 .right_margin = 13,
148 .upper_margin = 7,
149 .lower_margin = 5,
150 .hsync_len = 3,
151 .vsync_len = 1,
152 .xres = 800,
153 .yres = 480,
154 .refresh = 80,
153}; 155};
154 156
155static struct s3c_fb_platdata smdkc100_lcd_pdata __initdata = { 157static struct s3c_fb_platdata smdkc100_lcd_pdata __initdata = {
156 .win[0] = &smdkc100_fb_win0, 158 .win[0] = &smdkc100_fb_win0,
159 .vtiming = &smdkc100_lcd_timing,
157 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 160 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
158 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, 161 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
159 .setup_gpio = s5pc100_fb_gpio_setup_24bpp, 162 .setup_gpio = s5pc100_fb_gpio_setup_24bpp,
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c
index 48d018f2332b..af528f9e97f9 100644
--- a/arch/arm/mach-s5pv210/mach-aquila.c
+++ b/arch/arm/mach-s5pv210/mach-aquila.c
@@ -96,38 +96,34 @@ static struct s3c2410_uartcfg aquila_uartcfgs[] __initdata = {
96 96
97/* Frame Buffer */ 97/* Frame Buffer */
98static struct s3c_fb_pd_win aquila_fb_win0 = { 98static struct s3c_fb_pd_win aquila_fb_win0 = {
99 .win_mode = {
100 .left_margin = 16,
101 .right_margin = 16,
102 .upper_margin = 3,
103 .lower_margin = 28,
104 .hsync_len = 2,
105 .vsync_len = 2,
106 .xres = 480,
107 .yres = 800,
108 },
109 .max_bpp = 32, 99 .max_bpp = 32,
110 .default_bpp = 16, 100 .default_bpp = 16,
101 .xres = 480,
102 .yres = 800,
111}; 103};
112 104
113static struct s3c_fb_pd_win aquila_fb_win1 = { 105static struct s3c_fb_pd_win aquila_fb_win1 = {
114 .win_mode = {
115 .left_margin = 16,
116 .right_margin = 16,
117 .upper_margin = 3,
118 .lower_margin = 28,
119 .hsync_len = 2,
120 .vsync_len = 2,
121 .xres = 480,
122 .yres = 800,
123 },
124 .max_bpp = 32, 106 .max_bpp = 32,
125 .default_bpp = 16, 107 .default_bpp = 16,
108 .xres = 480,
109 .yres = 800,
110};
111
112static struct fb_videomode aquila_lcd_timing = {
113 .left_margin = 16,
114 .right_margin = 16,
115 .upper_margin = 3,
116 .lower_margin = 28,
117 .hsync_len = 2,
118 .vsync_len = 2,
119 .xres = 480,
120 .yres = 800,
126}; 121};
127 122
128static struct s3c_fb_platdata aquila_lcd_pdata __initdata = { 123static struct s3c_fb_platdata aquila_lcd_pdata __initdata = {
129 .win[0] = &aquila_fb_win0, 124 .win[0] = &aquila_fb_win0,
130 .win[1] = &aquila_fb_win1, 125 .win[1] = &aquila_fb_win1,
126 .vtiming = &aquila_lcd_timing,
131 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 127 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
132 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC | 128 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
133 VIDCON1_INV_VCLK | VIDCON1_INV_VDEN, 129 VIDCON1_INV_VCLK | VIDCON1_INV_VDEN,
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index f20a97c8e411..bf5087c2b7fe 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -107,25 +107,29 @@ static struct s3c2410_uartcfg goni_uartcfgs[] __initdata = {
107 107
108/* Frame Buffer */ 108/* Frame Buffer */
109static struct s3c_fb_pd_win goni_fb_win0 = { 109static struct s3c_fb_pd_win goni_fb_win0 = {
110 .win_mode = {
111 .left_margin = 16,
112 .right_margin = 16,
113 .upper_margin = 2,
114 .lower_margin = 28,
115 .hsync_len = 2,
116 .vsync_len = 1,
117 .xres = 480,
118 .yres = 800,
119 .refresh = 55,
120 },
121 .max_bpp = 32, 110 .max_bpp = 32,
122 .default_bpp = 16, 111 .default_bpp = 16,
112 .xres = 480,
113 .yres = 800,
123 .virtual_x = 480, 114 .virtual_x = 480,
124 .virtual_y = 2 * 800, 115 .virtual_y = 2 * 800,
125}; 116};
126 117
118static struct fb_videomode goni_lcd_timing = {
119 .left_margin = 16,
120 .right_margin = 16,
121 .upper_margin = 2,
122 .lower_margin = 28,
123 .hsync_len = 2,
124 .vsync_len = 1,
125 .xres = 480,
126 .yres = 800,
127 .refresh = 55,
128};
129
127static struct s3c_fb_platdata goni_lcd_pdata __initdata = { 130static struct s3c_fb_platdata goni_lcd_pdata __initdata = {
128 .win[0] = &goni_fb_win0, 131 .win[0] = &goni_fb_win0,
132 .vtiming = &goni_lcd_timing,
129 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB | 133 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
130 VIDCON0_CLKSEL_LCD, 134 VIDCON0_CLKSEL_LCD,
131 .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN 135 .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index fa1b61209fd9..0d7ddec88eb7 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -178,22 +178,26 @@ static struct platform_device smdkv210_lcd_lte480wv = {
178}; 178};
179 179
180static struct s3c_fb_pd_win smdkv210_fb_win0 = { 180static struct s3c_fb_pd_win smdkv210_fb_win0 = {
181 .win_mode = {
182 .left_margin = 13,
183 .right_margin = 8,
184 .upper_margin = 7,
185 .lower_margin = 5,
186 .hsync_len = 3,
187 .vsync_len = 1,
188 .xres = 800,
189 .yres = 480,
190 },
191 .max_bpp = 32, 181 .max_bpp = 32,
192 .default_bpp = 24, 182 .default_bpp = 24,
183 .xres = 800,
184 .yres = 480,
185};
186
187static struct fb_videomode smdkv210_lcd_timing = {
188 .left_margin = 13,
189 .right_margin = 8,
190 .upper_margin = 7,
191 .lower_margin = 5,
192 .hsync_len = 3,
193 .vsync_len = 1,
194 .xres = 800,
195 .yres = 480,
193}; 196};
194 197
195static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = { 198static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = {
196 .win[0] = &smdkv210_fb_win0, 199 .win[0] = &smdkv210_fb_win0,
200 .vtiming = &smdkv210_lcd_timing,
197 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, 201 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
198 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, 202 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
199 .setup_gpio = s5pv210_fb_gpio_setup_24bpp, 203 .setup_gpio = s5pv210_fb_gpio_setup_24bpp,
diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
index 0fedf47fa502..536002ff2ab8 100644
--- a/arch/arm/plat-samsung/include/plat/fb.h
+++ b/arch/arm/plat-samsung/include/plat/fb.h
@@ -24,15 +24,16 @@
24 24
25/** 25/**
26 * struct s3c_fb_pd_win - per window setup data 26 * struct s3c_fb_pd_win - per window setup data
27 * @win_mode: The display parameters to initialise (not for window 0) 27 * @xres : The window X size.
28 * @yres : The window Y size.
28 * @virtual_x: The virtual X size. 29 * @virtual_x: The virtual X size.
29 * @virtual_y: The virtual Y size. 30 * @virtual_y: The virtual Y size.
30 */ 31 */
31struct s3c_fb_pd_win { 32struct s3c_fb_pd_win {
32 struct fb_videomode win_mode;
33
34 unsigned short default_bpp; 33 unsigned short default_bpp;
35 unsigned short max_bpp; 34 unsigned short max_bpp;
35 unsigned short xres;
36 unsigned short yres;
36 unsigned short virtual_x; 37 unsigned short virtual_x;
37 unsigned short virtual_y; 38 unsigned short virtual_y;
38}; 39};
@@ -45,6 +46,7 @@ struct s3c_fb_pd_win {
45 * @default_win: default window layer number to be used for UI layer. 46 * @default_win: default window layer number to be used for UI layer.
46 * @vidcon0: The base vidcon0 values to control the panel data format. 47 * @vidcon0: The base vidcon0 values to control the panel data format.
47 * @vidcon1: The base vidcon1 values to control the panel data output. 48 * @vidcon1: The base vidcon1 values to control the panel data output.
49 * @vtiming: Video timing when connected to a RGB type panel.
48 * @win: The setup data for each hardware window, or NULL for unused. 50 * @win: The setup data for each hardware window, or NULL for unused.
49 * @display_mode: The LCD output display mode. 51 * @display_mode: The LCD output display mode.
50 * 52 *
@@ -58,8 +60,7 @@ struct s3c_fb_platdata {
58 void (*setup_gpio)(void); 60 void (*setup_gpio)(void);
59 61
60 struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN]; 62 struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
61 63 struct fb_videomode *vtiming;
62 u32 default_win;
63 64
64 u32 vidcon0; 65 u32 vidcon0;
65 u32 vidcon1; 66 u32 vidcon1;