340-MIPS-BCM63XX-add-pcie-support-for-BCM63268.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From 5c290c81dbdb4433600593fe80c88eb4af86e791 Mon Sep 17 00:00:00 2001
  2. From: Jonas Gorski <jogo@openwrt.org>
  3. Date: Sun, 8 Dec 2013 03:22:40 +0100
  4. Subject: [PATCH 50/53] MIPS: BCM63XX: add pcie support for BCM63268
  5. ---
  6. arch/mips/bcm63xx/reset.c | 3 ++-
  7. arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h | 5 +++++
  8. arch/mips/pci/pci-bcm63xx.c | 4 ++++
  9. 3 files changed, 11 insertions(+), 1 deletion(-)
  10. --- a/arch/mips/bcm63xx/reset.c
  11. +++ b/arch/mips/bcm63xx/reset.c
  12. @@ -136,7 +136,8 @@
  13. #define BCM63268_RESET_PCM SOFTRESET_63268_PCM_MASK
  14. #define BCM63268_RESET_MPI 0
  15. #define BCM63268_RESET_PCIE (SOFTRESET_63268_PCIE_MASK | \
  16. - SOFTRESET_63268_PCIE_CORE_MASK)
  17. + SOFTRESET_63268_PCIE_CORE_MASK | \
  18. + SOFTRESET_63268_PCIE_HARD_MASK)
  19. #define BCM63268_RESET_PCIE_EXT SOFTRESET_63268_PCIE_EXT_MASK
  20. /*
  21. --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h
  22. +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h
  23. @@ -45,6 +45,11 @@
  24. #define BCM_PCIE_MEM_END_PA_6328 (BCM_PCIE_MEM_BASE_PA_6328 + \
  25. BCM_PCIE_MEM_SIZE_6328 - 1)
  26. +#define BCM_PCIE_MEM_BASE_PA_63268 0x11000000
  27. +#define BCM_PCIE_MEM_SIZE_63268 (15 * 1024 * 1024)
  28. +#define BCM_PCIE_MEM_END_PA_63268 (BCM_PCIE_MEM_BASE_PA_63268 + \
  29. + BCM_PCIE_MEM_SIZE_63268 - 1)
  30. +
  31. /*
  32. * Internal registers are accessed through KSEG3
  33. */
  34. --- a/arch/mips/pci/pci-bcm63xx.c
  35. +++ b/arch/mips/pci/pci-bcm63xx.c
  36. @@ -337,11 +337,15 @@ static int __init bcm63xx_pci_init(void)
  37. if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) {
  38. bcm_pcie_mem_resource.start = BCM_PCIE_MEM_BASE_PA_6328;
  39. bcm_pcie_mem_resource.end = BCM_PCIE_MEM_END_PA_6328;
  40. + } else if (BCMCPU_IS_63268()) {
  41. + bcm_pcie_mem_resource.start = BCM_PCIE_MEM_BASE_PA_63268;
  42. + bcm_pcie_mem_resource.end = BCM_PCIE_MEM_END_PA_63268;
  43. }
  44. switch (bcm63xx_get_cpu_id()) {
  45. case BCM6328_CPU_ID:
  46. case BCM6362_CPU_ID:
  47. + case BCM63268_CPU_ID:
  48. return bcm63xx_register_pcie();
  49. case BCM3368_CPU_ID:
  50. case BCM6348_CPU_ID: