diff options
author | Hideki EIRAKU <hdk@igel.co.jp> | 2013-01-21 05:54:27 -0500 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2013-02-06 04:57:54 -0500 |
commit | 3cfb8439e4799896eae22743463f11fb0cc2f0a4 (patch) | |
tree | 7476fe8e843b969173a621f0e75c883d6b5c788d /arch/arm/mach-shmobile | |
parent | c2c460f7c148aa1a59630f61dac2481f1efb4f4e (diff) |
ARM: mach-shmobile: sh7372: 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/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh7372.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index c917882424a7..04ad98ece1f1 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/sh_timer.h> | 33 | #include <linux/sh_timer.h> |
34 | #include <linux/pm_domain.h> | 34 | #include <linux/pm_domain.h> |
35 | #include <linux/dma-mapping.h> | 35 | #include <linux/dma-mapping.h> |
36 | #include <linux/platform_data/sh_ipmmu.h> | ||
36 | #include <mach/dma-register.h> | 37 | #include <mach/dma-register.h> |
37 | #include <mach/hardware.h> | 38 | #include <mach/hardware.h> |
38 | #include <mach/irqs.h> | 39 | #include <mach/irqs.h> |
@@ -982,6 +983,43 @@ static struct platform_device spu1_device = { | |||
982 | .num_resources = ARRAY_SIZE(spu1_resources), | 983 | .num_resources = ARRAY_SIZE(spu1_resources), |
983 | }; | 984 | }; |
984 | 985 | ||
986 | /* IPMMUI (an IPMMU module for ICB/LMB) */ | ||
987 | static struct resource ipmmu_resources[] = { | ||
988 | [0] = { | ||
989 | .name = "IPMMUI", | ||
990 | .start = 0xfe951000, | ||
991 | .end = 0xfe9510ff, | ||
992 | .flags = IORESOURCE_MEM, | ||
993 | }, | ||
994 | }; | ||
995 | |||
996 | static const char * const ipmmu_dev_names[] = { | ||
997 | "sh_mobile_lcdc_fb.0", | ||
998 | "sh_mobile_lcdc_fb.1", | ||
999 | "sh_mobile_ceu.0", | ||
1000 | "uio_pdrv_genirq.0", | ||
1001 | "uio_pdrv_genirq.1", | ||
1002 | "uio_pdrv_genirq.2", | ||
1003 | "uio_pdrv_genirq.3", | ||
1004 | "uio_pdrv_genirq.4", | ||
1005 | "uio_pdrv_genirq.5", | ||
1006 | }; | ||
1007 | |||
1008 | static struct shmobile_ipmmu_platform_data ipmmu_platform_data = { | ||
1009 | .dev_names = ipmmu_dev_names, | ||
1010 | .num_dev_names = ARRAY_SIZE(ipmmu_dev_names), | ||
1011 | }; | ||
1012 | |||
1013 | static struct platform_device ipmmu_device = { | ||
1014 | .name = "ipmmu", | ||
1015 | .id = -1, | ||
1016 | .dev = { | ||
1017 | .platform_data = &ipmmu_platform_data, | ||
1018 | }, | ||
1019 | .resource = ipmmu_resources, | ||
1020 | .num_resources = ARRAY_SIZE(ipmmu_resources), | ||
1021 | }; | ||
1022 | |||
985 | static struct platform_device *sh7372_early_devices[] __initdata = { | 1023 | static struct platform_device *sh7372_early_devices[] __initdata = { |
986 | &scif0_device, | 1024 | &scif0_device, |
987 | &scif1_device, | 1025 | &scif1_device, |
@@ -993,6 +1031,7 @@ static struct platform_device *sh7372_early_devices[] __initdata = { | |||
993 | &cmt2_device, | 1031 | &cmt2_device, |
994 | &tmu00_device, | 1032 | &tmu00_device, |
995 | &tmu01_device, | 1033 | &tmu01_device, |
1034 | &ipmmu_device, | ||
996 | }; | 1035 | }; |
997 | 1036 | ||
998 | static struct platform_device *sh7372_late_devices[] __initdata = { | 1037 | static struct platform_device *sh7372_late_devices[] __initdata = { |