Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
for (i = 0; i <= time_out_num_tries; i++) {
if (i) {
- if (0 < delay_between_poll_us && delay_between_poll_us < 1000)
- udelay(delay_between_poll_us);
-
- if (delay_between_poll_us > 1000)
+ if (delay_between_poll_us >= 1000)
msleep(delay_between_poll_us/1000);
+ else if (delay_between_poll_us > 0)
+ udelay(delay_between_poll_us);
}
reg_val = dm_read_reg(ctx, addr);