aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorHideki EIRAKU <hdk@igel.co.jp>2013-01-21 05:54:28 -0500
committerJoerg Roedel <joro@8bytes.org>2013-02-06 04:59:31 -0500
commit9a27dee73f558a026e9bbfb5f8af6ae7ba6b7bdc (patch)
treef5be0b81d629614ad75f8f67651c9d847eb6906f /arch/arm/mach-shmobile
parent3cfb8439e4799896eae22743463f11fb0cc2f0a4 (diff)
ARM: mach-shmobile: sh73a0: 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-sh73a0.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index db99a4ade80c..36c2b2ec2f33 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -30,6 +30,7 @@
30#include <linux/sh_dma.h> 30#include <linux/sh_dma.h>
31#include <linux/sh_intc.h> 31#include <linux/sh_intc.h>
32#include <linux/sh_timer.h> 32#include <linux/sh_timer.h>
33#include <linux/platform_data/sh_ipmmu.h>
33#include <mach/dma-register.h> 34#include <mach/dma-register.h>
34#include <mach/hardware.h> 35#include <mach/hardware.h>
35#include <mach/irqs.h> 36#include <mach/irqs.h>
@@ -754,6 +755,35 @@ static struct platform_device pmu_device = {
754 .resource = pmu_resources, 755 .resource = pmu_resources,
755}; 756};
756 757
758/* an IPMMU module for ICB */
759static struct resource ipmmu_resources[] = {
760 [0] = {
761 .name = "IPMMU",
762 .start = 0xfe951000,
763 .end = 0xfe9510ff,
764 .flags = IORESOURCE_MEM,
765 },
766};
767
768static const char * const ipmmu_dev_names[] = {
769 "sh_mobile_lcdc_fb.0",
770};
771
772static struct shmobile_ipmmu_platform_data ipmmu_platform_data = {
773 .dev_names = ipmmu_dev_names,
774 .num_dev_names = ARRAY_SIZE(ipmmu_dev_names),
775};
776
777static struct platform_device ipmmu_device = {
778 .name = "ipmmu",
779 .id = -1,
780 .dev = {
781 .platform_data = &ipmmu_platform_data,
782 },
783 .resource = ipmmu_resources,
784 .num_resources = ARRAY_SIZE(ipmmu_resources),
785};
786
757static struct platform_device *sh73a0_early_devices[] __initdata = { 787static struct platform_device *sh73a0_early_devices[] __initdata = {
758 &scif0_device, 788 &scif0_device,
759 &scif1_device, 789 &scif1_device,
@@ -767,6 +797,7 @@ static struct platform_device *sh73a0_early_devices[] __initdata = {
767 &cmt10_device, 797 &cmt10_device,
768 &tmu00_device, 798 &tmu00_device,
769 &tmu01_device, 799 &tmu01_device,
800 &ipmmu_device,
770}; 801};
771 802
772static struct platform_device *sh73a0_late_devices[] __initdata = { 803static struct platform_device *sh73a0_late_devices[] __initdata = {