OpenWrt – Blame information for rev 2
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | --- a/arch/mips/ath79/dev-wmac.c |
2 | +++ b/arch/mips/ath79/dev-wmac.c |
||
3 | @@ -62,10 +62,26 @@ static void __init ar913x_wmac_setup(voi |
||
4 | |||
5 | static int ar933x_wmac_reset(void) |
||
6 | { |
||
7 | + int retries = 20; |
||
8 | + |
||
9 | ath79_device_reset_set(AR933X_RESET_WMAC); |
||
10 | ath79_device_reset_clear(AR933X_RESET_WMAC); |
||
11 | |||
12 | - return 0; |
||
13 | + while (1) { |
||
14 | + u32 bootstrap; |
||
15 | + |
||
16 | + bootstrap = ath79_reset_rr(AR933X_RESET_REG_BOOTSTRAP); |
||
17 | + if ((bootstrap & AR933X_BOOTSTRAP_EEPBUSY) == 0) |
||
18 | + return 0; |
||
19 | + |
||
20 | + if (retries-- == 0) |
||
21 | + break; |
||
22 | + |
||
23 | + udelay(10000); |
||
24 | + } |
||
25 | + |
||
26 | + pr_err("ar933x: WMAC reset timed out"); |
||
27 | + return -ETIMEDOUT; |
||
28 | } |
||
29 | |||
30 | static int ar933x_r1_get_wmac_revision(void) |