Commit 77ffc146 authored by Mike Rapoport's avatar Mike Rapoport Committed by Colin Cross

tegra: add PCI Express support

Change-Id: Ibd0bcd46895eb88952b9db29e1f68572d39aae01
Signed-off-by: default avatarMike Rapoport <mike@compulab.co.il>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
CC: Russell King <linux@arm.linux.org.uk>
CC: Gary King <GKing@nvidia.com>
Signed-off-by: default avatarColin Cross <ccross@android.com>
parent 8d685bc5
...@@ -16,6 +16,10 @@ config ARCH_TEGRA_2x_SOC ...@@ -16,6 +16,10 @@ config ARCH_TEGRA_2x_SOC
endchoice endchoice
config TEGRA_PCI
bool "PCI Express support"
select PCI
comment "Tegra board type" comment "Tegra board type"
config MACH_HARMONY config MACH_HARMONY
......
...@@ -14,6 +14,7 @@ obj-$(CONFIG_SMP) += platsmp.o localtimer.o headsmp.o ...@@ -14,6 +14,7 @@ obj-$(CONFIG_SMP) += platsmp.o localtimer.o headsmp.o
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
obj-$(CONFIG_TEGRA_SYSTEM_DMA) += dma.o obj-$(CONFIG_TEGRA_SYSTEM_DMA) += dma.o
obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o
obj-$(CONFIG_TEGRA_PCI) += pcie.o
obj-${CONFIG_MACH_HARMONY} += board-harmony.o obj-${CONFIG_MACH_HARMONY} += board-harmony.o
obj-${CONFIG_MACH_HARMONY} += board-harmony-pinmux.o obj-${CONFIG_MACH_HARMONY} += board-harmony-pinmux.o
...@@ -27,6 +27,7 @@ void __init tegra_common_init(void); ...@@ -27,6 +27,7 @@ void __init tegra_common_init(void);
void __init tegra_map_common_io(void); void __init tegra_map_common_io(void);
void __init tegra_init_irq(void); void __init tegra_init_irq(void);
void __init tegra_init_clock(void); void __init tegra_init_clock(void);
int __init tegra_pcie_init(bool init_port0, bool init_port1);
extern struct sys_timer tegra_timer; extern struct sys_timer tegra_timer;
#endif #endif
...@@ -21,4 +21,8 @@ ...@@ -21,4 +21,8 @@
#ifndef __MACH_TEGRA_HARDWARE_H #ifndef __MACH_TEGRA_HARDWARE_H
#define __MACH_TEGRA_HARDWARE_H #define __MACH_TEGRA_HARDWARE_H
#define PCIBIOS_MIN_IO 0x1000
#define PCIBIOS_MIN_MEM 0
#define pcibios_assign_all_busses() 1
#endif #endif
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#ifndef __MACH_TEGRA_IO_H #ifndef __MACH_TEGRA_IO_H
#define __MACH_TEGRA_IO_H #define __MACH_TEGRA_IO_H
#define IO_SPACE_LIMIT 0xffffffff #define IO_SPACE_LIMIT 0xffff
/* On TEGRA, many peripherals are very closely packed in /* On TEGRA, many peripherals are very closely packed in
* two 256MB io windows (that actually only use about 64KB * two 256MB io windows (that actually only use about 64KB
...@@ -73,10 +73,20 @@ void tegra_iounmap(volatile void __iomem *addr); ...@@ -73,10 +73,20 @@ void tegra_iounmap(volatile void __iomem *addr);
#define IO_ADDRESS(n) ((void __iomem *) IO_TO_VIRT(n)) #define IO_ADDRESS(n) ((void __iomem *) IO_TO_VIRT(n))
#ifdef CONFIG_TEGRA_PCI
extern void __iomem *tegra_pcie_io_base;
static inline void __iomem *__io(unsigned long addr)
{
return tegra_pcie_io_base + (addr & IO_SPACE_LIMIT);
}
#else
static inline void __iomem *__io(unsigned long addr) static inline void __iomem *__io(unsigned long addr)
{ {
return (void __iomem *)addr; return (void __iomem *)addr;
} }
#endif
#define __io(a) __io(a) #define __io(a) __io(a)
#define __mem_pci(a) (a) #define __mem_pci(a) (a)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment