mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 07:31:29 +00:00
r8152: check if disabling ALDPS is finished
Use PLA 0xe000 bit 8 to check if disabling ALDPS is finished. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
befb2de181
commit
4214cc550b
@ -2836,9 +2836,15 @@ static void r8153_aldps_en(struct r8152 *tp, bool enable)
|
||||
data |= EN_ALDPS;
|
||||
ocp_reg_write(tp, OCP_POWER_CFG, data);
|
||||
} else {
|
||||
int i;
|
||||
|
||||
data &= ~EN_ALDPS;
|
||||
ocp_reg_write(tp, OCP_POWER_CFG, data);
|
||||
msleep(20);
|
||||
for (i = 0; i < 20; i++) {
|
||||
usleep_range(1000, 2000);
|
||||
if (ocp_read_word(tp, MCU_TYPE_PLA, 0xe000) & 0x0100)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user