From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753551AbbDBPvB (ORCPT ); Thu, 2 Apr 2015 11:51:01 -0400 Received: from mail-bn1on0111.outbound.protection.outlook.com ([157.56.110.111]:3136 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752623AbbDBPu7 (ORCPT ); Thu, 2 Apr 2015 11:50:59 -0400 Message-ID: <1427989850.22867.266.camel@freescale.com> Subject: Re: [2/4] powerpc/rcpm: add RCPM driver From: Scott Wood To: Zhao Chenhui-B35336 CC: "linuxppc-dev@lists.ozlabs.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Jin Zhengxiong-R64188" Date: Thu, 2 Apr 2015 10:50:50 -0500 In-Reply-To: <1427970805609.21194@freescale.com> References: <1427365095-26396-2-git-send-email-chenhui.zhao@freescale.com> ,<20150331013057.GB5667@home.buserror.net> <1427970805609.21194@freescale.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Originating-IP: [2601:2:5800:3f7:12bf:48ff:fe84:c9a0] X-ClientProxiedBy: BY2PR08CA021.namprd08.prod.outlook.com (10.141.248.139) To BLUPR03MB1475.namprd03.prod.outlook.com (25.163.81.17) Authentication-Results: freescale.com; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1475;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB081; X-Forefront-Antispam-Report: BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(24454002)(377424004)(51704005)(36756003)(42186005)(86362001)(110136001)(50466002)(46102003)(122386002)(33646002)(92566002)(5820100001)(50226001)(2950100001)(23676002)(50986999)(76176999)(103116003)(87976001)(62966003)(47776003)(77156002)(3826002);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR03MB1475;H:[IPv6:2601:2:5800:3f7:12bf:48ff:fe84:c9a0];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5002010)(5005006);SRVR:BLUPR03MB1475;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1475; X-Forefront-PRVS: 0534947130 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2015 15:50:54.9156 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1475 X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-04-02 at 05:33 -0500, Zhao Chenhui-B35336 wrote: > > +static int rcpm_v2_plat_enter_state(int state) > > +{ > > + u32 *pmcsr_reg = &rcpm_v2_regs->powmgtcsr; > > + int ret = 0; > > + int result; > > + > > + switch (state) { > > + case PLAT_PM_LPM20: > > + /* clear previous LPM20 status */ > > + setbits32(pmcsr_reg, RCPM_POWMGTCSR_P_LPM20_ST); > > How would the bit be set when you enter here, given that you wait for it > to clear when leaving? > > [chenhui] Actually, the bit is not used by software. Just follow the instruction in RM. Sorry, I missed the "_P_" and thought it was RCPM_POWMGTCSR_LPM20_ST. -Scott