From patchwork Tue Oct 22 08:23:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Richard X-Patchwork-Id: 13845285 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 18863D1CDB2 for ; Tue, 22 Oct 2024 08:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=ZGkLsgNGgtfDauf8zg5VUFvg7kUsgGMuwlTOhxVF9X4=; b=uKUZEvlVWTQjQYoh/2Ym1ugUFz 62VaW/cQapIL1BBcaF+f1GHjQuDF6e6RpKlTXESIa1hqJoVyBBZKqaN9ORqxjqZWaCPibe+b4BZU7 oe5cqvq9WjQdjFKOOuvX4JQppEkKbjyrH2NA0t99s4SZIh7Eh4aQW4NGpPEj8gBxr1y6YId9321yd tWaksNVujoloTlqkiGCPCdj2Bxq3QiQMgBcNn7rWy1JdBq5bpOEjGlmVQLZM+PZaeTqBgEWqUau3q Hk95RVExxUzX6+2PrAgWbWlLus0xO3zS1n00qPggAVvt3/iiKPO5PQJuA5SuHYi5n5s7Y+KNcLQJe tGgPKSCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3ACl-0000000A9oQ-3THW; Tue, 22 Oct 2024 08:25:27 +0000 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3ABF-0000000A9aL-0Z28 for linux-arm-kernel@lists.infradead.org; Tue, 22 Oct 2024 08:23:55 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 0C2BCE0008; Tue, 22 Oct 2024 08:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1729585429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZGkLsgNGgtfDauf8zg5VUFvg7kUsgGMuwlTOhxVF9X4=; b=TFU1buJotNx+cqphHj/84TYUcdwdxPWa3Gy8i4ZRHnJ0bJ3F7sE6aByM6+/H4Rxf6qz1eX 3iK4yxHGf1ZCUybvBvwf/Bt302pZbNS3vLtk31xGbCLljvrea0RjuI/xEPV+CWjBNAZWEA FG+Ov8yEtf8yAgJQgqCHKXyw7qE091vjrZX3ms0/vVYliFljyx2oQTgRBdACCHQQQyGJTh uqsuKD+/acDp9Y1EwKp8/9EQGRBj70XPdpPDyeknndQjNvhRgI7VpY327M2T8ex1M8uW5x +8Qg8LiST+kQz/0QVsn2fY0eT8d1f5VAjVGuaGNFDIWChC8S4m3OettrdtnGaQ== From: Thomas Richard Date: Tue, 22 Oct 2024 10:23:36 +0200 Subject: [PATCH v2] pmdomain: ti-sci: set the GENPD_FLAG_ACTIVE_WAKEUP flag for all PM domains MIME-Version: 1.0 Message-Id: <20241022-8250-omap-no-console-suspend-v2-1-cc3d102b8a1e@bootlin.com> X-B4-Tracking: v=1; b=H4sIAAdhF2cC/33NQQ6CMBCF4auYWTtm2oJUV97DsMAySBPokBaJh nB3Kwdw+b/F91ZIHD0nuB5WiLz45CXk0McDuL4JT0bf5gZNuiCrLmh1SShjM2EQdBKSDIzplSY OLSqqjCHbmkoVkIkpcuffO3+vc/c+zRI/+9uifusOKyL7H14UEnLVkTmXjnRHt4fIPPhwcjJCv W3bFwlM0f7KAAAA To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Ulf Hansson Cc: tony@atomide.com, khilman@kernel.org, u-kumar1@ti.com, gregory.clement@bootlin.com, thomas.petazzoni@bootlin.com, theo.lebrun@bootlin.com, richard.genoud@bootlin.com, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Richard X-Mailer: b4 0.14.1 X-GND-Sasl: thomas.richard@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241022_012353_346977_EEC026D4 X-CRM114-Status: GOOD ( 13.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org With this flag, if a device is marked on the wakeup path, the corresponding PM domain is kept powered on. This commit fixes the no_console_suspend support for some TI platforms (tested on J7200). In case of no_console_suspend the serial core marks the device on the wakeup path, but without this patch the power domain is powered off anyway. Suggested-by: Théo Lebrun Signed-off-by: Thomas Richard Reviewed-by: Kevin Hilman --- This is the second version of the series to fix no_console_suspend in the 8250_omap driver. For this second version, the patch 2/2 "serial: 8250_omap: mark the serial as on the wakeup path if no_console_suspend" was removed. No need to mark the serial as on the wakeup path from the driver, as it is already done by the serial core [1]. Regards, Thomas [1] https://elixir.bootlin.com/linux/v6.12-rc3/source/drivers/tty/serial/serial_core.c#L2407 --- Changes in v2: - remove patch 2/2 "serial: 8250_omap: mark the serial as on the wakeup path if no_console_suspend" - Link to v1: https://lore.kernel.org/r/20241008-8250-omap-no-console-suspend-v1-0-e7f0365c02f0@bootlin.com --- drivers/pmdomain/ti/ti_sci_pm_domains.c | 1 + 1 file changed, 1 insertion(+) --- base-commit: eec50dadcc91583e08dcabdf83147f6538831b5f change-id: 20240819-8250-omap-no-console-suspend-1073308d3714 Best regards, diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c index 1510d5ddae3d..38448b4a035a 100644 --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c @@ -186,6 +186,7 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev) pd->pd.power_off = ti_sci_pd_power_off; pd->pd.power_on = ti_sci_pd_power_on; + pd->pd.flags |= GENPD_FLAG_ACTIVE_WAKEUP; pd->idx = args.args[0]; pd->parent = pd_provider;