ARM: at91: remove NEED_MACH_IO_H
authorArnd Bergmann <arnd@arndb.de>
Thu, 12 Mar 2015 14:54:23 +0000 (15:54 +0100)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Fri, 13 Mar 2015 14:11:04 +0000 (15:11 +0100)
The mach/io.h header on at91 is used to support a nonstandard I/O space
window for the cf card driver. This changes the driver to use pci_ioremap_io
in order to have the standard location, and then removes the custom
mach/io.h.

[alexandre.belloni@free-electrons.com: Added PCI dependency]
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
arch/arm/Kconfig
arch/arm/mach-at91/Kconfig
arch/arm/mach-at91/include/mach/io.h [deleted file]
drivers/pcmcia/Kconfig
drivers/pcmcia/at91_cf.c

index 9f1f09a2bc9bf28894777c08d6968d7faeba55a6..e7ce6612bc42442b82ee6cd860d51eb9d25958c7 100644 (file)
@@ -361,7 +361,6 @@ config ARCH_AT91
        select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
        select IRQ_DOMAIN
-       select NEED_MACH_IO_H if PCCARD
        select PINCTRL
        select PINCTRL_AT91
        select USE_OF
index 89276fb0052a9ce0255c44036fee78247158d06c..4da6bae047f3e1ed3b5fa4915590a4e08236e43b 100644 (file)
@@ -81,6 +81,7 @@ config SOC_AT91RM9200
        select CPU_ARM920T
        select GENERIC_CLOCKEVENTS
        select HAVE_AT91_USB_CLK
+       select MIGHT_HAVE_PCI
        select SRAM if PM
 
 config SOC_AT91SAM9
diff --git a/arch/arm/mach-at91/include/mach/io.h b/arch/arm/mach-at91/include/mach/io.h
deleted file mode 100644 (file)
index 2d9ca04..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * arch/arm/mach-at91/include/mach/io.h
- *
- *  Copyright (C) 2003 SAN People
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __ASM_ARCH_IO_H
-#define __ASM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT         0xFFFFFFFF
-#define __io(a)                        __typesafe_io(a)
-
-#endif
index 3bb49252a098b0b3d4c72b0895044c538d2af17d..075d5cd4c5ab4759eb376d8e2d0020e28dd64437 100644 (file)
@@ -278,6 +278,7 @@ config BFIN_CFPCMCIA
 
 config AT91_CF
        tristate "AT91 CompactFlash Controller"
+       depends on PCI
        depends on PCMCIA && ARCH_AT91
        depends on !ARCH_MULTIPLATFORM
        help
index bfb799c7b343a055edd97b621c1f85f8ed79e873..e7775a41ae5d11f397012194e20daa1ebf05d9b9 100644 (file)
@@ -317,13 +317,14 @@ static int at91_cf_probe(struct platform_device *pdev)
        } else
                cf->socket.pci_irq = nr_irqs + 1;
 
-       /* pcmcia layer only remaps "real" memory not iospace */
-       cf->socket.io_offset = (unsigned long) devm_ioremap(&pdev->dev,
-                                       cf->phys_baseaddr + CF_IO_PHYS, SZ_2K);
-       if (!cf->socket.io_offset) {
-               status = -ENXIO;
+       /*
+        * pcmcia layer only remaps "real" memory not iospace
+        * io_offset is set to 0x10000 to avoid the check in static_find_io().
+        * */
+       cf->socket.io_offset = 0x10000;
+       status = pci_ioremap_io(0x10000, cf->phys_baseaddr + CF_IO_PHYS);
+       if (status)
                goto fail0a;
-       }
 
        /* reserve chip-select regions */
        if (!devm_request_mem_region(&pdev->dev, io->start, resource_size(io), "at91_cf")) {