Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2770688imj; Mon, 11 Feb 2019 08:12:49 -0800 (PST) X-Google-Smtp-Source: AHgI3IaZPzvHnvq72rt/8UpCJp8uODkfvaKFW0rLOL3GyZ6cSy/nQ8lQmMT8hqhvViCsc7UhwE2f X-Received: by 2002:a17:902:296a:: with SMTP id g97mr38525865plb.317.1549901569059; Mon, 11 Feb 2019 08:12:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901569; cv=none; d=google.com; s=arc-20160816; b=yOZLK9G1sxNu2W91XAJ4OsVwuEv4mCwaCHWkkQPY3ab2aPeEajTDqXBLgt4lwwVSl+ XkMc+xTu4DtXIBw7BnLsICsiVKu4iypa4sxYfeJMS3z7qvLTbkWdNGp95K3NDxBH/NHw R68PYZmFZGFrPUpMkDMxXv37TkgqJ2aiFPxjfIhK4t4SpOuuZdgmOIZcic63gUHBzqA3 WEv2LDlZwyE2x+qYJtAqzBEXdxlCIYyLQGziFgibHPczKEMlwJ+0sqwzwboT7MbTu4Z8 30RaEvtvaWK5mghULgFWJIoaqFNtFlVO2KKYrQTrb90L+H41fABecuk+YTMOLLaMz3xr XTjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GHmvncTDxvRnOl2ACHCcd71Eey4bR4LE6fqR1XJGAm8=; b=o6JU/Nk84tDuC/iWgVsYHy8S54GoODffTZROB2qOy+ADDug0Ymv3s2/Iyr3Z+sGrKa MSITOqIw3pClnLP/Yy3z9Ai4kNm7b96asc2cHDZ4Xh9lGwLbRrYBxRP6veWSrso0tF0E zyvVBXG9wf8wEELFjUE0PzWSn/a/Pcxp3ZIV9V7O4CEp4oI5EXUsgHxqtppHlNiLvQzq PzjddQu7TgRYtAx9kw1Kf+aIwsgHrXD+PCsLnkC420QbQt1e9knzDZeGvXMEaWa2asAx jIPgf1gYsXLIUtf46WO9Oe85y9rZ3dr/HKqHiuT44LDD2SrpQ6ZlCYNj/s2YBd1bZA0w 6zMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="z9/TFc3R"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e8si10541640pfc.248.2019.02.11.08.12.29; Mon, 11 Feb 2019 08:12:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="z9/TFc3R"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729078AbfBKOXy (ORCPT + 99 others); Mon, 11 Feb 2019 09:23:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:56938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727932AbfBKOXw (ORCPT ); Mon, 11 Feb 2019 09:23:52 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE5BE205C9; Mon, 11 Feb 2019 14:23:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895032; bh=EWHTQJ4qCk4trEDNVL6G+bYuB14mDOVJ1gpx2DlQHhE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z9/TFc3RR0R+8CfXOo66eCbfOGandgqk4zgAuDz9bkHJYq812Aw+NsgDdg8Lc9bUw 9Ic8U60uCjFKY21J9jzMv+FNGWSUtGd+bdtP0XSMCqdi3CLVPggk6UR/4cBro/jrFt TFi5iVzx1f45kY4SNnd9nco+267qHvEfdYrDcu9I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Blumenstingl , Neil Armstrong , Sasha Levin Subject: [PATCH 4.20 068/352] clk: meson: meson8b: fix the width of the cpu_scale_div clock Date: Mon, 11 Feb 2019 15:14:55 +0100 Message-Id: <20190211141850.431876133@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit a8662eadd1032018f31e37deda811790b2326662 ] According to the public S805 datasheet HHI_SYS_CPU_CLK_CNTL1[29:20] is the register for the CPU scale_div clock. This matches the code in Amlogic's 3.10 GPL kernel sources: N = (aml_read_reg32(P_HHI_SYS_CPU_CLK_CNTL1) >> 20) & 0x3FF; This means that the divider register is 10 bit wide instead of 9 bits. So far this is not a problem since all u-boot versions I have seen are not using the cpu_scale_div clock at all (instead they are configuring the CPU clock to run off cpu_in_sel directly). The fixes tag points to the latest rework of the CPU clocks. However, even before the rework it was wrong. Commit 7a29a869434e8b ("clk: meson: Add support for Meson clock controller") defines MESON_N_WIDTH as 9 (in drivers/clk/meson/clk-cpu.c). But since the old clk-cpu implementation this only carries the fixes tag for the CPU clock rewordk. Fixes: 251b6fd38bcb9c ("clk: meson: rework meson8b cpu clock") Signed-off-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://lkml.kernel.org/r/20180927085921.24627-3-martin.blumenstingl@googlemail.com Signed-off-by: Sasha Levin --- drivers/clk/meson/meson8b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index 328fcf50d9e8..9160a3b2e668 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -599,7 +599,7 @@ static struct clk_regmap meson8b_cpu_scale_div = { .data = &(struct clk_regmap_div_data){ .offset = HHI_SYS_CPU_CLK_CNTL1, .shift = 20, - .width = 9, + .width = 10, .table = cpu_scale_table, .flags = CLK_DIVIDER_ALLOW_ZERO, }, -- 2.19.1