linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][TEST] ARM: shmobile: lager-reference: Instantiate IPMMU-MX
@ 2014-09-15 13:45 Magnus Damm
  2014-09-16 10:46 ` [PATCH][TEST] ARM: shmobile: lager-reference: IPMMUDS and SYS-DMAC test Magnus Damm
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Magnus Damm @ 2014-09-15 13:45 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm+renesas@opensource.se>

Hook up the IPMMU MX together with the DU on the Lager board.

Based on the very similar r8a7791 Koelsch code written by
Laurent Pinchart, thanks to him for that.

Tested with DU using the VGA connector on the r8a7790 Lager board.

Not-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 Written against renesas-devel-20140911-v3.17-rc4

 arch/arm/mach-shmobile/board-lager-reference.c |   30 ++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

--- 0001/arch/arm/mach-shmobile/board-lager-reference.c
+++ work/arch/arm/mach-shmobile/board-lager-reference.c	2014-09-15 20:45:37.000000000 +0900
@@ -21,6 +21,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/init.h>
 #include <linux/of_platform.h>
+#include <linux/platform_data/ipmmu-vmsa.h>
 #include <linux/platform_data/rcar-du.h>
 
 #include <asm/mach/arch.h>
@@ -88,6 +89,34 @@ static void __init lager_add_du_device(v
 }
 
 /*
+ * IPMMUs
+ *
+ * MX: for JPU, 2DDMAC, VSP, DCU, FDP, IMR-LSX2, DU, VCP, VPC and VIN
+ */
+static struct resource ipmmu_mx_resources[] = {
+	DEFINE_RES_MEM(0xfe951800, 0x800),
+	DEFINE_RES_IRQ(gic_spi(222)),
+};
+
+static const struct ipmmu_vmsa_master ipmmu_mx_masters[] = {
+	{ "rcar-du-r8a7790", 15, },
+};
+
+static struct ipmmu_vmsa_platform_data ipmmu_mx_platform_data = {
+	.masters = ipmmu_mx_masters,
+	.num_masters = ARRAY_SIZE(ipmmu_mx_masters),
+};
+
+static void __init lager_add_ipmmu_devices(void)
+{
+	platform_device_register_resndata(NULL, "ipmmu-vmsa", -1,
+					  ipmmu_mx_resources,
+					  ARRAY_SIZE(ipmmu_mx_resources),
+					  &ipmmu_mx_platform_data,
+					  sizeof(ipmmu_mx_platform_data));
+}
+
+/*
  * This is a really crude hack to provide clkdev support to platform
  * devices until they get moved to DT.
  */
@@ -104,6 +133,7 @@ static void __init lager_add_standard_de
 	shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 
+	lager_add_ipmmu_devices();
 	lager_add_du_device();
 }
 

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

end of thread, other threads:[~2014-09-19  5:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-15 13:45 [PATCH][TEST] ARM: shmobile: lager-reference: Instantiate IPMMU-MX Magnus Damm
2014-09-16 10:46 ` [PATCH][TEST] ARM: shmobile: lager-reference: IPMMUDS and SYS-DMAC test Magnus Damm
2014-09-18  2:22 ` Khiem Nguyen
2014-09-19  5:58 ` Magnus Damm

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).