Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2392231lqp; Sun, 24 Mar 2024 17:26:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWquDzADdhvZ2cMWTzi2Oylk0iT5ey0T0h8tFhOPF+XlErbS7PCMKyqL7+SFQeIDARApP26vigpEfS+gTG9oazmzDUvYC/7HGI3XnvDvw== X-Google-Smtp-Source: AGHT+IHDjExxAIEwySx9aQF3XMAK+NTRx0uCCGZPOzDxDWu+cYsbLltwxmZHJ0zJgShg1RIWgl8v X-Received: by 2002:a9d:618c:0:b0:6e6:9422:d70c with SMTP id g12-20020a9d618c000000b006e69422d70cmr5877446otk.17.1711326360247; Sun, 24 Mar 2024 17:26:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711326360; cv=pass; d=google.com; s=arc-20160816; b=AXPA/kgFPLYRY3g2eQNqIKKypqlz1ienDFpfJ6CYCJfj3kJ/R6F2TuM6Pmk/O6dnfr Gm/5riG+YgcnNwBkTuxP8qwUdeLD0qAuRJKXyJXwc5Ja57lojgy7keFQjfuQ6+bJIZ5y piYGjGWWuRLyIbXqXuPXxn6pRtgp73V5OtQQuquSgOkjoaDeP0NvAaVgwR/oEfforhFk 8Xk52F+epG9CenCAyNrOyBCV7ut1Dcvyu3/Y2/gnyf2jWlHGpD3KjJ5DFgFiihWD4+o5 FBGbshTOku2OfoAkeYY6VAEbLAHukhI20ttnuS4DZ7dJpxCsCNUNmRv2iBiWVE6g19FI i3Zw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=1yPxh0oP0re8zKiYyrItYTBx6rxkrboUffXZCqSVTyE=; fh=9oecMAMUp+C6RhW5THNu+Tx+51SMTNtgnmdYrm+W0qE=; b=oFuTQ0vK2cIoLNuLAyy9cWZQxvYSFMbe7mZtmOidsEAqSNW//6Mkd6EQXji8FQUQjD hElPtmhk+T7w5GZEpvnXo69bEalrvyH9M8CeFbbdQgiUJr0Zjoa0ofhqfxpRW0CYRmj3 ptT0ivCfgTxITsrO0A79g1g4/phCao3aOItgxa4ykGgk4mgEQ8XMqmagd2OnX9/dnH0h xpmQrwvFNPt5Y2cXsx+wOozcQIl6OhKYTZznW1ZNCfZA/hjBK+aeaQ9SbinZS1qo9Lwf 3MKRZeGgnfIufMc1jqkN4mwb90i70DK6GoRqI6WznXFpHRzmFfPQf+RR+lC3V+f1+q44 G5pg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="GAB45/+Q"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113348-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113348-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t9-20020a63eb09000000b005d8bd587734si6365684pgh.772.2024.03.24.17.25.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:26:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113348-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="GAB45/+Q"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113348-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113348-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 01C77B240EE for ; Mon, 25 Mar 2024 00:15:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00F87198B96; Sun, 24 Mar 2024 22:42:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GAB45/+Q" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0EC9C198A09; Sun, 24 Mar 2024 22:42:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320149; cv=none; b=mWH3RUz0W8cvHxQfGa84jZN83TnBMJjBSvLxNTJKBE9UI9raLrAsc8nc/wKQS4BoBHsymAGVky9xWH7+9+FfKAAXj8xoUD4PQ+l9Fu2mivh+YY/mdAbO+AbuGb9AB0JmcbcrTgGz9Yxiva02C1S5325v+uW7+OClTQc4lfftjCU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320149; c=relaxed/simple; bh=H2gboN4lFyZoPhuYF6uDqvUvDVm/a9twxrSa4OJarhM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lKTEIDlgbW0L8oBODDP9/esfyJxHPwJwegp8Qnr/qtpN1K70jc5zRkZk+OUkxGeRCj20Q+CxuZVzpGukFmxb3sGL5sapXTkQLWFeOhNxyiO/kKkvB09veQF87A6VQH6UhdGR7kMkLWvLe9BEFtjH9AMCGUWQQ43ykng8tZFkbIk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GAB45/+Q; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3933AC433F1; Sun, 24 Mar 2024 22:42:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320148; bh=H2gboN4lFyZoPhuYF6uDqvUvDVm/a9twxrSa4OJarhM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GAB45/+QvgBZhC+mgrZfzv4SV9YEC9Fw3LrPqt3zolG5TBV/eiSvFpM2cb+6Eh/OY RYlUwqMd1sMArZCO5Qw6AiG40MEAc1CeBwoIUkP4SUQF+JrzKmgQ6pSYt5UfZADola r8axiGFHBwnGR+ygbarFyPgXai+khD8n6ZDrEyJG2L41aVCQqpb48p01r3ak7oAJLc ihIY2UlOnD6Ny0pgOacfU5PBN46g62rwsJH5kJyYLJHnetBwHiWfPivnBctVt3PDWL VhsX6WGIFIA+Dty8MG8j6jnUq+gT/S7GHGprXpuckrJWpaUNDtnE9Hu5fc5si5Z9lM sRn6j9bT+Beyg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Daniel Golle , AngeloGioacchino Del Regno , Stephen Boyd , Sasha Levin Subject: [PATCH 6.8 457/715] clk: mediatek: mt7981-topckgen: flag SGM_REG_SEL as critical Date: Sun, 24 Mar 2024 18:30:36 -0400 Message-ID: <20240324223455.1342824-458-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Daniel Golle [ Upstream commit aa690050c00a251ab69e3c5204d582833d0b958c ] 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 Link: https://lore.kernel.org/r/fc157139e6b7f8dfb6430ac7191ba754027705e8.1708221995.git.daniel@makrotopia.org Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/mediatek/clk-mt7981-topckgen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 */ -- 2.43.0