0006-MIPS-lantiq-reboot-gphy-on-restart.patch 858 B

1234567891011121314151617181920212223242526272829
  1. From f81979f4b297693ac70616feaa4a79bdcb11db35 Mon Sep 17 00:00:00 2001
  2. From: John Crispin <blogic@openwrt.org>
  3. Date: Thu, 7 Aug 2014 18:55:57 +0200
  4. Subject: [PATCH 06/36] MIPS: lantiq: reboot gphy on restart
  5. Signed-off-by: John Crispin <blogic@openwrt.org>
  6. ---
  7. arch/mips/lantiq/xway/reset.c | 9 ++++++++-
  8. 1 file changed, 8 insertions(+), 1 deletion(-)
  9. --- a/arch/mips/lantiq/xway/reset.c
  10. +++ b/arch/mips/lantiq/xway/reset.c
  11. @@ -176,8 +176,15 @@ void ltq_rst_init(void)
  12. static void ltq_machine_restart(char *command)
  13. {
  14. + u32 val = ltq_rcu_r32(RCU_RST_REQ);
  15. +
  16. + if (of_device_is_compatible(ltq_rcu_np, "lantiq,rcu-xrx200"))
  17. + val |= RCU_RD_GPHY1_XRX200 | RCU_RD_GPHY0_XRX200;
  18. +
  19. + val |= RCU_RD_SRST;
  20. +
  21. local_irq_disable();
  22. - ltq_rcu_w32(ltq_rcu_r32(RCU_RST_REQ) | RCU_RD_SRST, RCU_RST_REQ);
  23. + ltq_rcu_w32(val, RCU_RST_REQ);
  24. unreachable();
  25. }