From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50041C433EF for ; Wed, 9 Mar 2022 10:36:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230357AbiCIKhV (ORCPT ); Wed, 9 Mar 2022 05:37:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230332AbiCIKhT (ORCPT ); Wed, 9 Mar 2022 05:37:19 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D86C129BB9 for ; Wed, 9 Mar 2022 02:36:20 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id 15-20020a17090a098f00b001bef0376d5cso1908440pjo.5 for ; Wed, 09 Mar 2022 02:36:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=nBz9I0mFgs5u062cU8PWaEUMW26wc4vG19g0SAhyIOU=; b=mY94NA13vTUMuBG5Bb4LFlSz3w6FHEwXWhxPlmNJ1x2gXIe5ylLYwvvWbO0dw3ggad /QpIpgbMmdTxCBLWoGyUf5iZXBialoj2hYz/bmjw/3Ge8rDQFXQQ0XT6h4ViJNJbLYmw p0QVP1VWTx9++z0xizrfuicuu9RkgpQdMlHZ83iNHBugqVLkSMRmfPMBtc2CYlTIS9jR VdnbPO+gOd75CscjnUmSZt5mVBZacYseAi4x2Rn4Y0UCD3t3WMiZwtB9+0vWDEB3K5gt W7T17l0rNFhIHyQtW69eTy1xdaHsHxblS/w3IL/XuUKR8iPdpBevan4/w24/RCTtRvkO dZYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=nBz9I0mFgs5u062cU8PWaEUMW26wc4vG19g0SAhyIOU=; b=7r6UsW3Px1RAwK/pSNX6dgxlx3LTx7COPmEnp9XaLZxCxi4r4QUC5xpSjjsKwS+mzp OQiEWkXjQWbA/gjNeHZX3V/0eGlMg7t8HhcQ7O/am7jPYLvBelQHkN08k5Cnw1Ge9FjI gJsjwfIcyYW7dZOSjhSVoQr0iChTbliWwR5Pi3y5KQUdeOBRxkk4ElRqGvmVy4qGaHrU D4bal8f1ri7h5r16ergJ24JvkPlUeb3akyu0IvFGM8HoSPam6bM+RIlOSzqsIsTeE7kK ZkCrmjpCjB1Mv8jHDIacMF63AwYLqDBNCy6ly2jM1riAq21v7VOtQDhC8VEqClBNwi5E pgtQ== X-Gm-Message-State: AOAM5318/eMH26yeoqFW7Eqoe888GKPCf4Fb7F7SVK6VTL0nuzhMITRT UYLUQ0Vku++SeMQVkGpbLa+SZQ== X-Google-Smtp-Source: ABdhPJzLigLjr3+0rRbWvgtefYE80In5/d68K54nYw/h39qRlT1InJt38j1/Rnfp072s73i8QfoDaA== X-Received: by 2002:a17:903:24e:b0:151:9fa5:ebdd with SMTP id j14-20020a170903024e00b001519fa5ebddmr22258261plh.84.1646822179631; Wed, 09 Mar 2022 02:36:19 -0800 (PST) Received: from localhost (c-71-197-186-152.hsd1.wa.comcast.net. [71.197.186.152]) by smtp.gmail.com with ESMTPSA id m11-20020a17090a3f8b00b001bc299e0aefsm5915575pjc.56.2022.03.09.02.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Mar 2022 02:36:19 -0800 (PST) From: Kevin Hilman To: Tony Lindgren Cc: linux-omap@vger.kernel.org, Dave Gerlach , Faiz Abbas , Greg Kroah-Hartman , Grygorii Strashko , Keerthy , Nishanth Menon , Suman Anna , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jarkko Nikula Subject: Re: [PATCH] bus: ti-sysc: Fix gpt12 system timer issue with reserved status In-Reply-To: References: <20210611060224.36769-1-tony@atomide.com> <7h7d99ehu4.fsf@baylibre.com> Date: Wed, 09 Mar 2022 02:36:18 -0800 Message-ID: <7h8rtj9zvh.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Tony Lindgren writes: > Hi, > > * Kevin Hilman [220304 17:39]: >> Hi Tony, >> >> Tony Lindgren writes: >> >> > Jarkko Nikula reported that Beagleboard >> > revision c2 stopped booting. Jarkko bisected the issue down to >> > commit 6cfcd5563b4f ("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: 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4") >> > Reported-by: Jarkko Nikula >> > Signed-off-by: Tony Lindgren >> >> I'm debugging why suspend/resume on AM3x and AM4x are mostly working, >> but getting the warning that not all powerdomains are transitioning: >> >> pm33xx pm33xx: PM: Could not transition all powerdomains to target state >> >> I bisected it down to $SUBJECT patch, and verified that reverting it >> makes both on am335x-boneblack and am437x-gp-evm fully suspend, and I'm >> now seeing: >> >> pm33xx pm33xx: PM: Successfully put all powerdomains to target state >> >> Note that it doesn't revert cleanly due to some other changes, but this >> one-liner[1] effectively reverts the behavior of $SUBJECT patch, and >> also makes things work again. >> >> I verified the revert (and hack[1]) on both v5.10 stable and mainline >> v5.16 but TBH, I'm still not 100% sure what's going on so looking for >> some guidance from you Tony on what the "real" fix should be. > > Thanks for debugging the issue Kevin. It seems the issue is caused by the > extra runtime PM usage count done for modules tagged no-idle. However, > this causes issues for am335x timers as the PM coprocessor needs all > the domains idled for system suspend despite the system timers tagged > with no-idle. > > We could patch ti-sysc.c for more timer workarounds, but I don't know if > that really makes sense. It would add further dependencies between the > system timer code and the interconnect code, and I'd rather go back to > no dependencies between the system timers and the interconnect code :) > > So I suggest we make the omap3 gpt12 quirk checks SoC specific as below > for now, they are not needed for the other SoCs. > > Then at some point we can plan on dropping support for the old beagleboard > revisions A to B4, and then reverting commit 3ff340e24c9d ("bus: ti-sysc: > Fix gpt12 system timer issue with reserved status"). > > Note that we now have commit 23885389dbbb ("ARM: dts: Fix timer regression > for beagleboard revision c"), so there no need to (wrongly) enable the > old timer quirks for working omap3 revision C and later boards. Thanks for the explanation. > 8< ---------------------- > From tony Mon Sep 17 00:00:00 2001 > From: Tony Lindgren > Date: Mon, 7 Mar 2022 14:28:44 +0200 > Subject: [PATCH] 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: 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status") > Reported-by: Kevin Hilman > Suggested-by: Kevin Hilman > Signed-off-by: Tony Lindgren Reviewed-by: Kevin Hilman Tested-by: Kevin Hilman Teested on am335x-boneblack and am437x-gp-evm and am seeing pm33xx pm33xx: PM: Successfully put all powerdomains to target state on both boards. Kevin