From patchwork Sun Oct 27 12:00:11 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: 13852494 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2079.outbound.protection.outlook.com [40.107.241.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12C8216DC12 for ; Sun, 27 Oct 2024 11:50:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.79 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730029823; cv=fail; b=fI/+MPfRFtOgSshDcpnAw4G7hi451QOi6vFSPfliJFgSgFJsh0ojAXXuRnr2+a4TjJ8CQxtD5qJesZAdmcuCJh0eqUgXmjLUhPlml96TEVFEMJElvCh0tw3EF7aE07Jh7LmhQNyfp/RdFLPVR5tsAT12iExnCsEOuTgtkIoFHzc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730029823; c=relaxed/simple; bh=FnyQJ4KbSA5IYehksxsDruXIF7wDWgXvyU0rehFEl0M=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=MtjVeHtqx5S+T0uP9jAj91hQYvhnjLJ0Nl1CHeJSVa43+/94mlQvj2WJfGKikJ0E9MgETIK1y2plQe+quqjaQpegxFKBxn2YJEjgLAaKddx/Ki4PHgnP9b1LJ5eSD4azfxUyTTo1gtLRYoKIeBUrkbfHYCVGh6BmSQLEpPZFl1E= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=d4+3wXqm; arc=fail smtp.client-ip=40.107.241.79 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="d4+3wXqm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=f2+cBNjTy2WypiP9t1U+x0enAfKrnhbmNEDv3XmPeJwD3D+a9zNpvykZ8AdZqEvPqVZA7mGAX5Fy3yzKi7sVl16iZrrxDZiYzh+pOP0LjYj6nO1Qf0ajQoYQzHZlLeJNY2aCjC/S+D9GMjzZn3i/unL588fmYD2Dcsc2VPv0y2F4RYsJyFwQaIGooDPINxpG6EZBpQdG3HYKgnzi8uWvXtGCVvZCBOrgr3Q1Lg/HdmHPtiDLdVRxJkFI+z6ojr9BGFKFhBqcd/McVzW0jkvb6MQc05m3zIfhGVDeAPkmKiJeJZ4p/DBKVK7XmZu+MPPI3qxqSllC+J1CXtface4QCg== 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=aeMdrbEeiHP0OWLxFzTmf1X1E5W0VvOXXT8+i272q4Q=; b=Caf67s8Sy/qBJ8M32pgT7vyNmRG/xjt6Yt6fORISj3LonrxJgM4FgpNVVAVcu98nrW//OZhacDwls4BxRdVQMaFWs+/OEvxbLSZQYzF+a5QDVGVHUF6zWPyVnlcPUdCw9SoFcKKSl6ig8Js/WeH9F2xP/gBuQouW5i6X3YSN+7Pj/rXxoW/SM59/F6EEmDjtmi0ZKyf2wkJq6Qfg8ng/b1ld7yhPGFkfvIBeoMJjLS/WkNGg34QkDUOHl52ypyczVeK6xV4q9P29jrerp58yjLJwuLIzpi3ZVKi0iutk9fhoSq2PAVQeUGiGc9YfUUHmppl8QnGn1Zz3yyAcKPe6LQ== 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=aeMdrbEeiHP0OWLxFzTmf1X1E5W0VvOXXT8+i272q4Q=; b=d4+3wXqmLgdwscuh/NNO88jobkyH8y58LQXtf/5lgP9Bohiq0NrHkgKtgSmdiW0YvANK41VYEPsu7w9UzFFkMO7dOXXa/7eMLGx1bwEr7LdoxFhRCjDTqg9LIyo4xLBlvcJXy4lY6SRme8rpT0b934zx1A+WTvcE6wRYGH9nNznLLfEFHBjXZJfDvVf+NCqOHNfl/Tib6Z+7ofBazUuOLzpF9qOnJfTh1HFqUIU8VX3B+PgdFUqljOLzx+Ic96pi4RXNr4Q1E10WNVhM+iSRDIDK5QAytyg4gEKSm1JAr9i0gH7GrD9023fLWfTAi9vXvpcD1Y1NMFDlsJRJiaPUWQ== 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 AS8PR04MB8689.eurprd04.prod.outlook.com (2603:10a6:20b:428::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.24; Sun, 27 Oct 2024 11:50:19 +0000 Received: from DB9PR04MB8461.eurprd04.prod.outlook.com ([fe80::b1b9:faa9:901b:c197]) by DB9PR04MB8461.eurprd04.prod.outlook.com ([fe80::b1b9:faa9:901b:c197%5]) with mapi id 15.20.8069.016; Sun, 27 Oct 2024 11:50:19 +0000 From: "Peng Fan (OSS)" Date: Sun, 27 Oct 2024 20:00:11 +0800 Subject: [PATCH v3 5/5] clk: imx: lpcg-scu: Skip HDMI LPCG clock save/restore Message-Id: <20241027-imx-clk-v1-v3-5-89152574d1d7@nxp.com> References: <20241027-imx-clk-v1-v3-0-89152574d1d7@nxp.com> In-Reply-To: <20241027-imx-clk-v1-v3-0-89152574d1d7@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, Abel Vesa , Peng Fan X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1730030419; l=1554; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=k5AgvMxJOkPlhKlSMu3UDdZczpUXI2PHGzFfZGRxtfs=; b=h9DapNZroXt/cac+Tk9/QxyshQKZrQEjnIj8f4f2v7n2b+Qo0H3xPMkLdQveOcR437j8IT5mw pstmqx+cr7YDPAgl3m4/goolf2Xx/VrGBxqD60Xc24qnbK05Xq95ctd X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2P153CA0011.APCP153.PROD.OUTLOOK.COM (2603:1096::21) To DB9PR04MB8461.eurprd04.prod.outlook.com (2603:10a6:10:2cf::20) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB8461:EE_|AS8PR04MB8689:EE_ X-MS-Office365-Filtering-Correlation-Id: b818e4e1-a7b5-405c-34db-08dcf67d8847 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|52116014|7416014|1800799024|366016|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?RIA3L0mBQfaAOINOr11CnkmDAQN8tEJ?= =?utf-8?q?ukg9WmFcWqyJz3fkUIy6w8s99YP+9thQ1r9xsfOctvB2z7l+8P4GE1sCseF8Otv+L?= =?utf-8?q?0FKe78OnGPpOVz0hBkRfQcNrgfve6G0b+16tDWxDfMA3owTsCs3nVcPCAlI/ejTnO?= =?utf-8?q?A7whM8G4dW1JM1l8KlcCWsarOFvb4ar2k+leRefWw0D4H6j7nGPHakRZ8x78MjFus?= =?utf-8?q?jlA0azclOi0DpMxpVBKt4gb0csPyCZGX3qoAPm03EmRSQL2Bs0d+3EbeQBKNRwYgr?= =?utf-8?q?xRcK4E0f27Ak7Z8MUrJ5MGM2lyhg9YhwxNdrA6Y3c8sTKgnpPdEaJVTnGEMWI1Ic6?= =?utf-8?q?cBM3f5uIf1dC1YSQLeRKNKr+T/lkKrEDInXAGLZamuq3HsncGoAPWTYTsTRbWCT9q?= =?utf-8?q?zsUkIsvaXQ0P5h1L71NoSnv4tNsJghIvZwq198EvUGg9JbBYUTA/ztuRLtAJ+Vy6U?= =?utf-8?q?akjUIcUpF+lQiy5DdBblpbmQ9AYPkriYnCTUjCH2T0oXXBSrfgwFygq3yNgU1YZVm?= =?utf-8?q?CZTlCnum4x6ygnSW1H5mzfWJvOd0R99p4ghVCIn3Tu8Bho593ymyw3BDSGpLKDUFT?= =?utf-8?q?ePv4aU3GIfsBLcjntqUMHCSZVVPKN3FVV4j0+6h2B6rAw9cXE9eQ5SQyJOaI345lK?= =?utf-8?q?4YfIfsO2pHK+2b4qEs0K4yPlQcflVHc4EmRZmhlig8YWuRpGvrgPlkdvlp4GzqenG?= =?utf-8?q?XesGrlv7Upmj3QbszyclhIirwFDNEk0bUy2hULVwwPsTmphqtNeSxSMQHESpqoUm7?= =?utf-8?q?lErvboxcNcXpl1LYIWLM2MqV9W1eFSGnoci7QD7AVC6HMaJid5VOzzV0/k8WcKOXJ?= =?utf-8?q?dEcwg4Dq2E5iUDA2cCBZ1olSPEVOW1lWhyRNbxaXkNeP+nZ83L9eLic4rwDYF3hR8?= =?utf-8?q?3uLrupLr6B0M0JZJxNWNeWO4Yk4kAd/yX6Rqplww45kmbEPno/3JXurLw3PBydKip?= =?utf-8?q?t6KsE+ZkZOIoCC0eoJNxEgFy1AKcmslQDKD5IWGGmEvK7d0gnDE29Tycb4FwouIMe?= =?utf-8?q?bKifoygl4F6nLTZEQgZkAv0i7ccAsQB0ZUyxk4efYtZX2E8jBScM57ZfjG+tKOAxT?= =?utf-8?q?8JhQdvX6ZYc8NikiZxeB2Lp3BgK8yIoS6x42dXpLEwovxXeb95+F5b+/ZdsRtPCoE?= =?utf-8?q?/rvmDhv/LNXL0AdJbtfLjoPGB0aTbMUN6FxCryPw9Iuq856pancag+qTu/tLyZhfS?= =?utf-8?q?3yGhrGApYfu8HVRRNe97jbRyAJsNHGmwCI3c0Og0ZdKbZtqFOI1quvRftZv6ZvelB?= =?utf-8?q?Z/HQH5kUzZpk1hqZxCb1MwABbq5xDd/cdVeIn2puBpGXRM+z0UG9JSS8=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)(52116014)(7416014)(1800799024)(366016)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?W0qHCix9YzRPOkwKw6Ugrig7YDaC?= =?utf-8?q?2nDPgxGtYvPkJ31yUpJoVSIS9dWkE48AcxVIOm0JlJZdpmUlv1TYZ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KM9oaXQIdPLZJhro3SL?= =?utf-8?q?tRBkU0gNbJYcbdgJefzW5i854Qx5kW4QA+9uR0mjmpEdl7dLo3IW/7WbArJBVUIt2?= =?utf-8?q?VSJ9GM3p2Z7eS7VgYC0Uc67n0SjKEdQQsU7rigtzr8XWxGkc0usaOnF16PFG1YzrE?= =?utf-8?q?LpoaYGq4GIr4pjjJ2LbvzIDO1W1LhUxd1KlaDX6LUZcUpg8HzQND8CPFXRpWvHHmu?= =?utf-8?q?Y5S+rnL5mfoeDXmYTcLupbBvquzxYXmCQxfRjAosA+mExKFq9j8T6AxFKdmr2Rouv?= =?utf-8?q?j3IM/dW4OCe65rZz/1oe8ZXnV9ywOWXptM5QHvqbAJwC61iZ67dp74/iAQshOppL/?= =?utf-8?q?qLLnB2Jj3kim+j6GllKEEucDJNew4hUS5e6ZTGqfTdsXxF2P2z7GgB1IerjpqMcLK?= =?utf-8?q?BeLm7dW2RdBpiMC4P4zeqbOczX1u801LYOJI+3DMOBcO+/YHB2lm0VFlTLQIxrCri?= =?utf-8?q?krwcbYCla60qWUSLMj0UNPLlNQuUH8yapbtV1BQl7zKXSz6IYrh/VLl3Byl776xGE?= =?utf-8?q?xV/tC6O2ZJtpPk7uSdJeIq3qMSyknAlPc6YkZ/Oce+Z7Q93n4ftt8q/YW+zouOVof?= =?utf-8?q?iSzuzSAE9NsL?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b818e4e1-a7b5-405c-34db-08dcf67d8847 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB8461.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2024 11:50:19.8256 (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: UBUUZHvq5ae7En+0T/bRzTPR/FE7AtYiEux6J8FSIXuZRqp+ppEj5dC/gUXIRf0tYDKyh2LArYwCZmHp6KEnQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8689 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 620afdf8dc03e9564bb074ca879cf778f7fc6419..6376557a3c3d03130ca8168a6cb69eda73c43abe 100644 --- a/drivers/clk/imx/clk-lpcg-scu.c +++ b/drivers/clk/imx/clk-lpcg-scu.c @@ -161,6 +161,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); @@ -171,6 +174,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; + writel(clk->state, clk->reg); lpcg_e10858_writel(0, clk->reg, clk->state); dev_dbg(dev, "restore lpcg state 0x%x\n", clk->state);