Message ID | fc157139e6b7f8dfb6430ac7191ba754027705e8.1708221995.git.daniel@makrotopia.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-70180-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp611600dyc; Sat, 17 Feb 2024 19:34:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWTz1KY0p5ylJU/CAh3Y465e0wseQgNuup9kAAov7wwEEoGXE7XsoKLbLL1an72mJJPvrI6gnv6wjfI1SdGB/e4HJB2EQ== X-Google-Smtp-Source: AGHT+IEAka5hRtWI3DWWRFig/5VsUmvJ+4XH+u8sKlPsrS/LMKUbG++5SIxt7fbGcEyGb+pHza3C X-Received: by 2002:a05:6a21:9216:b0:19e:a3d4:24be with SMTP id tl22-20020a056a21921600b0019ea3d424bemr9944152pzb.49.1708227272019; Sat, 17 Feb 2024 19:34:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708227272; cv=pass; d=google.com; s=arc-20160816; b=D3aOZ1RSOceEwf5Taxl4fCqoXKx8SF1XQU2W45tLkPelXKJZEdLZdGWoMQvmwBF36n 13ztJ3Ryh2Zfmb11qGOleNZIqQarh1iYpLjP6CRfSD+8XKmjwaY3DbDYsl9kT/luMsck Nwctr1F6jWHiuxyOgUDZD7vTrsyt7yQqM9d8sMe1yMRFqR5hLvr3FZMnZMQEPM3msRTQ q7PjKe4sP7WdiUlICG5QRCPfpH31jCGkEfkmLmHuK21n2RBK60+6MSH7LDaXSDGpV2Wk h66Qin3AZdK6oXtuhC3Ix0q4iDAsmf+hBCYy+Moz0zlktbmcS6sqXBEZT2ZbTB/Ixpsd J9Gw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date; bh=CTkpCAt52XGgguaJPVayTwv86qpgvut5YPHklVZRrNA=; fh=l3V+4PyNWoadZcKMO9AyzkkxX79/hcFMwtoEulFIM8c=; b=kZmOt5dEDyBfBm+D3xRmUtVEKxvl5H29073urM6Utfx5r4CBB1lvmP6RvbYl/CLo4N SSshzqavCbb8uTxrfmNWkoYKg4qlvcUEziRYDShf+GHTvQISAym3/NDJI44ZlXQCjY7r BcKSymsPT/MRO6b8P7lYo/FycN/knOfKjX8SC2l17QNXszJYqXJKqkLSklnolYBrfY0u coiGdltKymxsnrWEmwUFq3Y1ZJEaHFB+2WzBoUD+cOi+ctW0eye+RkIU292uhZadN2Jh ljAyqTXhSVjPtLx2Q0V2ziGvoTqHgIA0S6gqSw9uDrTuPQrkPVPfGxoOdja1VXJ28m3J HYTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-70180-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70180-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w186-20020a6382c3000000b005cfd6ba16f7si2254486pgd.647.2024.02.17.19.34.31 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 19:34:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70180-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-70180-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70180-ouuuleilei=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B73B02833BC for <ouuuleilei@gmail.com>; Sun, 18 Feb 2024 03:34:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DA2946BA; Sun, 18 Feb 2024 03:34:18 +0000 (UTC) Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (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 E3B7C1C27; Sun, 18 Feb 2024 03:34:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708227256; cv=none; b=ngxWj/i1VMqWlsfh8Z5CZO06mn68xoxUq9gEVmmQ+ZRjUU12pzsJnyec11boJ4Pjtv22jzTmV6KaSN1aSlTIazMlT+6sFrnaKiVi7j1Z5E3kvrKoNfvDcndas0oqhr6kLHtN6/QBclOx2Qwjg+7IJZ3Z+EOef+nLv+W4pWMIHug= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708227256; c=relaxed/simple; bh=CxVKwUGLo7LecTQYrgFuAB5EEisKCsHAp17IP4LnF4Q=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=ul4SK1VFx147ZY7kzk1Oeap9evRJvnnvCF0jCmtxgTvKXBUvAHGBxrQ7XhOtGaxVHpBzCbp8P/Xy77DXhzzBmxlOrqxZiIaUQgOgP8YQtOdOg+3So/WWFIQldN89hdt7L1kdfQPlpvgbhP493J8EDJ98K0Dpig5SkDcUj0oMgLI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from <daniel@makrotopia.org>) id 1rbXaP-00054G-35; Sun, 18 Feb 2024 03:11:26 +0000 Date: Sun, 18 Feb 2024 03:11:15 +0000 From: Daniel Golle <daniel@makrotopia.org> To: Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Chen-Yu Tsai <wenst@chromium.org>, Daniel Golle <daniel@makrotopia.org>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Uwe =?iso-8859-1?q?Kl?= =?iso-8859-1?q?eine-K=F6nig?= <u.kleine-koenig@pengutronix.de>, Rob Herring <robh@kernel.org>, Jianhui Zhao <zhaojh329@gmail.com>, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Cc: John Crispin <john@phrozen.org>, Steven Liu <steven.liu@mediatek.com> Subject: [PATCH] clk: mediatek: mt7981-topckgen: flag SGM_REG_SEL as critical Message-ID: <fc157139e6b7f8dfb6430ac7191ba754027705e8.1708221995.git.daniel@makrotopia.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791206120130379703 X-GMAIL-MSGID: 1791206120130379703 |
Series |
clk: mediatek: mt7981-topckgen: flag SGM_REG_SEL as critical
|
|
Commit Message
Daniel Golle
Feb. 18, 2024, 3:11 a.m. UTC
Without the SGM_REG_SEL clock enabled the cpu freezes if trying to
access registers used by MT7981 clock drivers itself.
Mark SGM_REG_SEL as critical to make sure it is always enabled to
prevent freezes on boot even if the Ethernet driver which prepares
and enables the clock is not loaded or probed at a later point.
Fixes: 813c3b53b55b ("clk: mediatek: add MT7981 clock support")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/clk/mediatek/clk-mt7981-topckgen.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Comments
Il 18/02/24 04:11, Daniel Golle ha scritto: > Without the SGM_REG_SEL clock enabled the cpu freezes if trying to > access registers used by MT7981 clock drivers itself. > Mark SGM_REG_SEL as critical to make sure it is always enabled to > prevent freezes on boot even if the Ethernet driver which prepares > and enables the clock is not loaded or probed at a later point. > > Fixes: 813c3b53b55b ("clk: mediatek: add MT7981 clock support") > Signed-off-by: Daniel Golle <daniel@makrotopia.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Quoting Daniel Golle (2024-02-17 19:11:15) > Without the SGM_REG_SEL clock enabled the cpu freezes if trying to > access registers used by MT7981 clock drivers itself. > Mark SGM_REG_SEL as critical to make sure it is always enabled to > prevent freezes on boot even if the Ethernet driver which prepares > and enables the clock is not loaded or probed at a later point. > > Fixes: 813c3b53b55b ("clk: mediatek: add MT7981 clock support") > Signed-off-by: Daniel Golle <daniel@makrotopia.org> > --- Applied to clk-next
diff --git a/drivers/clk/mediatek/clk-mt7981-topckgen.c b/drivers/clk/mediatek/clk-mt7981-topckgen.c index 682f4ca9e89ad..493aa11d3a175 100644 --- a/drivers/clk/mediatek/clk-mt7981-topckgen.c +++ b/drivers/clk/mediatek/clk-mt7981-topckgen.c @@ -357,8 +357,9 @@ static const struct mtk_mux top_muxes[] = { MUX_GATE_CLR_SET_UPD(CLK_TOP_SGM_325M_SEL, "sgm_325m_sel", sgm_325m_parents, 0x050, 0x054, 0x058, 8, 1, 15, 0x1C0, 21), - MUX_GATE_CLR_SET_UPD(CLK_TOP_SGM_REG_SEL, "sgm_reg_sel", sgm_reg_parents, - 0x050, 0x054, 0x058, 16, 1, 23, 0x1C0, 22), + MUX_GATE_CLR_SET_UPD_FLAGS(CLK_TOP_SGM_REG_SEL, "sgm_reg_sel", sgm_reg_parents, + 0x050, 0x054, 0x058, 16, 1, 23, 0x1C0, 22, + CLK_IS_CRITICAL | CLK_SET_RATE_PARENT), MUX_GATE_CLR_SET_UPD(CLK_TOP_EIP97B_SEL, "eip97b_sel", eip97b_parents, 0x050, 0x054, 0x058, 24, 3, 31, 0x1C0, 23), /* CLK_CFG_6 */