diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2009-05-28 17:16:04 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-05-28 17:16:04 -0400 |
commit | 44169075e6eaa87bab6a296209d8d0610879b394 (patch) | |
tree | 4aca7ea61215bb50d647476de30c558859c2f2f3 /arch/arm/plat-omap/io.c | |
parent | 7419045016e5002b3ccee72b28e41bf53dca68f2 (diff) |
ARM: OMAP4: Add minimal support for omap4
This patch adds the support for OMAP4. The platform and machine specific
headers and sources updated for OMAP4430 SDP platform.
OMAP4430 is Texas Instrument's SOC based on ARM Cortex-A9 SMP architecture.
It's a dual core SOC with GIC used for interrupt handling and SCU for cache
coherency.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/io.c')
-rw-r--r-- | arch/arm/plat-omap/io.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c index af326efc1ad3..9b42d72d96cf 100644 --- a/arch/arm/plat-omap/io.c +++ b/arch/arm/plat-omap/io.c | |||
@@ -1,3 +1,14 @@ | |||
1 | /* | ||
2 | * Common io.c file | ||
3 | * This file is created by Russell King <rmk+kernel@arm.linux.org.uk> | ||
4 | * | ||
5 | * Copyright (C) 2009 Texas Instruments | ||
6 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
1 | #include <linux/module.h> | 12 | #include <linux/module.h> |
2 | #include <linux/io.h> | 13 | #include <linux/io.h> |
3 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
@@ -7,6 +18,7 @@ | |||
7 | #include <mach/omap16xx.h> | 18 | #include <mach/omap16xx.h> |
8 | #include <mach/omap24xx.h> | 19 | #include <mach/omap24xx.h> |
9 | #include <mach/omap34xx.h> | 20 | #include <mach/omap34xx.h> |
21 | #include <mach/omap44xx.h> | ||
10 | 22 | ||
11 | #define BETWEEN(p,st,sz) ((p) >= (st) && (p) < ((st) + (sz))) | 23 | #define BETWEEN(p,st,sz) ((p) >= (st) && (p) < ((st) + (sz))) |
12 | #define XLATE(p,pst,vst) ((void __iomem *)((p) - (pst) + (vst))) | 24 | #define XLATE(p,pst,vst) ((void __iomem *)((p) - (pst) + (vst))) |
@@ -92,7 +104,22 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type) | |||
92 | return XLATE(p, L4_EMU_34XX_PHYS, L4_EMU_34XX_VIRT); | 104 | return XLATE(p, L4_EMU_34XX_PHYS, L4_EMU_34XX_VIRT); |
93 | } | 105 | } |
94 | #endif | 106 | #endif |
95 | 107 | #ifdef CONFIG_ARCH_OMAP4 | |
108 | if (cpu_is_omap44xx()) { | ||
109 | if (BETWEEN(p, L3_44XX_PHYS, L3_44XX_SIZE)) | ||
110 | return XLATE(p, L3_44XX_PHYS, L3_44XX_VIRT); | ||
111 | if (BETWEEN(p, L4_44XX_PHYS, L4_44XX_SIZE)) | ||
112 | return XLATE(p, L4_44XX_PHYS, L4_44XX_VIRT); | ||
113 | if (BETWEEN(p, L4_WK_44XX_PHYS, L4_WK_44XX_SIZE)) | ||
114 | return XLATE(p, L4_WK_44XX_PHYS, L4_WK_44XX_VIRT); | ||
115 | if (BETWEEN(p, OMAP44XX_GPMC_PHYS, OMAP44XX_GPMC_SIZE)) | ||
116 | return XLATE(p, OMAP44XX_GPMC_PHYS, OMAP44XX_GPMC_VIRT); | ||
117 | if (BETWEEN(p, L4_PER_44XX_PHYS, L4_PER_44XX_SIZE)) | ||
118 | return XLATE(p, L4_PER_44XX_PHYS, L4_PER_44XX_VIRT); | ||
119 | if (BETWEEN(p, L4_EMU_44XX_PHYS, L4_EMU_44XX_SIZE)) | ||
120 | return XLATE(p, L4_EMU_44XX_PHYS, L4_EMU_44XX_VIRT); | ||
121 | } | ||
122 | #endif | ||
96 | return __arm_ioremap(p, size, type); | 123 | return __arm_ioremap(p, size, type); |
97 | } | 124 | } |
98 | EXPORT_SYMBOL(omap_ioremap); | 125 | EXPORT_SYMBOL(omap_ioremap); |