Received: by 10.223.185.116 with SMTP id b49csp1098461wrg; Fri, 23 Feb 2018 11:55:11 -0800 (PST) X-Google-Smtp-Source: AH8x224c/WK06afnhTxmkuSBcyxo5IVLuj2cGV+py9qfWEYseJRtNXTpe7Phhq/LbQfY+meaxnoe X-Received: by 10.98.20.22 with SMTP id 22mr2785011pfu.141.1519415711839; Fri, 23 Feb 2018 11:55:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519415711; cv=none; d=google.com; s=arc-20160816; b=q0snapxans7JqUTel5SkI1dzqVTNZ9dRS14w7BSwbn2j5R5xGMwFIQYZLOBa3Kyya0 1FooAcjj+ZKZZG8k48/qIAH6aXCPMuLxUe0LgOIjJvbfcCBAuledC4iE3ctNqXyH4GNy TqBJ3MSDr+qN50P6WTLn4F1g3cy0zZh+KzSLzFpPdODl00xUCg9jQHBPzXJs5+msMIZ9 RovDj7PHqT5A4sZYev4AyX66Eb/WhFBjZLLu2f6VHcVBaGMk4umZ/RvJ2jGJOk1EAri4 2vlSZwuZkR4oTl2/5cacKILOB9Bi2rWHNeBGyzjhnDZpzlM3FucK5Umbu27QaJ05GCnQ Pk3g== 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=ei+p5PxDoaruILNLqg0UPqfHB0fdu6aHAcOrz8doxS8=; b=EcvD6b6Co1Fk/+qa841xbc7tcUlY6StQ74br2vYB8UppWPXz/nK2EXU3uWhWFvpvaV 7xIAXuFuR096Q2g+GaoC9jlF6HGBgF5zMZGzafM5E67XeuQHPon4o3q8EyOKHZ2Axzic lQ66ANwQuf7QqMMHSB8Z0F/8Vx3PnCVDTwiLKdqieueqspajvqzYySW178L4kRO9cPQB JqAEvA2GkS0/q/68EADwuhRZ4I5NoC8kq7zcWd5k/IGlgDz654KU3pG/Oliy76DvM0Lw OHmVdUdr6pIM5uyIlL3FpmFqHKvn9W5h9j5hG6qDnVE+BFjTqh3yQcVrSS6ef5YiUYGH KsYA== 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 g24si2287534pfe.107.2018.02.23.11.54.57; Fri, 23 Feb 2018 11:55:11 -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 S1755004AbeBWTxy (ORCPT + 99 others); Fri, 23 Feb 2018 14:53:54 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43292 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933474AbeBWSpW (ORCPT ); Fri, 23 Feb 2018 13:45:22 -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 18A7E1244; Fri, 23 Feb 2018 18:45:20 +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.9 044/145] ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function Date: Fri, 23 Feb 2018 19:25:50 +0100 Message-Id: <20180223170730.619713900@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170724.669759283@linuxfoundation.org> References: <20180223170724.669759283@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.9-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,