diff options
author | John Crispin <blogic@openwrt.org> | 2014-08-07 12:55:57 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-11-24 01:45:17 -0500 |
commit | 50128fe8164ba2c9e36bc5156eabdfd69225b7d2 (patch) | |
tree | 3b165fedeb8eab3cef3f78323f135f702498ad41 /arch/mips/lantiq | |
parent | c530781c93a55a937d2847efeda744b4e099dfef (diff) |
MIPS: lantiq: reboot gphy on restart
A reboot sometimes lead to a none working phy. An explicit reboot fixes the
problem.
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/8044/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lantiq')
-rw-r--r-- | arch/mips/lantiq/xway/reset.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/mips/lantiq/xway/reset.c b/arch/mips/lantiq/xway/reset.c index a1e06b78e15a..fe68f9ae47c1 100644 --- a/arch/mips/lantiq/xway/reset.c +++ b/arch/mips/lantiq/xway/reset.c | |||
@@ -176,8 +176,15 @@ void ltq_rst_init(void) | |||
176 | 176 | ||
177 | static void ltq_machine_restart(char *command) | 177 | static void ltq_machine_restart(char *command) |
178 | { | 178 | { |
179 | u32 val = ltq_rcu_r32(RCU_RST_REQ); | ||
180 | |||
181 | if (of_device_is_compatible(ltq_rcu_np, "lantiq,rcu-xrx200")) | ||
182 | val |= RCU_RD_GPHY1_XRX200 | RCU_RD_GPHY0_XRX200; | ||
183 | |||
184 | val |= RCU_RD_SRST; | ||
185 | |||
179 | local_irq_disable(); | 186 | local_irq_disable(); |
180 | ltq_rcu_w32(ltq_rcu_r32(RCU_RST_REQ) | RCU_RD_SRST, RCU_RST_REQ); | 187 | ltq_rcu_w32(val, RCU_RST_REQ); |
181 | unreachable(); | 188 | unreachable(); |
182 | } | 189 | } |
183 | 190 | ||