140-arm-gemini-add-pci-support.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. --- a/arch/arm/Kconfig
  2. +++ b/arch/arm/Kconfig
  3. @@ -399,6 +399,7 @@ config ARCH_GEMINI
  4. select CLKSRC_MMIO
  5. select CPU_FA526
  6. select GENERIC_CLOCKEVENTS
  7. + select MIGHT_HAVE_PCI
  8. help
  9. Support for the Cortina Systems Gemini family SoCs
  10. --- a/arch/arm/mach-gemini/include/mach/hardware.h
  11. +++ b/arch/arm/mach-gemini/include/mach/hardware.h
  12. @@ -68,4 +68,9 @@
  13. */
  14. #define IO_ADDRESS(x) IOMEM((((x) & 0xFFF00000) >> 4) | ((x) & 0x000FFFFF) | 0xF0000000)
  15. +/*
  16. + * PCI subsystem macros
  17. + */
  18. +#define pcibios_assign_all_busses() 1
  19. +
  20. #endif
  21. --- a/arch/arm/mach-gemini/include/mach/irqs.h
  22. +++ b/arch/arm/mach-gemini/include/mach/irqs.h
  23. @@ -43,11 +43,14 @@
  24. #define NORMAL_IRQ_NUM 32
  25. -#define GPIO_IRQ_BASE NORMAL_IRQ_NUM
  26. +#define PCI_IRQ_BASE NORMAL_IRQ_NUM
  27. +#define PCI_IRQ_NUM 4
  28. +
  29. +#define GPIO_IRQ_BASE (NORMAL_IRQ_NUM + PCI_IRQ_NUM)
  30. #define GPIO_IRQ_NUM (3 * 32)
  31. #define ARCH_TIMER_IRQ IRQ_TIMER2
  32. -#define NR_IRQS (NORMAL_IRQ_NUM + GPIO_IRQ_NUM)
  33. +#define NR_IRQS (NORMAL_IRQ_NUM + PCI_IRQ_NUM + GPIO_IRQ_NUM)
  34. #endif /* __MACH_IRQS_H__ */
  35. --- a/arch/arm/mach-gemini/Makefile
  36. +++ b/arch/arm/mach-gemini/Makefile
  37. @@ -6,6 +6,8 @@
  38. obj-y := irq.o mm.o time.o devices.o gpio.o idle.o reset.o
  39. +obj-$(CONFIG_PCI) += pci.o
  40. +
  41. # Board-specific support
  42. obj-$(CONFIG_MACH_NAS4220B) += board-nas4220b.o
  43. obj-$(CONFIG_MACH_RUT100) += board-rut1xx.o
  44. --- a/arch/arm/mach-gemini/mm.c
  45. +++ b/arch/arm/mach-gemini/mm.c
  46. @@ -59,6 +59,11 @@ static struct map_desc gemini_io_desc[]
  47. .length = SZ_512K,
  48. .type = MT_DEVICE,
  49. }, {
  50. + .virtual = (unsigned long)IO_ADDRESS(GEMINI_PCI_IO_BASE),
  51. + .pfn = __phys_to_pfn(GEMINI_PCI_IO_BASE),
  52. + .length = SZ_512K,
  53. + .type = MT_DEVICE,
  54. + }, {
  55. .virtual = (unsigned long)IO_ADDRESS(GEMINI_FLASH_CTRL_BASE),
  56. .pfn = __phys_to_pfn(GEMINI_FLASH_CTRL_BASE),
  57. .length = SZ_512K,