Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
* [PATCH] bus: ti-sysc: Fix error handling for sysc_check_active_timer() again
@ 2023-12-22 16:37 Romain Naour
  2023-12-23 22:41 ` Andreas Kemnade
  0 siblings, 1 reply; 3+ messages in thread
From: Romain Naour @ 2023-12-22 16:37 UTC (permalink / raw)
  To: tony, linux-omap; +Cc: Romain Naour

From: Romain Naour <romain.naour@skf.com>

sysc_check_active_timer() has been introduced by 6cfcd5563b4f
("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4")
and initially returned -EBUSY to ignore timers tagged with no-reset
and no-idle.

But the return code has been updated from -EBUSY to -ENXIO by
65fb73676112 ("bus: ti-sysc: suppress err msg for timers used as clockevent/source")
and introduced a regression fixed by 06a089ef6449
("bus: ti-sysc: Fix error handling for sysc_check_active_timer()")
since sysc_probe() was still checking for -EBUSY.

Finally the sysc_check_active_timer() return code was reverted
back to -EBUSY by a12315d6d270
("bus: ti-sysc: Make omap3 gpt12 quirk handling SoC specific") except
for SOC_3430.

Now sysc_check_active_timer() may return ENXIO for SOC_3430 and
EBUSY for all other SoC.

But sysc_probe() still check for -ENXIO leading to the following
errors in dmesg on AM57xx:

ti-sysc: probe of 4ae18000.target-module failed with error -16 (timer1_target)
ti-sysc: probe of 4882c000.target-module failed with error -16 (timer15_target)
ti-sysc: probe of 4882e000.target-module failed with error -16 (timer6_target)

Fix this by checking for both error code...

Signed-off-by: Romain Naour <romain.naour@skf.com>
---
 drivers/bus/ti-sysc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index d57bc066dce6..0c6d5e3d5dc7 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -3314,7 +3314,7 @@ static int sysc_probe(struct platform_device *pdev)
 		return error;
 
 	error = sysc_check_active_timer(ddata);
-	if (error == -ENXIO)
+	if ((error == -ENXIO) || (error == -EBUSY))
 		ddata->reserved = true;
 	else if (error)
 		return error;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-19 22:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-22 16:37 [PATCH] bus: ti-sysc: Fix error handling for sysc_check_active_timer() again Romain Naour
2023-12-23 22:41 ` Andreas Kemnade
2024-01-19 22:47   ` Romain Naour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox