Received: by 10.223.185.116 with SMTP id b49csp1141319wrg; Fri, 23 Feb 2018 12:40:17 -0800 (PST) X-Google-Smtp-Source: AH8x2262sE3u5Od3htUxtFKdEEQsrk+VFm4FwBJ38xJtoUS8Tc9E5tKL5jvBIvxoIItBYw9BueF5 X-Received: by 10.98.171.24 with SMTP id p24mr2923452pff.71.1519418417554; Fri, 23 Feb 2018 12:40:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519418417; cv=none; d=google.com; s=arc-20160816; b=lG/Tyl9KjpHaVyz1KNpDCApSvfhJr/cHx7GRO2/WwEcwaCmW4T4/kZjLhnS/NHpga7 6JFtWNfjQ2v+LObT2sj8psWuDPmkSnZouYwOdPFbuY4E6BuHrFN6B1Fs8qEU5tLHC2KC vLX/rmwDHW1XZtp6HJmAREhmwzmASMCJpJvs0GInAICTk8xvQ9T903ScvCaEbuI0xmfw /eu/RSpQFmApszLTVb0mkFNzAhMFrx2uPxYcApp1TePZI5aomOlGdVRy5dywQQ/df91I geo0mNIBGuSE7OBslcqZRdNhhw5ebW3A6JS+OI0ryUeyAIpyxFNrlq/crcRDnlJtRxPz 5brw== 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=RQsuOXjABKvuGkNd3mQIR2RTK1ZcaCOwXz7RtFGjmik=; b=o1pfNy3jTh1g5gf3cy1bExVbL5oF8wMbTX7ViUyFuBb7hJnB5l4Bn6rWSgHF0aaLmT WcYGHD5qXphBdHw4h4+fNGS8+9BmmYkY7FFWUiw3bQppXmA89z1flAB1BLRAtNt09PjR UiTqkPDFOYWspVivV4B4wLYm8xWoJpLTlprGnaPEsUxdztQuY7MQxFpm1p/odABRDBUg GqG+WiK368sp0MkdgbjH2FJ3rL09b0EuHeXWWGcVTZeLuMNsSvR+/IRPpRIOVhZW9MW5 MERgP4362iytdoGjRd4IHkL/5euIMSDrZRI8GmwX16+PcwLoD/G4WYjijbT+2IZaOZlA XdXQ== 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 p18-v6si2244827plo.388.2018.02.23.12.40.03; Fri, 23 Feb 2018 12:40:17 -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 S1753607AbeBWUj1 (ORCPT + 99 others); Fri, 23 Feb 2018 15:39:27 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:36788 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753421AbeBWSeG (ORCPT ); Fri, 23 Feb 2018 13:34:06 -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 7C7D71164; Fri, 23 Feb 2018 18:34:05 +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.4 032/193] ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function Date: Fri, 23 Feb 2018 19:24:25 +0100 Message-Id: <20180223170331.132737512@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@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.4-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,