From patchwork Wed Oct 21 08:31:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11848551 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7217FC561F8 for ; Wed, 21 Oct 2020 08:39:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F090C2080A for ; Wed, 21 Oct 2020 08:38:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KjjMwcmt"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="S+7WxWAU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F090C2080A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zi6GrQnw6G0pBSrDA+MRu5Hnae0HYb+Sb1T8tB6uq3U=; b=KjjMwcmt5uwZI4jj56de9sMQo G0qMMndq5te9u+KHFQtjQQo+UT2dAsybTaj7kEwFr//mjjyg/uZq9a3UfsFRsb5LoMjyhDdnKQDd9 YNwMSFT74EaqGCTCnELlFjoc3ifJ7Wt5mU4wPVOgSaaCid5TjVx2Gs+tlgp6b2ElEl1yo4dKqaBgX Q6ReyJalEaa1IitAwwQeDTCWLGv6jQlMA1pR9JJM9ZIkeHFDysAvn3LJbh+lAY1XZ5P0VkKg9RjBK pE1RHzzEeLbgN2oDu0poLIRo8hAqidWwkA2DJbcEAdbyOGO43DurpNNIdOcMo+03Z+4oaNQFu+y6n Qpu3WE4wA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kV9cY-0005l2-B3; Wed, 21 Oct 2020 08:37:22 +0000 Received: from mail-am6eur05on2047.outbound.protection.outlook.com ([40.107.22.47] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kV9cR-0005ib-IP for linux-arm-kernel@lists.infradead.org; Wed, 21 Oct 2020 08:37:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SI+YewFD6u7VTOfKbdyWdpgLf9CiA7BOaYzxYc9R6toB5kD25rsVas3EKgrdOHQOzog3VZGxNRXqprNhRS+g5b1SzpCARpKGNIpCN+/pBp7pjSDDnYWiSlnUN1LyaKA84+Fm2C2+s+yjizc/c813wEcRUNcHtcgFZW/NVAfX8SOyG75RB7MpF0Z1zf/zQuzI88AovJIRIDGzznKnIacWHmcursJ8D+YBNUzRDeFc/Khn6z8Q8Ehxt/0EK5yNqKv9bhMHqxIz/Cu/QFjW6Bpf+peU+g/huXr5UyhvLz8q/r691ZlVYBX3jzQrlfgOsAjzojt+YNtJiuhfH0OqUAeCHw== 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-SenderADCheck; bh=owP+ftRfPGXBy+W051+XVxhCLpMtPSVGkk2farXvbcE=; b=nP0e17otSN3YtzfrWmIXzT9aSmM8ifHCSaQV80UlQ5yJDvwV1m0HgnL/c+8yO4Ewt3Vy0rNgjr3UBpKvKvVFvgrjD4KCZihnxhvWxl72EqS37iMUM/3l4B6YNPSr+BbPXonpcqg2IsubnIZFai9tEpF8GItjSIg0x3di/+SfDqD2kxbqHo1f4bRje/HojCdtMw2VSD4NNX5cAE1EE+ySUpNPuhLgm7QyfEKunCF7aTv8bhf73aDIu7x2Q5oBUfLzkYZPJwOzAKKZSYEcjyP4TMKOSb34t8oRNrGhfMgROIe5k/XKw+G8/byapnxkzZdWn1FT4g3AQjKq3N+unEXIQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=owP+ftRfPGXBy+W051+XVxhCLpMtPSVGkk2farXvbcE=; b=S+7WxWAUNW0wiVz7TXmAMSj8Dw81Y04UQFbM1H6iVPqmTq9jo5q9JfpEB4PE5mWtShY1TbvlCth8Sr6eVCd6CDXLekh90AzYATf934UlwCW8TtiCGJO6PpDtGvwkOzRKJLN4vR5i3r1HrnTGKjGViOjJwLdcey0jMtsdiUqnx2c= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4636.eurprd04.prod.outlook.com (2603:10a6:5:2e::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.22; Wed, 21 Oct 2020 08:37:09 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::ec42:b6d0:7666:19ef]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::ec42:b6d0:7666:19ef%8]) with mapi id 15.20.3477.028; Wed, 21 Oct 2020 08:37:09 +0000 From: peng.fan@nxp.com To: sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, abel.vesa@nxp.com Subject: [PATCH 4/5] clk: imx8mn: fix bus critical clk registration Date: Wed, 21 Oct 2020 16:31:33 +0800 Message-Id: <1603269094-29367-5-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1603269094-29367-1-git-send-email-peng.fan@nxp.com> References: <1603269094-29367-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR03CA0155.apcprd03.prod.outlook.com (2603:1096:4:c9::10) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR03CA0155.apcprd03.prod.outlook.com (2603:1096:4:c9::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3499.4 via Frontend Transport; Wed, 21 Oct 2020 08:37:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9acd1a39-fb27-4ff6-6099-08d8759c7f7b X-MS-TrafficTypeDiagnostic: DB7PR04MB4636: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d7fjisP0jNYloMqHHYeDXmoooj1aXIH6OgTG5hqY4O1LVv/F9Vk1p4wiQLH0pK05nLHo/46Q8lK+o+k4n8R9Jd3TxQJkfKfGFvA8US55i/jFOuo3wb34bDg+d//HHKRIikyv05TP5Ox6pRw7+M+e4RqNa+RbHjEVNj67AuX1ubuw5k/dwHgaFbB2KVsANqCEshdoRbGbud+HxCcwk8xHWjTWytAf6/OYPP9EEW6ea/cZk7E7lzmfv+KbERzjtreDxAEuQFuPYlwsXsCy54QpUBmvA/NnqvDwmyWIA63dtwLKCj1yNHUad5sSlv4RT300D5+yVpfwvtLDYhH5ebEXZlOL6nQedcK1BRSXxpi5oCKFQT4Os0VKQ+NlXfTkYOVT27f20uMpNb8iOBtnacA5anHrGhliqXkrapl5cj5zwAk= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(346002)(366004)(136003)(376002)(396003)(8936002)(36756003)(83380400001)(52116002)(2616005)(16526019)(6666004)(26005)(69590400008)(6506007)(956004)(6512007)(5660300002)(186003)(9686003)(8676002)(66556008)(4326008)(2906002)(86362001)(66946007)(66476007)(478600001)(316002)(6486002)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 7Fr6r+RyShhnxo3wRppn1jv85vAOciXYJwsvj+TWOys/1uSat7d7jujGuNwXZrwcnKxQ/AO0y9hWui/ELo4l4AFIDlv9PH64GHMZ2gndpE15OV8qITePEeTBpwSLnIWhuZYfDgFU8kishvvtDW4T/OMqKcg8P0cm+kz0aE5DqA3p1swdwN5jkVT1AuZX+ywCG+BPm5ppeXVoft4IsNmFgImSYw7CwFSO/4oD4xUHZdhwccHIMX5FvcuWGh3Ipgj2k1o2Im3/XryFWNF/zn0tW41R/Rbhx1k0jxGn7LOFLtZD8uh6tqv5gsn/vf3kD4Wgjzjw6l4REp5yLxXcN5eyDZjKl9VAkT1FNQIyLsin9HnjDrZkjTLy3DdkrjmitVUXufZ9Hx8rmB89jNR6wu2mvop59JeDaD4Y744uC7iP+rUbexXhvdNs+4MX22yWUEKjaulSJ7lph7q9UggFyEZ7bQ3mQn4W/LPLrejOXFp1x/mg44shlquau3Hm/Ap+xN5LPub0x5s/EITmEK5NpT9SyRFZc6yjp9O2YV8nXS09wvUuoIwVklWaerW39xawNazBcx8dqGxmmxFZZsKwHqAsE683nH2cCIJdkS9su+ItBaVj3juPvde1x6YQ7DFWc7a8QafFyEzao9ZTpL0SlDaFWA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9acd1a39-fb27-4ff6-6099-08d8759c7f7b X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2020 08:37:08.9264 (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: cJ4J9CrTdDzdF2A9AIrz3CBAR2xK/KzWvPfQ8ZCNqyVyH3rKyZMgUsWA2MswBMAg8leImEIpp6Q2ZT944bbdhg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4636 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201021_043715_683429_7A7C326E X-CRM114-Status: GOOD ( 13.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aisheng.dong@nxp.com, Peng Fan , Anson.Huang@nxp.com, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan noc/axi/ahb are bus clk, not peripheral clk. Since peripheral clk has a limitation that for peripheral clock slice, IP clock slices must be stopped to change the clock source. So we added CLK_SET_PARENT_GATE flag to avoid glitch. However if noc is marked as critical clk peripheral, the assigned clock parent operation will fail. Fix to register as composite bus critical. Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8mn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c index e984de543f0b..f3c5e6cf55dd 100644 --- a/drivers/clk/imx/clk-imx8mn.c +++ b/drivers/clk/imx/clk-imx8mn.c @@ -431,7 +431,7 @@ static int imx8mn_clocks_probe(struct platform_device *pdev) hws[IMX8MN_CLK_A53_CORE] = imx_clk_hw_mux2("arm_a53_core", base + 0x9880, 24, 1, imx8mn_a53_core_sels, ARRAY_SIZE(imx8mn_a53_core_sels)); /* BUS */ - hws[IMX8MN_CLK_MAIN_AXI] = imx8m_clk_hw_composite_critical("main_axi", imx8mn_main_axi_sels, base + 0x8800); + hws[IMX8MN_CLK_MAIN_AXI] = imx8m_clk_hw_composite_bus_critical("main_axi", imx8mn_main_axi_sels, base + 0x8800); hws[IMX8MN_CLK_ENET_AXI] = imx8m_clk_hw_composite_bus("enet_axi", imx8mn_enet_axi_sels, base + 0x8880); hws[IMX8MN_CLK_NAND_USDHC_BUS] = imx8m_clk_hw_composite_bus("nand_usdhc_bus", imx8mn_nand_usdhc_sels, base + 0x8900); hws[IMX8MN_CLK_DISP_AXI] = imx8m_clk_hw_composite_bus("disp_axi", imx8mn_disp_axi_sels, base + 0x8a00); @@ -439,9 +439,9 @@ static int imx8mn_clocks_probe(struct platform_device *pdev) hws[IMX8MN_CLK_USB_BUS] = imx8m_clk_hw_composite_bus("usb_bus", imx8mn_usb_bus_sels, base + 0x8b80); hws[IMX8MN_CLK_GPU_AXI] = imx8m_clk_hw_composite_bus("gpu_axi", imx8mn_gpu_axi_sels, base + 0x8c00); hws[IMX8MN_CLK_GPU_AHB] = imx8m_clk_hw_composite_bus("gpu_ahb", imx8mn_gpu_ahb_sels, base + 0x8c80); - hws[IMX8MN_CLK_NOC] = imx8m_clk_hw_composite_critical("noc", imx8mn_noc_sels, base + 0x8d00); + hws[IMX8MN_CLK_NOC] = imx8m_clk_hw_composite_bus_critical("noc", imx8mn_noc_sels, base + 0x8d00); - hws[IMX8MN_CLK_AHB] = imx8m_clk_hw_composite_critical("ahb", imx8mn_ahb_sels, base + 0x9000); + hws[IMX8MN_CLK_AHB] = imx8m_clk_hw_composite_bus_critical("ahb", imx8mn_ahb_sels, base + 0x9000); hws[IMX8MN_CLK_AUDIO_AHB] = imx8m_clk_hw_composite_bus("audio_ahb", imx8mn_audio_ahb_sels, base + 0x9100); hws[IMX8MN_CLK_IPG_ROOT] = imx_clk_hw_divider2("ipg_root", "ahb", base + 0x9080, 0, 1); hws[IMX8MN_CLK_IPG_AUDIO_ROOT] = imx_clk_hw_divider2("ipg_audio_root", "audio_ahb", base + 0x9180, 0, 1);