* [PATCH] ARM: at91: remove NEED_MACH_IO_H
@ 2015-03-02 13:09 Arnd Bergmann
2015-03-02 13:22 ` Alexandre Belloni
2015-03-02 14:29 ` Alexandre Belloni
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2015-03-02 13:09 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
----
I've found this patch in an old git tree of mine. I think it's still needed,
but see for yourselves.
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4db6c803eaf2..b2798e25829a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -351,7 +351,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
diff --git a/arch/arm/mach-at91/include/mach/io.h b/arch/arm/mach-at91/include/mach/io.h
deleted file mode 100644
index 2d9ca0455745..000000000000
--- a/arch/arm/mach-at91/include/mach/io.h
+++ /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
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index bfb799c7b343..a2b677a8abb5 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -318,12 +318,10 @@ static int at91_cf_probe(struct platform_device *pdev)
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;
+ cf->socket.io_offset = 0;
+ status = pci_ioremap_io(0, 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")) {
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ARM: at91: remove NEED_MACH_IO_H
2015-03-02 13:09 [PATCH] ARM: at91: remove NEED_MACH_IO_H Arnd Bergmann
@ 2015-03-02 13:22 ` Alexandre Belloni
2015-03-02 19:33 ` Arnd Bergmann
2015-03-02 14:29 ` Alexandre Belloni
1 sibling, 1 reply; 4+ messages in thread
From: Alexandre Belloni @ 2015-03-02 13:22 UTC (permalink / raw)
To: linux-arm-kernel
On 02/03/2015 at 14:09:57 +0100, Arnd Bergmann wrote :
> 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.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ----
> I've found this patch in an old git tree of mine. I think it's still needed,
> but see for yourselves.
>
Do you think we can take it through the at91 tree? I think my previous
patch went through arm-soc.
If yes, I'll include it in the multiplatform series to reduce the number
of conflicts in Kconfig.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: at91: remove NEED_MACH_IO_H
2015-03-02 13:09 [PATCH] ARM: at91: remove NEED_MACH_IO_H Arnd Bergmann
2015-03-02 13:22 ` Alexandre Belloni
@ 2015-03-02 14:29 ` Alexandre Belloni
1 sibling, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2015-03-02 14:29 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On 02/03/2015 at 14:09:57 +0100, Arnd Bergmann wrote :
> 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.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ----
> I've found this patch in an old git tree of mine. I think it's still needed,
> but see for yourselves.
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 4db6c803eaf2..b2798e25829a 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -351,7 +351,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
That also needs:
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index c74a44324e5b..7ecde7de69da 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -81,6 +81,7 @@ config SOC_AT91RM9200
select CPU_ARM920T
select GENERIC_CLOCKEVENTS
select HAVE_AT91_USB_CLK
+ select MIGHT_HAVE_PCI
config SOC_AT91SAM9
bool "AT91SAM9"
diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
index 3bb49252a098..075d5cd4c5ab 100644
--- a/drivers/pcmcia/Kconfig
+++ b/drivers/pcmcia/Kconfig
@@ -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
I'll amend the patch if you agree.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ARM: at91: remove NEED_MACH_IO_H
2015-03-02 13:22 ` Alexandre Belloni
@ 2015-03-02 19:33 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2015-03-02 19:33 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 02 March 2015 14:22:34 Alexandre Belloni wrote:
> On 02/03/2015 at 14:09:57 +0100, Arnd Bergmann wrote :
> > 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.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ----
> > I've found this patch in an old git tree of mine. I think it's still needed,
> > but see for yourselves.
> >
>
> Do you think we can take it through the at91 tree? I think my previous
> patch went through arm-soc.
>
> If yes, I'll include it in the multiplatform series to reduce the number
> of conflicts in Kconfig.
Yes, I think that would be good.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-02 19:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-02 13:09 [PATCH] ARM: at91: remove NEED_MACH_IO_H Arnd Bergmann
2015-03-02 13:22 ` Alexandre Belloni
2015-03-02 19:33 ` Arnd Bergmann
2015-03-02 14:29 ` Alexandre Belloni
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).