From patchwork Sat May 4 00:49:03 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: 13653712 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2050.outbound.protection.outlook.com [40.107.105.50]) (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 8F6C1200C3 for ; Sat, 4 May 2024 00:42:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783323; cv=fail; b=KoorEZgkln40Z267qsDVYQ70aO565YQ0Ka4w15pTAKtsRyQhHulBGf8uH/CRV1UhgB5XYNDqfaU+G9cVjZpbHWm4meWWTbRLvhLuuDGrvyYGcFQJ+9BNi1qQBoat5rVFz/21c/F41E3NbTVzIXz2t2PbheO8aOgqS7R0JLkaAQU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783323; c=relaxed/simple; bh=tTnmH/6Qnb9N9OjP7YpZL6Z0qYEvJ4SWgZIDAnZMSPo=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=B6e4qXqVtk1MgQ+V9+W6e4Kneqy1X/NE5bpHgqGvGefwKZNu/4idS96KUF9p50gOnBJkSaPpaXo8cWBkwRFGQGtnXW8rp67EYvnXhO4RqK/cTOeVnaRH/mRQT+VNKZbE8TMdPeCJjfG7pGnyELRjnMObMOa1QAYVRpZekeAaaOI= 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 (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=GjQDZ3wg; arc=fail smtp.client-ip=40.107.105.50 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 (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="GjQDZ3wg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CeHzWAetFo6fIJaIVW2PjhPSLOZnHlTavll1nsME4XwPKMHXKN5nO9jF5UZ4CVmGJeQloz7DoRCCAwkiBkNhMeQ/c5hr0/rLzClafN5G0DtY/5zMMjfoY107tCQhguBYnkmoaMUm3i2zSHxGgQSOzOM5bb/cipgE4mjRIvj7H6lv4rHJ8sZv7SGSdTPgfhbUrfpcp+P0JJ3YtuIaMZeliT9mff881QtaaILBqXDQ2txOD2ySB1jNI6vJq2wU5NMhgKOUDR5q7yb4l05vyI5dlhK7EhIc65aFTj3QMkRZ5OjMag5Gg2j0j59WVIkeJvFTQNFqKnUSMfCzCifl7llGrA== 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=shqQpCU+zit6vu8mozb5Ood+1gNMCo0go1qiqqcoK28=; b=X4sFRWQiRvadVZJeXmfzu4LYgBlmDjwVbp8UG+3fWx743GYIxHnXNhU9ZTXZix0po2fAW7g9VGID7j/lWp1nXGG+ycKwvCvEGMjVhuELM6imONDdWOL0CAQ+wmkXU2VpJzlgchLuzG8SknJsTZYPQuKcSVI6EV7lUYk+n1ob31evCDoXjRfkqYjh1LHAscdvUui2UvHl/3ItnjlSocvO+BBmEguFUgFkrJnuNJYu67zUFU7K1CMYyw07hROkQIHMb37MO0beLnYHpgEVT5J5DBAYvBTyLzhTZavwrywgyr/k0MYEGQLxdoc0y38KqJSZlSsWX+ffEgD4Ql4N8NJHSA== 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=shqQpCU+zit6vu8mozb5Ood+1gNMCo0go1qiqqcoK28=; b=GjQDZ3wgBSw1/mBRJxim0K7dZ3O7iYUwgICLle70K3OOONYVMlmtoT0RNmdELfTOoDOZHseCWZrKV5m1m8CPBGphNkseg/BJZq1bnrc8zlTAwBKL18pb6nT29FVGlUpkB2+g29NDVLZ+x1sCCJy2jFUJkXHP7C1OTkRcvifwMYY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by PA4PR04MB7726.eurprd04.prod.outlook.com (2603:10a6:102:ea::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.29; Sat, 4 May 2024 00:41:57 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d%4]) with mapi id 15.20.7544.029; Sat, 4 May 2024 00:41:57 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:49:03 +0800 Subject: [PATCH 10/18] clk: imx: Remove CLK_SET_PARENT_GATE for DRAM mux for i.MX7D Message-Id: <20240504-imx-clk-v1-10-f7915489d58d@nxp.com> References: <20240504-imx-clk-v1-0-f7915489d58d@nxp.com> In-Reply-To: <20240504-imx-clk-v1-0-f7915489d58d@nxp.com> To: Abel Vesa , Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Jacky Bai , Ye Li , Dong Aisheng 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.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714783747; l=2512; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=tawkmb4o3zsB4Mw7AonWFpkCgwbnD1LyifvXX0BKqZk=; b=KoSIBH1CAzTBT8etU+iZ4h2zs6IYqvUz8RLZLmTWh6jjhWfqE9AJZn0x4lnw82iMIEOG23tvO ohqaAuyFEcyBl5rNeYHSz899K4esYINWgYhPd9uUSSuN0sjYJT9uO4N X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI1PR02CA0055.apcprd02.prod.outlook.com (2603:1096:4:1f5::16) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) 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: DU0PR04MB9417:EE_|PA4PR04MB7726:EE_ X-MS-Office365-Filtering-Correlation-Id: 624db2e0-ca56-4e35-19da-08dc6bd300d4 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|7416005|52116005|366007|1800799015|376005|921011|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?H7pUAVCxF5zxmnnANcTPts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nbKfmi?= =?utf-8?q?S7fkEk3rJkjq+HCvO4S/7RB0r+QeFplvrkpwfrEaDJf6dvcI3tQnZlUL0Sl7Jg8bJ?= =?utf-8?q?JBNSKSYXJlv704Bu6qOFXYKWHP9W1Ewf+AelAPIRdt1oCtg7WkXQqPPzhoFnYsvw/?= =?utf-8?q?HJEpHcp4f9mzbTSn3moGdVVzss6B5L+fICCAawyXompNsduW66VFrsnqdMKeYcQGj?= =?utf-8?q?gwGvQPH+4GmqvC6ddfnXg9RyS6pjO0h1H8e3JxjYi3tIjgATnCmMQlZp98sUDItOd?= =?utf-8?q?WbuyFKy/wJ4ifUfshXUmV0/vo5Yf4t6VAEgjj+VbRJUjmQdlBYtK8lvxj7zctVp6b?= =?utf-8?q?mbxfQwoJ4rvGsUEHluf1934fM5L9yvK6WBC5VwLNMqLaoEzSMh0lx6UkM1dkLY14x?= =?utf-8?q?e0p+ihU0H0MWk3Z2JXpgewqTVOtkh798sDey5lWfHPmnBWGMFi7RseF0=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(52116005)(366007)(1800799015)(376005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?wzyTDFbnq32QBljNqE95oETOSVJe?= =?utf-8?q?4eXldt588Ys5YOzCitgQqLRI3SpDM/twpQCswpyoga9T7RLwjqMx3539ogwvTqmer?= =?utf-8?q?nPvGSJevrzt5209JHJBr8UYEgOENLIrUUSz+h+G4l92GMIubXMREmFzZgqGbI1lbn?= =?utf-8?q?IbxgzdZ993Mxd3axRAPC9Nl7mdtOVliHk66DZYU+nh3jhlZ7A5NcyeWAYiJoYLqI0?= =?utf-8?q?lI4/QFhsDI/865TGtxpWyzYf7qbJ80gC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+33+qDzKCd1Cl0?= =?utf-8?q?xzcflU9LYemPMBH/5OE1uULLPSWQoaPqDrDA9qbvyBCvhwsS2YAx3pnDAxrs72U09?= =?utf-8?q?ca0Ke1XHByQAJJViJ5ARiKcjeofr5qez424I+XU7ROzNZiiilj/PrsASB+PePXJNp?= =?utf-8?q?B40way0cmWFo6UptjA49uJt2zjFDcZDjYblPht7t9dKYwKcF6wyFuZh76kywsK+jA?= =?utf-8?q?rSnytuul6/iMFqXuHUaajCcFyM236/PiWA/iwI6vQdNFRDVv6tVm1BPIwrML3MG/o?= =?utf-8?q?B/DDg9NDQ17lCNkPdm3s3IZPOjCQNWrWgSs2EZ5+FSJysx5vvy+1RwDFCRDWCwIrj?= =?utf-8?q?FqTkEUDwjeDsRmOgRn5HPY0iYrqzxDEWjEoqqYB1nFjQFXR1vgSXh/XvxrZ93BOmQ?= =?utf-8?q?pS5XYtyiljFB?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 624db2e0-ca56-4e35-19da-08dc6bd300d4 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2024 00:41:57.6652 (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: nLRcxt4COoJauroaUm1hFq6td6EVmB2yRiy3SqVXQs9tqBc2cnf7GUkybszjG3FxKMlLzA0Y1iBEYhZa0s2YEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 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);