Skip to content

Commit a12315d

Browse files
committed
bus: ti-sysc: Make omap3 gpt12 quirk handling SoC specific
On beagleboard revisions A to B4 we need to use gpt12 as the system timer. However, the quirk handling added for gpt12 caused a regression for system suspend for am335x as the PM coprocessor needs the timers idled for suspend. Let's make the gpt12 quirk specific to omap34xx, other SoCs don't need it. Beagleboard revisions C and later no longer need to use the gpt12 related quirk. Then at some point, if we decide to drop support for the old beagleboard revisions A to B4, we can also drop the gpt12 related quirks completely. Fixes: 3ff340e ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status") Reported-by: Kevin Hilman <khilman@baylibre.com> Suggested-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent 0f83e6b commit a12315d

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

drivers/bus/ti-sysc.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3232,13 +3232,27 @@ static int sysc_check_disabled_devices(struct sysc *ddata)
32323232
*/
32333233
static int sysc_check_active_timer(struct sysc *ddata)
32343234
{
3235+
int error;
3236+
32353237
if (ddata->cap->type != TI_SYSC_OMAP2_TIMER &&
32363238
ddata->cap->type != TI_SYSC_OMAP4_TIMER)
32373239
return 0;
32383240

3241+
/*
3242+
* Quirk for omap3 beagleboard revision A to B4 to use gpt12.
3243+
* Revision C and later are fixed with commit 23885389dbbb ("ARM:
3244+
* dts: Fix timer regression for beagleboard revision c"). This all
3245+
* can be dropped if we stop supporting old beagleboard revisions
3246+
* A to B4 at some point.
3247+
*/
3248+
if (sysc_soc->soc == SOC_3430)
3249+
error = -ENXIO;
3250+
else
3251+
error = -EBUSY;
3252+
32393253
if ((ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT) &&
32403254
(ddata->cfg.quirks & SYSC_QUIRK_NO_IDLE))
3241-
return -ENXIO;
3255+
return error;
32423256

32433257
return 0;
32443258
}

0 commit comments

Comments
 (0)