aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-mackerel.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-09-11 17:30:45 -0400
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-03-12 17:40:46 -0400
commita1022adbdff45c76dea27f89cdb3d77e76b75620 (patch)
treec26694aeb014e8fbe37f0a91d3817c1f4d68bb3d /arch/arm/mach-shmobile/board-mackerel.c
parent9a2985e7f943678154f5761dad753f1987c2fdd0 (diff)
arm: mach-shmobile: Add LCDC tx_dev field to platform data
Make sure the transmitter devices get registered before the associated LCDC devices. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'arch/arm/mach-shmobile/board-mackerel.c')
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c66
1 files changed, 35 insertions, 31 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 1e0229390197..740f022fd7be 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -426,6 +426,38 @@ static struct platform_device lcdc_device = {
426 }, 426 },
427}; 427};
428 428
429/* HDMI */
430static struct sh_mobile_lcdc_info hdmi_lcdc_info;
431
432static struct sh_mobile_hdmi_info hdmi_info = {
433 .lcd_chan = &hdmi_lcdc_info.ch[0],
434 .flags = HDMI_SND_SRC_SPDIF,
435};
436
437static struct resource hdmi_resources[] = {
438 [0] = {
439 .name = "HDMI",
440 .start = 0xe6be0000,
441 .end = 0xe6be00ff,
442 .flags = IORESOURCE_MEM,
443 },
444 [1] = {
445 /* There's also an HDMI interrupt on INTCS @ 0x18e0 */
446 .start = evt2irq(0x17e0),
447 .flags = IORESOURCE_IRQ,
448 },
449};
450
451static struct platform_device hdmi_device = {
452 .name = "sh-mobile-hdmi",
453 .num_resources = ARRAY_SIZE(hdmi_resources),
454 .resource = hdmi_resources,
455 .id = -1,
456 .dev = {
457 .platform_data = &hdmi_info,
458 },
459};
460
429static struct sh_mobile_meram_cfg hdmi_meram_cfg = { 461static struct sh_mobile_meram_cfg hdmi_meram_cfg = {
430 .icb[0] = { 462 .icb[0] = {
431 .marker_icb = 30, 463 .marker_icb = 30,
@@ -440,7 +472,7 @@ static struct sh_mobile_meram_cfg hdmi_meram_cfg = {
440 .meram_size = 0x100, 472 .meram_size = 0x100,
441 }, 473 },
442}; 474};
443/* HDMI */ 475
444static struct sh_mobile_lcdc_info hdmi_lcdc_info = { 476static struct sh_mobile_lcdc_info hdmi_lcdc_info = {
445 .meram_dev = &mackerel_meram_info, 477 .meram_dev = &mackerel_meram_info,
446 .clock_source = LCDC_CLK_EXTERNAL, 478 .clock_source = LCDC_CLK_EXTERNAL,
@@ -451,6 +483,7 @@ static struct sh_mobile_lcdc_info hdmi_lcdc_info = {
451 .clock_divider = 1, 483 .clock_divider = 1,
452 .flags = LCDC_FLAGS_DWPOL, 484 .flags = LCDC_FLAGS_DWPOL,
453 .meram_cfg = &hdmi_meram_cfg, 485 .meram_cfg = &hdmi_meram_cfg,
486 .tx_dev = &hdmi_device,
454 } 487 }
455}; 488};
456 489
@@ -478,35 +511,6 @@ static struct platform_device hdmi_lcdc_device = {
478 }, 511 },
479}; 512};
480 513
481static struct sh_mobile_hdmi_info hdmi_info = {
482 .lcd_chan = &hdmi_lcdc_info.ch[0],
483 .flags = HDMI_SND_SRC_SPDIF,
484};
485
486static struct resource hdmi_resources[] = {
487 [0] = {
488 .name = "HDMI",
489 .start = 0xe6be0000,
490 .end = 0xe6be00ff,
491 .flags = IORESOURCE_MEM,
492 },
493 [1] = {
494 /* There's also an HDMI interrupt on INTCS @ 0x18e0 */
495 .start = evt2irq(0x17e0),
496 .flags = IORESOURCE_IRQ,
497 },
498};
499
500static struct platform_device hdmi_device = {
501 .name = "sh-mobile-hdmi",
502 .num_resources = ARRAY_SIZE(hdmi_resources),
503 .resource = hdmi_resources,
504 .id = -1,
505 .dev = {
506 .platform_data = &hdmi_info,
507 },
508};
509
510static struct platform_device fsi_hdmi_device = { 514static struct platform_device fsi_hdmi_device = {
511 .name = "sh_fsi2_b_hdmi", 515 .name = "sh_fsi2_b_hdmi",
512}; 516};
@@ -1275,8 +1279,8 @@ static struct platform_device *mackerel_devices[] __initdata = {
1275 &sh_mmcif_device, 1279 &sh_mmcif_device,
1276 &ceu_device, 1280 &ceu_device,
1277 &mackerel_camera, 1281 &mackerel_camera,
1278 &hdmi_lcdc_device,
1279 &hdmi_device, 1282 &hdmi_device,
1283 &hdmi_lcdc_device,
1280 &meram_device, 1284 &meram_device,
1281}; 1285};
1282 1286