Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3710034imu; Mon, 28 Jan 2019 09:25:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN4/EzXOOVhHyoADufwj8JCiOuJkXm33cSejxGDBcS3dK4kCz1WyDJb61yZioMqOt96C3nQE X-Received: by 2002:a63:6006:: with SMTP id u6mr20697087pgb.176.1548696332348; Mon, 28 Jan 2019 09:25:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696332; cv=none; d=google.com; s=arc-20160816; b=v5gTRAnjBeJo2bwLpYbJd1tfTV2MkHOVjfgVBG4kE2XVBd+8kQIjW8EgGrsgLpSkGa AZ94AxL9iG9+iXFrccKL2uBap3UAw6axFMxVXKx9G3D56HDHx2fbavx1vzeEZInNj9Sb c1QZOkOX7mZNlRpNc2tQOiBUaozMz8a1Y8EqeY6YMSYOHWRdF7R4+Z4mqGcRI+gtMikl DO52FibIgln9+85DERTAsxQH1Qcm4mdk0xFzLJZOWhMIW4m2s1s48qazUrvFEgLSn3mZ FC/OztqWkgHjUSR76pcwJvyX4sbTrwllSYHMhOs9e8KXhJxNNIaY6NIg7kMf/NTP+fq1 pifw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yYawbKnzoxYVmtQEH7TPlZm9qUNMr1tT7UYjK8K2j6Q=; b=pbfXCF9boHr/ye0IILq2flFPIKrCQrsdvo++J2Re2qzyeJAwAtYx4L6nMdeNtOPUax zCME+Yfg6Agdc0i4Pk/ArIyLLrnQtxn0D+KtztQCv5+k2NUEe/iMHyK2whuEvABYJ8QJ cWuA7GzSAp7wog82RGyuY9zDNMIjmlzy+fMHmumxu3SsSJ6Crl5bM8yP2exfDP7H5O58 blO6XDrjPKxFBYuTL+iwGkBLU3IumPO0ZI+5Omfmkj1Z/upMZnk5QUMNbOauOkNcR47W kaZ5ExB+zsCcWv1dthor0dbDYvgKNfG5MEwXLiOZeuMHoJKuEaDNG4aIRTLLsIPOvIn0 LUHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tqLGEKb6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u23si3191215pfi.175.2019.01.28.09.25.16; Mon, 28 Jan 2019 09:25:32 -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=tqLGEKb6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731429AbfA1RYA (ORCPT + 99 others); Mon, 28 Jan 2019 12:24:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:47682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728381AbfA1QCV (ORCPT ); Mon, 28 Jan 2019 11:02:21 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C6E4E2175B; Mon, 28 Jan 2019 16:02:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691341; bh=zg/Vpf28TMYu0pRhPPFBtAn+7EvNhpStuH/LM0Ka8Ko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tqLGEKb6EpqnWTh5Qp8HaMvhv8rJtPLxOV0FbtwPKwKvX73J+Dku9U6SyzKFoBtG6 i0Tl5MMAVm53fLLLSElbf4h3TAddkrweVwxdv9R14swF8btW1XzdggPYumkBMBeMOa wDT481qfUPhqqOJN0IoAWyLMInvoXpg1gtOXEnYg= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Martin Blumenstingl , Neil Armstrong , Sasha Levin , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 061/258] clk: meson: meson8b: fix the width of the cpu_scale_div clock Date: Mon, 28 Jan 2019 10:56:07 -0500 Message-Id: <20190128155924.51521-61-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Martin Blumenstingl [ 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 580a86d120e8..0da8334f2e43 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -583,7 +583,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