Message ID | 20180927085921.24627-3-martin.blumenstingl@googlemail.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 780A7913 for <patchwork-linux-amlogic@patchwork.kernel.org>; Thu, 27 Sep 2018 09:08:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 674222AE37 for <patchwork-linux-amlogic@patchwork.kernel.org>; Thu, 27 Sep 2018 09:08:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 590BE2AE42; Thu, 27 Sep 2018 09:08:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 890B42AE37 for <patchwork-linux-amlogic@patchwork.kernel.org>; Thu, 27 Sep 2018 09:08:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RVWpUsgChnrMA7Lz5xrw/P88A/9HNdaqnME9WgrAHB0=; b=LbWjzxJsRl4Rck ygJ2nr3+E2wiizqXi7ujakGNxIuQkfclpHMeN75W76oY9h8P6dp3h19bFtGTU3QNxLUwKqtDqly0c jXTnqPqF4hwaQTx3Q1uK0fAudHrY46814lFxVZn1Bl0ASCt50wgZoA32C4RtDISwRt63jLp5mf59W oJhY/J5NadJU93ZbBR7oXuknVvLSE7+SWelaSqaWcPa43pvKqlfF+OXMCYxJ4HKzPUS7J9DmFVkaq iwq6T7+Kty+r/wz5IkCfUHefI1Vl/uUzQA0VT1v/N4UhtUWaBSGvrt07iz5rXmBhTCalz21KD5ARE hc54BmTNH5+Ks9RlPimA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5SHv-0007ms-MD; Thu, 27 Sep 2018 09:08:47 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5S9M-0003Vd-Je for linux-amlogic@lists.infradead.org; Thu, 27 Sep 2018 08:59:58 +0000 Received: by mail-wm1-x341.google.com with SMTP id y25-v6so5039518wmi.1 for <linux-amlogic@lists.infradead.org>; Thu, 27 Sep 2018 01:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=34KR1Fv7mj1UVEfnSg3tBaV+0nA/FGUVZpJpwcFCys4=; b=TFnv3qiZ23jjQJboy+mQ0osNdYbXSjrk7yr+dfP5WAB7A5uNnpWYpyq9spxXB/izL4 XCwYY+YGqfOCa4+/i52oxRJBCPJQ9r0kKdEUTKpyCSS4ZgBDm16cwrc5gEL2ty8L8YuJ kISKH8tKY1d7qG5zrcLuFetq3AqS2OOQ1hn+TKlsf+Kzez37Y4CLslVr8kwEGBXs84Qk xVEc5HGLW0J5X2EHYW+gCXWFDIssEi6diYFLxXRRyTCpuvKgf0NKEpZOgR486fLBl1Xf 11JM0age8Dg+x56+rmMng40oS1PbMri2DnXwDVijz/LkRxLL7Upu0FO4zwwGJrYY1hFs IEFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=34KR1Fv7mj1UVEfnSg3tBaV+0nA/FGUVZpJpwcFCys4=; b=j1+H9vVl/NeUtr74IOEyay80ltDnx61PXEEEz2w2y6AazRlwz0Qq4ZowMJM9NrkVjK OHFG74Fx557jBB3eeZr0Jv1yR9fTffunmNvd29gDKjUhMpu1ZdF4z0qARE38Db1MChvI JWa235uIjTZFdhCZajQKfMo8Cuf6jrYxEJFfMKB1XUZhxT7q1/v4FnjheCHWXXb1cPUH DHhuBHdacMzzAvHw8OZgKJtRVLHiF4H1Lr+WC/PhjjilDdcLsN0UtjUJ4dtZSv+227Ho fhDA351ZA8sTii+zf2Dw/9+0cqp576U0gB/lR1ibM7mqQ0Ztvd6swwO/Q2VUB/dq7EJ9 XmOw== X-Gm-Message-State: ABuFfoiQ8RLqrU1/cA7IfrsdPRLZJRrlANq8UxK6sXhj9kw0OQz+TL7S hHS17MdDodFMKlCg412tXtlxefUk X-Google-Smtp-Source: ACcGV60NlKQ2Xz0LAYKn0eJABi7iwVwITspGUqTrMXuC3c3Rht/+cZRf7EWgzdXioUCc6d2lAM00CA== X-Received: by 2002:a1c:2108:: with SMTP id h8-v6mr7317159wmh.108.1538038773679; Thu, 27 Sep 2018 01:59:33 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD716E000F8F1A759B0FAA67F.dip0.t-ipconnect.de. [2003:dc:d716:e000:f8f1:a759:b0fa:a67f]) by smtp.googlemail.com with ESMTPSA id p64-v6sm1776483wrc.97.2018.09.27.01.59.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 01:59:33 -0700 (PDT) From: Martin Blumenstingl <martin.blumenstingl@googlemail.com> To: linux-amlogic@lists.infradead.org, jbrunet@baylibre.com, narmstrong@baylibre.com Subject: [PATCH 2/2] clk: meson: meson8b: fix the width of the cpu_scale_div clock Date: Thu, 27 Sep 2018 10:59:21 +0200 Message-Id: <20180927085921.24627-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180927085921.24627-1-martin.blumenstingl@googlemail.com> References: <20180927085921.24627-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_015956_658833_1F07C10D X-CRM114-Status: GOOD ( 16.01 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-amlogic.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-amlogic>, <mailto:linux-amlogic-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-amlogic/> List-Post: <mailto:linux-amlogic@lists.infradead.org> List-Help: <mailto:linux-amlogic-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-amlogic>, <mailto:linux-amlogic-request@lists.infradead.org?subject=subscribe> Cc: carlo@caione.org, Martin Blumenstingl <martin.blumenstingl@googlemail.com>, linux-clk@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" <linux-amlogic-bounces@lists.infradead.org> Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Meson8b: fixes for the cpu_scale_div clock
|
expand
|
diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index d3f4e11d106d..8658a662b10e 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -594,7 +594,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, },
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 <martin.blumenstingl@googlemail.com> --- drivers/clk/meson/meson8b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)