From patchwork Fri Oct 18 10:00:56 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: 13841489 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2066.outbound.protection.outlook.com [40.107.247.66]) (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 34394201032; Fri, 18 Oct 2024 09:52:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729245162; cv=fail; b=J28sT5O1FcU5pTC41uqgXz7VHtb5qAuyUDQxtypOLKWhnqAusEeb8JS52iLJuNEU+sTX02J5tW+QEx+I8qzDYXgMGchvTDwTX3yX6MCCOZZJvVcCWrAMXGjI8El1L3T5jL6kEaM98LGAzmoZbTG0T9GCs4oa6dZR9sQ29Kfx0pk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729245162; c=relaxed/simple; bh=N/iy+g4d4ZrluabxI3N13/2R+2wZz+/hS82POc1WCr0=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=T1qVJJ7NW82vlrwJ7RZGQ+gMBJf91dTg2KVGiRX9mgctPACpSJ8mCzq2FCeAxHrMkMwHugJ5OBzZo/jEXdABcgRmqt/knxMEROzAbZscGNUTHETPoK3GLBTptZNW2T4xQrHkYppCEcG41/LW5LSiAxkcoWwhiSULAlifCBBzjWo= 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=I5zGDf0S; arc=fail smtp.client-ip=40.107.247.66 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="I5zGDf0S" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aji57qC18OPKTDm/i+gGteyLpB0eoYNqi0YPKeM/7kl3rVzheCW5SLbX8FnhfpLhfwukYfZ2AABTRyL5OJcpqmitwzI0+8n7VPUL9cBW+qh1K+XxnOY9oApXfaTEurQBJ4hG523aShclXKdBLU/VNU7s28BtilcGMaPU7iUgeQaTQDg1nIyRPnzdD719Zt0Shp3yyrQ9kCTHHAFkYOxUvdfVWmqEE5EsGCgHM6uEh54E424b4BycXly3pAUOS3c8RaZyj4Lfg6qE7TzU3GQ1uBfXXvklYogDUBFiCDMKa509Ro4plA0ZF53DXPgjv0aPrJ0K+umfUQxmi8WZA3V0rw== 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=Cm/mFQG2wVSjBXkYDMorim2bPCGjUUwGsFt9Oh0GLds=; b=CWqvGoLuqCXRK7wpS7HXGPDk3uiIUg1X6M0TkxpQP5VkNjgbnTjLO4eeMWQduk3xE5LToRqIZohGpzC0GnjXSxgbjRdtX3V9QAZkOgjQmCtMPE4UQd2PU45SqDTnlvfA7NuvAQ40nLq9MRNSOR8hm2YXI8z2jWUQeu0Thm6PCe36hFyKKfsYDX1To9Du4MHLOxkGAGsLSK0DpMac95EjU3pIMQLuLRjQXXNvOqESDjMquGw//GCpqbK2RgnVZQw7tq27NNppnt6Q6GRvSKsqRxIW6Ji8GU7gC28BKHpXK9kHGQ28aJkjkeeZuT8TxqbTw69FV9d+Yvi0UbhBPKhcLA== 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=Cm/mFQG2wVSjBXkYDMorim2bPCGjUUwGsFt9Oh0GLds=; b=I5zGDf0SoGmGTikOJxuBzyPkBQdITmR857k6IhFiRcWWZaqs1LAya1CIPDg/EQbjJVy7JLsuakuZp7HaaTwH6nXg06HIbKwz3OcgFRkk1UBM58qbXNUVGx/FwACo5ZzhfSnWt+Y13NOVZDzruQfz84DRMvAZ+lZKtrVlbZ+mDI1AH/xla6Nrc3k9pWUy5q8qyH4nCbLuVt9AhxvGbhXRKKJYa0yH6KwvVRz5Z3r1mwkWLL95rHu7Y0hLrstUJjBOgrMKssqsyM8uIZwWvYw7JsbwGs2SCW5n5PtxQPGzi8YEE1DkEiRfC6IvBvH1o9CpFhGrYKZzacXRq9qzt2fNVA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by DBAPR04MB7285.eurprd04.prod.outlook.com (2603:10a6:10:1ac::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.20; Fri, 18 Oct 2024 09:52:36 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%6]) with mapi id 15.20.8069.016; Fri, 18 Oct 2024 09:52:36 +0000 From: "Peng Fan (OSS)" Date: Fri, 18 Oct 2024 18:00:56 +0800 Subject: [PATCH v2 2/4] clk: imx: lpcg-scu: Skip HDMI LPCG clock save/restore Message-Id: <20241018-imx-clk-v1-v2-2-92c0b66ca970@nxp.com> References: <20241018-imx-clk-v1-v2-0-92c0b66ca970@nxp.com> In-Reply-To: <20241018-imx-clk-v1-v2-0-92c0b66ca970@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=1729245675; l=1501; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=Bc91I2eEi8/lINfvZA+03pByFBF/wxNxtYOf5hDZEIg=; b=Y+dGz3t9xvJH8MXD9XRzQd4Hx7F8NpX8IvWvzxTdUJyMc6JHXo8QTNMMvkbMDsDPJgmBcw3Hh 4k4MKmfRuY+CqepJ4Gw+F+q4pGBmA5xbw4ZUuH7XEO7+9otjY7tVNGG X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2PR01CA0028.apcprd01.prod.exchangelabs.com (2603:1096:4:192::21) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|DBAPR04MB7285:EE_ X-MS-Office365-Filtering-Correlation-Id: 3913e856-4958-4af3-61db-08dcef5a9866 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|366016|52116014|7416014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?jiUWc58c7YAytpTKNxw5YX69gpyPXUl?= =?utf-8?q?+6cx7m7qggOMMaryd3DpYJIfZzNy11ktCJr9HntArKtlq69laGE2bJugkCeYOsGvh?= =?utf-8?q?bXeFONDkkNELWPiqtleKPd2kussCQw7/igKJhodzDOSNheQwk3pz1nHWq5/9ZZGST?= =?utf-8?q?y+NwH/yXSjFSqBZ26fBpwrCmqm4sKtkJ2nwkzuRbEQUua7UO8jWRh8RAYkBkqppaH?= =?utf-8?q?YWFFEpelT+adeU0Cg96xqhvJq2TB/0z2EFhizLzNziLXOOlGVe5i1bKNChR6xGpkZ?= =?utf-8?q?FHkGGlxFJifR1YxBqv10jscBRF4kt1Ns2HEUhSHu3uUKmhCfEONuDb3nOTdw5Lr/S?= =?utf-8?q?CHVXlDVaaRy9arYd8LJLcKSc1ouaZPNg6mzGODXhiXn772uLKqEasfbvR5AafAG64?= =?utf-8?q?/K3Ms5p6No7P7us/JrJsMA5xmI7hf/ebeeLQqJNq6WnH2Qz2wqC3uM7HVxiGnd+dU?= =?utf-8?q?SawNdAPNXMfUJ4vUukbdJhOe+qke0tz9wbqp1JxpoFyYtwbnpowz8dq8+S0/8XadZ?= =?utf-8?q?IWDGLpu4YKJ4eAweHNZDUt1H56ifiNCac3/cOhdqBg7/T8mwnr6EwUUSH9FllHHe6?= =?utf-8?q?NZs+5NKxGkOyPHY7WWh2kdi4xTB0Dxu5cispubMpVpv4l7VYHlBCWU1s4pBsQ1bpz?= =?utf-8?q?PWJ20DqwjulBvi3ClAmZeIFxYhMvlA/yOuA1e2iIKFeahx0okEa1YBouIdtJZddQe?= =?utf-8?q?jXubSPpgRi6XD26kJpVGxx2kCsurHZfuqU/FCejICCDD6Th4mNi0+DUcmVVvPd/XV?= =?utf-8?q?S+TwZpUGu+hPYt27sxCaJZo36g4u6d0GWdQLf2XxDcDgWThn1T/V4YD7lM8ESgZ8A?= =?utf-8?q?9+0IzMIdkdmWyWSP8XpH353kcduJBILJV04lRBrgxvT8jTVwiv29w00EYhRf69IE7?= =?utf-8?q?G+cx0lrj0eZtaio0VjySmbBNOlEyN9sm6Z25sSGsakN+YB1Jzm3su7ul5tfNhKdbV?= =?utf-8?q?aWBlQUCtZFNNCe1g/Uiq35ssdFK02km80+jdQrVtxIDqiLmdesk0yC/oybiKNXQ1S?= =?utf-8?q?UM53cjr2WRMWAB2j1vkGUlCCDdIXUQNUCfszX7AdXeujDBx0jVaU37twkV7TRNqWW?= =?utf-8?q?XoOFWZfEoW59163qStZIEtvIsppgIu9gWaaHWBPt42GzVVEQDqpR83pDOsN261ihh?= =?utf-8?q?lRz4AbEBZWfyJAwQmHlyYQhEg5xI9MccBkZ8JUNML8A5igVjd6tgBIYYqZwd5NGRd?= =?utf-8?q?JJmYzV6YWfDKN0+FbriMaUE1V9iTCOKWhVOWDbeLA+xato9OMssZSrL0tMv2TdAeJ?= =?utf-8?q?y9bYqzCMYNdu2z5eWqlQMuXoZQjZvY1qkOigMEQ55IDNVxYm/r4YrUts=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(7416014)(376014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?nbjVksECNjEpxbH3ZGlLB58HcSuh?= =?utf-8?q?lS33QuIm75lGcV6uh7qRuy0AeTdoWZ9YXWCGPgQ2l/aLCCWUvbhUAY+rqUM4hR7Sc?= =?utf-8?q?MzcsA3GeWgr/u4Mcf/U16D44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T3k+XwcFIsrS0t/dXAStQ/AO1aWr0iQ7vT5xY8Q?= =?utf-8?q?tOT8bv/JZUvUecHWk2IFG9lBk7j/WHyLxy4ntveW+4ZM4V/3SDgot83YqL/uFsoyl?= =?utf-8?q?7riVRtZiEOEexzM2ortjov2an1GOWCnWALlMo2J9eIdFOrOuEJi55V+hkmQUIMpz4?= =?utf-8?q?aoxMWO4nYtSpBfucNjELLga8A8mx1K820PSso4N98ObbhbZfjYmeK0V+ajyvdV2zH?= =?utf-8?q?My7+lxPBTZhD2XSrVCXs7PJ4BqFioAO+Adzu1R9DCHEYbFAu/ib15BeLrsMVkgyYM?= =?utf-8?q?sNDY4awmQ9HWtnHryBaDLQLHF4GcT6gMy5t4wutM9z6ySKtn1s/DqwwK606+sAe86?= =?utf-8?q?ebR7IKrulrMJRczFGOOwRLkvh84+x4Ahg2ViW3hyTlf3tp8c7dqu4SSLnc5ekHILo?= =?utf-8?q?nE4LNx/ukZOlSjg/4ksv1BkHubxWyI0xQhrGoxsL9+5jWcveVhY9/B4iuZtH2OFiY?= =?utf-8?q?j51OnJhSRKYTHMJxymuomKSfvDaz5D14yKspNH4Nhp0mKvYdxPsu6PSjv35VrMBCd?= =?utf-8?q?tjwMZu6saspn?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3913e856-4958-4af3-61db-08dcef5a9866 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2024 09:52:36.4009 (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: phywFUaCWgFJsgy6we+Rk2u5oIZm5nkU6C68bbHUV7N4xykKF/PUujgn10rUtAB+Di+2FMuAc6CQoX2tyux3eg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7285 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 cd42190233662c66f2c354f0a2eee3a2531eeb3a..07deadcf73e929841fe113c7febfb6c9b6c5e719 100644 --- a/drivers/clk/imx/clk-lpcg-scu.c +++ b/drivers/clk/imx/clk-lpcg-scu.c @@ -163,6 +163,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); @@ -173,6 +176,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