Merge tag 'iommu-updates-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/joro...
[cascardo/linux.git] / arch / arm / mach-shmobile / setup-sh73a0.c
index 2ecd668..bdab575 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/sh_dma.h>
 #include <linux/sh_intc.h>
 #include <linux/sh_timer.h>
+#include <linux/platform_data/sh_ipmmu.h>
 #include <mach/dma-register.h>
 #include <mach/hardware.h>
 #include <mach/irqs.h>
@@ -780,6 +781,35 @@ static struct platform_device pmu_device = {
        .resource       = pmu_resources,
 };
 
+/* an IPMMU module for ICB */
+static struct resource ipmmu_resources[] = {
+       [0] = {
+               .name   = "IPMMU",
+               .start  = 0xfe951000,
+               .end    = 0xfe9510ff,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static const char * const ipmmu_dev_names[] = {
+       "sh_mobile_lcdc_fb.0",
+};
+
+static struct shmobile_ipmmu_platform_data ipmmu_platform_data = {
+       .dev_names = ipmmu_dev_names,
+       .num_dev_names = ARRAY_SIZE(ipmmu_dev_names),
+};
+
+static struct platform_device ipmmu_device = {
+       .name           = "ipmmu",
+       .id             = -1,
+       .dev = {
+               .platform_data = &ipmmu_platform_data,
+       },
+       .resource       = ipmmu_resources,
+       .num_resources  = ARRAY_SIZE(ipmmu_resources),
+};
+
 static struct platform_device *sh73a0_early_devices_dt[] __initdata = {
        &scif0_device,
        &scif1_device,
@@ -796,6 +826,7 @@ static struct platform_device *sh73a0_early_devices_dt[] __initdata = {
 static struct platform_device *sh73a0_early_devices[] __initdata = {
        &tmu00_device,
        &tmu01_device,
+       &ipmmu_device,
 };
 
 static struct platform_device *sh73a0_late_devices[] __initdata = {