Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Linus Walleij <linus.walleij@linaro.org>

+32 -14
+2 -1
arch/arm/Kconfig
··· 398 398 select HAVE_PCI 399 399 select IXP4XX_IRQ 400 400 select IXP4XX_TIMER 401 - select NEED_MACH_IO_H 401 + # With the new PCI driver this is not needed 402 + select NEED_MACH_IO_H if PCI_IXP4XX_LEGACY 402 403 select USB_EHCI_BIG_ENDIAN_DESC 403 404 select USB_EHCI_BIG_ENDIAN_MMIO 404 405 help
+21 -12
arch/arm/mach-ixp4xx/Kconfig
··· 20 20 config MACH_NSLU2 21 21 bool 22 22 prompt "Linksys NSLU2" 23 - select FORCE_PCI 23 + depends on IXP4XX_PCI_LEGACY 24 24 help 25 25 Say 'Y' here if you want your kernel to support Linksys's 26 26 NSLU2 NAS device. For more information on this platform, ··· 28 28 29 29 config MACH_AVILA 30 30 bool "Avila" 31 - select FORCE_PCI 31 + depends on IXP4XX_PCI_LEGACY 32 32 help 33 33 Say 'Y' here if you want your kernel to support the Gateworks 34 34 Avila Network Platform. For more information on this platform, ··· 44 44 45 45 config ARCH_ADI_COYOTE 46 46 bool "Coyote" 47 - select FORCE_PCI 47 + depends on IXP4XX_PCI_LEGACY 48 48 help 49 49 Say 'Y' here if you want your kernel to support the ADI 50 50 Engineering Coyote Gateway Reference Platform. For more ··· 52 52 53 53 config MACH_GATEWAY7001 54 54 bool "Gateway 7001" 55 - select FORCE_PCI 55 + depends on IXP4XX_PCI_LEGACY 56 56 help 57 57 Say 'Y' here if you want your kernel to support Gateway's 58 58 7001 Access Point. For more information on this platform, ··· 60 60 61 61 config MACH_WG302V2 62 62 bool "Netgear WG302 v2 / WAG302 v2" 63 - select FORCE_PCI 63 + depends on IXP4XX_PCI_LEGACY 64 64 help 65 65 Say 'Y' here if you want your kernel to support Netgear's 66 66 WG302 v2 or WAG302 v2 Access Points. For more information ··· 68 68 69 69 config ARCH_IXDP425 70 70 bool "IXDP425" 71 + depends on IXP4XX_PCI_LEGACY 71 72 help 72 73 Say 'Y' here if you want your kernel to support Intel's 73 74 IXDP425 Development Platform (Also known as Richfield). ··· 76 75 77 76 config MACH_IXDPG425 78 77 bool "IXDPG425" 78 + depends on IXP4XX_PCI_LEGACY 79 79 help 80 80 Say 'Y' here if you want your kernel to support Intel's 81 81 IXDPG425 Development Platform (Also known as Montajade). ··· 122 120 config MACH_NAS100D 123 121 bool 124 122 prompt "NAS100D" 125 - select FORCE_PCI 123 + depends on IXP4XX_PCI_LEGACY 126 124 help 127 125 Say 'Y' here if you want your kernel to support Iomega's 128 126 NAS 100d device. For more information on this platform, ··· 131 129 config MACH_DSMG600 132 130 bool 133 131 prompt "D-Link DSM-G600 RevA" 134 - select FORCE_PCI 132 + depends on IXP4XX_PCI_LEGACY 135 133 help 136 134 Say 'Y' here if you want your kernel to support D-Link's 137 135 DSM-G600 RevA device. For more information on this platform, ··· 145 143 config MACH_FSG 146 144 bool 147 145 prompt "Freecom FSG-3" 148 - select FORCE_PCI 146 + depends on IXP4XX_PCI_LEGACY 149 147 help 150 148 Say 'Y' here if you want your kernel to support Freecom's 151 149 FSG-3 device. For more information on this platform, ··· 154 152 config MACH_ARCOM_VULCAN 155 153 bool 156 154 prompt "Arcom/Eurotech Vulcan" 157 - select FORCE_PCI 155 + depends on IXP4XX_PCI_LEGACY 158 156 help 159 157 Say 'Y' here if you want your kernel to support Arcom's 160 158 Vulcan board. ··· 175 173 config MACH_GTWX5715 176 174 bool "Gemtek WX5715 (Linksys WRV54G)" 177 175 depends on ARCH_IXP4XX 178 - select FORCE_PCI 176 + depends on IXP4XX_PCI_LEGACY 179 177 help 180 178 This board is currently inside the Linksys WRV54G Gateways. 181 179 ··· 198 196 199 197 config MACH_MICCPT 200 198 bool "Omicron MICCPT" 201 - select FORCE_PCI 199 + depends on IXP4XX_PCI_LEGACY 202 200 help 203 201 Say 'Y' here if you want your kernel to support the MICCPT 204 202 board from OMICRON electronics GmbH. ··· 211 209 212 210 comment "IXP4xx Options" 213 211 212 + config IXP4XX_PCI_LEGACY 213 + bool "IXP4xx legacy PCI driver support" 214 + depends on PCI 215 + help 216 + Selects legacy PCI driver. 217 + Not recommended for new development. 218 + 214 219 config IXP4XX_INDIRECT_PCI 215 220 bool "Use indirect PCI memory access" 216 - depends on PCI 221 + depends on IXP4XX_PCI_LEGACY 217 222 help 218 223 IXP4xx provides two methods of accessing PCI memory space: 219 224
-1
arch/arm/mach-ixp4xx/common.c
··· 32 32 #include <linux/dma-map-ops.h> 33 33 #include <mach/udc.h> 34 34 #include <mach/hardware.h> 35 - #include <mach/io.h> 36 35 #include <linux/uaccess.h> 37 36 #include <asm/page.h> 38 37 #include <asm/exception.h>
+1
arch/arm/mach-ixp4xx/fsg-setup.c
··· 28 28 #include <asm/mach-types.h> 29 29 #include <asm/mach/arch.h> 30 30 #include <asm/mach/flash.h> 31 + #include <mach/hardware.h> 31 32 32 33 #include "irqs.h" 33 34
+1
arch/arm/mach-ixp4xx/nas100d-setup.c
··· 33 33 #include <asm/mach-types.h> 34 34 #include <asm/mach/arch.h> 35 35 #include <asm/mach/flash.h> 36 + #include <mach/hardware.h> 36 37 37 38 #include "irqs.h" 38 39
+1
arch/arm/mach-ixp4xx/nslu2-setup.c
··· 31 31 #include <asm/mach/arch.h> 32 32 #include <asm/mach/flash.h> 33 33 #include <asm/mach/time.h> 34 + #include <mach/hardware.h> 34 35 35 36 #include "irqs.h" 36 37
+1
drivers/ata/pata_ixp4xx_cf.c
··· 18 18 #include <linux/irq.h> 19 19 #include <linux/platform_device.h> 20 20 #include <scsi/scsi_host.h> 21 + #include <mach/hardware.h> 21 22 22 23 #define DRV_NAME "pata_ixp4xx_cf" 23 24 #define DRV_VERSION "0.2"
+1
drivers/net/ethernet/xscale/ixp4xx_eth.c
··· 37 37 #include <linux/module.h> 38 38 #include <linux/soc/ixp4xx/npe.h> 39 39 #include <linux/soc/ixp4xx/qmgr.h> 40 + #include <mach/hardware.h> 40 41 41 42 #include "ixp46x_ts.h" 42 43
+2
drivers/soc/ixp4xx/ixp4xx-npe.c
··· 20 20 #include <linux/of.h> 21 21 #include <linux/platform_device.h> 22 22 #include <linux/soc/ixp4xx/npe.h> 23 + #include <mach/hardware.h> 24 + #include <mach/cpu.h> 23 25 24 26 #define DEBUG_MSG 0 25 27 #define DEBUG_FW 0
+2
drivers/soc/ixp4xx/ixp4xx-qmgr.c
··· 12 12 #include <linux/of.h> 13 13 #include <linux/platform_device.h> 14 14 #include <linux/soc/ixp4xx/qmgr.h> 15 + #include <mach/hardware.h> 16 + #include <mach/cpu.h> 15 17 16 18 static struct qmgr_regs __iomem *qmgr_regs; 17 19 static int qmgr_irq_1;