Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752305AbdGMLsU (ORCPT ); Thu, 13 Jul 2017 07:48:20 -0400 Received: from mail-cys01nam02on0079.outbound.protection.outlook.com ([104.47.37.79]:14239 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752182AbdGMLsA (ORCPT ); Thu, 13 Jul 2017 07:48:00 -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 09/10] clk: imx: implement new clk_hw based APIs Date: Thu, 13 Jul 2017 19:47:14 +0800 Message-ID: <1499946435-7177-10-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: 131444200718637980;(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)(39400400002)(39850400002)(39410400002)(39450400003)(39840400002)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189002)(54534003)(199003)(9170700003)(5003940100001)(6916009)(305945005)(7416002)(53936002)(85426001)(48376002)(81166006)(104016004)(77096006)(86362001)(5660300001)(498600001)(50466002)(6666003)(54906002)(2950100002)(47776003)(110136004)(8676002)(2351001)(106466001)(76176999)(50986999)(38730400002)(356003)(2906002)(68736007)(8936002)(4326008)(189998001)(36756003)(39060400002)(33646002)(626005)(105606002)(50226002)(8656002);DIR:OUT;SFP:1101;SCL:1;SRVR:BL2PR03MB465;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;BY2FFO11OLC004;1:iY57xJnf58AWBcyqOjQjZzyUaQTxXC+fPzdaCREnv?= =?us-ascii?Q?M9g6ltThWcaeR1CHj/VCBl2TNaiYc64vLalfZF+hlHP1/8NqlpF38rRZNfJX?= =?us-ascii?Q?aSeeZvKxOwMdCcGOgBFDOiXZDdD6NUWqUjYtbpNMiDhqFvWFVWkWs5t0Q1e4?= =?us-ascii?Q?x08NACHgcJrlAaYrBPoC4XVouI6edEafi8S2G8SXSTwOn7C6YT2fqSTaB1e8?= =?us-ascii?Q?ik8LVsOdICLCAKAV1lwDCQtF4nQ63WGaupTsa7h5eyWPMNzd7Ve5XzCU1dMJ?= =?us-ascii?Q?GL2N3I2/el1jHfx6toU1CgrKA4Mu/U0m15Cc0u/0gQZU5eXU4Ts9u84jbWtt?= =?us-ascii?Q?V123Bx0LsGUR06mTH157wZ1ALCbjtcGw+noVjMv+cbS/KPCeKEozvzfpkPoB?= =?us-ascii?Q?oqULj72NNNb8uQ1EMAIqpJOMD9NwFFqRO5STuGBUS0LRS3r9z07IeHi6tx2Z?= =?us-ascii?Q?MTbmB1AdlDZPFLpwILC7Ozb7U103WbfKA/y9qiC5ABsyloHVHXvoNSiE3z1I?= =?us-ascii?Q?n4L2oNRgUdfmgJJPNMyVwAdNSjYq2byE1kV6R9AYIdMdoa6Q2CpngM7OLG1j?= =?us-ascii?Q?/vOAbzeMD5RVmf3tUBCgHgzi2liAsx+Tk0MvcQIXLC+yUobML+i3MxRet/rD?= =?us-ascii?Q?K3i5iw/9Qu3gQXjF8/MCnn+ZNFy4gAYi2QMhLiwivxZUt/1j3t0YfhByLndW?= =?us-ascii?Q?kH2qfKEyVXidSBfYXc4J1Cs5A85R9B6EmNjA2ktBd6vvp3eCIYvdpFNnb4fX?= =?us-ascii?Q?mstVr73uOISldTpWv8mNl6/mJPislrxiHUdhhEMX79FweTYhI80VOjqHRYPR?= =?us-ascii?Q?ipGD3WvUEhoziG+g1Kh2BWIZ0MAjCV03WIwRFgUJcWW3bZYOCoGhrB8EhHJ+?= =?us-ascii?Q?FUHUMgjRCM2p5CBLGOKhr7zfQYc+QXE2asFim+Y1IpXvKlns+pqc/Uk+B8Sr?= =?us-ascii?Q?OHtpDQnHHLITM7Xyfak8vXUUpv0GnXlxVjRWY038ubkvdAb0zll9Oj/CfQsF?= =?us-ascii?Q?JunMrpz30+r2XA4MToUIn8uHcb3MLE9EmgYvT+lFC9hMQ=3D=3D?= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4863c07f-e60f-4fd4-9b9c-08d4c9e4fe15 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:BL2PR03MB465; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB465;3:P9vAYMuQ2sAPjZpm1DEUqhpC+cMVhNTAMdWKFmBoJlU3oFqq/PKnpQr9CIl1CmkfuIJ8BB2PQXdLzj8GO1esrGgripfah254n7qJ2ez73Pb3Y0L6REfD8CcoolU5SZIo6nA4O0NG9H7WUSIBMFAMh3NisjrbKoV7NRvjZSrXGdEE8B1KRpXc0j2Varm4q/7M3kgWWiqkxi7JE0gHibCFRy7Uq6/XuBTWfH7+EJO0fGWw9Val7nIqTJ2VYt4d9RU+cKvMK7H3Rw+dKMEkZE3r9V7zaSPO96KpNv9u61VZ7U6UflBIJNrijhvS63piBvM/ICEIWh1JIcDQ0DCoSw0jP+r2uVhd/6tAfUi4g58exQV3yzVG0SpA2InH3zc/Rd52ES+DS4f+LsrmTQwYrWqoppcfIO0jJKiY1hSLZKNYpUHRfwXo1KY0gC9Bo87/EcvJ+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hLJ43b+SbMbSMSdA+okwItqqQh6RVFvW24cLzqmXqBvJwkzg== X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(185117386973197)(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)(13016025)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123563025)(20161123556025)(20161123561025)(20161123559100)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123565025)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BL2PR03MB465;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BL2PR03MB465; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR03MB465;4:bDCzwG0HHKZMn4ZmzxVVpm5+VhPb7jxjAFFpelKEc9L?= =?us-ascii?Q?bRECWFDDtUTLH/qdTLUgsTfwo3myGP269LHamx+cF6WHii5n+xw0lP3DSMnC?= =?us-ascii?Q?9UmSX0br8NHgKhuBTD94yK6YtkBMyZ2tGKui0Vttf8CUPQMgzQKzPSh6hVM4?= =?us-ascii?Q?FX3R31gMw1R7be/lz8tcR5nqjdeswtg6jGSgaF3uPBoZzQamATqIZ7oq25TZ?= =?us-ascii?Q?nS8g+BGLryZB4DQTxiCSM53VnTnmNAbp6EkkVaEP4wY2kHOVK01yySKxgknY?= =?us-ascii?Q?2EggZmRj2OTrqS4V4qMBOPo3wuoG2uzh7V+dYzTXw6CrcIlI4/CmrKw9iA2c?= =?us-ascii?Q?IPmGnv2QTm4guCSb5Q86TXjcNVwAMaUkMJ2eSYrfbVStQec2LUUEHX9zXZyH?= =?us-ascii?Q?wHbc6peXhbR/M4a+Bw1B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IZ?= =?us-ascii?Q?9N/JbN8WBv6BNkB6EKO2TT2x03JN5gfOFJSNNDockJh6EiKu1REi15u8HtMr?= =?us-ascii?Q?HveES2lWViYVcmNVVir06d64=3D?= X-Forefront-PRVS: 0367A50BB1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR03MB465;23:mpRi3McXTbFj9B3d0Y/ZjMkZXD416zHaO7NrbkrXvB?= =?us-ascii?Q?hIeq5lXOOgnArJw5BgX2R19jEt77sY78TYbw2qEAVD8Pu/cawvhH99rRb1kp?= =?us-ascii?Q?qSxJOtQVFX0zNi4Z+EJvyrghEGvtjOEIAjZu6k0X9Jzecwx4/wqsBZyz+Ft8?= =?us-ascii?Q?vHOsMuOYOcmYfPjtwRN7cBrd15Cdjn7PIlnyCS3MpgtHpfE3VoYK1sDpDeU0?= =?us-ascii?Q?po7NgzThaQEy2SgJR9HuDTPdrLgGezUcRhBlRUWJFxloo4wMlQECi9nsUl46?= =?us-ascii?Q?CzMk7ug2zXIZ2UT8Eg0yybDnMrBv4RbuhFbcdbSX7o37v/B0Ypjq3hep3HA3?= =?us-ascii?Q?mM5J0M9Q+B5bJFpheSiDbQYNv2yTOLwQSwAnK08rLKf3epa2xYX9vCMe+U+F?= =?us-ascii?Q?kxC2XbjbhDw4OzDA9MsPpnApD24ZnZ9xioPcCNwF5AP4nyfk1VumLFcwyQzr?= =?us-ascii?Q?d0F30upC4Aouhsx183Q0lES4Cr56YoHqxXRd4hXnUm9z5JyOK2qyFTCqvsGe?= =?us-ascii?Q?i9/IczRJbeavOgpx8GLiFgn/Uj6L0GCetYyQqR7Iy/thwb5fc/owe+wEYaCq?= =?us-ascii?Q?ID0rrs49ssNeDgqXpcj/FQy1AAj9glR0GWMn5YrWjsOt2GFuFu0DhdjOnxAN?= =?us-ascii?Q?VbzvMhB6nXg54usWQFB9kkNvxJ0QsCUNPwNsISH+659//aREF22AEPzOonyD?= =?us-ascii?Q?m819u+NJ+U1AhB9bfueKY5AYjT2AEqGVCQiHxjtibjC1JPaDfs4Tr6jVx6jy?= =?us-ascii?Q?AbKEH2/z529k1RQ+xk6j71mnDB+OyW86zYTREGSPGMzuXM+64KuxMaU3VTIt?= =?us-ascii?Q?uyQQ9HmmtHhRdb3hhItDWsqoBocSNPacLO2hR7NjbvLZdrst504QTYcNOtKZ?= =?us-ascii?Q?pSYt3vM7Umd7QDprHBlFnhEdVdB3RxSqATGZXCvpEbFgZYj06loXBkuq37sh?= =?us-ascii?Q?xtgOKb3w12kvmq04Vs2b8H4YggUikAuWNJsRSb9D+a/bHz50U0hGsmvZ8qdF?= =?us-ascii?Q?BcZINz2r2UmKhnlKuZlUyLIpIkYt9ZkMKIMFOVt5ucgjNV6nOFrSYj4YODac?= =?us-ascii?Q?a3Lvwrz3hO5ihjxQJ1aB3YWsJnUJZknwptxCJXFoQLssV+FikkHQNbsMixkV?= =?us-ascii?Q?TStp9OPHLZlqMrRhIth67FVWdIaYBM24oHPn8YEImA6yIfGlH9kL67M14oWI?= =?us-ascii?Q?N0HGJ7/pWg4yQTVqhPtdnYYd4z/1vtuknYJ/NJ6So/AWynh6j6mW1h+zN4kR?= =?us-ascii?Q?+vbeqfpdqmUIGYoR0BEOUHYZGHqZ/LrFeuXmm/OLcKSTlyl/jQBQtAARhBmI?= =?us-ascii?Q?nax3cAdUEMUJf1HkbUK0kppT/h6qBWTJoed+sfdU6njMe6Otx+hXXH4JuqZf?= =?us-ascii?Q?+O4w=3D=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR03MB465;6:/90zJSy1J3YP8ry/19geOGmVYUuOb5OU16IAwhDj6Lx?= =?us-ascii?Q?9TgqdXA3q+v3APThME0t9ySpUBde/aDbrYY40GjFd0p8Yj9a/f+KV1lU+6em?= =?us-ascii?Q?g/vymDw4N1VcHxOYWRV+G2kF64R2xsF/0woAA86lN+KQ8kEUSK+tPRkWkRNf?= =?us-ascii?Q?jkL2Sq8DTCqquEVWDiG78YXhw380Wx3dniJRTvqTto5a1GwF82yWwHCJ7Qw3?= =?us-ascii?Q?tmUwwRhemfHBsQw3Pz60loHO6iC46AdxXD6tsQzseRg3D1/MIYlvaLCUmhHz?= =?us-ascii?Q?JssrpNZMZEU45xxfry40ZzSPRgTreFf82W/UnpTIR7RUfgRGnUVqrJz5gPm7?= =?us-ascii?Q?MOnKScO/+5aPmOg37qMxrXTck0eNiwgu4GJCcL7zrLcOO5rAWpav1NCkjoM4?= =?us-ascii?Q?6Pa4hsU43Uqj0Da1zQOuX1e4g81mRfQfk3MODhw6gq52ZZOC2h84fpg42Ls+?= =?us-ascii?Q?dP7a97tH0JsngQaoV5FuIPR+eUsqS1aUSxjNkO+UrUwt3p507qakoLChOldI?= =?us-ascii?Q?RBtcCgTMoJA+QJ2Cv8qVBQXPE/s+9Ui+cBUDvvAXICXXYtipX3UvKmQf6P6p?= =?us-ascii?Q?oa8XaKop9hDYeh0yfoHd8YLP/WEqNCy84wIef8k2HLRku58SoDiRkPV17CkL?= =?us-ascii?Q?S68z6uI1saqHnHy9asxzg65H3eXycj2U7Jj6TeB5o98e7hE0gQP5AP8rwPSL?= =?us-ascii?Q?u1iyFFaxwK3iKEs7UQGbb/xkOMj1p0yt/WVzKrgMMwyDiDI/nYHVujA2zQux?= =?us-ascii?Q?mXxMGFey22e5iHIPH70P1HBwboli251hI0SwwEJkZ8N4F56Avmo6tGJjX3Lj?= =?us-ascii?Q?oMUWLkIxEvCsTKu0+brVhAE0edOjB2VpRBTLjYNhNHdtIXOyznTQGaTswos0?= =?us-ascii?Q?MNkUoRbOUVxYpvvROKBnWaEy6kPnfJTBZUjkHzf9n/V8C+B0ve57ZBTabe46?= =?us-ascii?Q?6Au3WgeiqLgNqR1Pj2c3Tci6l3MKnMYrYSwPPhA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB465;5:RwFZHMZWlfMpcpoSSAjXe7qse152YSYjUlAf0EQSXG0sCyOZ3jdJ6D2fzA6rVMqcNDmsh+qmXQmXI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rBQ5t0VZKHbAjEZJbuKitEqUsPcY+LK7r4AdQQcf+zrObNMeA69qrxlpmvgxyqtbinYPdTluw5DWwEEEkNbIeSGJqyO51aanNntR19y+4RU7Huo2PvrUqGP9uhP3ioPHCphF6HsI9+tgOH+KzCNzsuowFVF5RGX89FEstlJv7Dc315VLoi8csyoOF1fn5UNMtUfaZSanojKn2q07Ve0q/Lkqemb5ze0iQNrmXrwbH7zLZIcZ9jODm1+KphBlwi9iZnsjd8YLva6Fd5O3vT7YfjPlVpcaqgcMTJuuJa8b5Xyhm3PtIPxtCW+6Q5Xf0yaOclndDqqwaQH94FTwAv16QvxoiLLx4kCxNGYj7JsIAlZSy+0hIoXJ3TpSMMw= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2017 11:47:51.6610 (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: BL2PR03MB465 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5843 Lines: 178 Clock providers are recommended to use the new struct clk_hw based API, so implement IMX clk_hw based provider helpers functions to the new approach. Signed-off-by: Dong Aisheng --- ChangeLog: v1->v2: new patches --- drivers/clk/imx/clk.c | 22 ++++++++++++++++++ drivers/clk/imx/clk.h | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/drivers/clk/imx/clk.c b/drivers/clk/imx/clk.c index a634b11..0474306 100644 --- a/drivers/clk/imx/clk.c +++ b/drivers/clk/imx/clk.c @@ -17,6 +17,16 @@ void __init imx_check_clocks(struct clk *clks[], unsigned int count) i, PTR_ERR(clks[i])); } +void imx_check_clk_hws(struct clk_hw *clks[], unsigned int count) +{ + unsigned int i; + + for (i = 0; i < count; i++) + if (IS_ERR(clks[i])) + pr_err("i.MX clk %u: register failed with %ld\n", + i, PTR_ERR(clks[i])); +} + static struct clk * __init imx_obtain_fixed_clock_from_dt(const char *name) { struct of_phandle_args phandle; @@ -48,6 +58,18 @@ struct clk * __init imx_obtain_fixed_clock( return clk; } +struct clk_hw * __init imx_obtain_fixed_clk_hw(struct device_node *np, + const char *name) +{ + struct clk *clk; + + clk = of_clk_get_by_name(np, name); + if (IS_ERR(clk)) + return ERR_PTR(-ENOENT); + + return __clk_get_hw(clk); +} + /* * This fixups the register CCM_CSCMR1 write value. * The write/read/divider values of the aclk_podf field diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index 2646cc3..b5ad15f 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -7,6 +7,7 @@ extern spinlock_t imx_ccm_lock; void imx_check_clocks(struct clk *clks[], unsigned int count); +void imx_check_clk_hws(struct clk_hw *clks[], unsigned int count); void imx_register_uart_clocks(struct clk ** const clks[]); extern void imx_cscmr1_fixup(u32 *val); @@ -53,6 +54,9 @@ struct clk *clk_register_gate2(struct device *dev, const char *name, struct clk * imx_obtain_fixed_clock( const char *name, unsigned long rate); +struct clk_hw *imx_obtain_fixed_clk_hw(struct device_node *np, + const char *name); + struct clk *imx_clk_gate_exclusive(const char *name, const char *parent, void __iomem *reg, u8 shift, u32 exclusive_mask); @@ -89,6 +93,16 @@ static inline struct clk *imx_clk_fixed(const char *name, int rate) return clk_register_fixed_rate(NULL, name, NULL, 0, rate); } +static inline struct clk_hw *imx_clk_hw_fixed(const char *name, int rate) +{ + return clk_hw_register_fixed_rate(NULL, name, NULL, 0, rate); +} + +static inline struct clk_hw *imx_get_clk_hw_fixed(const char *name, int rate) +{ + return clk_hw_register_fixed_rate(NULL, name, NULL, 0, rate); +} + static inline struct clk *imx_clk_mux_ldb(const char *name, void __iomem *reg, u8 shift, u8 width, const char * const *parents, int num_parents) @@ -112,6 +126,15 @@ static inline struct clk *imx_clk_divider(const char *name, const char *parent, reg, shift, width, 0, &imx_ccm_lock); } +static inline struct clk_hw *imx_clk_hw_divider(const char *name, + const char *parent, + void __iomem *reg, u8 shift, + u8 width) +{ + return clk_hw_register_divider(NULL, name, parent, CLK_SET_RATE_PARENT, + reg, shift, width, 0, &imx_ccm_lock); +} + static inline struct clk *imx_clk_divider_flags(const char *name, const char *parent, void __iomem *reg, u8 shift, u8 width, unsigned long flags) @@ -120,6 +143,15 @@ static inline struct clk *imx_clk_divider_flags(const char *name, reg, shift, width, 0, &imx_ccm_lock); } +static inline struct clk_hw *imx_clk_hw_divider_flags(const char *name, + const char *parent, + void __iomem *reg, u8 shift, + u8 width, unsigned long flags) +{ + return clk_hw_register_divider(NULL, name, parent, flags, + reg, shift, width, 0, &imx_ccm_lock); +} + static inline struct clk *imx_clk_divider2(const char *name, const char *parent, void __iomem *reg, u8 shift, u8 width) { @@ -135,6 +167,13 @@ static inline struct clk *imx_clk_gate(const char *name, const char *parent, shift, 0, &imx_ccm_lock); } +static inline struct clk_hw *imx_clk_hw_gate(const char *name, const char *parent, + void __iomem *reg, u8 shift) +{ + return clk_hw_register_gate(NULL, name, parent, CLK_SET_RATE_PARENT, reg, + shift, 0, &imx_ccm_lock); +} + static inline struct clk *imx_clk_gate_dis(const char *name, const char *parent, void __iomem *reg, u8 shift) { @@ -207,6 +246,17 @@ static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg, reg, shift, width, 0, &imx_ccm_lock); } +static inline struct clk_hw *imx_clk_hw_mux2(const char *name, void __iomem *reg, + u8 shift, u8 width, + const char * const *parents, + int num_parents) +{ + return clk_hw_register_mux(NULL, name, parents, num_parents, + CLK_SET_RATE_NO_REPARENT | + CLK_OPS_PARENT_ENABLE, + reg, shift, width, 0, &imx_ccm_lock); +} + static inline struct clk *imx_clk_mux_flags(const char *name, void __iomem *reg, u8 shift, u8 width, const char * const *parents, int num_parents, @@ -217,6 +267,18 @@ static inline struct clk *imx_clk_mux_flags(const char *name, &imx_ccm_lock); } +static inline struct clk_hw *imx_clk_hw_mux_flags(const char *name, + void __iomem *reg, u8 shift, + u8 width, + const char * const *parents, + int num_parents, + unsigned long flags) +{ + return clk_hw_register_mux(NULL, name, parents, num_parents, + flags | CLK_SET_RATE_NO_REPARENT, + reg, shift, width, 0, &imx_ccm_lock); +} + struct clk *imx_clk_cpu(const char *name, const char *parent_name, struct clk *div, struct clk *mux, struct clk *pll, struct clk *step); -- 2.7.4