Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3543503pxb; Mon, 1 Mar 2021 12:51:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcQXPUAwAvQO70tMIvmVqXFneN1NOsVgERKwA1q+pMyqkgmlFR5YEMb8fB7UndMdKm/O7o X-Received: by 2002:aa7:d296:: with SMTP id w22mr18860394edq.150.1614631908825; Mon, 01 Mar 2021 12:51:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614631908; cv=none; d=google.com; s=arc-20160816; b=TAXa5wBYVhEW0NjSyJYtSzlX8lOwxf5La+EFkMVx/2bQabYQlRQTIvufwkPoYi00fx w4iqK0qWF9UqrMUXcKfwJXBmziIp3ncbntCMC3SQKLLFdlauz/T6DWTU8lFBLwHjcpW4 ZLwHDGVwY1y9AiN8QFD10PrD7fl69qhXSRtfi3gEir9NfgyWTxJuTQ3EiQFNyka4GxhH wrlPEPZS6ECtYwlxq1Y77/Df9bIoGjWPxNVZDNh52HabLePpiuWQXFbwQ7WGfoM/Gyqp R6KTOQMaNYo4cobijZB1Orex5M6tOBpv3rlA/ZA/4O6KBT5nTZaEKHlUBEv+jczbTFtY 8a1Q== 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=vR8vyu64CXglyg2Lt8QBfT/SMD7VnB1cz3SKM9ADOcg=; b=mIiDUGPnBcZ30kRfXHjXlhOgf0SaLPqu5cbCi/nWtnnHxG8UtaSh2BHqYnNX/J9rFQ +ZdZ0yiWT5wB5kJs+K92IU8oAMxxtjOivPPP28Ek7XSDpzwvtWw9tW341OZraWvYISyS tIoReFAuc2V3uUuTfsDmSmZ/UcgG5DHGRX+PGSMOoXpOO5DHNaTI5p2oRFUDHgk43/vz N9faJkME36a7mNeTM+1zkljcBgwPYlQL1LKexzKLH8yxV/jNIz1kh7OqE8Z/VCq07RFx ljfxUcbvFv/PFwyAmX/UMlwB7QfPTc4AmSTevGGAHion4wG5bhTfCGX0+PzkluFo3G9u SLOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="UeQZ/4o5"; 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 bu13si2516715edb.498.2021.03.01.12.51.26; Mon, 01 Mar 2021 12:51:48 -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="UeQZ/4o5"; 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 S243832AbhCAUs3 (ORCPT + 99 others); Mon, 1 Mar 2021 15:48:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:37620 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236669AbhCARIk (ORCPT ); Mon, 1 Mar 2021 12:08:40 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7A2BA65015; Mon, 1 Mar 2021 16:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616923; bh=bICXy+oCC2hTyFlwB19WDIb3xPBQTmzH8T3GcRMLNu4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UeQZ/4o5xj5gmpfnavE7btROmNvRjp2zEL0suGKraTR5G1YkfvyHjLFAmfm2iVqO9 6bcgJqjh9NzIG6JykhqLBihCoogIohEZx4/dTEUwHlZDWpz0d8Ctu3BShmANba5sGh pqBvay3MgK9PIgZ4C9iD7MspYlTVVtpB+b8lGFJk= 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 4.19 124/247] clk: sunxi-ng: h6: Fix clock divider range on some clocks Date: Mon, 1 Mar 2021 17:12:24 +0100 Message-Id: <20210301161037.740806094@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@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 3449dcf1908ef..1197ace591247 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c @@ -223,7 +223,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); @@ -232,19 +232,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