Skip to content

Commit 3ff340e

Browse files
committed
bus: ti-sysc: Fix gpt12 system timer issue with reserved status
Jarkko Nikula <[email protected]> reported that Beagleboard revision c2 stopped booting. Jarkko bisected the issue down to commit 6cfcd55 ("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4"). Let's fix the issue by tagging system timers as reserved rather than ignoring them. And let's not probe any interconnect target module child devices for reserved modules. This allows PM runtime to keep track of clocks and clockdomains for the interconnect target module, and prevent the system timer from idling as we already have SYSC_QUIRK_NO_IDLE and SYSC_QUIRK_NO_IDLE_ON_INIT flags set for system timers. Fixes: 6cfcd55 ("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4") Reported-by: Jarkko Nikula <[email protected]> Tested-by: Jarkko Nikula <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 78b4b16 commit 3ff340e

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

drivers/bus/ti-sysc.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ static const char * const clock_names[SYSC_MAX_CLOCKS] = {
100100
* @cookie: data used by legacy platform callbacks
101101
* @name: name if available
102102
* @revision: interconnect target module revision
103+
* @reserved: target module is reserved and already in use
103104
* @enabled: sysc runtime enabled status
104105
* @needs_resume: runtime resume needed on resume from suspend
105106
* @child_needs_resume: runtime resume needed for child on resume from suspend
@@ -130,6 +131,7 @@ struct sysc {
130131
struct ti_sysc_cookie cookie;
131132
const char *name;
132133
u32 revision;
134+
unsigned int reserved:1;
133135
unsigned int enabled:1;
134136
unsigned int needs_resume:1;
135137
unsigned int child_needs_resume:1;
@@ -3093,8 +3095,8 @@ static int sysc_probe(struct platform_device *pdev)
30933095
return error;
30943096

30953097
error = sysc_check_active_timer(ddata);
3096-
if (error)
3097-
return error;
3098+
if (error == -EBUSY)
3099+
ddata->reserved = true;
30983100

30993101
error = sysc_get_clocks(ddata);
31003102
if (error)
@@ -3130,11 +3132,15 @@ static int sysc_probe(struct platform_device *pdev)
31303132
sysc_show_registers(ddata);
31313133

31323134
ddata->dev->type = &sysc_device_type;
3133-
error = of_platform_populate(ddata->dev->of_node, sysc_match_table,
3134-
pdata ? pdata->auxdata : NULL,
3135-
ddata->dev);
3136-
if (error)
3137-
goto err;
3135+
3136+
if (!ddata->reserved) {
3137+
error = of_platform_populate(ddata->dev->of_node,
3138+
sysc_match_table,
3139+
pdata ? pdata->auxdata : NULL,
3140+
ddata->dev);
3141+
if (error)
3142+
goto err;
3143+
}
31383144

31393145
INIT_DELAYED_WORK(&ddata->idle_work, ti_sysc_idle);
31403146

0 commit comments

Comments
 (0)