diff options
author | Hideki EIRAKU <hdk@igel.co.jp> | 2013-01-21 19:54:29 +0900 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2013-02-06 10:59:45 +0100 |
commit | f671e0224a7f6432abdd9935bc34d959f5a67e21 (patch) | |
tree | d873f255ce8c2fe41eb769094988cca0fa7fd3d1 /arch | |
parent | 9a27dee73f558a026e9bbfb5f8af6ae7ba6b7bdc (diff) |
ARM: mach-shmobile: r8a7740: Add IPMMU device
This patch adds an IPMMU device and notifies the IPMMU driver which
devices are connected via the IPMMU module. All devices connected to the main
memory bus via the IPMMU module MUST be registered when SHMOBILE_IPMMU and
SHMOBILE_IOMMU are enabled because physical address cannot be used
while the IPMMU module's MMU function is enabled.
Signed-off-by: Hideki EIRAKU <hdk@igel.co.jp>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7740.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 095222469d0..b85bea517d9 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c @@ -28,6 +28,7 @@ #include <linux/sh_dma.h> #include <linux/sh_timer.h> #include <linux/dma-mapping.h> +#include <linux/platform_data/sh_ipmmu.h> #include <mach/dma-register.h> #include <mach/r8a7740.h> #include <mach/pm-rmobile.h> @@ -262,6 +263,37 @@ static struct platform_device cmt10_device = { .num_resources = ARRAY_SIZE(cmt10_resources), }; +/* IPMMUI (an IPMMU module for ICB/LMB) */ +static struct resource ipmmu_resources[] = { + [0] = { + .name = "IPMMUI", + .start = 0xfe951000, + .end = 0xfe9510ff, + .flags = IORESOURCE_MEM, + }, +}; + +static const char * const ipmmu_dev_names[] = { + "sh_mobile_lcdc_fb.0", + "sh_mobile_lcdc_fb.1", + "sh_mobile_ceu.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 *r8a7740_early_devices[] __initdata = { &scif0_device, &scif1_device, @@ -273,6 +305,7 @@ static struct platform_device *r8a7740_early_devices[] __initdata = { &scif7_device, &scifb_device, &cmt10_device, + &ipmmu_device, }; /* DMA */ |