]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ti-sysc: allow OMAP2 and OMAP4 timers to be reserved on AM33xx
authorMatthias Schiffer <matthias.schiffer@tq-group.com>
Mon, 25 Aug 2025 13:11:13 +0000 (15:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:09:47 +0000 (13:09 +0100)
[ Upstream commit 3f61783920504b2cf99330b372d82914bb004d8e ]

am33xx.dtsi has the same clock setup as am35xx.dtsi, setting
ti,no-reset-on-init and ti,no-idle on timer1_target and timer2_target,
so AM33 needs the same workaround as AM35 to avoid ti-sysc probe
failing on certain target modules.

Signed-off-by: Matthias Schiffer <matthias.schiffer@tq-group.com>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20250825131114.2206804-1-alexander.stein@ew.tq-group.com
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bus/ti-sysc.c

index 20e09072348558be3eae4b2aec7571e80961405c..12ab9bf160c976d728b15a9a19ccd0532d3f6355 100644 (file)
@@ -37,6 +37,7 @@ enum sysc_soc {
        SOC_UNKNOWN,
        SOC_2420,
        SOC_2430,
+       SOC_AM33,
        SOC_3430,
        SOC_AM35,
        SOC_3630,
@@ -2946,6 +2947,7 @@ static void ti_sysc_idle(struct work_struct *work)
 static const struct soc_device_attribute sysc_soc_match[] = {
        SOC_FLAG("OMAP242*", SOC_2420),
        SOC_FLAG("OMAP243*", SOC_2430),
+       SOC_FLAG("AM33*", SOC_AM33),
        SOC_FLAG("AM35*", SOC_AM35),
        SOC_FLAG("OMAP3[45]*", SOC_3430),
        SOC_FLAG("OMAP3[67]*", SOC_3630),
@@ -3153,10 +3155,15 @@ static int sysc_check_active_timer(struct sysc *ddata)
         * can be dropped if we stop supporting old beagleboard revisions
         * A to B4 at some point.
         */
-       if (sysc_soc->soc == SOC_3430 || sysc_soc->soc == SOC_AM35)
+       switch (sysc_soc->soc) {
+       case SOC_AM33:
+       case SOC_3430:
+       case SOC_AM35:
                error = -ENXIO;
-       else
+               break;
+       default:
                error = -EBUSY;
+       }
 
        if ((ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT) &&
            (ddata->cfg.quirks & SYSC_QUIRK_NO_IDLE))