aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/Makefile5
-rw-r--r--arch/arm/mach-omap2/omap-iommu.c (renamed from arch/arm/mach-omap2/omap3-iommu.c)23
2 files changed, 14 insertions, 14 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 4b9fc57770d..7d2cf0f714c 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -89,10 +89,7 @@ obj-$(CONFIG_OMAP3_EMU) += emu.o
89obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o 89obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o
90mailbox_mach-objs := mailbox.o 90mailbox_mach-objs := mailbox.o
91 91
92iommu-y += iommu2.o 92obj-$(CONFIG_OMAP_IOMMU) := iommu2.o omap-iommu.o
93iommu-$(CONFIG_ARCH_OMAP3) += omap3-iommu.o
94
95obj-$(CONFIG_OMAP_IOMMU) += $(iommu-y)
96 93
97i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o 94i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
98obj-y += $(i2c-omap-m) $(i2c-omap-y) 95obj-y += $(i2c-omap-m) $(i2c-omap-y)
diff --git a/arch/arm/mach-omap2/omap3-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
index fbbcb5c8336..416a65d5c4a 100644
--- a/arch/arm/mach-omap2/omap3-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * omap iommu: omap3 device registration 2 * omap iommu: omap device registration
3 * 3 *
4 * Copyright (C) 2008-2009 Nokia Corporation 4 * Copyright (C) 2008-2009 Nokia Corporation
5 * 5 *
@@ -21,6 +21,7 @@ struct iommu_device {
21 struct resource res[2]; 21 struct resource res[2];
22}; 22};
23 23
24#ifdef CONFIG_ARCH_OMAP3
24static struct iommu_device devices[] = { 25static struct iommu_device devices[] = {
25 { 26 {
26 .base = 0x480bd400, 27 .base = 0x480bd400,
@@ -43,11 +44,13 @@ static struct iommu_device devices[] = {
43 }, 44 },
44#endif 45#endif
45}; 46};
47#endif
48
46#define NR_IOMMU_DEVICES ARRAY_SIZE(devices) 49#define NR_IOMMU_DEVICES ARRAY_SIZE(devices)
47 50
48static struct platform_device *omap3_iommu_pdev[NR_IOMMU_DEVICES]; 51static struct platform_device *omap_iommu_pdev[NR_IOMMU_DEVICES];
49 52
50static int __init omap3_iommu_init(void) 53static int __init omap_iommu_init(void)
51{ 54{
52 int i, err; 55 int i, err;
53 struct resource res[] = { 56 struct resource res[] = {
@@ -80,26 +83,26 @@ static int __init omap3_iommu_init(void)
80 err = platform_device_add(pdev); 83 err = platform_device_add(pdev);
81 if (err) 84 if (err)
82 goto err_out; 85 goto err_out;
83 omap3_iommu_pdev[i] = pdev; 86 omap_iommu_pdev[i] = pdev;
84 } 87 }
85 return 0; 88 return 0;
86 89
87err_out: 90err_out:
88 while (i--) 91 while (i--)
89 platform_device_put(omap3_iommu_pdev[i]); 92 platform_device_put(omap_iommu_pdev[i]);
90 return err; 93 return err;
91} 94}
92module_init(omap3_iommu_init); 95module_init(omap_iommu_init);
93 96
94static void __exit omap3_iommu_exit(void) 97static void __exit omap_iommu_exit(void)
95{ 98{
96 int i; 99 int i;
97 100
98 for (i = 0; i < NR_IOMMU_DEVICES; i++) 101 for (i = 0; i < NR_IOMMU_DEVICES; i++)
99 platform_device_unregister(omap3_iommu_pdev[i]); 102 platform_device_unregister(omap_iommu_pdev[i]);
100} 103}
101module_exit(omap3_iommu_exit); 104module_exit(omap_iommu_exit);
102 105
103MODULE_AUTHOR("Hiroshi DOYU"); 106MODULE_AUTHOR("Hiroshi DOYU");
104MODULE_DESCRIPTION("omap iommu: omap3 device registration"); 107MODULE_DESCRIPTION("omap iommu: omap device registration");
105MODULE_LICENSE("GPL v2"); 108MODULE_LICENSE("GPL v2");