Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -16,6 +16,10 @@ config ARCH_TEGRA_2x_SOC

endchoice

config TEGRA_PCI
	bool "PCI Express support"
	select PCI

comment "Tegra board type"

config MACH_HARMONY
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ obj-$(CONFIG_SMP) += platsmp.o localtimer.o headsmp.o
obj-$(CONFIG_HOTPLUG_CPU)               += hotplug.o
obj-$(CONFIG_TEGRA_SYSTEM_DMA)		+= dma.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-pinmux.o
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ void __init tegra_common_init(void);
void __init tegra_map_common_io(void);
void __init tegra_init_irq(void);
void __init tegra_init_clock(void);
int __init tegra_pcie_init(bool init_port0, bool init_port1);

extern struct sys_timer tegra_timer;
#endif
+4 −0
Original line number Diff line number Diff line
@@ -21,4 +21,8 @@
#ifndef __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
+11 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
#ifndef __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
 * two 256MB io windows (that actually only use about 64KB
@@ -73,10 +73,20 @@ void tegra_iounmap(volatile void __iomem *addr);

#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)
{
	return (void __iomem *)addr;
}
#endif

#define __io(a)         __io(a)
#define __mem_pci(a)    (a)

Loading