From patchwork Fri Jun 7 13:33:39 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: 13689938 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 9520FC27C53 for ; Fri, 7 Jun 2024 13:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GHXswN/qgByo5FY2acODRqNum3ed8GWXLn3o86bvJHU=; b=WQrGOJ8teNjnMZ vpZN7WxL31O1N1GFoYuxt9hMJGR8CNeSRiwGZvLaMRMq7N2U2t1eTLow0M4xtkYB2YtSHktZ/DU+3 F4HtKVdN3GsnQ2PAcOHWC+z+aJjUp5cIaLG1QkmiAHdhz10Pp/ANIbnzUEOo9pDwBkYQ9CaYjf1us oVsbg3tslmaHzK71InOl1SytPOsY39YOkLA6VHBiDbb/GKyqVSecwMDo+BADtHTOQEWIA7pRLdwgg 342g8XuW75gRz1O/CQ9/2jEf8J2f5jqv+Co7T7fWoxlE21NP8aIgMDNeWjeX3Ps+FIOWaEwJ183Ar 8drld2iFPvb0FZJLAQ1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFZbQ-0000000E7LM-1XJa; Fri, 07 Jun 2024 13:25:56 +0000 Received: from mail-db8eur05on2060b.outbound.protection.outlook.com ([2a01:111:f400:7e1a::60b] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFZbA-0000000E6x6-1r9O for linux-arm-kernel@lists.infradead.org; Fri, 07 Jun 2024 13:25:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NmWxFwa3H4QIXetO5tUQQVybySUhYTQSGw8VKAvhmRXgN2XA+JMYDvYrFPNN0n/57E5IkF2vo4+kuGXgv9LYuSltsQheA0L1oPleEfwdH6PV0Hx5w2ccuWBWsP0j6TKkZBSdrJb0Y6rXYdT2HW5OSpTWInhc1km4wAWccQHLUIWp+gHmbZI0Qm8JbRULlRaor5V4XlYGPDojj5BAbHQCK/SC9VccoGehv6Onm3IlI923orIU0hqkyL4RxOxbNhwHMcxb8dpgOqHTuISDRLYPgQ5fl/KJbh2T99ZDUzpbWJrXvfxnc1Y2vTm7Cct+EqxdHQciThow4NwbZmQ7RaigPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=+Xn+IT81wV5cTyz4USGrnh/ChDNJlpXbvwJEfxkiinw=; b=YHzY1d4kCnjZrjBLNyVbsFinZb4A46rysU28CGTyTF2wqkvg6EOTFQYMxvpsVM/6qoIURKO+mN5e4OGJO6ncM6MGe3R6nkN5ng5OKSOHNtar1ESpAqxRRuDPpKnzrqIx3Zpy2g/b1nobXOafxJixqBwpa7UgrHlbTlDvzfRU3XfpvdImc+CZEuoAAcKUHWBTgDDn73mgUdXH8UhYB53Z7ePi7dKIsLUzOh0ffkGE+/hAoybER41vbgwdlzWFF/7Zzhuyd6FRFd5pr3Tk7XSPqRKcBliS27Vh9x6v2b4NOL0fvykXZippEAoW7yCNp1e4Rtg8zflCLqr9vEUleXLw3w== 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=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+Xn+IT81wV5cTyz4USGrnh/ChDNJlpXbvwJEfxkiinw=; b=D58s5gTXa7/CUJ2ARu2F2Gqx1doJgVYaoEQY5RvFwZu5wqsRiD6CKHHgqmhI2mpR96i7XmY4gIuEWcsNX+BMKbvovzicg2lEaBf4IEOf/4e6G4EVOJ/cvmw7X1Iqb1jpbSIi87KYtmKy6zDwMoHOQZnTewJ29gseRB+pnZTOCEw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM6PR04MB5941.eurprd04.prod.outlook.com (2603:10a6:20b:9e::16) by DU0PR04MB9249.eurprd04.prod.outlook.com (2603:10a6:10:350::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.27; Fri, 7 Jun 2024 13:25:38 +0000 Received: from AM6PR04MB5941.eurprd04.prod.outlook.com ([fe80::9f4e:b695:f5f0:5256]) by AM6PR04MB5941.eurprd04.prod.outlook.com ([fe80::9f4e:b695:f5f0:5256%5]) with mapi id 15.20.7611.030; Fri, 7 Jun 2024 13:25:37 +0000 From: "Peng Fan (OSS)" To: abelvesa@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: imx@lists.linux.dev, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan Subject: [PATCH V3 07/15] clk: imx: Remove CLK_SET_PARENT_GATE for DRAM mux for i.MX7D Date: Fri, 7 Jun 2024 21:33:39 +0800 Message-Id: <20240607133347.3291040-8-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240607133347.3291040-1-peng.fan@oss.nxp.com> References: <20240607133347.3291040-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI1PR02CA0046.apcprd02.prod.outlook.com (2603:1096:4:1f5::14) To DB7PR04MB5948.eurprd04.prod.outlook.com (2603:10a6:10:8b::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB5941:EE_|DU0PR04MB9249:EE_ X-MS-Office365-Filtering-Correlation-Id: 97a60e7f-f154-4cd7-5a5a-08dc86f551aa X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|52116005|7416005|366007|376005|38350700005; X-Microsoft-Antispam-Message-Info: e4CiSN9TYN4SzFLhq32nkm6ln6sFjbeEADqnpVCSNoFfaUUWEeASEGgp26PAWtwHJPaygQjtUMVoXNOqU28+0ZkbRTdta1zOiYKZu8d40NBr3f5RpSwvPArfv2kGTEZtbfj15Hx6D18qakFQRKoXJ+jxzhp5wDwAtuykJnFqlpOq8d6D0SRwsuHK/oaalwqNS4/ZG2rmI8+kulH213FVFKUyrn10yKvwxdR4znlAP1d5iB57z9egjtE+0yXLY6aXX0WimgdR2usI8ELq5W5IKr+LRAO5xlUvuF6Np5V11RvgxOmlmwXeQq029LFyNzwJBPfMLlrbhC8A2WJXT6JVYyh0S5KCucf5q8z0LhdGQt6aFJ5d+xhOweQMnyMBI6Agls1EiRaA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d04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(52116005)(7416005)(366007)(376005)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PKNglZWRb8U2eg/Yp2sCzUubvFu3wZ0QZC6qUGZ08wXIrnVhBjZeR6vPJjBPJ6e/qKNNnM/VsAsdjbvmqmgEQZ+hB1NYgPWRZAfS3sa88a2ICDO7j1Lzqb/Siuf0c5+xTAkM6SoDccH8ORj7rnBSNQzpcVWOHawTJ0KvFyEuyyQrUAM37+gdkOB4ErS+J7BJ87dN+2ZLeOg9Sjg8GBwjGUKmLv8DdePG0pD7XfOjCpVME/UwBfRkNCyBpglOSPUNlfxVZky5MNAdEiK1C/xZRzVb5rc1dUD66koZXvQroSjKLekJk1WABSZzpRVqbLY4hD8xZaB2M0vFuSM5OIHqVLC5jeYA9Ixbhr9SFyFEy29YUKugAUs06Zztckn5v/HCfcOssvD7LDMXQN7fAV8nUzPop2g7pj/NJ/4l3uGAH+4hbslmaiCFkXE80EpEDOfyLhJB2fe5GJFqOI96lbpwiIWudoXL6xfGWNt+M82rjGbFyVV2pvp4+whK42NWLO4oHMznFilFT7SxHEuojJlZZOM4atnt4y5D30V66z0D3i09y6Gp8tIH6zDKLq+KLnBKmWkqoitWsBoF77qBDa+riDLPyx03CjFXrKapkm+Q0hCcWbta1eY/lrlYULJ6IeEfbjpPTXkU4PhZDDSzo0//rMZVorL4HDiGzpK+iIn5GHg8bS43QBX3ZWPZnpGupHBKaV2s1FTU6fSUPQq6YRMZc/lg427dgUofG8gxgY2inmcd4jGl7Iifvib28rs+W3uN7blK9EOkUuSrWV567P+BhmaGs76X+sOOV20/XqyxZH9CXAWMtdWWCiT8IGREZpRca762zRise3JwyxhhSLdMq7Wm4ArjUKcSukpapSMOGcwUXjZCFRCpw6+fdclJaLdgCKK2hX1J35pcqaETzAtVMh1blQ86OUuZya+RMZ+OgOWnW+O2kf0X6xNwVUJzYbZIKjYwsFNxaQdsN3qR4C1GSwSUpHuhiTlBTzGqdvoMooBvdMSzFwGc6swUb59LcH4BOlyvtQmg4RcITyGvP9gpAxzcxVWP0n4MMRf9lVlHA6GfFh5p9BILSjd+ryxdTVC/4NJ3oLc9Wq4ojqYG/yKSamwaEWRCNS4j6aKEVoKw35U0KTRPj5XYiQOWQFbwhmv9SOEzhk9oow6xNULOvSh18Os8t4E0NtCG0grtyhmD20+HE+ysNuibm6I2+YlGc4ExGnY/5f0qMDwb2Pb07ohW1EE6/+w20cjlU+o4GRbZiqKPpq+OTj0DAN7+smbCMhVyhX4zpakTWIw1hvIwReD1AroXubeNLNFogXVZeYRzCgBoZNkA2Pi8FcnZS666Z6/SQQVSVVQ65lAcJKu8s12O+P1RpBHnDFP+UhwcBxLA/QEA99k44Fw4YU8EkvCMBJyp7pkMh5ry87ZeEYUQt1k4IcYioYMTvtnZVkyWtFkru9ukM6HQurmr7/MNm7xhLv+uptR0Ufdwtpp8hPgcFyu+fHOkfQQVZoPAth2s2ax9n8XMKqAKdubC9J7r8Kq+Yj9xSN43nBV1T62TEfrFi9NfL646hCpOxQmDUOdaJDPvj+LhpPgFwsZoalChLDS1Uufm X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97a60e7f-f154-4cd7-5a5a-08dc86f551aa X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB5948.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2024 13:25:37.9426 (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: NVh7LkloHRDkAzqlQ4TPZWF6Dq9HPF7YHFKF+F2jimacXIIyhG+C7Y6u4g4bHOyHk3q/RObuG/qCt4G9FBGPnQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9249 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240607_062540_696678_E385B13F X-CRM114-Status: GOOD ( 11.73 ) 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 For i.MX7D DRAM related mux clock, the clock source change should ONLY be done done in low level asm code without accessing DRAM, and then calling clk API to sync the HW clock status with clk tree, it should never touch real clock source switch via clk API, so CLK_SET_PARENT_GATE flag should NOT be added, otherwise, DRAM's clock parent will be disabled when DRAM is active, and system will hang. Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx7d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c index 2b77d1fc7bb9..1e1296e74835 100644 --- a/drivers/clk/imx/clk-imx7d.c +++ b/drivers/clk/imx/clk-imx7d.c @@ -498,9 +498,9 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node) hws[IMX7D_ENET_AXI_ROOT_SRC] = imx_clk_hw_mux2_flags("enet_axi_src", base + 0x8900, 24, 3, enet_axi_sel, ARRAY_SIZE(enet_axi_sel), CLK_SET_PARENT_GATE); hws[IMX7D_NAND_USDHC_BUS_ROOT_SRC] = imx_clk_hw_mux2_flags("nand_usdhc_src", base + 0x8980, 24, 3, nand_usdhc_bus_sel, ARRAY_SIZE(nand_usdhc_bus_sel), CLK_SET_PARENT_GATE); hws[IMX7D_DRAM_PHYM_ROOT_SRC] = imx_clk_hw_mux2_flags("dram_phym_src", base + 0x9800, 24, 1, dram_phym_sel, ARRAY_SIZE(dram_phym_sel), CLK_SET_PARENT_GATE); - hws[IMX7D_DRAM_ROOT_SRC] = imx_clk_hw_mux2_flags("dram_src", base + 0x9880, 24, 1, dram_sel, ARRAY_SIZE(dram_sel), CLK_SET_PARENT_GATE); + hws[IMX7D_DRAM_ROOT_SRC] = imx_clk_hw_mux2("dram_src", base + 0x9880, 24, 1, dram_sel, ARRAY_SIZE(dram_sel)); hws[IMX7D_DRAM_PHYM_ALT_ROOT_SRC] = imx_clk_hw_mux2_flags("dram_phym_alt_src", base + 0xa000, 24, 3, dram_phym_alt_sel, ARRAY_SIZE(dram_phym_alt_sel), CLK_SET_PARENT_GATE); - hws[IMX7D_DRAM_ALT_ROOT_SRC] = imx_clk_hw_mux2_flags("dram_alt_src", base + 0xa080, 24, 3, dram_alt_sel, ARRAY_SIZE(dram_alt_sel), CLK_SET_PARENT_GATE); + hws[IMX7D_DRAM_ALT_ROOT_SRC] = imx_clk_hw_mux2("dram_alt_src", base + 0xa080, 24, 3, dram_alt_sel, ARRAY_SIZE(dram_alt_sel)); hws[IMX7D_USB_HSIC_ROOT_SRC] = imx_clk_hw_mux2_flags("usb_hsic_src", base + 0xa100, 24, 3, usb_hsic_sel, ARRAY_SIZE(usb_hsic_sel), CLK_SET_PARENT_GATE); hws[IMX7D_PCIE_CTRL_ROOT_SRC] = imx_clk_hw_mux2_flags("pcie_ctrl_src", base + 0xa180, 24, 3, pcie_ctrl_sel, ARRAY_SIZE(pcie_ctrl_sel), CLK_SET_PARENT_GATE); hws[IMX7D_PCIE_PHY_ROOT_SRC] = imx_clk_hw_mux2_flags("pcie_phy_src", base + 0xa200, 24, 3, pcie_phy_sel, ARRAY_SIZE(pcie_phy_sel), CLK_SET_PARENT_GATE);