diff options
author | Rob Herring <rob.herring@calxeda.com> | 2012-04-04 18:48:04 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-04-05 14:29:55 -0400 |
commit | 1ac02d795889d1828a66d4b3a3fd66492d1d7cf2 (patch) | |
tree | e77b927029ba0280754936c5a75941bfdfa8ec8d /arch | |
parent | 00bd60fe33f3b9e0d790a5e3eebbaa50ac89ead2 (diff) |
ARM: fix __io macro for PCMCIA
With commit c334bc1 (ARM: make mach/io.h include optional), PCMCIA was
broken. PCMCIA depends on __io() returning a valid i/o address, and most
ARM platforms require IO_SPACE_LIMIT be set to 0xffffffff for PCMCIA. This
needs a better fix with a fixed i/o address mapping, but for now we just
restore things to the previous behavior.
This fixes at91, omap1, pxa and sa11xx. pxa needs io.h if PCI is enabled,
but PCMCIA is not. sa11xx already has IO_SPACE_LIMIT set to 0xffffffff,
so it doesn't need an io.h.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Joachim Eastwood <joachim.eastwood@jotron.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Tested-by: Paul Parsons <lost.distance@yahoo.com> (pxa270)
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/io.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/io.h | 27 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/io.h | 45 | ||||
-rw-r--r-- | arch/arm/mach-pxa/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/io.h | 17 | ||||
-rw-r--r-- | arch/arm/plat-omap/Kconfig | 1 |
7 files changed, 93 insertions, 1 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 93180845ae16..cf006d40342c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -338,6 +338,7 @@ config ARCH_AT91 | |||
338 | select HAVE_CLK | 338 | select HAVE_CLK |
339 | select CLKDEV_LOOKUP | 339 | select CLKDEV_LOOKUP |
340 | select IRQ_DOMAIN | 340 | select IRQ_DOMAIN |
341 | select NEED_MACH_IO_H if PCCARD | ||
341 | help | 342 | help |
342 | This enables support for systems based on the Atmel AT91RM9200, | 343 | This enables support for systems based on the Atmel AT91RM9200, |
343 | AT91SAM9 processors. | 344 | AT91SAM9 processors. |
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index df0ac0bb39aa..9af5563dd3eb 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -119,7 +119,7 @@ static inline void __iomem *__typesafe_io(unsigned long addr) | |||
119 | #ifdef CONFIG_NEED_MACH_IO_H | 119 | #ifdef CONFIG_NEED_MACH_IO_H |
120 | #include <mach/io.h> | 120 | #include <mach/io.h> |
121 | #else | 121 | #else |
122 | #define __io(a) ({ (void)(a); __typesafe_io(0); }) | 122 | #define __io(a) __typesafe_io((a) & IO_SPACE_LIMIT) |
123 | #endif | 123 | #endif |
124 | 124 | ||
125 | /* | 125 | /* |
diff --git a/arch/arm/mach-at91/include/mach/io.h b/arch/arm/mach-at91/include/mach/io.h new file mode 100644 index 000000000000..2d9ca0455745 --- /dev/null +++ b/arch/arm/mach-at91/include/mach/io.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/include/mach/io.h | ||
3 | * | ||
4 | * Copyright (C) 2003 SAN People | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef __ASM_ARCH_IO_H | ||
22 | #define __ASM_ARCH_IO_H | ||
23 | |||
24 | #define IO_SPACE_LIMIT 0xFFFFFFFF | ||
25 | #define __io(a) __typesafe_io(a) | ||
26 | |||
27 | #endif | ||
diff --git a/arch/arm/mach-omap1/include/mach/io.h b/arch/arm/mach-omap1/include/mach/io.h new file mode 100644 index 000000000000..ce4f8005b26f --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/io.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/io.h | ||
3 | * | ||
4 | * IO definitions for TI OMAP processors and boards | ||
5 | * | ||
6 | * Copied from arch/arm/mach-sa1100/include/mach/io.h | ||
7 | * Copyright (C) 1997-1999 Russell King | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | * | ||
14 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
15 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
16 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
17 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
20 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
21 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
24 | * | ||
25 | * You should have received a copy of the GNU General Public License along | ||
26 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
27 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
28 | * | ||
29 | * Modifications: | ||
30 | * 06-12-1997 RMK Created. | ||
31 | * 07-04-1999 RMK Major cleanup | ||
32 | */ | ||
33 | |||
34 | #ifndef __ASM_ARM_ARCH_IO_H | ||
35 | #define __ASM_ARM_ARCH_IO_H | ||
36 | |||
37 | #define IO_SPACE_LIMIT 0xffffffff | ||
38 | |||
39 | /* | ||
40 | * We don't actually have real ISA nor PCI buses, but there is so many | ||
41 | * drivers out there that might just work if we fake them... | ||
42 | */ | ||
43 | #define __io(a) __typesafe_io(a) | ||
44 | |||
45 | #endif | ||
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 109ccd2a8885..fe2d1f80ef50 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -113,6 +113,7 @@ config MACH_ARMCORE | |||
113 | select IWMMXT | 113 | select IWMMXT |
114 | select PXA25x | 114 | select PXA25x |
115 | select MIGHT_HAVE_PCI | 115 | select MIGHT_HAVE_PCI |
116 | select NEED_MACH_IO_H if PCI | ||
116 | 117 | ||
117 | config MACH_EM_X270 | 118 | config MACH_EM_X270 |
118 | bool "CompuLab EM-x270 platform" | 119 | bool "CompuLab EM-x270 platform" |
diff --git a/arch/arm/mach-pxa/include/mach/io.h b/arch/arm/mach-pxa/include/mach/io.h new file mode 100644 index 000000000000..cd78b7fe3567 --- /dev/null +++ b/arch/arm/mach-pxa/include/mach/io.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-pxa/include/mach/io.h | ||
3 | * | ||
4 | * Copied from asm/arch/sa1100/io.h | ||
5 | */ | ||
6 | #ifndef __ASM_ARM_ARCH_IO_H | ||
7 | #define __ASM_ARM_ARCH_IO_H | ||
8 | |||
9 | #define IO_SPACE_LIMIT 0xffffffff | ||
10 | |||
11 | /* | ||
12 | * We don't actually have real ISA nor PCI buses, but there is so many | ||
13 | * drivers out there that might just work if we fake them... | ||
14 | */ | ||
15 | #define __io(a) __typesafe_io(a) | ||
16 | |||
17 | #endif | ||
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index ce1e9b96ba1a..ad95c7a5d009 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -17,6 +17,7 @@ config ARCH_OMAP1 | |||
17 | select IRQ_DOMAIN | 17 | select IRQ_DOMAIN |
18 | select HAVE_IDE | 18 | select HAVE_IDE |
19 | select NEED_MACH_MEMORY_H | 19 | select NEED_MACH_MEMORY_H |
20 | select NEED_MACH_IO_H if PCCARD | ||
20 | help | 21 | help |
21 | "Systems based on omap7xx, omap15xx or omap16xx" | 22 | "Systems based on omap7xx, omap15xx or omap16xx" |
22 | 23 | ||