diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 14:09:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 14:09:17 -0500 |
commit | f6c0ffa8f0b0781f4954cb06f0a81d6c10c1b434 (patch) | |
tree | f99190661706d18f129497a4ef2d37822c9c34db /arch/arm/mach-shmobile | |
parent | 42a0a1b0fd343888c59afc8b243a77bcec2cc11c (diff) | |
parent | 604542b824f72fa5d7fd977af277538c1e15b5f0 (diff) |
Merge tag 'iommu-updates-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull IOMMU Updates from Joerg Roedel:
"Besides some fixes and cleanups in the code there are three more
important changes to point out this time:
* New IOMMU driver for the ARM SHMOBILE platform
* An IOMMU-API extension for non-paging IOMMUs (required for
upcoming PAMU driver)
* Rework of the way the Tegra IOMMU driver accesses its
registetrs - register windows are easier to extend now.
There are also a few changes to non-iommu code, but that is acked by
the respective maintainers."
* tag 'iommu-updates-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (23 commits)
iommu/tegra: assume CONFIG_OF in SMMU driver
iommu/tegra: assume CONFIG_OF in gart driver
iommu/amd: Remove redundant NULL check before dma_ops_domain_free().
iommu/amd: Initialize device table after dma_ops
iommu/vt-d: Zero out allocated memory in dmar_enable_qi
iommu/tegra: smmu: Fix incorrect mask for regbase
iommu/exynos: Make exynos_sysmmu_disable static
ARM: mach-shmobile: r8a7740: Add IPMMU device
ARM: mach-shmobile: sh73a0: Add IPMMU device
ARM: mach-shmobile: sh7372: Add IPMMU device
iommu/shmobile: Add iommu driver for Renesas IPMMU modules
iommu: Add DOMAIN_ATTR_WINDOWS domain attribute
iommu: Add domain window handling functions
iommu: Implement DOMAIN_ATTR_PAGING attribute
iommu: Check for valid pgsize_bitmap in iommu_map/unmap
iommu: Make sure DOMAIN_ATTR_MAX is really the maximum
iommu/tegra: smmu: Change SMMU's dependency on ARCH_TEGRA
iommu/tegra: smmu: Use helper function to check for valid register offset
iommu/tegra: smmu: Support variable MMIO ranges/blocks
iommu/tegra: Add missing spinlock initialization
...
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7740.c | 33 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh7372.c | 39 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh73a0.c | 31 |
3 files changed, 103 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 30ac79c7c687..8b85d4d8fab6 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/serial_sci.h> | 27 | #include <linux/serial_sci.h> |
28 | #include <linux/sh_dma.h> | 28 | #include <linux/sh_dma.h> |
29 | #include <linux/sh_timer.h> | 29 | #include <linux/sh_timer.h> |
30 | #include <linux/platform_data/sh_ipmmu.h> | ||
30 | #include <mach/dma-register.h> | 31 | #include <mach/dma-register.h> |
31 | #include <mach/r8a7740.h> | 32 | #include <mach/r8a7740.h> |
32 | #include <mach/pm-rmobile.h> | 33 | #include <mach/pm-rmobile.h> |
@@ -378,6 +379,37 @@ static struct platform_device tmu02_device = { | |||
378 | .num_resources = ARRAY_SIZE(tmu02_resources), | 379 | .num_resources = ARRAY_SIZE(tmu02_resources), |
379 | }; | 380 | }; |
380 | 381 | ||
382 | /* IPMMUI (an IPMMU module for ICB/LMB) */ | ||
383 | static struct resource ipmmu_resources[] = { | ||
384 | [0] = { | ||
385 | .name = "IPMMUI", | ||
386 | .start = 0xfe951000, | ||
387 | .end = 0xfe9510ff, | ||
388 | .flags = IORESOURCE_MEM, | ||
389 | }, | ||
390 | }; | ||
391 | |||
392 | static const char * const ipmmu_dev_names[] = { | ||
393 | "sh_mobile_lcdc_fb.0", | ||
394 | "sh_mobile_lcdc_fb.1", | ||
395 | "sh_mobile_ceu.0", | ||
396 | }; | ||
397 | |||
398 | static struct shmobile_ipmmu_platform_data ipmmu_platform_data = { | ||
399 | .dev_names = ipmmu_dev_names, | ||
400 | .num_dev_names = ARRAY_SIZE(ipmmu_dev_names), | ||
401 | }; | ||
402 | |||
403 | static struct platform_device ipmmu_device = { | ||
404 | .name = "ipmmu", | ||
405 | .id = -1, | ||
406 | .dev = { | ||
407 | .platform_data = &ipmmu_platform_data, | ||
408 | }, | ||
409 | .resource = ipmmu_resources, | ||
410 | .num_resources = ARRAY_SIZE(ipmmu_resources), | ||
411 | }; | ||
412 | |||
381 | static struct platform_device *r8a7740_early_devices[] __initdata = { | 413 | static struct platform_device *r8a7740_early_devices[] __initdata = { |
382 | &scif0_device, | 414 | &scif0_device, |
383 | &scif1_device, | 415 | &scif1_device, |
@@ -392,6 +424,7 @@ static struct platform_device *r8a7740_early_devices[] __initdata = { | |||
392 | &tmu00_device, | 424 | &tmu00_device, |
393 | &tmu01_device, | 425 | &tmu01_device, |
394 | &tmu02_device, | 426 | &tmu02_device, |
427 | &ipmmu_device, | ||
395 | }; | 428 | }; |
396 | 429 | ||
397 | /* DMA */ | 430 | /* DMA */ |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index d2079d5e3334..59c7146bf66f 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> |
@@ -1008,6 +1009,43 @@ static struct platform_device spu1_device = { | |||
1008 | .num_resources = ARRAY_SIZE(spu1_resources), | 1009 | .num_resources = ARRAY_SIZE(spu1_resources), |
1009 | }; | 1010 | }; |
1010 | 1011 | ||
1012 | /* IPMMUI (an IPMMU module for ICB/LMB) */ | ||
1013 | static struct resource ipmmu_resources[] = { | ||
1014 | [0] = { | ||
1015 | .name = "IPMMUI", | ||
1016 | .start = 0xfe951000, | ||
1017 | .end = 0xfe9510ff, | ||
1018 | .flags = IORESOURCE_MEM, | ||
1019 | }, | ||
1020 | }; | ||
1021 | |||
1022 | static const char * const ipmmu_dev_names[] = { | ||
1023 | "sh_mobile_lcdc_fb.0", | ||
1024 | "sh_mobile_lcdc_fb.1", | ||
1025 | "sh_mobile_ceu.0", | ||
1026 | "uio_pdrv_genirq.0", | ||
1027 | "uio_pdrv_genirq.1", | ||
1028 | "uio_pdrv_genirq.2", | ||
1029 | "uio_pdrv_genirq.3", | ||
1030 | "uio_pdrv_genirq.4", | ||
1031 | "uio_pdrv_genirq.5", | ||
1032 | }; | ||
1033 | |||
1034 | static struct shmobile_ipmmu_platform_data ipmmu_platform_data = { | ||
1035 | .dev_names = ipmmu_dev_names, | ||
1036 | .num_dev_names = ARRAY_SIZE(ipmmu_dev_names), | ||
1037 | }; | ||
1038 | |||
1039 | static struct platform_device ipmmu_device = { | ||
1040 | .name = "ipmmu", | ||
1041 | .id = -1, | ||
1042 | .dev = { | ||
1043 | .platform_data = &ipmmu_platform_data, | ||
1044 | }, | ||
1045 | .resource = ipmmu_resources, | ||
1046 | .num_resources = ARRAY_SIZE(ipmmu_resources), | ||
1047 | }; | ||
1048 | |||
1011 | static struct platform_device *sh7372_early_devices[] __initdata = { | 1049 | static struct platform_device *sh7372_early_devices[] __initdata = { |
1012 | &scif0_device, | 1050 | &scif0_device, |
1013 | &scif1_device, | 1051 | &scif1_device, |
@@ -1019,6 +1057,7 @@ static struct platform_device *sh7372_early_devices[] __initdata = { | |||
1019 | &cmt2_device, | 1057 | &cmt2_device, |
1020 | &tmu00_device, | 1058 | &tmu00_device, |
1021 | &tmu01_device, | 1059 | &tmu01_device, |
1060 | &ipmmu_device, | ||
1022 | }; | 1061 | }; |
1023 | 1062 | ||
1024 | static struct platform_device *sh7372_late_devices[] __initdata = { | 1063 | static struct platform_device *sh7372_late_devices[] __initdata = { |
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 2ecd6681692f..bdab575f88bc 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/sh_dma.h> | 31 | #include <linux/sh_dma.h> |
32 | #include <linux/sh_intc.h> | 32 | #include <linux/sh_intc.h> |
33 | #include <linux/sh_timer.h> | 33 | #include <linux/sh_timer.h> |
34 | #include <linux/platform_data/sh_ipmmu.h> | ||
34 | #include <mach/dma-register.h> | 35 | #include <mach/dma-register.h> |
35 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
36 | #include <mach/irqs.h> | 37 | #include <mach/irqs.h> |
@@ -780,6 +781,35 @@ static struct platform_device pmu_device = { | |||
780 | .resource = pmu_resources, | 781 | .resource = pmu_resources, |
781 | }; | 782 | }; |
782 | 783 | ||
784 | /* an IPMMU module for ICB */ | ||
785 | static struct resource ipmmu_resources[] = { | ||
786 | [0] = { | ||
787 | .name = "IPMMU", | ||
788 | .start = 0xfe951000, | ||
789 | .end = 0xfe9510ff, | ||
790 | .flags = IORESOURCE_MEM, | ||
791 | }, | ||
792 | }; | ||
793 | |||
794 | static const char * const ipmmu_dev_names[] = { | ||
795 | "sh_mobile_lcdc_fb.0", | ||
796 | }; | ||
797 | |||
798 | static struct shmobile_ipmmu_platform_data ipmmu_platform_data = { | ||
799 | .dev_names = ipmmu_dev_names, | ||
800 | .num_dev_names = ARRAY_SIZE(ipmmu_dev_names), | ||
801 | }; | ||
802 | |||
803 | static struct platform_device ipmmu_device = { | ||
804 | .name = "ipmmu", | ||
805 | .id = -1, | ||
806 | .dev = { | ||
807 | .platform_data = &ipmmu_platform_data, | ||
808 | }, | ||
809 | .resource = ipmmu_resources, | ||
810 | .num_resources = ARRAY_SIZE(ipmmu_resources), | ||
811 | }; | ||
812 | |||
783 | static struct platform_device *sh73a0_early_devices_dt[] __initdata = { | 813 | static struct platform_device *sh73a0_early_devices_dt[] __initdata = { |
784 | &scif0_device, | 814 | &scif0_device, |
785 | &scif1_device, | 815 | &scif1_device, |
@@ -796,6 +826,7 @@ static struct platform_device *sh73a0_early_devices_dt[] __initdata = { | |||
796 | static struct platform_device *sh73a0_early_devices[] __initdata = { | 826 | static struct platform_device *sh73a0_early_devices[] __initdata = { |
797 | &tmu00_device, | 827 | &tmu00_device, |
798 | &tmu01_device, | 828 | &tmu01_device, |
829 | &ipmmu_device, | ||
799 | }; | 830 | }; |
800 | 831 | ||
801 | static struct platform_device *sh73a0_late_devices[] __initdata = { | 832 | static struct platform_device *sh73a0_late_devices[] __initdata = { |