linux/arch/arm
Arnd Bergmann 9b0f7e3992 arm: versatile: fix and enable PCI I/O space
With commit 4d5fc58dbe (ARM: remove bunch of now unused
mach/io.h files), the I/O space setup was completely broken on
versatile. This patch fixes that and prepares for further
I/O space clean-up.

I/O space handling on the versatile platform is currently
broken in multiple ways. Most importantly, the ports do
not get mapped into the virtual address space at all.

Also, there is some amount of confusion between PCI I/O
space and other statically mapped MMIO registers in the
platform code:

* The __io_address() macro that is used to access the
  platform register maps to the same __io macro that gets
  used for I/O space.

* The IO_SPACE_LIMIT is set to a value that is much larger
  than the total available space.

* The I/O resource of the PCI bus is set to the physical
  address of the mapping, which is way outside of the
  actual I/O space limit as well as the address range that
  gets decoded by traditional PCI cards.

* No attempt is made to stay outside of the ISA port range
  that some device drivers try access.

* No resource gets requested as a child of ioport_resource,
  but an IORESOURCE_IO type mapping gets requested
  as a child of iomem_resource.

This patch attempts to correct all of the above. This makes
it possible to use virtio-pci based virtual devices as well
as actual PCI cards including those with legacy ISA port
ranges like VGA.

