Received: by 10.223.185.116 with SMTP id b49csp1075984wrg; Fri, 23 Feb 2018 11:29:12 -0800 (PST) X-Google-Smtp-Source: AH8x226T9luKcXmqWLkfaJeO2BovPZQe5VSul72pnk04iTjHOFFdkCgiNC39hksHFW7XdMvjl6Io X-Received: by 2002:a17:902:6c41:: with SMTP id h1-v6mr2614023pln.25.1519414152199; Fri, 23 Feb 2018 11:29:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519414152; cv=none; d=google.com; s=arc-20160816; b=WlTHgxhYqZ9q90m+v4RuOFRW1IbB7Vh2lbMpFOXgBlbTa4m39A2sRcGmBFqQRd6U3p /ODa6ueDkC5B0FPsaUbcZhV4i2Tg/PhRQKaeytsqg+dpzO57MBrTBeFXeMZThNSpwJjl WL637QR/JqLLADt08Xe8xtOle+b0bbmvhFBSkPTwbI1yZO5y0Q7GbVlzkmhXWjA1+avJ 0tdagL6thGmQOKY82mYB9JkVXXU65WwGBCGTh0qS1GlIsQmrbucfAqED5q1if2vn/AE1 4szRCxhCk/p0K/eOwgmaA6AxM51nqORina9aSNdPY7eUbLtpa28G3zyq8TW9sLm6vfkx 7eXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=GJe064+zYQUlJbW2G6uRgeVfn23wQt2x+eZkOFsTUP4=; b=L+v6GuM6b33zcyDgNQcxEKwRB5WGZN1SgFL8RaozZ/PRiwKMzi3PqM32dRoghOQ/09 8qNVKtxVYsMU0DcycshiEXa5IT8ubkh/lWIz2uXeJE1pKM/XFAyYNPx2eUyiGHvz3xlF CKVC6bsn/XzQY0oY+BxBx8ywpdj7/MEpecECztaP6i+P0cBfumUKCyHCoHlX4WVq6wF+ Bxq4IVQFrEqVUrv2hfxcMIo2fyunZzbnu6BkbH8Cq9hKLiS6ZUF/0qzljcZ7w1ExUZUK h8t2YMQoIPvNCpDt0dwRuLpqGzUf3SZNCG/K/dHRSCHbuVpw3NDbefcxHh0cNXnCm2Pf kAog== ARC-Authentication-Results: i=1; mx.google.com; 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 f89si2268309pfe.185.2018.02.23.11.28.57; Fri, 23 Feb 2018 11:29:12 -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; 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 S935088AbeBWSwG (ORCPT + 99 others); Fri, 23 Feb 2018 13:52:06 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:46528 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935075AbeBWSwE (ORCPT ); Fri, 23 Feb 2018 13:52:04 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3E3DE728; Fri, 23 Feb 2018 18:52:03 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Keerthy , Tony Lindgren , Sasha Levin Subject: [PATCH 4.14 062/159] ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function Date: Fri, 23 Feb 2018 19:26:10 +0100 Message-Id: <20180223170751.089659979@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170743.086611315@linuxfoundation.org> References: <20180223170743.086611315@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Keerthy [ Upstream commit b6d6af7226465b6d11eac09d0be2ab78a4a9eb62 ] Referring TRM Am335X series: http://www.ti.com/lit/ug/spruh73p/spruh73p.pdf The LastPowerStateEntered bitfield is present only for PM_CEFUSE domain. This is not present in any of the other power domains. Hence remove the generic am33xx_pwrdm_read_prev_pwrst hook which wrongly reads the reserved bit fields for all the other power domains. Reading the reserved bits leads to wrongly interpreting the low power transitions for various power domains that do not have the LastPowerStateEntered field. The pm debug counters values are wrong currently as we are incrementing them based on the reserved bits. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-omap2/prm33xx.c | 12 ------------ 1 file changed, 12 deletions(-) --- a/arch/arm/mach-omap2/prm33xx.c +++ b/arch/arm/mach-omap2/prm33xx.c @@ -176,17 +176,6 @@ static int am33xx_pwrdm_read_pwrst(struc return v; } -static int am33xx_pwrdm_read_prev_pwrst(struct powerdomain *pwrdm) -{ - u32 v; - - v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstst_offs); - v &= AM33XX_LASTPOWERSTATEENTERED_MASK; - v >>= AM33XX_LASTPOWERSTATEENTERED_SHIFT; - - return v; -} - static int am33xx_pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm) { am33xx_prm_rmw_reg_bits(AM33XX_LOWPOWERSTATECHANGE_MASK, @@ -357,7 +346,6 @@ struct pwrdm_ops am33xx_pwrdm_operations .pwrdm_set_next_pwrst = am33xx_pwrdm_set_next_pwrst, .pwrdm_read_next_pwrst = am33xx_pwrdm_read_next_pwrst, .pwrdm_read_pwrst = am33xx_pwrdm_read_pwrst, - .pwrdm_read_prev_pwrst = am33xx_pwrdm_read_prev_pwrst, .pwrdm_set_logic_retst = am33xx_pwrdm_set_logic_retst, .pwrdm_read_logic_pwrst = am33xx_pwrdm_read_logic_pwrst, .pwrdm_read_logic_retst = am33xx_pwrdm_read_logic_retst,