Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752167AbdGMLr4 (ORCPT ); Thu, 13 Jul 2017 07:47:56 -0400 Received: from mail-dm3nam03on0066.outbound.protection.outlook.com ([104.47.41.66]:18679 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752040AbdGMLrs (ORCPT ); Thu, 13 Jul 2017 07:47:48 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Dong Aisheng To: CC: , , , , , , , , Subject: [PATCH V2 04/10] clk: imx: add pllv4 support Date: Thu, 13 Jul 2017 19:47:09 +0800 Message-ID: <1499946435-7177-5-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499946435-7177-1-git-send-email-aisheng.dong@nxp.com> References: <1499946435-7177-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131444200559436214;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39450400003)(39840400002)(39400400002)(39410400002)(39380400002)(39850400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189002)(54534003)(199003)(9170700003)(189998001)(50466002)(6666003)(8656002)(76176999)(356003)(50986999)(68736007)(54906002)(305945005)(6306002)(5660300001)(6916009)(2950100002)(53936002)(7416002)(104016004)(50226002)(4326008)(8676002)(81166006)(8936002)(2906002)(626005)(5003940100001)(2351001)(39060400002)(106466001)(105606002)(38730400002)(86362001)(77096006)(36756003)(110136004)(33646002)(48376002)(85426001)(498600001)(47776003)(966005)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0301MB0608;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1AFFO11FD008;1:CzCiOyMsPHs0l8rydapHyL5OiaVEKUy2dBCpjvF2T?= =?us-ascii?Q?hVcPObFLP6+K78aKEBJpJkX0iDvaoYNJDIBUKWXa81Lw73enKxQEpksam2h3?= =?us-ascii?Q?V3AMyqkWB5HEDWOWg+wq/gIHno6E1EORYTubZlNa1BOF2wnqNE0jaOy1wlBZ?= =?us-ascii?Q?xD370XhaZBcNyHkyOSoEoi5AgbECSUs9OOElUmJ3ELPFmwIhGheFTcZG3H90?= =?us-ascii?Q?cUwSQx3WHlgNwusfYP/9gcGBLf7VDhECAjoJ6i5tDqdoycLSrWSOzVxoB3Gx?= =?us-ascii?Q?rbRjVOxxSqCFDOqWtipo9ZRi3oCM93Hj42u3aoSAddtPzKkM3DZ4ppNHGL/7?= =?us-ascii?Q?bJhbwgnt2YJRdNnD7+x2m1w4D0gQlMULsYBnvrJR0lMd//uP3e4LEasSNAFU?= =?us-ascii?Q?IXHZhgXw2/jBvP0QZs4331FPctu9UoJ2HnW/0+k9Pqm22yuuNd/44NSW46vR?= =?us-ascii?Q?bh3TCSQfmoo/TRX6HaN9pJCLgpBr8y0QGkz1xs2x55z4baG8iRhqAhNJ5a+b?= =?us-ascii?Q?vjod+tSo8MljPGmbxzSj7Qx9t2a6bxFkvQQHy04KDKodu0nGDsgARp2nXXmi?= =?us-ascii?Q?lNixYNIVMUSRlOVw+pbDCbT6GT6rXGu3Et46vB++eqHKurA+jRMrxpkPBxKA?= =?us-ascii?Q?Yeal7rur2GI6Pfe6D75EsmZwOyCfI9wF+mx6LC96x8IwXUVZLqYEyYa43vTQ?= =?us-ascii?Q?20XLKFmBBmawq/17gMuxE70PQyLKFBhJWA41A0xPe9J0VzJ5UfhjEybMf5OA?= =?us-ascii?Q?AMEj6E4ltTkliGGYz0T0Va9O4gbSR+eID9Imfo9Vb+TFfWka1kQezXXA9hsu?= =?us-ascii?Q?IWAD/FffTvhXK7dn2mF8H6m2QYTTwD8BjilTUeavLSFoNXv8IklaIqq+K5Bm?= =?us-ascii?Q?hzmXhsEM5xpSQ3e0Nad40wSjV2OAeX1/OJA23F7JrN1akgMCcFmVVieB+Z6U?= =?us-ascii?Q?QsdQXBN0kuAKdXz8YvJUC3hPJ8EPeQ4Bi765XNoo0VACx+BHGUi3MhA7EcKC?= =?us-ascii?Q?3yr/rxsWjMY6FS6X8xrZzq4bbf/bB5L905mgg2x1KWc5w=3D=3D?= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3b73ed74-436d-436e-9ef4-08d4c9e4f493 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DM2PR0301MB0608; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0608;3:rYu6HNRksiNSwbWRBZV9cFYrPweeI1vaWjzaPNT3xegzvTqjyWOHuOc/878cfb2enG4Z9kkR9+6YrEkRqY1bd+KU1jVbjFTnE/k95Ql3qZN9a8htcf4vR5Oh2174WfPCQ3dIEr43+EMwV9hLhUBMvKsw0zy+88UF1bewQxCX0lruxIsO/KGiNgIvw/RnsylL3kj7TFDaZICX8W0Z6qIOHCpyVbnEF05zGuRketq9Ny5/SGXrzUvBRpKN6bQASLR/F8vmv+mPlTtxMkAtLx+Z2/luY/hkIEubofcHgF5DrbFhwp6HHmekQ00JrjY9cvvvd4L0uxsShncQWxqHA1pL+32fgyQMLZw5J/8WDu8dWexexXZi5jPJtT5hDHiYYG92f01GHcHNK/6B3lUID/6UK0am5iySYriLS9B/bOJqU2+N7IUxAgVq1u5T3xyYbUqytXl9MeZTobyauzjx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mVz2jWANUqzxVTMswjyi7ocQiHRfteqHLRc9uuL7C8iOh/1ZusMbBHg== X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(133145235818549)(22074186197030)(236129657087228)(185117386973197)(48057245064654)(148574349560750); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(13018025)(2017060910075)(5005006)(13016025)(8121501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123563025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123559100)(20161123565025)(20161123561025)(20161123556025)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM2PR0301MB0608;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM2PR0301MB0608; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB0608;4:8YxfWPn9FBlTGs0NvmPU4kQNHRlZCsYtXtHiFxIq?= =?us-ascii?Q?B8ASmn4hzhg43/eJ8iBYOntnQLoS/xpjLKVwgap8ExPyk/W9T0sCEONIaY0H?= =?us-ascii?Q?Djw9c4HqZgai8RmJPQRj1zuEVpt9XUxxb10dARIfCkiAX77oNl2OxC56NDwl?= =?us-ascii?Q?fse3e7WIlDgQ1dkOXOYgL++R1py8p9r2dlmqc/VyzoYah3h43fhEu+iEgjlV?= =?us-ascii?Q?eQ355h7HBPEu0IHnd22vnABNxLMADQKST3bYWxrlDiMSpWua5P/1BgkDkh1P?= =?us-ascii?Q?jwdYg2P3TtEaWBlLxQNrb39R0Lo3h281O7Jdk0vunIVY3MOoQuOTLnynmqC2?= =?us-ascii?Q?SJSI/fuWGfFLvwZjX6Asuy0XZAwzoh6Il3hes/K32RXEPkcyRTGyOdfKGf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k8BZQIxa2Tu4/gYv7HEDXqPIaFz5nOR?= =?us-ascii?Q?VgLethHB+jDDLld2CW/fyAHJGo0K6qZwS6hEFwPMaaED6F24KdqSR7wz6Q4P?= =?us-ascii?Q?AcxPF7Lphpo+QjNNvM+pYf6jXcKJYNW+sqC8Cm26XYkalsiIM6u8p+n7rOVq?= =?us-ascii?Q?tyBeC3oxg68gL1JXTrnolfsfUz57KhUjoAbdCoeLML3Cz52gtrw0ovz7m2Rv?= =?us-ascii?Q?lmykapVcOWMFTfTZbURlCrgkrc5O6WMFFKA=3D?= X-Forefront-PRVS: 0367A50BB1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB0608;23:wGNUwZiVs/l6iFwvAf6WEk4gXInVLFdWuc5EgtW?= =?us-ascii?Q?GUY2JG6JqqSBvZLg13iT0c+LpCbkgMAJhUnrhvu2QTDeyhxgxKDzWhUVCYoR?= =?us-ascii?Q?05Pn4OPQtAnqudDWMO1BLLy/NvC6OKg2K2kOrzSYHttemLbjE8a+iLdkMEzy?= =?us-ascii?Q?PS96TDRbFv6KIQVtFtL97sXDVjBovn1ru2PAYW9uvmM1PFAzvxReGFTlXStv?= =?us-ascii?Q?W59Q1FFjBCp5JkhYxR+1Plvwu6OfJaNKg609AIfZmZ6i++QuystqVP6gF7Oi?= =?us-ascii?Q?8vqpCv+MFIkOuY+NKK+y/DZTFyQJjaJH1dU7B1D8SMBuYQ9BjjAIvdOMiTtL?= =?us-ascii?Q?TdnMBXr1VigtdxJHQv52orvVmhK8e3HxnRF2ynaT0P6kIiNXGvYc9l68Coik?= =?us-ascii?Q?ZxPbeERv7Y4M3tEuFpkxat/xtrUJyGnDqP/dArc3ZaF7tlciPcUSa08VEqyv?= =?us-ascii?Q?Gva9rVyOLjlI364Ogvvy04I+i4NLbTkb2LQfQjO/WBb6e19/aE7V9WuF2c4K?= =?us-ascii?Q?HEQPE+wUA4B4FXjupuVFJlEKIVVV38kmGfdGaCyHUlPDsShYdIJ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?= =?us-ascii?Q?s6BzG/UDLCH5GwnEqMWCkpt46oSO/6og3OhHFHS0WnJPXQ+c4WrlS5nX/K+M?= =?us-ascii?Q?jRUTutvfkpef6EMlkuPXuG2TBbySEID51W+/lRKHQQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0608;5:h/lvSYBc3/WxN/ru9QMaJ9pchNPYoUL7zB356Y7CSWKtvmlTSaTzSokcPSQzJBWou1715Wfdvos4H/4wYRvPpYHvHqtpqPF30LYlq8cXiouEcCMlHQY1rHjULhv0xmcCpXHYDVQ33wm77IiNYZVr06gurwcFlW+jx6fbrdnnIMXvzzSSphrcMmvBASK/vAWqjaiM/lqHPBerVKXpkkxYFjoE526cp0lFu6myykrVcTBUyJ3xYKXogXbE4WxAYVsvoFBqqZVkL+SV544ZfHuKebc16r1aMSqaajhU0sQTWRwug9QBOBR/h9FFKqY+a8iqS+j9YzQ7AVSUald+WJe/tVB93KwBzQdK18W9cNq5XsAxuDLp+DrNeeVGCNo5i1UaoiVaS6xHexBObXZhFH4eqcExPDwfuHhsNH3x8JJq84xU/pcq59INu+tMy+FcUkVReSSOS1CgPHf0JKnWXwJCtplstarJ5HO18vAFmOExToXCbmm6dmRWnSKgHtv5XY9MJdToQx760gufvIwZvK52Sg==;24:SFfhTJ2AEgbLdat9nJGPh0XFH0L6Y0JkNPZJWJ3KnehuZYR2v0ZRKv54LLJTH98PW3/AfRk0VsKe8j6oLVhZNuKhuEsegR6C6RGRmqBvbwI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0608;7:23X5z6/KUPiV0yCgEKGcR/AhzJAFEv4cIkjE5do/fEAt1zyAp+Hp3hJqQpeq13TqAcnoGFZkHu6+S2I30PpEahqUOIlzfad0gnIOaLYTCQDVxRxkCH1XJFqsNhOv1tHvzgU8kWQg4q5bcnLzWrk8L1Cye9t/ow4+eCcslBjONcQGdiPrplaBugXk8G/00teNFI9USaoUAuFAzqW+yr8x61Xlicivb+3d2blSTMAOYibUhgYQhTTjElm0CDNmfOr71xDGyk8l4bU8HulacQEzF5WDHKt/ytdjdq/j00PY78KHJi77jZUhJpsrgUQErazYVecejyzxpOrxcxniNCGta2ZI+J15DXwvTygwEV5AkSCqmhyIDTEGwbUhN0AeHgEKrQngUVcPETOj9L3HBysI0G23amoZl/e4HiiIJzSG37669mjJG3F64FjxRszazr5BFiJYrffB2nRK6Q4gUS8PeteXlSFtM5hpwZMnkjx4KAkXP6qbLv1nPT0/zKPxYlPdGfhBKbOSnzAo1pfN9paXXATEDDZ3K+CxTRGYOF/T+4lvXx606ZcphCaxeXezl+263wrnmibPe2SfwoKRyJbu3LmRlWIE6zJqiwVv5XGeYOYyxeQsw9TtEy1HEZ193R/J6kHXqSsVmGRS13iLKR7FMROIZnAbNVtnbsYXeU5EOosgPti4pCotwfO8IjGPAtjS2W9L65H8XsoXte7Qkwl/CdkM9M0JtfMJeUS/9NpFyDFP3O2BAjcXZ2x+1BSzMwbgYdWDAOlVDd4mRVr7LYmzG/RU1uyFNYqToOVYRIq0NvY= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2017 11:47:35.7408 (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.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0608 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6362 Lines: 251 pllv4 is designed for System Clock Generation (SCG) module observed in IMX ULP SoC series. e.g. i.MX7ULP. The SCG modules generates clock used to derive processor, system, peripheral bus and external memory interface clocks while this patch intends to support the PLL part. Cc: Stephen Boyd Cc: Michael Turquette Cc: Shawn Guo Cc: Anson Huang Cc: Bai Ping Signed-off-by: Dong Aisheng --- ChangeLog: v1->v2: * remove clk_pllv4_is_enabled() check in set_rate, instead it will be handled by core later. * use readl_poll_timeout * use clk_hw_register instead of clk_register * other minor changes --- drivers/clk/imx/Makefile | 1 + drivers/clk/imx/clk-pllv4.c | 188 ++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/imx/clk.h | 3 + 3 files changed, 192 insertions(+) create mode 100644 drivers/clk/imx/clk-pllv4.c diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index 1ada68a..1e308e2 100644 --- a/drivers/clk/imx/Makefile +++ b/drivers/clk/imx/Makefile @@ -10,6 +10,7 @@ obj-y += \ clk-pllv1.o \ clk-pllv2.o \ clk-pllv3.o \ + clk-pllv4.o \ clk-pfd.o obj-$(CONFIG_SOC_IMX1) += clk-imx1.o diff --git a/drivers/clk/imx/clk-pllv4.c b/drivers/clk/imx/clk-pllv4.c new file mode 100644 index 0000000..47e4d1c --- /dev/null +++ b/drivers/clk/imx/clk-pllv4.c @@ -0,0 +1,188 @@ +/* + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * Copyright 2017 NXP + * + * Author: Dong Aisheng + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +#include +#include +#include +#include + +/* PLL Control Status Register (xPLLCSR) */ +#define PLL_CSR_OFFSET 0x0 +#define PLL_VLD BIT(24) +#define PLL_EN BIT(0) + +/* PLL Configuration Register (xPLLCFG) */ +#define PLL_CFG_OFFSET 0x08 +#define BP_PLL_MULT 16 +#define BM_PLL_MULT (0x7f << 16) + +/* PLL Numerator Register (xPLLNUM) */ +#define PLL_NUM_OFFSET 0x10 + +/* PLL Denominator Register (xPLLDENOM) */ +#define PLL_DENOM_OFFSET 0x14 + +struct clk_pllv4 { + struct clk_hw hw; + void __iomem *base; +}; + +/* Valid PLL MULT Table */ +static const int pllv4_mult_table[] = {33, 27, 22, 20, 17, 16}; + +#define to_clk_pllv4(__hw) container_of(__hw, struct clk_pllv4, hw) + +#define LOCK_TIMEOUT_US USEC_PER_MSEC + +static inline int clk_pllv4_wait_lock(struct clk_pllv4 *pll) +{ + u32 csr; + + return readl_poll_timeout(pll->base + PLL_CSR_OFFSET, + csr, csr & PLL_VLD, 0, LOCK_TIMEOUT_US); +} + +static int clk_pllv4_is_enabled(struct clk_hw *hw) +{ + struct clk_pllv4 *pll = to_clk_pllv4(hw); + + if (readl_relaxed(pll->base) & PLL_EN) + return 1; + + return 0; +} + +static unsigned long clk_pllv4_recalc_rate(struct clk_hw *hw, + unsigned long parent_rate) +{ + struct clk_pllv4 *pll = to_clk_pllv4(hw); + u32 div; + + div = readl_relaxed(pll->base + PLL_CFG_OFFSET); + div &= BM_PLL_MULT; + div >>= BP_PLL_MULT; + + return parent_rate * div; +} + +static long clk_pllv4_round_rate(struct clk_hw *hw, unsigned long rate, + unsigned long *prate) +{ + unsigned long parent_rate = *prate; + unsigned long round_rate, i; + + for (i = 0; i < ARRAY_SIZE(pllv4_mult_table); i++) { + round_rate = parent_rate * pllv4_mult_table[i]; + if (rate >= round_rate) + return round_rate; + } + + return round_rate; +} + +static bool clk_pllv4_is_valid_mult(unsigned int mult) +{ + int i; + + /* check if mult is in valid MULT table */ + for (i = 0; i < ARRAY_SIZE(pllv4_mult_table); i++) { + if (pllv4_mult_table[i] == mult) + return true; + } + + return false; +} + +static int clk_pllv4_set_rate(struct clk_hw *hw, unsigned long rate, + unsigned long parent_rate) +{ + struct clk_pllv4 *pll = to_clk_pllv4(hw); + u32 val, mult; + + mult = rate / parent_rate; + + if (clk_pllv4_is_valid_mult(mult)) + return -EINVAL; + + val = readl_relaxed(pll->base + PLL_CFG_OFFSET); + val &= ~BM_PLL_MULT; + val |= mult << BP_PLL_MULT; + writel_relaxed(val, pll->base + PLL_CFG_OFFSET); + + return 0; +} + +static int clk_pllv4_enable(struct clk_hw *hw) +{ + u32 val; + struct clk_pllv4 *pll = to_clk_pllv4(hw); + + val = readl_relaxed(pll->base); + val |= PLL_EN; + writel_relaxed(val, pll->base); + + return clk_pllv4_wait_lock(pll); +} + +static void clk_pllv4_disable(struct clk_hw *hw) +{ + u32 val; + struct clk_pllv4 *pll = to_clk_pllv4(hw); + + val = readl_relaxed(pll->base); + val &= ~PLL_EN; + writel_relaxed(val, pll->base); +} + +static const struct clk_ops clk_pllv4_ops = { + .recalc_rate = clk_pllv4_recalc_rate, + .round_rate = clk_pllv4_round_rate, + .set_rate = clk_pllv4_set_rate, + .enable = clk_pllv4_enable, + .disable = clk_pllv4_disable, + .is_enabled = clk_pllv4_is_enabled, +}; + +struct clk_hw *imx_clk_pllv4(const char *name, const char *parent_name, + void __iomem *base) +{ + struct clk_pllv4 *pll; + struct clk_hw *hw; + struct clk_init_data init; + int ret; + + pll = kzalloc(sizeof(*pll), GFP_KERNEL); + if (!pll) + return ERR_PTR(-ENOMEM); + + pll->base = base; + + init.name = name; + init.ops = &clk_pllv4_ops; + init.parent_names = &parent_name; + init.num_parents = 1; + init.flags = CLK_SET_RATE_GATE; + + pll->hw.init = &init; + + hw = &pll->hw; + ret = clk_hw_register(NULL, hw); + if (ret) { + kfree(pll); + hw = ERR_PTR(ret); + } + + return hw; +} diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index d54f072..132c89f 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -41,6 +41,9 @@ enum imx_pllv3_type { struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, const char *parent_name, void __iomem *base, u32 div_mask); +struct clk_hw *imx_clk_pllv4(const char *name, const char *parent_name, + void __iomem *base); + struct clk *clk_register_gate2(struct device *dev, const char *name, const char *parent_name, unsigned long flags, void __iomem *reg, u8 bit_idx, u8 cgr_val, -- 2.7.4