Commit d5d9f7ac authored by Linus Walleij's avatar Linus Walleij
Browse files

ARM/ixp4xx: Make NEED_MACH_IO_H optional



In order to create a proper PCI driver for the IXP4xx
we need to make the old PCI driver and its reliance
on <mach/io.h> optional.

Create a new Kconfig symbol for the legacy PCI driver
IXP4XX_PCI_LEGACY and only activate NEED_MACH_IO_H
for this driver.

A few files need to be adjusted to explicitly include
the <mach/hardware.h> and <mach/cpu.h> headers that
they previously obtained implicitly using <linux/io.h>
that would include <mach/io.h> and in turn include
these two headers.

This breaks our reliance on the old PCI and indirect
PCI support so we can reimplement a proper purely
DT-based driver in the PCI subsystem.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khalasa@piap.pl>
Cc: Zoltan HERPAI <wigyori@uid0.hu>
Cc: Raylynn Knight <rayknight@me.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 713ce38d
...@@ -398,7 +398,8 @@ config ARCH_IXP4XX ...@@ -398,7 +398,8 @@ config ARCH_IXP4XX
select HAVE_PCI select HAVE_PCI
select IXP4XX_IRQ select IXP4XX_IRQ
select IXP4XX_TIMER select IXP4XX_TIMER
select NEED_MACH_IO_H # With the new PCI driver this is not needed
select NEED_MACH_IO_H if PCI_IXP4XX_LEGACY
select USB_EHCI_BIG_ENDIAN_DESC select USB_EHCI_BIG_ENDIAN_DESC
select USB_EHCI_BIG_ENDIAN_MMIO select USB_EHCI_BIG_ENDIAN_MMIO
help help
......
...@@ -20,7 +20,7 @@ config MACH_IXP4XX_OF ...@@ -20,7 +20,7 @@ config MACH_IXP4XX_OF
config MACH_NSLU2 config MACH_NSLU2
bool bool
prompt "Linksys NSLU2" prompt "Linksys NSLU2"
select FORCE_PCI depends on IXP4XX_PCI_LEGACY
help help
Say 'Y' here if you want your kernel to support Linksys's Say 'Y' here if you want your kernel to support Linksys's
NSLU2 NAS device. For more information on this platform, NSLU2 NAS device. For more information on this platform,
...@@ -28,7 +28,7 @@ config MACH_NSLU2 ...@@ -28,7 +28,7 @@ config MACH_NSLU2
config MACH_AVILA config MACH_AVILA
bool "Avila" bool "Avila"
select FORCE_PCI depends on IXP4XX_PCI_LEGACY
help help
Say 'Y' here if you want your kernel to support the Gateworks Say 'Y' here if you want your kernel to support the Gateworks
Avila Network Platform. For more information on this platform, Avila Network Platform. For more information on this platform,
...@@ -44,7 +44,7 @@ config MACH_LOFT ...@@ -44,7 +44,7 @@ config MACH_LOFT
config ARCH_ADI_COYOTE config ARCH_ADI_COYOTE
bool "Coyote" bool "Coyote"
select FORCE_PCI depends on IXP4XX_PCI_LEGACY
help help
Say 'Y' here if you want your kernel to support the ADI Say 'Y' here if you want your kernel to support the ADI
Engineering Coyote Gateway Reference Platform. For more Engineering Coyote Gateway Reference Platform. For more
...@@ -52,7 +52,7 @@ config ARCH_ADI_COYOTE ...@@ -52,7 +52,7 @@ config ARCH_ADI_COYOTE
config MACH_GATEWAY7001 config MACH_GATEWAY7001
bool "Gateway 7001" bool "Gateway 7001"
select FORCE_PCI depends on IXP4XX_PCI_LEGACY
help help
Say 'Y' here if you want your kernel to support Gateway's Say 'Y' here if you want your kernel to support Gateway's
7001 Access Point. For more information on this platform, 7001 Access Point. For more information on this platform,
...@@ -60,7 +60,7 @@ config MACH_GATEWAY7001 ...@@ -60,7 +60,7 @@ config MACH_GATEWAY7001
config MACH_WG302V2 config MACH_WG302V2
bool "Netgear WG302 v2 / WAG302 v2" bool "Netgear WG302 v2 / WAG302 v2"
select FORCE_PCI depends on IXP4XX_PCI_LEGACY
help help
Say 'Y' here if you want your kernel to support Netgear's Say 'Y' here if you want your kernel to support Netgear's
WG302 v2 or WAG302 v2 Access Points. For more information WG302 v2 or WAG302 v2 Access Points. For more information
...@@ -68,6 +68,7 @@ config MACH_WG302V2 ...@@ -68,6 +68,7 @@ config MACH_WG302V2
config ARCH_IXDP425 config ARCH_IXDP425
bool "IXDP425" bool "IXDP425"
depends on IXP4XX_PCI_LEGACY
help help
Say 'Y' here if you want your kernel to support Intel's Say 'Y' here if you want your kernel to support Intel's
IXDP425 Development Platform (Also known as Richfield). IXDP425 Development Platform (Also known as Richfield).
...@@ -75,6 +76,7 @@ config ARCH_IXDP425 ...@@ -75,6 +76,7 @@ config ARCH_IXDP425
config MACH_IXDPG425 config MACH_IXDPG425
bool "IXDPG425" bool "IXDPG425"
depends on IXP4XX_PCI_LEGACY
help help
Say 'Y' here if you want your kernel to support Intel's Say 'Y' here if you want your kernel to support Intel's
IXDPG425 Development Platform (Also known as Montajade). IXDPG425 Development Platform (Also known as Montajade).
...@@ -120,7 +122,7 @@ config ARCH_PRPMC1100 ...@@ -120,7 +122,7 @@ config ARCH_PRPMC1100
config MACH_NAS100D config MACH_NAS100D
bool bool
prompt "NAS100D" prompt "NAS100D"
select FORCE_PCI depends on IXP4XX_PCI_LEGACY
help help
Say 'Y' here if you want your kernel to support Iomega's Say 'Y' here if you want your kernel to support Iomega's
NAS 100d device. For more information on this platform, NAS 100d device. For more information on this platform,
...@@ -129,7 +131,7 @@ config MACH_NAS100D ...@@ -129,7 +131,7 @@ config MACH_NAS100D
config MACH_DSMG600 config MACH_DSMG600
bool bool
prompt "D-Link DSM-G600 RevA" prompt "D-Link DSM-G600 RevA"
select FORCE_PCI depends on IXP4XX_PCI_LEGACY
help help
Say 'Y' here if you want your kernel to support D-Link's Say 'Y' here if you want your kernel to support D-Link's
DSM-G600 RevA device. For more information on this platform, DSM-G600 RevA device. For more information on this platform,
...@@ -143,7 +145,7 @@ config ARCH_IXDP4XX ...@@ -143,7 +145,7 @@ config ARCH_IXDP4XX
config MACH_FSG config MACH_FSG
bool bool
prompt "Freecom FSG-3" prompt "Freecom FSG-3"
select FORCE_PCI depends on IXP4XX_PCI_LEGACY
help help
Say 'Y' here if you want your kernel to support Freecom's Say 'Y' here if you want your kernel to support Freecom's
FSG-3 device. For more information on this platform, FSG-3 device. For more information on this platform,
...@@ -152,7 +154,7 @@ config MACH_FSG ...@@ -152,7 +154,7 @@ config MACH_FSG
config MACH_ARCOM_VULCAN config MACH_ARCOM_VULCAN
bool bool
prompt "Arcom/Eurotech Vulcan" prompt "Arcom/Eurotech Vulcan"
select FORCE_PCI depends on IXP4XX_PCI_LEGACY
help help
Say 'Y' here if you want your kernel to support Arcom's Say 'Y' here if you want your kernel to support Arcom's
Vulcan board. Vulcan board.
...@@ -173,7 +175,7 @@ config CPU_IXP43X ...@@ -173,7 +175,7 @@ config CPU_IXP43X
config MACH_GTWX5715 config MACH_GTWX5715
bool "Gemtek WX5715 (Linksys WRV54G)" bool "Gemtek WX5715 (Linksys WRV54G)"
depends on ARCH_IXP4XX depends on ARCH_IXP4XX
select FORCE_PCI depends on IXP4XX_PCI_LEGACY
help help
This board is currently inside the Linksys WRV54G Gateways. This board is currently inside the Linksys WRV54G Gateways.
...@@ -196,7 +198,7 @@ config MACH_DEVIXP ...@@ -196,7 +198,7 @@ config MACH_DEVIXP
config MACH_MICCPT config MACH_MICCPT
bool "Omicron MICCPT" bool "Omicron MICCPT"
select FORCE_PCI depends on IXP4XX_PCI_LEGACY
help help
Say 'Y' here if you want your kernel to support the MICCPT Say 'Y' here if you want your kernel to support the MICCPT
board from OMICRON electronics GmbH. board from OMICRON electronics GmbH.
...@@ -209,9 +211,16 @@ config MACH_MIC256 ...@@ -209,9 +211,16 @@ config MACH_MIC256
comment "IXP4xx Options" comment "IXP4xx Options"
config IXP4XX_PCI_LEGACY
bool "IXP4xx legacy PCI driver support"
depends on PCI
help
Selects legacy PCI driver.
Not recommended for new development.
config IXP4XX_INDIRECT_PCI config IXP4XX_INDIRECT_PCI
bool "Use indirect PCI memory access" bool "Use indirect PCI memory access"
depends on PCI depends on IXP4XX_PCI_LEGACY
help help
IXP4xx provides two methods of accessing PCI memory space: IXP4xx provides two methods of accessing PCI memory space:
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <linux/dma-map-ops.h> #include <linux/dma-map-ops.h>
#include <mach/udc.h> #include <mach/udc.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/io.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/exception.h> #include <asm/exception.h>
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/flash.h> #include <asm/mach/flash.h>
#include <mach/hardware.h>
#include "irqs.h" #include "irqs.h"
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/flash.h> #include <asm/mach/flash.h>
#include <mach/hardware.h>
#include "irqs.h" #include "irqs.h"
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/flash.h> #include <asm/mach/flash.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <mach/hardware.h>
#include "irqs.h" #include "irqs.h"
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <scsi/scsi_host.h> #include <scsi/scsi_host.h>
#include <mach/hardware.h>
#define DRV_NAME "pata_ixp4xx_cf" #define DRV_NAME "pata_ixp4xx_cf"
#define DRV_VERSION "0.2" #define DRV_VERSION "0.2"
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/soc/ixp4xx/npe.h> #include <linux/soc/ixp4xx/npe.h>
#include <linux/soc/ixp4xx/qmgr.h> #include <linux/soc/ixp4xx/qmgr.h>
#include <mach/hardware.h>
#include "ixp46x_ts.h" #include "ixp46x_ts.h"
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/soc/ixp4xx/npe.h> #include <linux/soc/ixp4xx/npe.h>
#include <mach/hardware.h>
#include <mach/cpu.h>
#define DEBUG_MSG 0 #define DEBUG_MSG 0
#define DEBUG_FW 0 #define DEBUG_FW 0
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/soc/ixp4xx/qmgr.h> #include <linux/soc/ixp4xx/qmgr.h>
#include <mach/hardware.h>
#include <mach/cpu.h>
static struct qmgr_regs __iomem *qmgr_regs; static struct qmgr_regs __iomem *qmgr_regs;
static int qmgr_irq_1; static int qmgr_irq_1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment