330-Revert-MIPS-BCM47XX-Enable-74K-Core-ExternalSync-for.patch 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
  2. Date: Fri, 27 Jul 2018 12:39:01 +0200
  3. Subject: [PATCH] Revert "MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe
  4. erratum"
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. This reverts commit 2a027b47dba6b77ab8c8e47b589ae9bbc5ac6175.
  9. Enabling ExternalSync caused a regression for BCM4718A1 (used e.g. in
  10. Netgear E3000 and ASUS RT-N16): it simply hangs during PCIe
  11. initialization. It's likely that BCM4717A1 is also affected.
  12. I didn't notice that earlier as the only BCM47XX devices with PCIe I
  13. own are:
  14. 1) BCM4706 with 2 x 14e4:4331
  15. 2) BCM4706 with 14e4:4360 and 14e4:4331
  16. it appears that BCM4706 is unaffected.
  17. While BCM5300X-ES300-RDS.pdf seems to document that erratum and its
  18. workarounds (according to quotes provided by Tokunori) it seems not even
  19. Broadcom follows them.
  20. According to the provided info Broadcom should define CONF7_ES in their
  21. SDK's mipsinc.h and implement workaround in the si_mips_init(). Checking
  22. both didn't reveal such code. It *could* mean Broadcom also had some
  23. problems with the given workaround.
  24. Reported-by: Michael Marley <[email protected]>
  25. Cc: Tokunori Ikegami <[email protected]>
  26. Cc: Paul Burton <[email protected]>
  27. Cc: Hauke Mehrtens <[email protected]>
  28. Cc: Chris Packham <[email protected]>
  29. Cc: [email protected]
  30. Cc: James Hogan <[email protected]>
  31. Signed-off-by: Rafał Miłecki <[email protected]>
  32. ---
  33. arch/mips/bcm47xx/setup.c | 6 ------
  34. arch/mips/include/asm/mipsregs.h | 3 ---
  35. 2 files changed, 9 deletions(-)
  36. --- a/arch/mips/bcm47xx/setup.c
  37. +++ b/arch/mips/bcm47xx/setup.c
  38. @@ -212,12 +212,6 @@ static int __init bcm47xx_cpu_fixes(void
  39. */
  40. if (bcm47xx_bus.bcma.bus.chipinfo.id == BCMA_CHIP_ID_BCM4706)
  41. cpu_wait = NULL;
  42. -
  43. - /*
  44. - * BCM47XX Erratum "R10: PCIe Transactions Periodically Fail"
  45. - * Enable ExternalSync for sync instruction to take effect
  46. - */
  47. - set_c0_config7(MIPS_CONF7_ES);
  48. break;
  49. #endif
  50. }
  51. --- a/arch/mips/include/asm/mipsregs.h
  52. +++ b/arch/mips/include/asm/mipsregs.h
  53. @@ -680,8 +680,6 @@
  54. #define MIPS_CONF7_WII (_ULCAST_(1) << 31)
  55. #define MIPS_CONF7_RPS (_ULCAST_(1) << 2)
  56. -/* ExternalSync */
  57. -#define MIPS_CONF7_ES (_ULCAST_(1) << 8)
  58. #define MIPS_CONF7_IAR (_ULCAST_(1) << 10)
  59. #define MIPS_CONF7_AR (_ULCAST_(1) << 16)
  60. @@ -2747,7 +2745,6 @@ __BUILD_SET_C0(status)
  61. __BUILD_SET_C0(cause)
  62. __BUILD_SET_C0(config)
  63. __BUILD_SET_C0(config5)
  64. -__BUILD_SET_C0(config7)
  65. __BUILD_SET_C0(intcontrol)
  66. __BUILD_SET_C0(intctl)
  67. __BUILD_SET_C0(srsmap)