generic: ar8216: use ar8216_read_port_link to get the CPU port link parameters
[openwrt.git] / target / linux / lantiq / patches / 840-fix-falcon-sysctrl.patch
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))
5
6 static inline void
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)
9 {
10 int err = 1000000;
11
12 - do {} while (--err && ((ltq_reg_r32(module, LTQ_SYSCTL_ACTS)
13 + do {} while (--err && ((ltq_reg_r32(module, reg)
14 & mask) != test));
15 if (!err)
16 pr_err("module de/activation failed %d %08X %08X\n",
17 @@ -82,7 +82,7 @@ ltq_sysctl_activate(int module, unsigned
18
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);
23 }
24 EXPORT_SYMBOL(ltq_sysctl_activate);
25
26 @@ -94,7 +94,7 @@ ltq_sysctl_deactivate(int module, unsign
27
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);
32 }
33 EXPORT_SYMBOL(ltq_sysctl_deactivate);
34
35 @@ -105,7 +105,7 @@ ltq_sysctl_clken(int module, unsigned in
36 return;
37
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);
41 }
42 EXPORT_SYMBOL(ltq_sysctl_clken);
43
44 @@ -116,7 +116,7 @@ ltq_sysctl_clkdis(int module, unsigned i
45 return;
46
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);
50 }
51 EXPORT_SYMBOL(ltq_sysctl_clkdis);
52
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);
59 }
60 EXPORT_SYMBOL(ltq_sysctl_reboot);
61
This page took 0.056034 seconds and 5 git commands to generate.