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 6 lines · Arnd Bergmann
Quoted 5 lines · On Thursday 16 September 2010 18:53:33 Mike Rapoport wrote:
These patches enable PCI Express support on Tegra2.
The implementation is based on original NVidia code from (1), but it is heavily reworked to avoid custom PCI enumeration and make the code more Linux friendly.
Quoted 6 lines
Quoted 2 lines
This implementation assumes that the PCIe subsystem is fully powered and ungated by the bootloader.
The patches look good to me, but it seems that I/O space accesses are still broken and need to be redirected to the PCI I/O range, like the (totally untested) patch below.
Thanks for catching this.
arch/arm/mach-tegra/include/mach/io.h line 25
Quoted 13 lines
Signed-off-by Arnd Bergmann <[email protected]>arch/arm/mach-tegra/include/mach/io.h +2
-1@@ -21,7 +21,8 @@#ifndef __MACH_TEGRA_IO_H#define __MACH_TEGRA_IO_H -#define IO_SPACE_LIMIT 0xffffffff +/* Two 1MB windows */ +#define IO_SPACE_LIMIT (SZ_1M + SZ_1M - 1)
This would limit ioport_resource to 2M, and request_resource(&ioport_resource, &res) will fail because ioport_resource does not take into account that IO can start somewhere else than at 0.
arch/arm/mach-tegra/include/mach/io.h void tegra_iounmap(volatile void __iomem *addr); · line 73
Quoted 9 lines
arch/arm/mach-tegra/include/mach/io.h +1
-1/* On TEGRA, many peripherals are very closely packed in * two 256MB io windows (that actually only use about 64KB @@ -69,7 +70,7 @@ void tegra_iounmap(volatile void __iomem *addr);static inline void __iomem *__io (unsigned long addr) { -return (void __iomem *)addr; +return addr + tegra_pcie.regs +SZ_4M ;
I wish things were that simple :)
As far as I understand, the IO space should be mapped prior to use and __io should return the virtual address.
I'll add it for the next re-spin.
Quoted 3 lines
arch/arm/mach-tegra/include/mach/io.h +0
-0}#define __io (a) __io(a)#define __mem_pci (a) (a)
Signature · 2 lines
Sincerely yours, Mike.