Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp160564lqh; Fri, 3 May 2024 17:41:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVG1nOwnvjLLB1JbjZaUleqqgAIYVG3OnASSvYoTp7CQkeRZkvEw8+PLcteVRU7SLabRWuyS2EHI054m7T87vAR1H1jKYXqNx80cgdXPw== X-Google-Smtp-Source: AGHT+IGWxL31Z0zsy8f6S8AXT/PM4GunpwXxczPLiwfs2RkvwNBvc16PGbpXcaIMtyOeGXTegefV X-Received: by 2002:a2e:9ed4:0:b0:2df:9c94:1516 with SMTP id h20-20020a2e9ed4000000b002df9c941516mr2954619ljk.23.1714783290162; Fri, 03 May 2024 17:41:30 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bx26-20020a0564020b5a00b00572a738c3d2si2016649edb.103.2024.05.03.17.41.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 17:41:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=LhAPvhcP; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-168460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168460-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8E2931F23C7A for ; Sat, 4 May 2024 00:41:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E271A935; Sat, 4 May 2024 00:41:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="LhAPvhcP" Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2044.outbound.protection.outlook.com [40.107.105.44]) (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 10C941865; Sat, 4 May 2024 00:41:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.44 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783273; cv=fail; b=qpyoet+gUH+W6tc2j5HsnFqDXae81Y8pDkOVtIcp1+I9M0dzNp8WiOeQRBtMuCy6+wlvd97unckCR8npXV05CqNLGVtjvieK9k2bTA/OPGX3heGNvrNygVayMF62tWW3oAXoIaRd3OqijwFJO/yisGPPghi/5d6DqbUv1Broks8= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714783273; c=relaxed/simple; bh=rcCtVWuFJLRqXg+s+ZbKpx/twvYOuewRyu/zZTOc/H8=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=IVTHjwXC5TyHG5rf/n8JYNqQyIT8DGPdLjsB8svP5NZhUgOxxNjPtwiL1XZzf23VWzjGNKracnIaNwKqP5PnVr5UG0XZleylD6Bz1zoWAaM83+Z6OhzUGkFjF2GQb5u0iyofICbkDKiDTBb0Xyewflzk1ZZzaUjx7BMrj2xxNO4= 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=LhAPvhcP; arc=fail smtp.client-ip=40.107.105.44 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PYJXEvNMH7SQGqxvt6QDR0NkkyqZR3IGcC5xskJxIrKRRvrjJYHK/KGC4jsYO9pM2NzHhGtOx08x50m35B0UAeoKClzu8+thzLfaDmXz//waBtZlg+Ba4J9y4yjXTD2nJ+Fk1Sj88lb8QVJViBZdfAoaZIuM6PeTCx2EfhKUodZTC19sNm8YgI5m4cnmJ/aDz3r9h9S3Lt9THwL+NUuheEuC5wD5rt7cza8i7a4upQrR6QF9FGmQsDM5iceNbQLKIpe74GzZ1mYJ0aArmww5DpZoAqWiIocptREpPLAHyFz1Z6giMkK5XQ4bRNmsx8+Ab+JbGiABrEYo2UoCIMPlSQ== 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=wUBHObqX7+uXERJEHkjNWet6mkZy6+My8u8xzR/PX/E=; b=nyrXLazplHUj+yJY03LDVDNDKGJlUv5SrLkX3tZ2AXVGNyfl/w6MSDOo8AkTflY68sIx388fK2G8vWvdg4yM4rf9KgyQTF5F6u9KtdynRgW7ALN6oJuk9m/a7xE6w9w6Qo+BuFv7/42wovl5xU7Fw5tyTuMpZur44mWmwbvO+2Bf3cYCpAzApA8EDlZdfHa0APV7uGwfZ6Ipd9GNXhsn6FQyOZHN+sTTo+uincYuDzD2SKrNwU7IPnNArDqv+7gf3GvISQrt8zVnz2VHJa5fFXGVQPIPgZj4KztiwsrcXPqUs+9IL9ekqc5AoVlAQRHxT5q/7vprNkr8ghSC/RHh1A== 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=wUBHObqX7+uXERJEHkjNWet6mkZy6+My8u8xzR/PX/E=; b=LhAPvhcPvpq1h2TemYfpLaoC69lDJ1R3Q1DxgX8OoaL7nKkBB4d93H67/5NEPjYCLLccBqW1mq4QfPe4jZGebfYIULyxcXNOPsfPk7p0p9CWkO84F0mWNcXNHCRCnj/8+UemLxb8wTJdvj6AX+itn3JxhELpfRxckaXkj+0T0X8= 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:07 +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:07 +0000 From: "Peng Fan (OSS)" Date: Sat, 04 May 2024 08:48:54 +0800 Subject: [PATCH 01/18] clk: imx: composite-8m: Enable gate clk with mcore_booted Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240504-imx-clk-v1-1-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=3100; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=iITI+dk+sPkjkDWQwUetdnNFKtogLu9x+44sHjDOVUI=; b=fkSTsJHoRmvS36n4JKMR8N2wmEhRjewWymbpgLM/PXzcG7mlf0GshZKeSpwDWPopG+52na0ri 5nrrvS0cHR5Br/6BePM4dNt8xDGjresoSl72zQDPa5z8trdkrkn2e2S 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: linux-kernel@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: DU0PR04MB9417:EE_|PA4PR04MB7726:EE_ X-MS-Office365-Filtering-Correlation-Id: bf5dbd63-c734-4328-a905-08dc6bd2e314 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-Antisp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21lV1I4SHRNZEw2NTY2OXpHaEc5UFVldnpI?= =?utf-8?Q?sm6FzlbIXvj+H+sdMLkR6ODceupn0aw4YgGzs=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?B?bEswMWV6K0hJNytjcTN2NnJSL0lCMTAxckRGaWhuS1lMS1JsVXBXd1RwUFpu?= =?utf-8?B?Rk1MVjRpNENEdmcwa1dSaC84UisvQUJJMjdBZ0JreFBkamt1djkrYmxNUTVl?= =?utf-8?B?Z1pRb0p6YW9meUc4QlZxSnJuRkFkZy9TaDc4M2pjMHp6eHM1cGRNUGJUK1l6?= =?utf-8?B?T1krcGIxeXk3Nmw0ZEU2MFRHZTMyOTVjNHdzM1lydDJBMDcwcjFSaTVsK01w?= =?utf-8?B?VHIrUTVRblVLYjZKZHZWNWR0OHdUZHp6Ujc5WmJZREdLKytTK3FNY29TNU5Z?= =?utf-8?B?ZWdxM3ZSOVArT3NHM1lLanFpVys3eUljRVQ3eGk5MC9VN3RKVjFPcUh4UkZV?= =?utf-8?B?RGFRWXppZTZMZDdjOVZTVjZPM3dOT1ZPYzZHY2VGdVhYMTN5dkxweDRmaWNJ?= =?utf-8?B?SDVWbXNRRkEwdURaTUVkY0lLZ2FyRklzaW9NdFlWaWoyZ0JMcmFCUm9QYWN4?= =?utf-8?B?bjZDWDRRd1FEeUV5Z1lmU1lnY2crNG9veXhOQnQrbjhQTEZlWEF5NS9PUndk?= =?utf-8?B?Q3ZjUC9wV3l0VkQ2dWpsL09Uak4yV2E2THpGRnM0M2lUZ25lZWRVVFdGZ20w?= =?utf-8?B?bVRJZDRGNl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=?utf-8?B?cmhRUXZnM0hOTStGOE5wNG9mMW5nSHVnWXpBV2ZBTzkwT2dKaGR5QXhMdm1Y?= =?utf-8?B?cmhsSUFRYVFubTI3WC9JS3g3dDJvcHJybFVIY25jQnoxSTQvTys4NnA2SGVK?= =?utf-8?B?ZzhnbVlVK3A2UmhQVUlHbkU4cXRWekhWSVZoL0tLOTJpNnVkdEswK2c0L25i?= =?utf-8?B?b3RvOWNqUFFSMk1zVndGNDBNSDNRQXBtd2I4UXFOempGaFI5ZTlaZGttME10?= =?utf-8?B?elkzOStrbHZtckVwR3RPK1NEVlhOZ01jTkYyOHBUNzV5K2RGUm1QK1NIYlNW?= =?utf-8?B?amlKcWJuRGxDSjJJb25xSExTVytTdTZmSEhGMThaREt4dzRuVUNGOEhuVGF0?= =?utf-8?B?V0lNVzZYZHdxemdHQmUxR29tem5aVkVJTWlBSzVqaE9pRFFVK0ZZdCtWOUNw?= =?utf-8?B?VGhxanlRTU5GZlpHaE9nNWdtVTN0TXNxV3l6MUJkL1l0dzlQVjdDb0J1OWla?= =?utf-8?B?bG0rdTI3TnRDbUxuT3JhWVBCc2FMYnc3TnBLTm9kejVBOCtyUkFXdnEvbjNN?= =?utf-8?B?d0h5Z0JyQXp4R2t1cHZrdlF4SWhsVGpTVk5oTDVIclFZZXd2NTViTVcxVmhr?= =?utf-8?Q?zZb71tzxVcwd6WDAhulI9ky6a?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf5dbd63-c734-4328-a905-08dc6bd2e314 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:07.7874 (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: 1CSe35Dopixa7e/iwt6n4cKl+rtZwbBirxi2n4WCfFXYuZHjR//RTFlYT7pZyIQX36YKYZd1NsDq7srhIlZAHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7726 From: Peng Fan Bootloader might disable some CCM ROOT Slices. So if mcore_booted set with display CCM ROOT disabled by Bootloader, kernel display BLK CTRL driver imx8m_blk_ctrl_driver_init may hang the system because the BUS clk is disabled. Add back gate ops, but with disable doing nothing, then the CCM ROOT will be enabled when used. Fixes: 489bbee0c983 ("clk: imx: composite-8m: Enable gate clk with mcore_booted") Reviewed-by: Ye Li Reviewed-by: Jacky Bai Signed-off-by: Peng Fan --- drivers/clk/imx/clk-composite-8m.c | 53 ++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/drivers/clk/imx/clk-composite-8m.c b/drivers/clk/imx/clk-composite-8m.c index 8cc07d056a83..f187582ba491 100644 --- a/drivers/clk/imx/clk-composite-8m.c +++ b/drivers/clk/imx/clk-composite-8m.c @@ -204,6 +204,34 @@ static const struct clk_ops imx8m_clk_composite_mux_ops = { .determine_rate = imx8m_clk_composite_mux_determine_rate, }; +static int imx8m_clk_composite_gate_enable(struct clk_hw *hw) +{ + struct clk_gate *gate = to_clk_gate(hw); + unsigned long flags; + u32 val; + + spin_lock_irqsave(gate->lock, flags); + + val = readl(gate->reg); + val |= BIT(gate->bit_idx); + writel(val, gate->reg); + + spin_unlock_irqrestore(gate->lock, flags); + + return 0; +} + +static void imx8m_clk_composite_gate_disable(struct clk_hw *hw) +{ + /* composite clk requires the disable hook */ +} + +static const struct clk_ops imx8m_clk_composite_gate_ops = { + .enable = imx8m_clk_composite_gate_enable, + .disable = imx8m_clk_composite_gate_disable, + .is_enabled = clk_gate_is_enabled, +}; + struct clk_hw *__imx8m_clk_hw_composite(const char *name, const char * const *parent_names, int num_parents, void __iomem *reg, @@ -217,6 +245,7 @@ struct clk_hw *__imx8m_clk_hw_composite(const char *name, struct clk_mux *mux; const struct clk_ops *divider_ops; const struct clk_ops *mux_ops; + const struct clk_ops *gate_ops; mux = kzalloc(sizeof(*mux), GFP_KERNEL); if (!mux) @@ -257,20 +286,22 @@ struct clk_hw *__imx8m_clk_hw_composite(const char *name, div->flags = CLK_DIVIDER_ROUND_CLOSEST; /* skip registering the gate ops if M4 is enabled */ - if (!mcore_booted) { - gate = kzalloc(sizeof(*gate), GFP_KERNEL); - if (!gate) - goto free_div; - - gate_hw = &gate->hw; - gate->reg = reg; - gate->bit_idx = PCG_CGC_SHIFT; - gate->lock = &imx_ccm_lock; - } + gate = kzalloc(sizeof(*gate), GFP_KERNEL); + if (!gate) + goto free_div; + + gate_hw = &gate->hw; + gate->reg = reg; + gate->bit_idx = PCG_CGC_SHIFT; + gate->lock = &imx_ccm_lock; + if (!mcore_booted) + gate_ops = &clk_gate_ops; + else + gate_ops = &imx8m_clk_composite_gate_ops; hw = clk_hw_register_composite(NULL, name, parent_names, num_parents, mux_hw, mux_ops, div_hw, - divider_ops, gate_hw, &clk_gate_ops, flags); + divider_ops, gate_hw, gate_ops, flags); if (IS_ERR(hw)) goto free_gate; -- 2.37.1