Skip to content

Commit

Permalink
MIPS: lantiq: reboot gphy on restart
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Crispin authored and Ralf Baechle committed Nov 24, 2014
1 parent c530781 commit 50128fe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion arch/mips/lantiq/xway/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 50128fe

Please sign in to comment.