From: Arnd Bergmann <arnd@arndb.de>
To: Tony Lindgren <tony@atomide.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Walleij <linus.walleij@linaro.org>,
linux-kernel@vger.kernel.org,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 14/22] ARM: omap1: use pci_ioremap_io() for omap_cf
Date: Thu, 8 Aug 2019 23:22:23 +0200 [thread overview]
Message-ID: <20190808212234.2213262-15-arnd@arndb.de> (raw)
In-Reply-To: <20190808212234.2213262-1-arnd@arndb.de>
The ISA I/O space handling in omap_cf is incompatible with
PCI drivers in a multiplatform kernel, and requires a custom
mach/io.h.
Change the driver to use pci_ioremap_io() like PCI drivers do,
so the generic ioport access can work across platforms.
To actually use that code, we have to select CONFIG_PCI
here.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/Kconfig | 2 +-
arch/arm/mach-omap1/include/mach/io.h | 45 ---------------------------
drivers/pcmcia/omap_cf.c | 9 ++----
3 files changed, 4 insertions(+), 52 deletions(-)
delete mode 100644 arch/arm/mach-omap1/include/mach/io.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b7162ac8d756..8263fe7a5e64 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -496,13 +496,13 @@ config ARCH_OMAP1
select ARCH_OMAP
select CLKDEV_LOOKUP
select CLKSRC_MMIO
+ select FORCE_PCI if PCCARD
select GENERIC_CLOCKEVENTS
select GENERIC_IRQ_CHIP
select GENERIC_IRQ_MULTI_HANDLER
select GPIOLIB
select HAVE_IDE
select IRQ_DOMAIN
- select NEED_MACH_IO_H if PCCARD
select NEED_MACH_MEMORY_H
select SPARSE_IRQ
help
diff --git a/arch/arm/mach-omap1/include/mach/io.h b/arch/arm/mach-omap1/include/mach/io.h
deleted file mode 100644
index ce4f8005b26f..000000000000
--- a/arch/arm/mach-omap1/include/mach/io.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * arch/arm/mach-omap1/include/mach/io.h
- *
- * IO definitions for TI OMAP processors and boards
- *
- * Copied from arch/arm/mach-sa1100/include/mach/io.h
- * Copyright (C) 1997-1999 Russell King
- *
- * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Modifications:
- * 06-12-1997 RMK Created.
- * 07-04-1999 RMK Major cleanup
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * We don't actually have real ISA nor PCI buses, but there is so many
- * drivers out there that might just work if we fake them...
- */
-#define __io(a) __typesafe_io(a)
-
-#endif
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c
index 98df6473034d..9f8ad82f5fce 100644
--- a/drivers/pcmcia/omap_cf.c
+++ b/drivers/pcmcia/omap_cf.c
@@ -235,9 +235,9 @@ static int __init omap_cf_probe(struct platform_device *pdev)
cf->phys_cf = res->start;
/* pcmcia layer only remaps "real" memory */
- cf->socket.io_offset = (unsigned long)
- ioremap(cf->phys_cf + SZ_4K, SZ_2K);
- if (!cf->socket.io_offset)
+ cf->socket.io_offset = 0x10000;
+ status = pci_ioremap_io(cf->socket.io_offset, cf->phys_cf + SZ_4K);
+ if (status)
goto fail1;
if (!request_mem_region(cf->phys_cf, SZ_8K, driver_name))
@@ -281,8 +281,6 @@ static int __init omap_cf_probe(struct platform_device *pdev)
fail2:
release_mem_region(cf->phys_cf, SZ_8K);
fail1:
- if (cf->socket.io_offset)
- iounmap((void __iomem *) cf->socket.io_offset);
free_irq(irq, cf);
fail0:
kfree(cf);
@@ -296,7 +294,6 @@ static int __exit omap_cf_remove(struct platform_device *pdev)
cf->active = 0;
pcmcia_unregister_socket(&cf->socket);
del_timer_sync(&cf->timer);
- iounmap((void __iomem *) cf->socket.io_offset);
release_mem_region(cf->phys_cf, SZ_8K);
free_irq(cf->irq, cf);
kfree(cf);
--
2.20.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-08-08 21:33 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 21:22 [PATCH 00/22] ARM: omap1 multiplatform support Arnd Bergmann
2019-08-08 21:22 ` [PATCH 01/22] ARM: omap1: innovator: pass lcd control address as pdata Arnd Bergmann
2019-08-09 11:29 ` Bartlomiej Zolnierkiewicz
2019-08-08 21:22 ` [PATCH 02/22] ARM: omap1: make omapfb standalone compilable Arnd Bergmann
2019-08-09 11:32 ` Bartlomiej Zolnierkiewicz
2019-08-09 11:43 ` Arnd Bergmann
2019-08-09 14:36 ` Bartlomiej Zolnierkiewicz
2019-08-09 19:55 ` Arnd Bergmann
2019-08-12 9:21 ` Bartlomiej Zolnierkiewicz
2019-08-08 21:22 ` [PATCH 03/22] ARM: omap1: move omap15xx local bus handling to usb.c Arnd Bergmann
2019-08-09 5:32 ` Felipe Balbi
2019-08-10 10:28 ` Christoph Hellwig
2019-08-08 21:22 ` [PATCH 04/22] ARM: omap1: move ohci phy power handling to board files Arnd Bergmann
2019-08-08 21:22 ` [PATCH 05/22] ARM: omap1: move mach/usb.h to include/linux/soc Arnd Bergmann
2019-08-08 21:22 ` [PATCH 06/22] ARM: omap1: move some headers " Arnd Bergmann
2019-08-08 21:22 ` [PATCH 07/22] ARM: omap1: move perseus spi pinconf to board file Arnd Bergmann
2019-08-08 22:24 ` Mark Brown
2019-08-09 11:29 ` Arnd Bergmann
2019-08-09 12:01 ` Mark Brown
2019-08-08 21:22 ` [PATCH 08/22] ARM: omap1: move CF chipselect setup " Arnd Bergmann
2019-08-08 21:22 ` [PATCH 09/22] fbdev: omap: avoid using mach/*.h files Arnd Bergmann
2019-08-09 11:34 ` Bartlomiej Zolnierkiewicz
2019-08-08 21:22 ` [PATCH 10/22] usb: omap: avoid mach/*.h headers Arnd Bergmann
2019-08-09 5:38 ` Greg Kroah-Hartman
2019-08-08 21:22 ` [PATCH 11/22] clocksource: ti-dmtimer: avoid using mach/hardware.h Arnd Bergmann
2019-08-09 7:01 ` Daniel Lezcano
2019-08-09 7:33 ` Arnd Bergmann
2019-08-09 7:57 ` Daniel Lezcano
2019-08-08 21:22 ` [PATCH 12/22] serial: 8250/omap1: include linux/soc/ti/omap1-soc.h Arnd Bergmann
2019-08-08 21:22 ` [PATCH 13/22] input: omap: void using mach/*.h headers Arnd Bergmann
2019-08-08 21:42 ` Dmitry Torokhov
2019-08-08 21:46 ` Arnd Bergmann
2019-08-08 22:19 ` Dmitry Torokhov
2019-08-08 23:39 ` Sebastian Reichel
2019-08-09 11:23 ` Arnd Bergmann
2019-08-08 21:22 ` Arnd Bergmann [this message]
2019-08-13 10:36 ` [PATCH 14/22] ARM: omap1: use pci_ioremap_io() for omap_cf Tony Lindgren
2019-08-13 11:02 ` Arnd Bergmann
2019-08-13 18:11 ` Aaro Koskinen
2019-08-13 19:33 ` Arnd Bergmann
2019-08-14 7:49 ` Tony Lindgren
2019-08-14 10:36 ` Arnd Bergmann
2019-08-14 13:40 ` Tony Lindgren
2019-08-16 8:34 ` Aaro Koskinen
2019-08-27 16:33 ` Arnd Bergmann
2019-08-27 19:04 ` Aaro Koskinen
2019-08-28 13:02 ` Arnd Bergmann
2019-08-28 18:23 ` Aaro Koskinen
2019-08-28 18:45 ` Tony Lindgren
2019-08-08 21:41 ` [PATCH 15/22] ARM: omap1: move mach/*.h into mach directory Arnd Bergmann
2019-08-08 21:41 ` [PATCH 16/22] ARM: omap1: move clk support into a single file Arnd Bergmann
2019-08-08 21:41 ` [PATCH 17/22] ARM: omap1: remove some dead clock code Arnd Bergmann
2019-08-08 21:41 ` [PATCH 18/22] ARM: omap1: clk: rework 'struct clk' Arnd Bergmann
2019-08-08 21:41 ` [PATCH 19/22] ARM: omap1: clk: use common_clk-like callbacks Arnd Bergmann
2019-08-08 21:43 ` [PATCH 20/22] ARM: omap1: clk: use clk_init_data Arnd Bergmann
2019-08-08 21:43 ` [PATCH 21/22] ARM: omap1: use common clk framework Arnd Bergmann
2019-08-14 21:10 ` Aaro Koskinen
2019-08-15 7:10 ` Arnd Bergmann
2019-08-08 21:47 ` [PATCH 22/22] ARM: omap1: enable multiplatform Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190808212234.2213262-15-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=aaro.koskinen@iki.fi \
--cc=b.zolnierkie@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=tomi.valkeinen@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).