1 --- a/arch/mips/lantiq/falcon/sysctrl.c
2 +++ b/arch/mips/lantiq/falcon/sysctrl.c
3 @@ -63,11 +63,11 @@ void __iomem *ltq_ebu_membase;
4 #define ltq_status_r32(x) ltq_r32(ltq_status_membase + (x))
7 -ltq_sysctl_wait(int module, unsigned int mask, unsigned int test)
8 +ltq_sysctl_wait(int module, unsigned int mask, unsigned int test, unsigned int reg)
12 - do {} while (--err && ((ltq_reg_r32(module, LTQ_SYSCTL_ACTS)
13 + do {} while (--err && ((ltq_reg_r32(module, reg)
16 pr_err("module de/activation failed %d %08X %08X\n",
17 @@ -82,7 +82,7 @@ ltq_sysctl_activate(int module, unsigned
19 ltq_reg_w32(module, mask, LTQ_SYSCTL_CLKEN);
20 ltq_reg_w32(module, mask, LTQ_SYSCTL_ACT);
21 - ltq_sysctl_wait(module, mask, mask);
22 + ltq_sysctl_wait(module, mask, mask, LTQ_SYSCTL_ACTS);
24 EXPORT_SYMBOL(ltq_sysctl_activate);
26 @@ -94,7 +94,7 @@ ltq_sysctl_deactivate(int module, unsign
28 ltq_reg_w32(module, mask, LTQ_SYSCTL_CLKCLR);
29 ltq_reg_w32(module, mask, LTQ_SYSCTL_DEACT);
30 - ltq_sysctl_wait(module, mask, 0);
31 + ltq_sysctl_wait(module, mask, 0, LTQ_SYSCTL_ACTS);
33 EXPORT_SYMBOL(ltq_sysctl_deactivate);
35 @@ -105,7 +105,7 @@ ltq_sysctl_clken(int module, unsigned in
38 ltq_reg_w32(module, mask, LTQ_SYSCTL_CLKEN);
39 - ltq_sysctl_wait(module, mask, mask);
40 + ltq_sysctl_wait(module, mask, mask, LTQ_SYSCTL_CLKS);
42 EXPORT_SYMBOL(ltq_sysctl_clken);
44 @@ -116,7 +116,7 @@ ltq_sysctl_clkdis(int module, unsigned i
47 ltq_reg_w32(module, mask, LTQ_SYSCTL_CLKCLR);
48 - ltq_sysctl_wait(module, mask, 0);
49 + ltq_sysctl_wait(module, mask, 0, LTQ_SYSCTL_CLKS);
51 EXPORT_SYMBOL(ltq_sysctl_clkdis);
53 @@ -132,7 +132,7 @@ ltq_sysctl_reboot(int module, unsigned i
54 if ((~act & mask) != 0)
55 ltq_sysctl_activate(module, ~act & mask);
56 ltq_reg_w32(module, act & mask, LTQ_SYSCTL_RBT);
57 - ltq_sysctl_wait(module, mask, mask);
58 + ltq_sysctl_wait(module, mask, mask, LTQ_SYSCTL_ACTS);
60 EXPORT_SYMBOL(ltq_sysctl_reboot);