lantiq: update 3.14 patches
[openwrt/openwrt.git] / target / linux / lantiq / patches-3.14 / 0006-MIPS-lantiq-reboot-gphy-on-restart.patch
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
6 Signed-off-by: John Crispin <blogic@openwrt.org>
7 ---
8 arch/mips/lantiq/xway/reset.c | 9 ++++++++-
9 1 file changed, 8 insertions(+), 1 deletion(-)
10
11 diff --git a/arch/mips/lantiq/xway/reset.c b/arch/mips/lantiq/xway/reset.c
12 index a1e06b7..fe68f9a 100644
13 --- a/arch/mips/lantiq/xway/reset.c
14 +++ b/arch/mips/lantiq/xway/reset.c
15 @@ -176,8 +176,15 @@ void ltq_rst_init(void)
16
17 static void ltq_machine_restart(char *command)
18 {
19 + u32 val = ltq_rcu_r32(RCU_RST_REQ);
20 +
21 + if (of_device_is_compatible(ltq_rcu_np, "lantiq,rcu-xrx200"))
22 + val |= RCU_RD_GPHY1_XRX200 | RCU_RD_GPHY0_XRX200;
23 +
24 + val |= RCU_RD_SRST;
25 +
26 local_irq_disable();
27 - ltq_rcu_w32(ltq_rcu_r32(RCU_RST_REQ) | RCU_RD_SRST, RCU_RST_REQ);
28 + ltq_rcu_w32(val, RCU_RST_REQ);
29 unreachable();
30 }
31
32 --
33 1.7.10.4
34