Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp500955pxb; Wed, 3 Mar 2021 08:21:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmcxEGgfEZocFcLhqQITBjTyA+ByPWsFDZUVpNzshxwGyMabtWYhRfpvgTuqhuSywP1g0K X-Received: by 2002:a05:6402:1d39:: with SMTP id dh25mr44410edb.282.1614788476560; Wed, 03 Mar 2021 08:21:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614788476; cv=none; d=google.com; s=arc-20160816; b=pjBqLjh0SzoTI8H2U1JU207JzZG9/YroEGyWwNXAcgOQtcEYVDZeEuwIDLk6/OTn3q hRoHHaV6rqnwSLXMHYWvrDf1ceWymrQKvztHUnUfXA10mrJPnt7qqcSIUV3jq7OkgKcZ YwLIDLPeM+YCoalI+3sYRnrlLGnGL4g+AfLoPWs7TIUXWkFWbA13O8gyg16NFjXWM/Y9 q8PbAvMXmgvQ7DjntgcNDWe2AFV5qLLxW3oVJFDRTtBbRQwYmFWpWFn0hD/xJZtSWhz1 YGZQWirWSvfkDS4UBGIEzkv2MemPkLtj+s13bvpYu8/Xw7DFCgu9dpcFpjPVo24d6fuR Q/FQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MWbkmZn0YRfcUfP4kVxbWE0T0KGATqyw8naEi1aTr+Y=; b=UJDawegdE2VTP1dwm8iRsGl74XIVhSDCWdGDSsyN7Rc3U8A44NLKhil89R+yTv7SMi Fd6uJalc+5HjZnHuqT0QFAWRmJAFAFd0MhB4JhlbTkPHfSuDW3c1U/7p1mPzeQ8j1DgG Nvr+QU/eCSn2u6Udy61zpcnEkav14xl99dULuh+kRL5D8mNasiIuM3vtRjmvEHnuJYl8 pHvQJxYoHdNE1ROvZBzVEwIUMPIZQMU8kVbqsnVseIbAH4Y5/4prkl5LHPwfFYT1M9ez uDvQS0vhUvBkxL2cMCMkFZtYa2rVVzQtNFbO2g95rv+lIa/YJN8w2B4kDonQUwETj4Eu lKRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Awf2Au2P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si14712531ejn.375.2021.03.03.08.20.21; Wed, 03 Mar 2021 08:21:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Awf2Au2P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346757AbhCAXuT (ORCPT + 99 others); Mon, 1 Mar 2021 18:50:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:34280 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239393AbhCASMD (ORCPT ); Mon, 1 Mar 2021 13:12:03 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D3307651C8; Mon, 1 Mar 2021 17:16:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619020; bh=7YVtzAOdpccMPBGAKnB8fOc8EPwe9L4sRW1khEaKJnQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Awf2Au2PWLtWcwYf0EPAnDGQrd10GixuF2S5EkjxVUYtcoBp449DION4RygKlT579 mckOjwu2X4D+a5r5EyFi8aZLGfCCB088wleq2wv1MOFBu12xwPR9MjzTzlPvcwQ+qf QlivfIHpXc4eJ7zcvF6P5TtjWo97J5QNG1ofoFRM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andre Przywara , Jernej Skrabec , Maxime Ripard , Sasha Levin Subject: [PATCH 5.10 303/663] clk: sunxi-ng: h6: Fix clock divider range on some clocks Date: Mon, 1 Mar 2021 17:09:11 +0100 Message-Id: <20210301161156.826208741@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andre Przywara [ Upstream commit 04ef679591c76571a9e7d5ca48316cc86fa0ef12 ] While comparing clocks between the H6 and H616, some of the M factor ranges were found to be wrong: the manual says they are only covering two bits [1:0], but our code had "5" in the number-of-bits field. By writing 0xff into that register in U-Boot and via FEL, it could be confirmed that bits [4:2] are indeed masked off, so the manual is right. Change to number of bits in the affected clock's description. Fixes: 524353ea480b ("clk: sunxi-ng: add support for the Allwinner H6 CCU") Signed-off-by: Andre Przywara Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210118000912.28116-1-andre.przywara@arm.com Signed-off-by: Sasha Levin --- drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c index a26dbbdff80d1..bff446b782907 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c @@ -237,7 +237,7 @@ static const char * const psi_ahb1_ahb2_parents[] = { "osc24M", "osc32k", static SUNXI_CCU_MP_WITH_MUX(psi_ahb1_ahb2_clk, "psi-ahb1-ahb2", psi_ahb1_ahb2_parents, 0x510, - 0, 5, /* M */ + 0, 2, /* M */ 8, 2, /* P */ 24, 2, /* mux */ 0); @@ -246,19 +246,19 @@ static const char * const ahb3_apb1_apb2_parents[] = { "osc24M", "osc32k", "psi-ahb1-ahb2", "pll-periph0" }; static SUNXI_CCU_MP_WITH_MUX(ahb3_clk, "ahb3", ahb3_apb1_apb2_parents, 0x51c, - 0, 5, /* M */ + 0, 2, /* M */ 8, 2, /* P */ 24, 2, /* mux */ 0); static SUNXI_CCU_MP_WITH_MUX(apb1_clk, "apb1", ahb3_apb1_apb2_parents, 0x520, - 0, 5, /* M */ + 0, 2, /* M */ 8, 2, /* P */ 24, 2, /* mux */ 0); static SUNXI_CCU_MP_WITH_MUX(apb2_clk, "apb2", ahb3_apb1_apb2_parents, 0x524, - 0, 5, /* M */ + 0, 2, /* M */ 8, 2, /* P */ 24, 2, /* mux */ 0); -- 2.27.0