102-MIPS-ath79-fix-regression-in-PCI-window-initializati.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From: Felix Fietkau <nbd@nbd.name>
  2. Date: Sun, 15 May 2016 13:09:20 +0200
  3. Subject: [PATCH] MIPS: ath79: fix regression in PCI window initialization
  4. ath79_ddr_pci_win_base has the type void __iomem *, so register offsets
  5. need to be a multiple of 4.
  6. Cc: Alban Bedel <albeu@free.fr>
  7. Fixes: 24b0e3e84fbf ("MIPS: ath79: Improve the DDR controller interface")
  8. Signed-off-by: Felix Fietkau <nbd@nbd.name>
  9. ---
  10. --- a/arch/mips/ath79/common.c
  11. +++ b/arch/mips/ath79/common.c
  12. @@ -76,14 +76,14 @@ void ath79_ddr_set_pci_windows(void)
  13. {
  14. BUG_ON(!ath79_ddr_pci_win_base);
  15. - __raw_writel(AR71XX_PCI_WIN0_OFFS, ath79_ddr_pci_win_base + 0);
  16. - __raw_writel(AR71XX_PCI_WIN1_OFFS, ath79_ddr_pci_win_base + 1);
  17. - __raw_writel(AR71XX_PCI_WIN2_OFFS, ath79_ddr_pci_win_base + 2);
  18. - __raw_writel(AR71XX_PCI_WIN3_OFFS, ath79_ddr_pci_win_base + 3);
  19. - __raw_writel(AR71XX_PCI_WIN4_OFFS, ath79_ddr_pci_win_base + 4);
  20. - __raw_writel(AR71XX_PCI_WIN5_OFFS, ath79_ddr_pci_win_base + 5);
  21. - __raw_writel(AR71XX_PCI_WIN6_OFFS, ath79_ddr_pci_win_base + 6);
  22. - __raw_writel(AR71XX_PCI_WIN7_OFFS, ath79_ddr_pci_win_base + 7);
  23. + __raw_writel(AR71XX_PCI_WIN0_OFFS, ath79_ddr_pci_win_base + 0x0);
  24. + __raw_writel(AR71XX_PCI_WIN1_OFFS, ath79_ddr_pci_win_base + 0x4);
  25. + __raw_writel(AR71XX_PCI_WIN2_OFFS, ath79_ddr_pci_win_base + 0x8);
  26. + __raw_writel(AR71XX_PCI_WIN3_OFFS, ath79_ddr_pci_win_base + 0xc);
  27. + __raw_writel(AR71XX_PCI_WIN4_OFFS, ath79_ddr_pci_win_base + 0x10);
  28. + __raw_writel(AR71XX_PCI_WIN5_OFFS, ath79_ddr_pci_win_base + 0x14);
  29. + __raw_writel(AR71XX_PCI_WIN6_OFFS, ath79_ddr_pci_win_base + 0x18);
  30. + __raw_writel(AR71XX_PCI_WIN7_OFFS, ath79_ddr_pci_win_base + 0x1c);
  31. }
  32. EXPORT_SYMBOL_GPL(ath79_ddr_set_pci_windows);