lantiq: reset gphys on reboot
authorJohn Crispin <john@openwrt.org>
Sun, 30 Mar 2014 09:16:10 +0000 (09:16 +0000)
committerJohn Crispin <john@openwrt.org>
Sun, 30 Mar 2014 09:16:10 +0000 (09:16 +0000)
If gphys are not reset upstream uboot can not use them anymore.

Signed-off-by: Antonios Vamporakis <ant@area128.com>
SVN-Revision: 40318

target/linux/lantiq/patches-3.10/0201-xway-reset-gphys-on-reboot.patch [new file with mode: 0644]

diff --git a/target/linux/lantiq/patches-3.10/0201-xway-reset-gphys-on-reboot.patch b/target/linux/lantiq/patches-3.10/0201-xway-reset-gphys-on-reboot.patch
new file mode 100644 (file)
index 0000000..8edc273
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/arch/mips/lantiq/xway/reset.c
++++ b/arch/mips/lantiq/xway/reset.c
+@@ -176,8 +176,15 @@ void ltq_rst_init(void)
+ static void ltq_machine_restart(char *command)
+ {
++      u32 val = ltq_rcu_r32(RCU_RST_REQ);
++
++      if (of_device_is_compatible(ltq_rcu_np, "lantiq,rcu-xrx200"))
++              val |= RCU_RD_GPHY1_XRX200 | RCU_RD_GPHY0_XRX200;
++
++      val |= RCU_RD_SRST;
++
+       local_irq_disable();
+-      ltq_rcu_w32(ltq_rcu_r32(RCU_RST_REQ) | RCU_RD_SRST, RCU_RST_REQ);
++      ltq_rcu_w32(val, RCU_RST_REQ);
+       unreachable();
+ }