From patchwork Mon Oct 14 09:11:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13834551 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 AC7D7CFC52F for ; Mon, 14 Oct 2024 09:43:19 +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:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wdvKNvGzumUXSlt5L+eIRW+tInE4yBzZKKVPMUHT4sI=; b=GqRWEhoMijq6u0Pao5vJ9Fecu7 lZZZPumZ+HgZ7yH+WAxiu9FakUN5z9P/TLfCVcA61GfBa739tsrDS7RGn8ju2YLEUAComxo4q0sbd tYvJiYM7defj3OfrO2oycjaUoB0+WRzu595SjKeIxCSSOxCIVsN3fZgVzdpePAkSbErGre8XWE8QS lbf934YS8a6VgRvzjUeUugfEFGvLNYvf+kT1mUgn8o/Yij1jJFEOGd8v+S3ir4rdwegIixBKZ+590 42+am0dmSfjOPURCdIr/6Nrd9lMJXZhDgJH4vSZ5t/apDr0frPjXpn3BVN3h103RN2qrhrds/dWiI RuU68KUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0HbX-00000004ZQd-0tRm; Mon, 14 Oct 2024 09:43:07 +0000 Received: from mail-am0eur02on20631.outbound.protection.outlook.com ([2a01:111:f403:2606::631] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0Gz8-00000004PmJ-1tsa for linux-arm-kernel@lists.infradead.org; Mon, 14 Oct 2024 09:03:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MFaMAok2L3Hjg024R3Ukwz+6qBY8YFN4eeuu1RTfMEefbTEvc98c4eQeUV7KoBv7vCelw0tQUydM8TtTomvs+gjDrLKLS1boG0sgHlWgpTWF+Wzq8YQeT6xsIcbjdCw+0rFiH+jvrcppC97Ketv2bN7cX6687f5J4uj+Cs4sdo2jFfYMsE+4R5O9JxDLTuJTa4MUVo+txVYZ1mQMMiI39QfdUNJfBoLhSKrROHYl98Zt5ykjKt/7BuwSqlMj6vfC1yHqb8UeTgQuZgbs72h8fKoIz4uRilIvMaMnl9SpjHGnspLci5RN7ivvvVGUMo6dmuf/LiL07ERN3vRFDIahZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wdvKNvGzumUXSlt5L+eIRW+tInE4yBzZKKVPMUHT4sI=; b=gAjs8ptdSLMVLTV91YONZIytl5xLucaw81XtbNlTVIZZQ7oD9vOw50KGdAMpyMhBiQt9dQktMaFobtlcKvAcONkY4qahVb5Qilh9u0qwFZUCGix8baiZ+ooD5ZRgQ2Xdp1g6gU2AltC4WHs0RziFeniVKxXR9ksjTodMZ0p2sLxk0RJ9vx3vYZ/MNG0ZpEAoLa/n9O7xpU0oHisxr4Ti1wADF95yq+V/UUGtKLCZArU78kiNCm6BugmZXk1nN9jIyqi/DG7xRsO6b3X2z0vx+cW2EkcbCRjFoZeMrjMAYESSvHtsqKPqXpRY6aIFYzHmyl2n7tN0NlRBTIfEoKRNhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wdvKNvGzumUXSlt5L+eIRW+tInE4yBzZKKVPMUHT4sI=; b=dxSFdCOXUuQ+HZEflL5dm0vCjEkIiVXT5iSqsvTsaA81lCIs+UtI4v7RNefXuKYK7pTWWcHFO155WzkbOTZOn7Fi/b8NE9J44G8WcqEH/i6417nvKQLb8SX9IVkR7koGh9Sgkxv75xod8sSq+X5ufDFYtQdRsAC+oyCARtTo3X16c2TMCV5C26+KseAfeBN4wJ12AdPIWDlBxa8tYEKAVEdpLVg9NkW7TTr5/FlXhXisoUzrt5X5GCmSXkLh7xfnl5h5hhmDRd1xAsREU2BtSOl34eRwtaDw3PJCS4BIDZwHYEMR+EVS35wS0OtMegyosgcQhCyL0t4zMYXeD92ytQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DB9PR04MB8461.eurprd04.prod.outlook.com (2603:10a6:10:2cf::20) by PAXPR04MB8765.eurprd04.prod.outlook.com (2603:10a6:102:20c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Mon, 14 Oct 2024 09:02:53 +0000 Received: from DB9PR04MB8461.eurprd04.prod.outlook.com ([fe80::b1b9:faa9:901b:c197]) by DB9PR04MB8461.eurprd04.prod.outlook.com ([fe80::b1b9:faa9:901b:c197%3]) with mapi id 15.20.8048.020; Mon, 14 Oct 2024 09:02:53 +0000 From: "Peng Fan (OSS)" Date: Mon, 14 Oct 2024 17:11:23 +0800 Subject: [PATCH 2/4] clk: imx: lpcg-scu: Skip HDMI LPCG clock save/restore Message-Id: <20241014-imx-clk-v1-v1-2-ee75876d3102@nxp.com> References: <20241014-imx-clk-v1-v1-0-ee75876d3102@nxp.com> In-Reply-To: <20241014-imx-clk-v1-v1-0-ee75876d3102@nxp.com> To: Abel Vesa , Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Aisheng Dong Cc: linux-clk@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1728897092; l=1501; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=ymw2GjjoDDKGoLL2K77L2xxO6NJ0H9lsK5VA9yIxUtA=; b=ZP8NYaa4S+DFKcFlOpHarpyP2wmmB8Ry7k0Sq3edfJFNRNtDTYyCmr+klBq4jhAtSpSk7oyvx fTVSGV2VdpOCIYqC/+VXYL25EMmR/NaKnjF9tLtT31NwoXFhlGeUWeK X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI1PR02CA0019.apcprd02.prod.outlook.com (2603:1096:4:1f4::15) To DB9PR04MB8461.eurprd04.prod.outlook.com (2603:10a6:10:2cf::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB8461:EE_|PAXPR04MB8765:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f74bca5-4915-4722-8a0d-08dcec2efcbf X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?/hZZXSSkbpaU0FJqu0q/kps4WzrG7fP?= =?utf-8?q?VDb7c4ZxXmdl58OWCN5u6k9BOs0FHMTLUmOMAqHMB6KW9hgkmikzAMbiIemp9QcqN?= =?utf-8?q?oc6tO7jsdYLpRF6Hybkj0+TWCQ6v1/AjPudeYgFO2hyoKsgfhHiZRtjnOPSBdqSEP?= =?utf-8?q?qoh1uP7ekVmpy6UPbfwuHRNAyCn7gi04hCeYjD52PPHvRa1yM1XKDES7t+Gsg9zQH?= =?utf-8?q?raeeiYtlgOtNfhOmsfxFspeeaR7ogx8hd6+r0GG7uVHGEFPsYmYSiwZwUliaf7XDX?= =?utf-8?q?lq7NF1pXoV1w0LDYSCL+IIZHWxbaaheg72Objz3CPw6dGrvtLo7bZA7bDF5qNF39k?= =?utf-8?q?N+Z7MXsEtvHgwovDFkOcMkZpPBa2B/kNB6sJq4utw20zhKGL/ouU/whI6ckaHjymO?= =?utf-8?q?nbQdaLbRpQGiH6xLcs1C6VYjRUjmUTNcX2XuefQKt4uuoB5WwoNOs1IJdJNZkkTkB?= =?utf-8?q?B50r8JuRFU56gIk62nq1ONuzkCNH4ssCCV/sqwta4jTTtBh4wdypVhtN+j1HHLJgm?= =?utf-8?q?30lWQ9rf9i+YRRslaNIaEG0RvtTkwJL56cYyKrY05lwG4SMbuC0PmPDPvLWufufvq?= =?utf-8?q?vQ7Tw+GbGrUV9PZcrQIoqrwFBg8z4LPMgDyAi5aqzElqAW0Xq5xoir4Gr0Dc9M7u1?= =?utf-8?q?B2kDqCskE1kgWk0Q9SAFfRQzuc1FK0lZqNMkJApJANzeJYr024Qns1d9nyM1MJhn8?= =?utf-8?q?iCk6BQb8k7YFs2DTdWsaDcViDjWK6L8yYJ99Aaj7VNMdkS/WXINYEq3ELMyTgjSKl?= =?utf-8?q?d4jeu5ez/jKdtBX8lkXO/bwBJXV8E53YFGhx3DmtD4kGetyKk85IHcPu8rVUIcpDp?= =?utf-8?q?Y2E4oIhaOOpZLKE1+3/7qb3QEXv8byV03MYEreoQSgZUvKJQWwhlnWDCU9qG3xr67?= =?utf-8?q?CNtBLIeiPiTA5+AfoCA9TaX5bWA5LYF0n23ZPQv+ZiedvMSLXc1OYPp9So+A5/lv/?= =?utf-8?q?ecKFwbLe4NabNWg0TJ4J3aEtSslNKvCvT/zNdPrify/RzIZTr8qhEc2Q+NAzkU8Vv?= =?utf-8?q?Gqt7O+IlrewZfRgqzBz3o+ykbMbNYAwN/SqHB1jBQHcbga9tl9DGwtQgvyVgngRCz?= =?utf-8?q?7qB2NWVexql07jEUoCnoLyRTN5tHDxysmFjMnZuCYcawzN1yt+nY9Ig/lq12Tf5pY?= =?utf-8?q?wQy+Kre6sxiyKw+RUTWNQt6K0IzH01bQmMkI9NadUEqljBzXd2SEvWQkDoj1k7Ug1?= =?utf-8?q?kz+hTCcc3S9SCJX+nl/ekPvR5zCR8fXPDis/ggfAYqU9zC5au3jW9PIyAkdJ2fPue?= =?utf-8?q?U8vZTSq6l3YyWdfoK3j63PFn+4DYb2bGF0A=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB8461.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(7416014)(52116014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?M3fDL92nqe6XihtFjDWqV2KVMcdJ?= =?utf-8?q?ydbw3a0++N/U2sa4ErQy2uQOeHV8VNjkgah0wiQFrmiRTxSKFak+1W2up/U6bsvjR?= =?utf-8?q?/YHzC0jggswuFbd2LnzmzJLW3CjsZQoevjX5BUVtK6/fGpYoI/7tsmeLqi6BhugBv?=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=?utf-8?q?1uTlE7ZWI8Bn0keb9uWwvXN4LHiTOxkqV2HLc9Pbsu3UDxoILKD8UU+ZIeUFB1QZr?= =?utf-8?q?QMHTyyadhEjwlFJMn9UEMdPAe2LkyF48vsi1Dm/GFKUD2IaOKsyWjYPj4lfT9S206?= =?utf-8?q?Af8iN9OB4jjvGTO26fvIXll+RjBivwtvZFRdlO+8PvMP35cFELaYtGGYxPxnH1FNh?= =?utf-8?q?H4rnYtOtpaJdWsy8Nv79UE+Pu/PtaTpNLhS6HD+1sveZPYGTqtRf9w+NkRwO2B489?= =?utf-8?q?3TvF7RxFwkHTV5yXrTo6Xim4NMBDkUcwPB98WHEPF0WfhT752GiJhBnVyNZKP4mIu?= =?utf-8?q?SjOj98+bzpTyMDu8JB5q9Sk5e5cfsVjQ3ep1AKiMEVkG67uZigSFderUEehOmjbzp?= =?utf-8?q?Tp2Z1WJ+w90jf4rzlb/ruWLc6G4P3qF38Pn2U4jI2k78nbzhxgHxG9Nefb+TrfvLx?= =?utf-8?q?07HLklAwYaBXngRsAIgb9VpQQ3IF2BxEMhCsF3vFEbOgYX5y+SmhenGNkD8oYD/sM?= =?utf-8?q?L8T9embcxx1M?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f74bca5-4915-4722-8a0d-08dcec2efcbf X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB8461.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2024 09:02:53.3611 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xNkMpz3ri6gFWqMsmTOCFdtYfSV8JM2WAYRs3NYs0BQQbsOSYCaD/O6PtkKDn3oirBULvwot1LCjSOyH3/WaWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8765 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241014_020326_509947_A534E3E7 X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. 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 From: Peng Fan On i.MX8QM, HDMI LPCG clocks operation needs SCU clock "hdmi_ipg_clk" to be ON. While during noirq suspend phase, "hdmi_ipg_clk" is disabled by HDMI IRQ STEER driver, so SError will be triggered when accessing the HDMI LPCG registers. Skip all HDMI LPCG clocks save/restore to avoid SError during system suspend/resume, it will NOT introduce additional power consumption as their parent clock is disabled when suspend. Signed-off-by: Peng Fan --- drivers/clk/imx/clk-lpcg-scu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/clk/imx/clk-lpcg-scu.c b/drivers/clk/imx/clk-lpcg-scu.c index 2cffec0c42dccc256e8dc5e9181952e250870a76..466c0de11ca7d5af42a5ec34fb197dc90b1742b1 100644 --- a/drivers/clk/imx/clk-lpcg-scu.c +++ b/drivers/clk/imx/clk-lpcg-scu.c @@ -162,6 +162,9 @@ static int __maybe_unused imx_clk_lpcg_scu_suspend(struct device *dev) { struct clk_lpcg_scu *clk = dev_get_drvdata(dev); + if (!strncmp("hdmi_lpcg", clk_hw_get_name(&clk->hw), strlen("hdmi_lpcg"))) + return 0; + clk->state = readl_relaxed(clk->reg); dev_dbg(dev, "save lpcg state 0x%x\n", clk->state); @@ -172,6 +175,9 @@ static int __maybe_unused imx_clk_lpcg_scu_resume(struct device *dev) { struct clk_lpcg_scu *clk = dev_get_drvdata(dev); + if (!strncmp("hdmi_lpcg", clk_hw_get_name(&clk->hw), strlen("hdmi_lpcg"))) + return 0; + /* * FIXME: Sometimes writes don't work unless the CPU issues * them twice