From patchwork Wed Jun 8 14:33:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 9164985 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EBE30604DB for ; Wed, 8 Jun 2016 14:56:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9B5527BE5 for ; Wed, 8 Jun 2016 14:56:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD612282F9; Wed, 8 Jun 2016 14:56:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55C4C27BE5 for ; Wed, 8 Jun 2016 14:56:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757158AbcFHOyi (ORCPT ); Wed, 8 Jun 2016 10:54:38 -0400 Received: from mail-bl2on0091.outbound.protection.outlook.com ([65.55.169.91]:46160 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757151AbcFHOyf (ORCPT ); Wed, 8 Jun 2016 10:54:35 -0400 X-Greylist: delayed 881 seconds by postgrey-1.27 at vger.kernel.org; Wed, 08 Jun 2016 10:54:34 EDT Received: from BN3PR0301CA0047.namprd03.prod.outlook.com (10.160.152.143) by CO2PR03MB2374.namprd03.prod.outlook.com (10.166.93.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.511.8; Wed, 8 Jun 2016 14:39:50 +0000 Received: from BN1BFFO11FD027.protection.gbl (2a01:111:f400:7c10::1:189) by BN3PR0301CA0047.outlook.office365.com (2a01:111:e400:401e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.517.8 via Frontend Transport; Wed, 8 Jun 2016 14:39:50 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; nxp.com; dmarc=none action=none header.from=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD027.mail.protection.outlook.com (10.58.144.90) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Wed, 8 Jun 2016 14:39:50 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u58EdPaR005456; Wed, 8 Jun 2016 07:39:38 -0700 From: Dong Aisheng To: CC: , , , , , , Subject: [PATCH 05/11] clk: imx: refine the powerup_set bit of clk-pllv3 Date: Wed, 8 Jun 2016 22:33:34 +0800 Message-ID: <1465396420-27064-5-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465396420-27064-1-git-send-email-aisheng.dong@nxp.com> References: <1465396420-27064-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131098703903270123; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(5003940100001)(86362001)(8666004)(50226002)(19580395003)(8676002)(50986999)(189998001)(77096005)(19580405001)(69596002)(8936002)(68736007)(76176999)(2950100001)(85426001)(110136002)(97736004)(229853001)(11100500001)(5008740100001)(6806005)(586003)(2351001)(106466001)(92566002)(105606002)(104016004)(50466002)(81166006)(48376002)(33646002)(87936001)(4326007)(81156014)(47776003)(36756003)(2906002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2374; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD027; 1:DHZMMdu+Gp985TontHcQptCmgoy7FAa8vA1toosccJtkY41cWuVTwcJWhUVQA3FuaqNKzuTGta1MoF9AkqsHUqcwGCTmfv3t6Nz1/HKQCjFE6S4ytoVod+yzDM4Wk4Snmun1sgxCUrORYkOt41ufgmwkOo68fRZ/fm/7Hkr7HOmnSHeBkYd1w5RVbrzgiS6KylJSD42tC8VEyXoVL2C4wLXYAhjjuotxJma+EiX5Y+HAJuPVPn8uWf1JKrHzyHpRaXSON5ayD6ASJzyYjeZG5HQywwZDPWId1/yN8tRRLFhgXipI8P7aqNbqczMUm6BL+PpOT1IqPtgS5AuYWLfWijvbdEM4Bvuokl/dR5jwBs/bxCt7Y4XpMsXm63JId36aybRtqZ+4MceIhkcU1jPyDvKl345CNd2BBYF9Hnmz8AmNvUEWxpJwutd+fPZVk6GX6Rqtq+F1aujPnFfLa7YwImA6fMm50OdfwI1z5ZQwwGckF7SdKCCUUdbse4SGZWAUQbLOmVoqDRnQqAzrPQD98G8R66QEbyokVtYuOitg72qMjitU90c9zNSQYsgNU4SeyAk3ljO9es/Xn4amWtmfpySN/QJvQcQjyaHycYSnMgwX28aYY/IRkArypyNW4lkiETxfDKrCHp5+Rk8YU7NYJvYdeRgWydvx27h2Alve5Coo6NulEjEy1FQPK/1G084f MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: a4fbf617-0848-49d0-c38a-08d38faabf1f X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2374; 2:jZng/3f3znU9fn8mJXSgbHsQ6mX+dTwmiz6uQkP+FawJQE/HxjmfCHTTyvwCQCEKEZ5mTDxMAzScNCYs9dFmHsQzfticx7INBrxO/WXDRWu2QcjZH1PIqrnxc7RUtbyxqDRZ7XLJ94NAh2tAsafJyUm5L4Ftv6jvL+NWe7NBLqqlu6i4F79wclOiUmj4dwLv; 3:yU9BqtvpcbvMS95KTyxU+/OixsY6OMl/FdDd8b5IoQlyEN/RD4C+mrT+zYvBoTiI+g68qOHERbREbSCN1KYOG3emaeh1LKx+IOiXYxSLfQn9tMyNyGuquyKWb5n1TJeloOepCnzOPcFN9DEDboOPw1SNwiJ7isdkmz6BXafssuzJSgM0B1jNSa1UgMLdZ4Kr0/q7suh07uY6CfrXBEHLYAmjHd4MPENaPk3H2uBAVZw=; 25:3oQ8N3R+rR/uzsfAP+X6/rYOR/avAuD3tyJynM7OKQm0QyVPkGSVrmWELRdkjoZgotbFRAruKQvKz4blo7K6pZlQY7E5ZJIayHAwEo+w1KeUdWfl1m80ufhHHbq/QLBMuWs9OhdPPftI6ycmb6WdZWRM3XMCvgSR6VedAROPhXQwDHKk3meBRRZgNdVXV0MxrLHXZx1kDqGd6DNw/fcuqNyd5/cWCC2XKaU7bPraWot6WLW/421Oc3YhgW7XMYeDtiGcq8yaosrWjTP7AE01/DWXCmB076GSpQ/ucAx3BYdtRofxW2HiZ0x7l1GD8E1YXUgd4IIMTozOiwC6b0NjY+WcQfi2Nl2HxD3aH6dXZoaTSqpIs3dIn8jkRgwCwnTjIIdtzMKKRkCAaMvpZOfS7NXiIAYXY9144wpY5MARDUA= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR03MB2374; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13024025)(13023025)(13018025)(13015025)(5005006)(8121501046)(13017025)(10201501046)(3002001)(6055026); SRVR:CO2PR03MB2374; BCL:0; PCL:0; RULEID:(400006); SRVR:CO2PR03MB2374; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2374; 4:CejLFKGc6/yMSDpCNs6OJVCpQIMySHBhlqj/wBt36HJuBP3MrFSxsH+kvKsw9+Q5UBh+VYwOX7nJkXWlRs2c90lBXJ3arkRBYzw2wUvLSvgE1O9hwv5m2omRHyR9mBh20pS1n2umSrE7fJC9Lqh6rYF2RsWJT3/o1AAyT6EtCloRnOxwKd1JSfRX++oQ0sFJVh7NEaHtGzeFZ2J7y406aWg8yKwUaIbNrUu82nh/r+hXAjTTL9NDNGf/MyzSmB1TUiIN7IEhW6vI6pILfSD1xmoPwsBiP7MOVV/KjgjqVGFFMO6imIGkOoMVsA+ApiJqSSLxYcNBYgN992ztCWvR58vhowGj/Wfk2YWwbeAk7tcTeK9bP5jn/he5DguXyV8qZC6+iVaczlNuKNc4WqB2y40dTuVSbNxApX6gvVMaA62Cle5nLfnluBp26H9Vet0mrHXgqNemapIwUJsQVZEmTS/xC2D5IgA5N3y6vs/j8y44nZQi6x09zpuSQLx3FzIXNOTTAXaOMVAKSDvHHoCRmw== X-Forefront-PRVS: 0967749BC1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2374; 23:Qcfv0YGiq/uz+HDQc6TR4My8l3VkWLy0PnUdR/seG?= =?us-ascii?Q?pZO6jDeO4yjmHFgDAKL2Nkd0MB2jCJLBQGUOmFLwf2BC9HiEjQrVseOfoFXq?= =?us-ascii?Q?Gq0XeMTjXe6waoE0m7nQcAyYa4S2XmeEud/Q6zpVLwI3T2utZus/Z4zF6ujb?= =?us-ascii?Q?gb9Hpur0H2SZvp41OJK/bcKU5dsuACEo+3TqPuQheeEBnmrn/fTIbrumHB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IqHejFkehpebLZ6122NAFLWfFvzrrOFF7?= =?us-ascii?Q?n+wrHHztfzBGuonMkFCg235hfY9byZGZ4s5PhJ+dnMlg8w/iPLLXA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2374; 5:LpL5lx5iPJfBeAv/xnmSqte/r1EV21W/EFkY2pjlH/iRzdthfRlS8MLIjSMRtWr3CZbv/5W7UzbDnBDIX0wiPNtkjztodFxd0qPdl3nNeufRR8gDPSJysYzpjQqdxxUlq8bSeAI7dn1046cgXpeay42gtcOt0qSe5ntbXtxAKfE=; 24:Mb6bD3xapeaQf1GgOR0PerBfFUMzTRo3tZPqrewGWEgA4dEb+dB3x4BMGH1MURnT2GGpn6NYB1vI8r+AMhwZMc2roLg0nY8CsLz/Zj9IZe4=; 7:VCiJkBWVy8EpJ5qJLsprUR1yfuWDAQBWoUaRrEYWgAyfjlJi+tAY9oCW12hmkqGQPKKgTTHdtLE11H3MhuDZ+Yal83R4VaJ3B3W8I1CkaEztLZVkKc9868tQIauIHotdVOF9EKT7uBwdemfoVeHro7bRwKzoeULRLQ2OngiwQem0snQ/AZXQ72htS0q/A4GVaCqx8AunXXZdONlxsEgz3HURC1sl2prU42WfTWulvzs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2016 14:39:50.0774 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR03MB2374 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There's a powerdown bit already, so let's change the name of powerup_set bit to power_invert to reflects the power polarity to make it less confusing. Signed-off-by: Dong Aisheng --- drivers/clk/imx/clk-pllv3.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c index eea2b1b3791e..3fdfb6d2cc71 100644 --- a/drivers/clk/imx/clk-pllv3.c +++ b/drivers/clk/imx/clk-pllv3.c @@ -29,8 +29,8 @@ * struct clk_pllv3 - IMX PLL clock version 3 * @clk_hw: clock source * @base: base address of PLL registers - * @powerup_set: set POWER bit to power up the PLL - * @powerdown: pll powerdown offset bit + * @powerdown: pll powerdown bit offset + * @power_invert: set powerdown bit to power up the PLL * @div_mask: mask of divider bits * @div_shift: shift of divider bits * @@ -40,7 +40,7 @@ struct clk_pllv3 { struct clk_hw hw; void __iomem *base; - bool powerup_set; + bool power_invert; u32 powerdown; u32 div_mask; u32 div_shift; @@ -55,7 +55,7 @@ static int clk_pllv3_wait_lock(struct clk_pllv3 *pll) u32 val = readl_relaxed(pll->base) & pll->powerdown; /* No need to wait for lock when pll is not powered up */ - if ((pll->powerup_set && !val) || (!pll->powerup_set && val)) + if ((pll->power_invert && !val) || (!pll->power_invert && val)) return 0; /* Wait for PLL to lock */ @@ -76,7 +76,7 @@ static int clk_pllv3_prepare(struct clk_hw *hw) u32 val; val = readl_relaxed(pll->base); - if (pll->powerup_set) + if (pll->power_invert) val |= pll->powerdown; else val &= ~pll->powerdown; @@ -91,7 +91,7 @@ static void clk_pllv3_unprepare(struct clk_hw *hw) u32 val; val = readl_relaxed(pll->base); - if (pll->powerup_set) + if (pll->power_invert) val &= ~pll->powerdown; else val |= pll->powerdown; @@ -326,7 +326,7 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, pll->div_shift = 1; case IMX_PLLV3_USB: ops = &clk_pllv3_ops; - pll->powerup_set = true; + pll->power_invert = true; break; case IMX_PLLV3_AV: ops = &clk_pllv3_av_ops;