Commit 06a089ef authored by Tony Lindgren's avatar Tony Lindgren

bus: ti-sysc: Fix error handling for sysc_check_active_timer()

We have changed the return type for sysc_check_active_timer() from -EBUSY
to -ENXIO, but the gpt12 system timer fix still checks for -EBUSY. We are
also not returning on other errors like we did earlier as noted by
Pavel Machek <pavel@denx.de>.

Commit 3ff340e2 ("bus: ti-sysc: Fix gpt12 system timer issue with
reserved status") should have been updated for commit 65fb7367
("bus: ti-sysc: suppress err msg for timers used as clockevent/source").

Let's fix the issue by checking for -ENXIO and returning on any other
errors as suggested by Pavel Machek <pavel@denx.de>.

Fixes: 3ff340e2 ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status")
Depends-on: 65fb7367 ("bus: ti-sysc: suppress err msg for timers used as clockevent/source")
Reported-by: default avatarPavel Machek <pavel@denx.de>
Reviewed-by: default avatarPavel Machek (CIP) <pavel@denx.de>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 353b7a55
...@@ -3097,8 +3097,10 @@ static int sysc_probe(struct platform_device *pdev) ...@@ -3097,8 +3097,10 @@ static int sysc_probe(struct platform_device *pdev)
return error; return error;
error = sysc_check_active_timer(ddata); error = sysc_check_active_timer(ddata);
if (error == -EBUSY) if (error == -ENXIO)
ddata->reserved = true; ddata->reserved = true;
else if (error)
return error;
error = sysc_get_clocks(ddata); error = sysc_get_clocks(ddata);
if (error) if (error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment