From patchwork Tue Jul 28 13:33:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dong Aisheng X-Patchwork-Id: 6886781 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 297BB9F358 for ; Tue, 28 Jul 2015 14:45:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4498620688 for ; Tue, 28 Jul 2015 14:45:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E5A5206A7 for ; Tue, 28 Jul 2015 14:45:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZK66s-00020L-3t; Tue, 28 Jul 2015 14:44:02 +0000 Received: from mail-bl2on0103.outbound.protection.outlook.com ([65.55.169.103] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZK66S-0001T0-V3 for linux-arm-kernel@lists.infradead.org; Tue, 28 Jul 2015 14:43:40 +0000 Received: from CO2PR03CA0046.namprd03.prod.outlook.com (10.141.194.173) by BLUPR03MB1364.namprd03.prod.outlook.com (10.163.80.30) with Microsoft SMTP Server (TLS) id 15.1.225.19; Tue, 28 Jul 2015 14:43:15 +0000 Received: from BN1AFFO11FD007.protection.gbl (2a01:111:f400:7c10::170) by CO2PR03CA0046.outlook.office365.com (2a01:111:e400:1414::45) with Microsoft SMTP Server (TLS) id 15.1.201.16 via Frontend Transport; Tue, 28 Jul 2015 14:43:14 +0000 Authentication-Results: spf=temperror (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of freescale.com: DNS Timeout) Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD007.mail.protection.outlook.com (10.58.52.67) with Microsoft SMTP Server (TLS) id 15.1.231.11 via Frontend Transport; Tue, 28 Jul 2015 14:43:12 +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 t6SEh4R7000941; Tue, 28 Jul 2015 07:43:08 -0700 From: Dong Aisheng To: Subject: [PATCH 1/4] clk: imx: move imx_clk_gate_x into one place Date: Tue, 28 Jul 2015 21:33:08 +0800 Message-ID: <1438090391-30329-2-git-send-email-aisheng.dong@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438090391-30329-1-git-send-email-aisheng.dong@freescale.com> References: <1438090391-30329-1-git-send-email-aisheng.dong@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD007; 1:1mEpA9jmEDaGyjwkNVWcKTDCjfn4tNWOhqMbH/fUk/lW02gEBgjWvNmRW/VRJ8LKL8DOqUgnGJ0aMcpBUd4Ztd9WIiqGFYJ39zJQqv7N00JLQUfPQCxRR39PEaZl5cc7to8/esBYBwNrX4MdOFicK2rXNM9XYRFBCSLGR1WiZyOM8wt00vN7qqNrENbGpNGchk0HP9gPE3BM8t27CkPNyXK7BOs33SHfWvUEXJjFCd+okUu26HnOAjdj490IUhiEr1XUyZ9JG3dnv5aw/L5ZQpAbMZYhz0e8pP16gnk6FCfhC2psqjiOwYBvKvn5ckiIpSlwHbuDgh3UqmgBb/Zb8A== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2970300002)(199003)(189002)(92566002)(19580405001)(6806004)(48376002)(2950100001)(189998001)(47776003)(106466001)(33646002)(50226001)(19580395003)(110136002)(107886002)(5001960100002)(77096005)(50986999)(76176999)(46102003)(104016003)(77156002)(229853001)(87936001)(575784001)(86362001)(62966003)(36756003)(2351001)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB1364; H:az84smr01.freescale.net; FPR:; SPF:TempError; MLV:sfv; A:1; MX:3; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1364; 2:ZtT6VV5T+0l1DWuaguopZpAuBjOLpVzqs43m6QJdN/QKbL4+1xD9BEMC6IUf1y4DHVcWxttvE22ODzUpiiiILaV9VZSRrMcYyv7e7Fboughlu7GiCSvJH8aBA3Du/pr2pLNSq3XIPpJJ9zMoFSkm8uVgEEmJFc65f/EMxmQjyWc=; 3:J5Ibs3i5jhpKlP0oDtBkKMfWSQwxORT4JZ+7I/nGBmBhGTB47otKdKXvafI/qgj6Fdsny1yRpp8Nm3h7B6MLZrbTlz0KERmPznYmOeldtZAodoTh3lxbawZxSi7xTe+yHcPJiH9BqxP6U6KbnqFej1KUvQWiKf0S/45/wiPrHPnv2KiJIOoS/aIRMMPRSGlcQpXlUvFZvYMPCnubVpYV+kidQXt9z2TfdlIIzxHKUjw=; 25:eFmKLAg+hwRyhZkBsoqWS5Tr+E9SjWApAnRVSSR7in8TGL92GDT5Yh5OxfDB/K+PVSoKiQsRVoNg6HPE9xzIsWJwLyFs6QlchCXkma5sQkZFjyhksywarjphZWKbjGy3dNwft3b5WpoFbSswAUvBo997L2DEHackjilnxANtEs442Lm9NRgWkjG+NHZqQsUHmnyUrwucovIQhAn5B4wh6i1N8xrr31h0eC/rwEnRKwpdX3a5k84X9o7yZCp9p1y6 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1364; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1364; 20:AA30KuEDoqime2GjiwJv1gd964dQyxv5omww1GGR+rax29XQ7OHVS8zXZIrhWZQ2BOuYMWuiV9yDRJTeeXV7LmD+V0p9r6RwRXiHbndaFFvkf+dWV8Q0kbMbIRY0qrjZeI76yBc7rozjC7cT4ZFCqwKrI1WgvLb2yh4wk4kpaIIOOhjh6SiXUrLkhIgyiTYn6iRISl545tQwU8viIvEz35X2P1gpcATY0YpRcK3cUDOi5wARAMMr1tfTUyaR5UzXUUA4S6ofdOc3tZtjMurs9JaysjDoKIBqMx/Q3E+ZWCRlQjw4HikHB01zCV7o+8Rdt9Be6kYQGmRZ0pVxFNO1bGwzsQZ29IpouTmwQH+rOs0=; 4:pXe+mJi8z9bQk1CvlxenBfsSMzOnioNkzN6GFPZqEZzIUYX4K1faslIXNIoVqTC6vV5kKrqtc/UQ72ss51qBaTjcXnxpKnCijdYsQmt+Hxa46lNITdOeGqeA2avF2dv8SDGwaYGQwHYyt6Ic5eMh/C9lhD2//ITA8DLWuxOSVvqxIKGd4mBxly+cha4w7TAoJTV+OS8uYiFhbeE9bA5KPYmgVpDi8Q1cstcJ9GfOPKIuByQSY40Y/yMjA+pEZc2YW1/pNzR+flHLsS0o6P8syTFLzOFQWFftE/ydVhprdI4= BLUPR03MB1364: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BLUPR03MB1364; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1364; X-Forefront-PRVS: 06515DA04B X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1364; 23:23NDhwqRNdx0iw7/6K3zbBt/l24DZsd7WN6iD+YpO1I2p+9WZWfKzB4vqRhPNm/g4GqMw+skdG+Gn3liYiRYEvEXhs/AAWsqnreLf1VO7/B6jshDsw3fYk9Wy6z7QdzIPkORtUudb2WZD6v7mpnpn/MoXQLHOPt//OqHgRyoz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ioqK0q9UfbBBOUvTDwBOpXLf2hE/uqA== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2015 14:43:12.2604 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1364 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150728_074337_447363_D822857D X-CRM114-Status: GOOD ( 11.45 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ranjani.Vaidyanathan@freescale.com, b20596@freescale.com, mturquette@baylibre.com, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, r64343@freescale.com, b20788@freescale.com, shawn.guo@linaro.org, b29396@freescale.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP move imx_clk_gate_x api into one place for better code maintenance. Signed-off-by: Dong Aisheng --- drivers/clk/imx/clk.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index 1049b0c..cda8756 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -50,21 +50,6 @@ struct clk * imx_obtain_fixed_clock( struct clk *imx_clk_gate_exclusive(const char *name, const char *parent, void __iomem *reg, u8 shift, u32 exclusive_mask); -static inline struct clk *imx_clk_gate2(const char *name, const char *parent, - void __iomem *reg, u8 shift) -{ - return clk_register_gate2(NULL, name, parent, CLK_SET_RATE_PARENT, reg, - shift, 0, &imx_ccm_lock, NULL); -} - -static inline struct clk *imx_clk_gate2_shared(const char *name, - const char *parent, void __iomem *reg, u8 shift, - unsigned int *share_count) -{ - return clk_register_gate2(NULL, name, parent, CLK_SET_RATE_PARENT, reg, - shift, 0, &imx_ccm_lock, share_count); -} - struct clk *imx_clk_pfd(const char *name, const char *parent_name, void __iomem *reg, u8 idx); @@ -118,6 +103,21 @@ static inline struct clk *imx_clk_gate_dis(const char *name, const char *parent, shift, CLK_GATE_SET_TO_DISABLE, &imx_ccm_lock); } +static inline struct clk *imx_clk_gate2(const char *name, const char *parent, + void __iomem *reg, u8 shift) +{ + return clk_register_gate2(NULL, name, parent, CLK_SET_RATE_PARENT, reg, + shift, 0, &imx_ccm_lock, NULL); +} + +static inline struct clk *imx_clk_gate2_shared(const char *name, + const char *parent, void __iomem *reg, u8 shift, + unsigned int *share_count) +{ + return clk_register_gate2(NULL, name, parent, CLK_SET_RATE_PARENT, reg, + shift, 0, &imx_ccm_lock, share_count); +} + static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg, u8 shift, u8 width, const char **parents, int num_parents) {