[PATCH V6 02/17] ST SPEAr13xx: Added PCIe host controller base driver support.
Arnd Bergmann
arnd at arndb.de
Thu Mar 10 09:38:26 EST 2011
On Thursday 10 March 2011, shiraz hashim wrote:
> >> diff --git a/arch/arm/mach-spear13xx/include/mach/hardware.h b/arch/arm/mach-spear13xx/include/mach/hardware.h
> >> index fd8c2dc..c3fb454 100644
> >> --- a/arch/arm/mach-spear13xx/include/mach/hardware.h
> >> +++ b/arch/arm/mach-spear13xx/include/mach/hardware.h
> >> @@ -28,4 +28,11 @@
> >> /* typesafe io address */
> >> #define __io_address(n) __io(IO_ADDRESS(n))
> >
> > I could not find the definition for __io() here, but I suspect this is
> > wrong. If __io_address() is what you use for accessing the direct-mapped
> > MMIO registers, it cannot also be what you use to access the PCIe PIO
> > ports, so most likely one of the two is broken. Can you explain?
>
> This is not used in PCIe and infact is not part of this PCIe patch.
> This is used at few places in the architecture code.
Let me rephrase my point:
The __io() macro is used for accessing PIO registers in PCIe drivers,
it needs to be defined to convert I/O port numbers between PCIBIOS_MIN_IO
and IO_SPACE_LIMIT to the virtual address that is mapped to the I/O
space registers on your PCIe bus.
__io_address() is used in spear13xx to map from physical addresses
in the SOC to virtual addresses that are part of the linear mapping
set up through iotable_init().
These two are not the same, so I believe that either __io_address()
or __io() is broken.
Arnd
More information about the linux-arm-kernel
mailing list