From patchwork Mon Mar 6 14:05:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 64675 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1865277wrd; Mon, 6 Mar 2023 06:16:26 -0800 (PST) X-Google-Smtp-Source: AK7set/+mwaOaq5gZVdmCWuOixECLsPppBaON4Gkex9vPTDbNiUEtTkrDQKddnlARkfAy/7FeYtD X-Received: by 2002:a05:6a21:3292:b0:cc:9b29:f604 with SMTP id yt18-20020a056a21329200b000cc9b29f604mr14923403pzb.55.1678112186204; Mon, 06 Mar 2023 06:16:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678112186; cv=none; d=google.com; s=arc-20160816; b=gCYJFmLNZBCE8uCWJXKJnnH4RIKclyQ5DcRM3+EUC83HNEDl91JvgxsTTg+cHdhZPE H9TQfw1d/mj313N5gA4l5KODzl2zPJR0zJhEuFIq4AAU9pL7LcRIr95SqIpBYtvnmdjx JZBHfJoGqrSN3R6M4zTuRsa1IQDpGyZfJqmHW4cSv8B+qV/7ZgWVvxsKwe8fQnn8j7u1 lvfVZd9NcyQS7byh9yNM9WV/WCIi/CzWNyXZizprQVrbCeaJItAKfTBSVKXKakettcpr YtXej7OjlrNVRF5VdGUg/ZHoaW40Q4JirJUKGcTqPkyxrGsj/k6mt7GEToJ/q0n6ITLU MPhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=R4HdwmUTTmmYtfYxriTOdE6mumiqouAepkweVsEEe/c=; b=mNvx/GcSlKlEeRpxKTvg2c7DUAffp4sExyWru31KMZeuxxdY0ctM5mpPJzKyEgnN3r K+0ZenAtygZbskSu+V4Gb57v3M8Q3lnPggHUzyNzxjW0PWFQRDPOoNeCaqceBvvoEuYL KVO404AenxY/15yO5vAiBHxBSd264G9+rupzY0npGFIJsp4iP8S0f2LjU8hTpYYBjjhT SpjtmnSIOfwnu55pEhId6FWOf42AIwqXLdXfQuR6irsHK0N6NkdbV5lwtgzAacL7wCav AX/09cYWJkv5hrx7eJLwZfwRu92VgT0g33Qo0dQjgPfHdw7jEeM2SQEGRpSiJqJIfY7L BTXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=VQDIxa69; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h129-20020a636c87000000b004fbd23110d4si8697650pgc.773.2023.03.06.06.16.13; Mon, 06 Mar 2023 06:16:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=VQDIxa69; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231307AbjCFOJF (ORCPT + 99 others); Mon, 6 Mar 2023 09:09:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231209AbjCFOIW (ORCPT ); Mon, 6 Mar 2023 09:08:22 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EC442DE70; Mon, 6 Mar 2023 06:07:21 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 7BA116602FED; Mon, 6 Mar 2023 14:06:37 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678111598; bh=V6gp3rQqGOdB6IuQNS6V9LAoXiOjBas/NVzMMD/2YpE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VQDIxa69jHOdAApQMJholZqtcNEPz/03GfHEFWKrR7CDCuu6qt09VZ1kEhjOWQ9vU lL8SFgB3A1BaTTe1zKu98/nssrI6meWem25wdLwwIQoJT5Jw472KutMyKCdMggkBow AscqEy/KdTl5Rcu8poBzLZ4m631rpBQIeIpaIF2ETicqqftsyblVnADtHG8UsOVNAz QmeCOrJhK7rk9l0g3pgi5Y242KiRI65dzCz4yLfL/LCmwiQTH76hs/ihVYJ8wFObuZ ZE/ezA30POk9k3XTA+HqQct8Gvbm2F9LpHR+NwFmbKLq3BSjObnKQVlmDQo0dNQWYR eL08JQwjl3NBA== From: AngeloGioacchino Del Regno To: mturquette@baylibre.com Cc: sboyd@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, johnson.wang@mediatek.com, miles.chen@mediatek.com, chun-jie.chen@mediatek.com, daniel@makrotopia.org, fparent@baylibre.com, msp@baylibre.com, nfraprado@collabora.com, rex-bc.chen@mediatek.com, zhaojh329@gmail.com, sam.shih@mediatek.com, edward-jw.yang@mediatek.com, yangyingliang@huawei.com, granquet@baylibre.com, pablo.sun@mediatek.com, sean.wang@mediatek.com, chen.zhong@mediatek.com, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com Subject: [PATCH v6 32/54] clk: mediatek: mt7986-apmixed: Use PLL_AO flag to set critical clock Date: Mon, 6 Mar 2023 15:05:21 +0100 Message-Id: <20230306140543.1813621-33-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230306140543.1813621-1-angelogioacchino.delregno@collabora.com> References: <20230306140543.1813621-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759628163509806231?= X-GMAIL-MSGID: =?utf-8?q?1759628163509806231?= Instead of calling clk_prepare_enable() at probe time, add the PLL_AO flag to CLK_APMIXED_ARMPLL clock: this will set CLK_IS_CRITICAL. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Daniel Golle --- drivers/clk/mediatek/clk-mt7986-apmixed.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt7986-apmixed.c b/drivers/clk/mediatek/clk-mt7986-apmixed.c index 62080ee4dbe3..227ca572056e 100644 --- a/drivers/clk/mediatek/clk-mt7986-apmixed.c +++ b/drivers/clk/mediatek/clk-mt7986-apmixed.c @@ -42,7 +42,7 @@ "clkxtal") static const struct mtk_pll_data plls[] = { - PLL(CLK_APMIXED_ARMPLL, "armpll", 0x0200, 0x020C, 0x0, 0, 32, + PLL(CLK_APMIXED_ARMPLL, "armpll", 0x0200, 0x020C, 0x0, PLL_AO, 32, 0x0200, 4, 0, 0x0204, 0), PLL(CLK_APMIXED_NET2PLL, "net2pll", 0x0210, 0x021C, 0x0, 0, 32, 0x0210, 4, 0, 0x0214, 0), @@ -77,8 +77,6 @@ static int clk_mt7986_apmixed_probe(struct platform_device *pdev) mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data); - clk_prepare_enable(clk_data->hws[CLK_APMIXED_ARMPLL]->clk); - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); if (r) { pr_err("%s(): could not register clock provider: %d\n",