Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp10695ybt; Tue, 23 Jun 2020 13:56:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIAPaztIXyKsKicdnOTw0IJLgnpjX6oHyazrx6xxmgyNQtyV3h+cWvD62pjQ6vcktnye0y X-Received: by 2002:a17:906:830b:: with SMTP id j11mr23253471ejx.42.1592945816712; Tue, 23 Jun 2020 13:56:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592945816; cv=none; d=google.com; s=arc-20160816; b=I+coCodT8L/HzL2tTq/aid0x1kxnofb+p1/W74O814ohh3+G/q9/4qhDRJUd+i/dh0 h9A0AyluveoEpmz65qu/diV4iziZXlIM1LKLFWGsCuP4Dc4yTOhoXyulVJYKHG3hmVBi XyzPiQQlMfjWTEKlHx61i/Fafi9MNOPdKXBsHVUivvyqc3G2mmdI9UVttWdRc0+NXNKN s8rmwn4FVt50LIxcFgPaLjwJ2YnX1F4hnaoXfxEy/+LvWzQo2Lspvn4TGnASGrYpaqf7 qPsDDHoWFk/nhG6rm5bSbzKGR8x2a6u7ttZXk+v2+O5L39BVnhzI7f5Bwts1QkFIP1co 6iog== 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=ndbGcOOpKJBfxd92k4xyCWMRnmVnV6Sz3khClru5lRU=; b=vNIQwVXYxAr5J1CRMuNFbe6m2oOp/N8dFi4K66P6UmOEP7laIqN2+QfY/FQRp1Q1ew LuGorWU+GCN2KBYaGi6etuH421n6o56yycNrkZiDGGT2YQWe6vX/Yj4fN6OoZITQ+yYt FhdjLQeD/96CYHwQg+Bj531pDqHq8E8TmSzUuLKmuGj/gEYB8BE9LWESEuFc1L/4Axfh AO3KzDbU/9o6fGuk32Mq0p21D3LJ/e5hZwcOOPZMN+TpRslcjzCwlaCgftji8ZqdRXkw lUc+fPzfczxeSARygSoKurgQhcCvg7VauRR1e2I6z4UO3RNKTlScLIhO3+FB+tZmQ09+ +vxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cNTZSfB0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k22si7335392ejv.685.2020.06.23.13.56.33; Tue, 23 Jun 2020 13:56:56 -0700 (PDT) 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=@kernel.org header.s=default header.b=cNTZSfB0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403849AbgFWUpI (ORCPT + 99 others); Tue, 23 Jun 2020 16:45:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:42166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392657AbgFWUox (ORCPT ); Tue, 23 Jun 2020 16:44:53 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 5713E21927; Tue, 23 Jun 2020 20:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592945092; bh=2ywDc0xZpZr4pNeuplAx72Tl1vqpLH6y/lFRNLON1GE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cNTZSfB0bZ5gkk7fNnbjP5zDfF7kbb9f+V39YaSp+iGRjOncAbWVwc6E2oXVovyfo T1YavHdy42HgkCYjqRnQ3qunT7DOTkx9IDwtLIQ95hDLnT4hdvAn4wNIhu9CqRwo0N hFMW9LT97LxbB+WUmuJNecWxanEJHDzFjxNxPd3M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Georgi Djakov , Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Bryan ODonoghue , Sasha Levin Subject: [PATCH 4.14 008/136] clk: qcom: msm8916: Fix the address location of pll->config_reg Date: Tue, 23 Jun 2020 21:57:44 +0200 Message-Id: <20200623195304.033620732@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195303.601828702@linuxfoundation.org> References: <20200623195303.601828702@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Bryan O'Donoghue [ Upstream commit f47ab3c2f5338828a67e89d5f688d2cef9605245 ] During the process of debugging a processor derived from the msm8916 which we found the new processor was not starting one of its PLLs. After tracing the addresses and writes that downstream was doing and comparing to upstream it became obvious that we were writing to a different register location than downstream when trying to configure the PLL. This error is also present in upstream msm8916. As an example clk-pll.c::clk_pll_recalc_rate wants to write to pll->config_reg updating the bit-field POST_DIV_RATIO. That bit-field is defined in PLL_USER_CTL not in PLL_CONFIG_CTL. Taking the BIMC PLL as an example lm80-p0436-13_c_qc_snapdragon_410_processor_hrd.pdf 0x01823010 GCC_BIMC_PLL_USER_CTL 0x01823014 GCC_BIMC_PLL_CONFIG_CTL This pattern is repeated for gpll0, gpll1, gpll2 and bimc_pll. This error is likely not apparent since the bootloader will already have initialized these PLLs. This patch corrects the location of config_reg from PLL_CONFIG_CTL to PLL_USER_CTL for all relevant PLLs on msm8916. Fixes commit 3966fab8b6ab ("clk: qcom: Add MSM8916 Global Clock Controller support") Cc: Georgi Djakov Cc: Andy Gross Cc: Bjorn Andersson Cc: Michael Turquette Cc: Stephen Boyd Signed-off-by: Bryan O'Donoghue Link: https://lkml.kernel.org/r/20200329124116.4185447-1-bryan.odonoghue@linaro.org Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/qcom/gcc-msm8916.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/qcom/gcc-msm8916.c b/drivers/clk/qcom/gcc-msm8916.c index 2057809219f4e..7426d910e0797 100644 --- a/drivers/clk/qcom/gcc-msm8916.c +++ b/drivers/clk/qcom/gcc-msm8916.c @@ -270,7 +270,7 @@ static struct clk_pll gpll0 = { .l_reg = 0x21004, .m_reg = 0x21008, .n_reg = 0x2100c, - .config_reg = 0x21014, + .config_reg = 0x21010, .mode_reg = 0x21000, .status_reg = 0x2101c, .status_bit = 17, @@ -297,7 +297,7 @@ static struct clk_pll gpll1 = { .l_reg = 0x20004, .m_reg = 0x20008, .n_reg = 0x2000c, - .config_reg = 0x20014, + .config_reg = 0x20010, .mode_reg = 0x20000, .status_reg = 0x2001c, .status_bit = 17, @@ -324,7 +324,7 @@ static struct clk_pll gpll2 = { .l_reg = 0x4a004, .m_reg = 0x4a008, .n_reg = 0x4a00c, - .config_reg = 0x4a014, + .config_reg = 0x4a010, .mode_reg = 0x4a000, .status_reg = 0x4a01c, .status_bit = 17, @@ -351,7 +351,7 @@ static struct clk_pll bimc_pll = { .l_reg = 0x23004, .m_reg = 0x23008, .n_reg = 0x2300c, - .config_reg = 0x23014, + .config_reg = 0x23010, .mode_reg = 0x23000, .status_reg = 0x2301c, .status_bit = 17, -- 2.25.1