lantiq: reset gphys on reboot
[openwrt.git] / target / linux / lantiq / patches-3.10 / 0201-xway-reset-gphys-on-reboot.patch
1 --- a/arch/mips/lantiq/xway/reset.c
2 +++ b/arch/mips/lantiq/xway/reset.c
3 @@ -176,8 +176,15 @@ void ltq_rst_init(void)
4  
5  static void ltq_machine_restart(char *command)
6  {
7 +       u32 val = ltq_rcu_r32(RCU_RST_REQ);
8 +
9 +       if (of_device_is_compatible(ltq_rcu_np, "lantiq,rcu-xrx200"))
10 +               val |= RCU_RD_GPHY1_XRX200 | RCU_RD_GPHY0_XRX200;
11 +
12 +       val |= RCU_RD_SRST;
13 +
14         local_irq_disable();
15 -       ltq_rcu_w32(ltq_rcu_r32(RCU_RST_REQ) | RCU_RD_SRST, RCU_RST_REQ);
16 +       ltq_rcu_w32(val, RCU_RST_REQ);
17         unreachable();
18  }
19