linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] ARM: mach-shmobile: r8a7779: Add DU support
@ 2013-03-27 19:21 Laurent Pinchart
  2013-03-28 12:46 ` Sergei Shtylyov
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Laurent Pinchart @ 2013-03-27 19:21 UTC (permalink / raw)
  To: linux-sh

Add a function to register the DU device with board-specific platform
data.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 arch/arm/mach-shmobile/include/mach/common.h |  1 +
 arch/arm/mach-shmobile/setup-r8a7779.c       | 30 ++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 03f73de..4531872 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -68,6 +68,7 @@ extern void r8a7779_earlytimer_init(void);
 extern void r8a7779_add_early_devices(void);
 extern void r8a7779_add_standard_devices(void);
 extern void r8a7779_add_standard_devices_dt(void);
+extern void r8a7779_add_du_device(void *pdata);
 extern void r8a7779_clock_init(void);
 extern void r8a7779_pinmux_init(void);
 extern void r8a7779_pm_init(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index a460ba3..2f817d8 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -393,6 +393,29 @@ static struct platform_device sata_device = {
 	},
 };
 
+static struct resource du_resources[] = {
+	[0] = {
+		.name	= "Display Unit",
+		.start	= 0xfff80000,
+		.end	= 0xfffb1007,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start	= gic_iid(0x3f),
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device du_device = {
+	.name		= "rcar-du",
+	.num_resources	= ARRAY_SIZE(du_resources),
+	.resource	= du_resources,
+	.id		= 0,
+	.dev	= {
+		.coherent_dma_mask = ~0,
+	},
+};
+
 static struct platform_device *r8a7779_devices_dt[] __initdata = {
 	&scif0_device,
 	&scif1_device,
@@ -428,6 +451,13 @@ void __init r8a7779_add_standard_devices(void)
 			    ARRAY_SIZE(r8a7779_late_devices));
 }
 
+void __init r8a7779_add_du_device(void *pdata)
+{
+	du_device.dev.platform_data = pdata;
+
+	platform_device_register(&du_device);
+}
+
 /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
 void __init __weak r8a7779_register_twd(void) { }
 
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-04-05  0:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-27 19:21 [PATCH v2 1/2] ARM: mach-shmobile: r8a7779: Add DU support Laurent Pinchart
2013-03-28 12:46 ` Sergei Shtylyov
2013-03-28 14:42 ` Laurent Pinchart
2013-03-28 17:44 ` Sergei Shtylyov
2013-04-04 14:54 ` Laurent Pinchart
2013-04-04 17:27 ` Sergei Shtylyov
2013-04-04 19:17 ` Sergei Shtylyov
2013-04-04 23:52 ` Laurent Pinchart
2013-04-05  0:02 ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).