From patchwork Mon Feb 20 15:00:48 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: 59509 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1355004wrn; Mon, 20 Feb 2023 07:05:11 -0800 (PST) X-Google-Smtp-Source: AK7set8XZoqj6WPTNBwvrNMF0Yz1XjQpBkwXOtK03HY9pDtFM9uPmAu2EGRRPAVyORGHdo7TbjNE X-Received: by 2002:a17:902:d2cd:b0:19a:98fd:9c54 with SMTP id n13-20020a170902d2cd00b0019a98fd9c54mr3250087plc.35.1676905511437; Mon, 20 Feb 2023 07:05:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676905511; cv=none; d=google.com; s=arc-20160816; b=kJCWXYxDbs2DMibWoXYvOcEiKCK1V0Zz2vfyhvHQgSCVDsunC7AguvUp39xxP8alwF K3me1zH5/N9moBR9kvn5j+NZUqt5qd46nUgSU8l0GzAJbdQXUbBm6ejeuxSWVamCFDBr pzhWcgMfPIDsNHeNf37eozvvxV117PP14t94VquFc+VobZdnYhyzgbMo0X9lghhOcUOU oIbx2jziuRgX9Eg9y3GeYEA7qyy2ow6NL3Z4Kcl24IVDiYaQhDnTw8mxgmCpueczTKAi 3KFskg975Bkn6pvW5akwcZbTeKSrw3NQn/vbq+rolLdZNLv6LUNdQQKmww+tGijH32Ss CVJg== 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=7Gpb1sMgn12S142sdneBhi6bAmc7uSkNPwIwBUJuHJY=; b=aag6AfNWDxEZEikCi7xrFSUq0PzdjJDupYW4VM4JVwAKXl80xjKHKQFS/5S+JkI9P4 e5KgwmXHEaVoHf0elQO6kgoix3z6ij4kdGpg6WzzpZZfp61y14KXsUgCsTXHC8y/hGda xgFsUOsruD8OYBKMlyhT3aO2OuHBQHmJ5KHY87+HFbozjYW8jSttcMb5I9ALZTEtdlmb TRJEJK6jwODNR02DfHtE6dWyqCWd2d1HaekNSlJT/d9J5/hagXcnQ2pP/U11LC8QxT2u GuIj5zcUMwGGHNemmpZjwMhvTy3Z8TCuf2OUtGfgwAiW7fYk/adZ/lks1cUAX+k7EG6X QjtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=P4BwsqZ9; 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=REJECT sp=REJECT 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 u1-20020a170902714100b0019262c18328si295838plm.14.2023.02.20.07.04.56; Mon, 20 Feb 2023 07:05:11 -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=P4BwsqZ9; 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=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232091AbjBTPDs (ORCPT + 99 others); Mon, 20 Feb 2023 10:03:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231839AbjBTPDL (ORCPT ); Mon, 20 Feb 2023 10:03:11 -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 51E6E1DBBC; Mon, 20 Feb 2023 07:02:06 -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 DEDE3660216A; Mon, 20 Feb 2023 15:01:59 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676905321; bh=TVcQKRssdAc9o2ZUajNdAkJkyh364bF8fOa6lB5Z2tE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P4BwsqZ98UmXU7C5jgu1fXk5B6wVJFJExMfeTa9u1C/Auv2vDycXxcHbCli8cjfNZ MV4efjnqCQclipqwM6Af+KWoaaDSSmaHqhrfESFHD19pFIpXAuJyI+qc3WY9qRFm4l zVGUzscQDpe8EMGqNGLGo9NVwdAxs+HMe6PXwZ7lmfyirtVreh4GWZL0IGbAVKVDA1 Wx0FCgL792SQin4x4/wfJXdl+pX5d9rN+48fQXZvC2kWHfEzL7Si7AjUT/xdb8hevH 5y+zQiitmOGXkQuZsReXnDuX56KFJM89TI9F4oFa33T2kHDMWsFWIJpnwXjBSAsuc6 nDSHFb6j2bqRA== 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 Subject: [PATCH v3 32/55] clk: mediatek: mt7986-apmixed: Use PLL_AO flag to set critical clock Date: Mon, 20 Feb 2023 16:00:48 +0100 Message-Id: <20230220150111.77897-33-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220150111.77897-1-angelogioacchino.delregno@collabora.com> References: <20230220150111.77897-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?1758362873224994616?= X-GMAIL-MSGID: =?utf-8?q?1758362873224994616?= 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 --- 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",