Some of the issues seem to be duplicated on other platforms.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[rob: update to 3.5-rc2 and io.h cleanup related changes]
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Tested-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-06-16 18:41:35 -07:00
..
boot ARM: dts: update memory size on brownstone 2012-06-05 16:42:38 +08:00
common Merge branch 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2012-05-25 09:18:59 -07:00
configs ARM: ux500: Provide regulator support for SMSC911x via Device Tree 2012-06-01 02:04:46 +02:00
include/asm Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-06-01 10:34:35 -07:00
kernel new helper: signal_delivered() 2012-06-01 12:58:52 -04:00
lib ARM: Remove support for ARMv3 ARM610 and ARM710 CPUs 2012-05-05 05:50:50 +01:00
mach-at91 Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-05-25 09:31:59 -07:00
mach-bcmring ARM: bcmring: fix UART declarations 2012-04-18 21:21:45 -07:00
mach-clps711x ARM: clps711x: Cleanup IRQ handling 2012-05-15 21:20:59 +02:00
mach-cns3xxx ARM: PCI: provide a default bus scan implementation 2012-05-13 17:12:17 +01:00
mach-davinci arm-soc: sweeping late_initcall cleanup 2012-05-26 13:14:01 -07:00
mach-dove arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
mach-ebsa110 ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-ep93xx - More robust parsing especially of xattr data in JFFS2 2012-06-01 16:55:42 -07:00
mach-exynos fbdev updates for 3.5 2012-06-01 16:57:51 -07:00
mach-footbridge ARM: PCI: provide a default bus scan implementation 2012-05-13 17:12:17 +01:00
mach-gemini ARM: remove bunch of now unused mach/io.h files 2012-03-06 21:34:44 -06:00
mach-h720x ARM: A few more platform fixes for include file fallout 2012-03-30 17:00:34 -07:00
mach-highbank ARM: highbank: Add smc calls to enable/disable the L2 2012-06-07 22:39:43 -07:00
mach-imx Merge branch 'imx/fixes' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes 2012-06-07 14:59:28 -07:00
mach-integrator Merge branches 'amba', 'devel-stable', 'fixes', 'mach-types', 'mmci', 'pci' and 'versatile' into for-linus 2012-05-21 15:15:10 +01:00
mach-iop13xx ARM: PCI: get rid of pci_std_swizzle() 2012-05-13 17:12:16 +01:00
mach-iop32x ARM: PCI: provide a default bus scan implementation 2012-05-13 17:12:17 +01:00
mach-iop33x ARM: PCI: provide a default bus scan implementation 2012-05-13 17:12:17 +01:00
mach-ixp4xx - More robust parsing especially of xattr data in JFFS2 2012-06-01 16:55:42 -07:00
mach-kirkwood arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
mach-ks8695 ARM: PCI: provide a default bus scan implementation 2012-05-13 17:12:17 +01:00
mach-l7200/include/mach
mach-lpc32xx GPIO driver changes for v3.5 merge window 2012-05-24 14:01:46 -07:00
mach-mmp ARM: mmp: fix missing cascade_irq in irq handler 2012-06-05 17:42:23 +08:00
mach-msm arm-soc: sweeping late_initcall cleanup 2012-05-26 13:14:01 -07:00
mach-mv78xx0 arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
mach-mxs arm-soc: device tree conversions, part 2 2012-05-26 12:57:47 -07:00
mach-netx ARM: __io abuse cleanup 2012-03-13 21:25:21 -05:00
mach-nomadik - More robust parsing especially of xattr data in JFFS2 2012-06-01 16:55:42 -07:00
mach-omap1 - More robust parsing especially of xattr data in JFFS2 2012-06-01 16:55:42 -07:00
mach-omap2 ARM: OMAP2+: Fix compile for CONFIG_TIDSPBRIDGE platform init code 2012-06-06 01:42:20 -07:00
mach-orion5x - More robust parsing especially of xattr data in JFFS2 2012-06-01 16:55:42 -07:00
mach-picoxcell ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-pnx4008 arm-soc: sweeping late_initcall cleanup 2012-05-26 13:14:01 -07:00
mach-prima2 arm-soc: sweeping late_initcall cleanup 2012-05-26 13:14:01 -07:00
mach-pxa - More robust parsing especially of xattr data in JFFS2 2012-06-01 16:55:42 -07:00
mach-realview ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-rpc ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
mach-s3c24xx fbdev updates for 3.5 2012-06-01 16:57:51 -07:00
mach-s3c64xx fbdev updates for 3.5 2012-06-01 16:57:51 -07:00
mach-s3c2410 Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
mach-s3c2412 Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
mach-s3c2440 Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
mach-s5p64x0 fbdev updates for 3.5 2012-06-01 16:57:51 -07:00
mach-s5pc100 fbdev updates for 3.5 2012-06-01 16:57:51 -07:00
mach-s5pv210 fbdev updates for 3.5 2012-06-01 16:57:51 -07:00
mach-sa1100 Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-05-29 18:21:44 -07:00
mach-shark ARM: PCI: provide a default bus scan implementation 2012-05-13 17:12:17 +01:00
mach-shmobile arm-soc: sweeping late_initcall cleanup 2012-05-26 13:14:01 -07:00
mach-spear3xx arm-soc: soc-specific pinctrl changes 2012-05-22 09:39:42 -07:00
mach-spear6xx arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
mach-spear13xx pinctrl: Add SPEAr13xx pinctrl drivers 2012-05-14 17:34:07 +02:00
mach-tegra arm-soc: sweeping late_initcall cleanup 2012-05-26 13:14:01 -07:00
mach-u300 ARM: u300: bump all IRQ numbers by one 2012-04-20 09:52:58 +02:00
mach-ux500 ARM: ux500: Allow PRCMU regulator to be probed during a DT enabled boot 2012-06-01 02:04:41 +02:00
mach-versatile arm: versatile: fix and enable PCI I/O space 2012-06-16 18:41:35 -07:00
mach-vexpress Merge branch 'late/soc' into devel-late 2012-05-30 16:06:46 -07:00
mach-vt8500 ARM: remove bunch of now unused mach/io.h files 2012-03-06 21:34:44 -06:00
mach-w90x900 ARM: A few more platform fixes for include file fallout 2012-03-30 17:00:34 -07:00
mach-zynq ARM: remove bunch of now unused mach/io.h files 2012-03-06 21:34:44 -06:00
mm Merge branch 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2012-05-25 09:18:59 -07:00
net ARM: 7259/3: net: JIT compiler for packet filters 2012-03-24 09:38:56 +00:00
nwfpe Merge branch 'master' into for-next 2012-04-08 21:48:52 +02:00
oprofile
plat-iop ARM: PCI: provide a default bus scan implementation 2012-05-13 17:12:17 +01:00
plat-mxc Some fixes for the fresh i.MX common clock support 2012-06-07 11:47:28 -07:00
plat-nomadik ARM: nomadik: enable PINCTRL_NOMADIK where needed 2012-05-15 14:42:57 +02:00
plat-omap ARM: OMAP: Fix MMC_OMAP build when only MMC_OMAP_HS is selected 2012-06-06 01:42:20 -07:00
plat-orion arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
plat-pxa Input: pxa27x_keypad add choice to set direct_key_mask 2012-04-27 16:50:05 +08:00
plat-s3c24xx ARM: S3C24XX: move common clock init into common.c 2012-05-12 16:22:18 +09:00
plat-samsung fbdev updates for 3.5 2012-06-01 16:57:51 -07:00
plat-spear arm-soc: soc-specific pinctrl changes 2012-05-22 09:39:42 -07:00
plat-versatile ARM: 7389/2: plat-versatile: modernize FPGA IRQ controller 2012-05-04 16:53:37 +01:00
tools ARM: Update mach-types 2012-04-26 08:46:02 +01:00
vfp Merge branch 'misc' into for-linus 2012-05-21 15:15:24 +01:00
Kconfig arm: versatile: fix and enable PCI I/O space 2012-06-16 18:41:35 -07:00
Kconfig-nommu
Kconfig.debug arm-soc: device tree conversions, part 2 2012-05-26 12:57:47 -07:00
Makefile arm-soc: soc specific changes, part 2 2012-05-26 13:05:55 -07:00