diff options
author | Roman Yeryomin <roman@advem.lv> | 2016-08-22 02:36:50 +0300 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2016-08-23 15:41:27 +0200 |
commit | f046737e92f9a13acbe9139e1ded83287d31eeb5 (patch) | |
tree | a99693b42935d5d4ea1addf3514003df4e7898bd /target/linux/gemini/patches-4.4/140-arm-gemini-add-pci-support.patch | |
parent | e58c20aac319e5d9722caed2d64b6338c6b04b85 (diff) | |
download | upstream-f046737e92f9a13acbe9139e1ded83287d31eeb5.tar.gz upstream-f046737e92f9a13acbe9139e1ded83287d31eeb5.tar.bz2 upstream-f046737e92f9a13acbe9139e1ded83287d31eeb5.zip |
gemini: add Linux 4.4 support
Signed-off-by: Roman Yeryomin <roman@advem.lv>
[Jo-Philipp Wich: change commit title]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'target/linux/gemini/patches-4.4/140-arm-gemini-add-pci-support.patch')
-rw-r--r-- | target/linux/gemini/patches-4.4/140-arm-gemini-add-pci-support.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/target/linux/gemini/patches-4.4/140-arm-gemini-add-pci-support.patch b/target/linux/gemini/patches-4.4/140-arm-gemini-add-pci-support.patch new file mode 100644 index 0000000000..d17b1a1f8e --- /dev/null +++ b/target/linux/gemini/patches-4.4/140-arm-gemini-add-pci-support.patch @@ -0,0 +1,66 @@ +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -399,6 +399,7 @@ config ARCH_GEMINI + select CLKSRC_MMIO + select CPU_FA526 + select GENERIC_CLOCKEVENTS ++ select MIGHT_HAVE_PCI + help + Support for the Cortina Systems Gemini family SoCs + +--- a/arch/arm/mach-gemini/include/mach/hardware.h ++++ b/arch/arm/mach-gemini/include/mach/hardware.h +@@ -68,4 +68,9 @@ + */ + #define IO_ADDRESS(x) IOMEM((((x) & 0xFFF00000) >> 4) | ((x) & 0x000FFFFF) | 0xF0000000) + ++/* ++ * PCI subsystem macros ++ */ ++#define pcibios_assign_all_busses() 1 ++ + #endif +--- a/arch/arm/mach-gemini/include/mach/irqs.h ++++ b/arch/arm/mach-gemini/include/mach/irqs.h +@@ -43,11 +43,14 @@ + + #define NORMAL_IRQ_NUM 32 + +-#define GPIO_IRQ_BASE NORMAL_IRQ_NUM ++#define PCI_IRQ_BASE NORMAL_IRQ_NUM ++#define PCI_IRQ_NUM 4 ++ ++#define GPIO_IRQ_BASE (NORMAL_IRQ_NUM + PCI_IRQ_NUM) + #define GPIO_IRQ_NUM (3 * 32) + + #define ARCH_TIMER_IRQ IRQ_TIMER2 + +-#define NR_IRQS (NORMAL_IRQ_NUM + GPIO_IRQ_NUM) ++#define NR_IRQS (NORMAL_IRQ_NUM + PCI_IRQ_NUM + GPIO_IRQ_NUM) + + #endif /* __MACH_IRQS_H__ */ +--- a/arch/arm/mach-gemini/Makefile ++++ b/arch/arm/mach-gemini/Makefile +@@ -6,6 +6,8 @@ + + obj-y := irq.o mm.o time.o devices.o gpio.o idle.o reset.o + ++obj-$(CONFIG_PCI) += pci.o ++ + # Board-specific support + obj-$(CONFIG_MACH_NAS4220B) += board-nas4220b.o + obj-$(CONFIG_MACH_RUT100) += board-rut1xx.o +--- a/arch/arm/mach-gemini/mm.c ++++ b/arch/arm/mach-gemini/mm.c +@@ -59,6 +59,11 @@ static struct map_desc gemini_io_desc[] + .length = SZ_512K, + .type = MT_DEVICE, + }, { ++ .virtual = (unsigned long)IO_ADDRESS(GEMINI_PCI_IO_BASE), ++ .pfn = __phys_to_pfn(GEMINI_PCI_IO_BASE), ++ .length = SZ_512K, ++ .type = MT_DEVICE, ++ }, { + .virtual = (unsigned long)IO_ADDRESS(GEMINI_FLASH_CTRL_BASE), + .pfn = __phys_to_pfn(GEMINI_FLASH_CTRL_BASE), + .length = SZ_512K, |