mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 11:21:23 +00:00
bdk: i2c: correct order of spinlock wait
This commit is contained in:
parent
9a80f8b4b5
commit
3fdb72ce37
1 changed files with 2 additions and 2 deletions
|
@ -95,9 +95,9 @@ static void _i2c_load_cfg_wait(vu32 *base)
|
|||
base[I2C_CONFIG_LOAD] = BIT(5) | TIMEOUT_CONFIG_LOAD | MSTR_CONFIG_LOAD;
|
||||
for (u32 i = 0; i < 20; i++)
|
||||
{
|
||||
usleep(1);
|
||||
if (!(base[I2C_CONFIG_LOAD] & MSTR_CONFIG_LOAD))
|
||||
break;
|
||||
usleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -362,9 +362,9 @@ void i2c_init(u32 i2c_idx)
|
|||
|
||||
for (u32 i = 0; i < 10; i++)
|
||||
{
|
||||
usleep(20000);
|
||||
if (base[I2C_INT_STATUS] & BUS_CLEAR_DONE)
|
||||
break;
|
||||
usleep(25);
|
||||
}
|
||||
|
||||
(vu32)base[I2C_BUS_CLEAR_STATUS];
|
||||
|
|
Loading…
Reference in a new issue