740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --- a/arch/mips/ath79/pci.c
  2. +++ b/arch/mips/ath79/pci.c
  3. @@ -53,6 +53,15 @@ static const struct ath79_pci_irq ar724x
  4. }
  5. };
  6. +static const struct ath79_pci_irq qca953x_pci_irq_map[] = {
  7. + {
  8. + .bus = 0,
  9. + .slot = 0,
  10. + .pin = 1,
  11. + .irq = ATH79_PCI_IRQ(0),
  12. + },
  13. +};
  14. +
  15. static const struct ath79_pci_irq qca955x_pci_irq_map[] = {
  16. {
  17. .bus = 0,
  18. @@ -98,6 +107,9 @@ int pcibios_map_irq(const struct pci_dev
  19. soc_is_ar9344()) {
  20. ath79_pci_irq_map = ar724x_pci_irq_map;
  21. ath79_pci_nr_irqs = ARRAY_SIZE(ar724x_pci_irq_map);
  22. + } else if (soc_is_qca953x()) {
  23. + ath79_pci_irq_map = qca953x_pci_irq_map;
  24. + ath79_pci_nr_irqs = ARRAY_SIZE(qca953x_pci_irq_map);
  25. } else if (soc_is_qca955x()) {
  26. ath79_pci_irq_map = qca955x_pci_irq_map;
  27. ath79_pci_nr_irqs = ARRAY_SIZE(qca955x_pci_irq_map);
  28. @@ -303,6 +315,15 @@ int __init ath79_register_pci(void)
  29. AR724X_PCI_MEM_SIZE,
  30. 0,
  31. ATH79_IP2_IRQ(0));
  32. + } else if (soc_is_qca9533()) {
  33. + pdev = ath79_register_pci_ar724x(0,
  34. + QCA953X_PCI_CFG_BASE0,
  35. + QCA953X_PCI_CTRL_BASE0,
  36. + QCA953X_PCI_CRP_BASE0,
  37. + QCA953X_PCI_MEM_BASE0,
  38. + QCA953X_PCI_MEM_SIZE,
  39. + 0,
  40. + ATH79_IP2_IRQ(0));
  41. } else if (soc_is_qca9558()) {
  42. pdev = ath79_register_pci_ar724x(0,
  43. QCA955X_PCI_CFG_BASE0,