Skip to content

Commit

Permalink
tegra: add PCI Express support
Browse files Browse the repository at this point in the history
Change-Id: Ibd0bcd46895eb88952b9db29e1f68572d39aae01
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Arnd Bergmann <arnd@arndb.de>
CC: Russell King <linux@arm.linux.org.uk>
CC: Gary King <GKing@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
  • Loading branch information
Mike Rapoport authored and Colin Cross committed Oct 22, 2010
1 parent 8d685bc commit 77ffc14
Show file tree
Hide file tree
Showing 6 changed files with 936 additions and 1 deletion.
4 changes: 4 additions & 0 deletions arch/arm/mach-tegra/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-tegra/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions arch/arm/mach-tegra/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 4 additions & 0 deletions arch/arm/mach-tegra/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 11 additions & 1 deletion arch/arm/mach-tegra/include/mach/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
Loading

0 comments on commit 77ffc14

Please sign in to comment.