tegra: PCI Express support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 3 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 3 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] [ARM] tegra: PCI Express support
Quoted 7 lines · Arnd Bergmann
Quoted 2 lines · On Sunday 19 September 2010 16:07:02 Mike Rapoport wrote:
As far as I understand, the IO space should be mapped prior to use and
__ioshould return the virtual address.That's right. You already map all the PCI registers including the I/O port mapping at initialization time, but you must not attempt to access these during boot before that time.
Yes. __io() takes the IO port address, and returns a virtual address for the inb() et.al. macros to deference to perform the actual access.
So, for example if you have a PCI serial card inserted which appears at 0x3f8, then inb(0x3f8) should access the first register on the PCI serial card. As inb(0x3f8) equates to __raw_readb(__io(0x3f8)), __io(0x3f8) must return the virtual address to access that port.
Eg, on DC21285 (footbridge) systems, the PCI IO window is at 0x7c000000 physical, mapped into 0xff000000 virtual. So __io(0x3f8) translates to 0xff0003f8 virtual, which hits 0x7c0003f8 physical, and 0x3f8 as an IO access on the PCI bus.
Things become a little more complicated when you have PCMCIA cards with separate IO regions, as on SA11x0 and PXA systems. These don't tend to have PCI, so we adopted there to have __io() do a 1:1 translation, and arrange for the "bus IO" address to be the actual virtual address.