Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752496AbdGMLtk (ORCPT ); Thu, 13 Jul 2017 07:49:40 -0400 Received: from mail-co1nam03on0046.outbound.protection.outlook.com ([104.47.40.46]:3749 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751926AbdGMLro (ORCPT ); Thu, 13 Jul 2017 07:47:44 -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 06/10] clk: imx: add composite clk support Date: Thu, 13 Jul 2017 19:47:11 +0800 Message-ID: <1499946435-7177-7-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: 131444200620296420;(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)(39860400002)(39410400002)(39400400002)(39850400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(54534003)(9170700003)(8936002)(77096006)(4326008)(6306002)(36756003)(305945005)(7416002)(53936002)(189998001)(54906002)(76176999)(50986999)(5003940100001)(50226002)(110136004)(6916009)(38730400002)(5660300001)(86362001)(106466001)(48376002)(85426001)(47776003)(356003)(33646002)(2950100002)(6666003)(966005)(105606002)(8676002)(39060400002)(626005)(81166006)(8656002)(2906002)(104016004)(50466002)(68736007)(498600001)(2351001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0301MB0606;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;BN1BFFO11FD010;1:bUBGaFDF5R7z02SpqkcCqeC2xV2k1XmcS4YHJzPtD?= =?us-ascii?Q?LvZjC4JLTlghkhjqb3GSwFU/ZH6nPZpeSlAcLY0FnOEoxLMi/SinKck8AxGt?= =?us-ascii?Q?tg68BokOdN9IOXRZoBj3UiwdEwb34dObH3zNVbue3RyJnq+S5fYS2Ivb0khI?= =?us-ascii?Q?lz87V0XpcWkJFeYRSqoFjnhsYLmmLnUCHjZImNcwX/9QONI3qWm3T4leAEGT?= =?us-ascii?Q?xoxU8PAOaaBCFagnfWIdQ6QMOzj2yI61GIzC3T5ltlSTMiCTW+O62tvYjr2o?= =?us-ascii?Q?fK0kFIahFh+Z9N1F67YTj8ZiAWi3cTqm9wQmp7tiX4uzSBURojwnK2xkB1hO?= =?us-ascii?Q?q9Qb8VbOXdGfxVBWf3VoTg6OxRKO2eR7Q5wCteJaxGdOx51hodlC4CRWJHDe?= =?us-ascii?Q?sGIiylO4qgM3JyYzRSfqMupXzlEi3RHsOeAAM0ennsdl7HQgbwhGmtndfbyq?= =?us-ascii?Q?Or1HpUNfQmH9gQw3KhPfXvLkSdyg0hjLh7HE7H1R4RIRpDMpZaOEK4c2Okm/?= =?us-ascii?Q?UM8xBjt5vN+llJM7X8MZzIxefw38snCp3+6f8Fo4KGWccKxrCe5idJgU+io5?= =?us-ascii?Q?oGnCCAc4kcOgEFYfpQay/O2pUVQzC5IvCrI3UFlsB2OcPHK93VyT8H37KVMQ?= =?us-ascii?Q?4D36R+WaX7LaWStpm/6hsSPByIEStmOWrN5nCHSvU9SokhIjkY8nGzNmP9EC?= =?us-ascii?Q?/vlERQA+Il5XkI5NCbAcph0JZIFSvWUMJxgRDv4T+4to4MZo0gr74sWT3b7Y?= =?us-ascii?Q?764uBJLo68aDZgjyZKY36xsufcyyVaEIsDwhbUUrpxMrf/AYI4kq0sBdVzLa?= =?us-ascii?Q?sCDfu6KgJ6b4AHDngF0/tgH5Vtq9diiZ4S1kbKvb5oMt58y8PnPPpR+Ibvxi?= =?us-ascii?Q?r6Psi/EVH+0Ln7XMK2C4uNHlJThQTb7fOnadKKZ3g/GLeute7vTGvF+Vr3tX?= =?us-ascii?Q?bK/sbPvvbJe+yzEtlRx765UJFlR14FwoYZrKxvsFGPeVMWAWTSamC080eXDH?= =?us-ascii?Q?SBOpPfmqIdDQjTbWsjbsJtcvAfHp8c6ElFd+fQbth5L4w=3D=3D?= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5bebe86b-a86e-4472-a785-08d4c9e4f836 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:DM2PR0301MB0606; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0606;3:L9oth12I0CR+k7S2/zWVn6N9oCkQcjlfE+Dd0UhhcjvfIf6UJKZkx1nbaOUqqTJBTtxgXGSMUyo0u47jlAZFvAHapsUjQtMFPh2nNrXiQ8hL0/U2a/XQs04rBe8JjT8zFdrDRKLPkNXmZ90/ObiFgni9IhEHw01oUSNspW+XCqLNZtC8w6YGYpDaIH6fQ+g3cyD+bwPyoetwcZYOmC20JhRt6O1kt471igFmTHNn6UuNvENuZd1LUEvZg+YX504/yZEuU1IL0wL/CvD+ynWfGU9Rl1LABWQGgBwgDvOdzS9MJ7GdM6Dyl4onpHu6t/HdyebLc+qEK0senP4xnYfzwqrRNS01H3WlWGxCkUUPAA3fcDo0F8UXVP3Sk8mhJCreLM5WmyCHMqEZh32FsgaOjUx4doa+OxP0yhq21fFaTUu/zv7Cz6ZkXTZrRmqB7lYs6EKLUHZJzXy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Sa7KeyapNBG+syF1sRnMag0HmumTvS5HRnZfXW9XpaeUoIeuCvnw+xIXw== X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(133145235818549)(22074186197030)(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)(5005006)(13016025)(8121501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123563025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123559100)(20161123565025)(20161123561025)(20161123556025)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM2PR0301MB0606;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM2PR0301MB0606; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB0606;4:v7N3uVOZK/sL8RRV8k6f4NqDPtnWfLpLKdteQZHv?= =?us-ascii?Q?vsBUFGlVaYltjb5ITADYYdxPzLvTVgiHtuJ9oZWSbBmDMAMvoLavN9/mYb00?= =?us-ascii?Q?hcEXC0XwBtyUaUUQtyJDQ8cZhSuBnCUOgohJ98BAqLyMCHBT5EZTROtXgWCg?= =?us-ascii?Q?nXMABol48KG1hPpCUaduByu1R5nC8HNRGMVjNM7NykjiSDXekXSGJRcN81MJ?= =?us-ascii?Q?KP4xw5FcV9Vwbemm0TMDsj7MQ4+JiFOrxJ5qn1xXRc6FFXWUl9mbSocK/t1s?= =?us-ascii?Q?8qjW+dBtG3vKVOJf1OzMiLQTGazUyRwbUIksf/hvZ63h9eK1iBnOXoTyWhQn?= =?us-ascii?Q?weqk+JswU9RVTzagIIQBu9wMFqzsbUT+MmS3WZNPOnN3foTtaB14mqsG6Dm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nviikleyVHPUIsJnSFgLxn/I3cVUwC0VQ?= =?us-ascii?Q?oPrvKzxtv/mVC2k1mR8yXDkk+6ZMAJiETmN9frzsx0uahiQnVu7G8ruyAdEM?= =?us-ascii?Q?f2VSJev78OF3BsS2S6F57b00j3Lww9+xLVGL24ld5wccKKArKioCoaIyNBZ3?= =?us-ascii?Q?oENLMV1pD0ztg6B+rSlWa158sXOJOwAPGTNeJBmf4ofdXZXkyrJb?= X-Forefront-PRVS: 0367A50BB1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB0606;23:l1pn7UILUSFyUVfJEfQ8tk8ydUUeqOmG2b/X4o+?= =?us-ascii?Q?vzeUoTnYtgapUgYVP7Mr+ZMSR3p62e4gtMDv2v5EA/CUp5kLcqYaG/N48/jx?= =?us-ascii?Q?GQl7QfrbUQslVf7znq/ik4AjMDXsK3BHz6Qj8AkNiTXT62WbL0c1j9FXGdi2?= =?us-ascii?Q?q69YRHcc7bF7YyPZ+17FgsX1lOFmfwZO6TkOwHEp7EHpdL4dJYqjpZfYnN4X?= =?us-ascii?Q?JnGdguMID/0DWHdV5q0v/jTQKdPOarT0TF0fzm0IFuXaxZIzLfSQj4D7MIyb?= =?us-ascii?Q?3hIxdN7PhYddOOl7Az66cEYxZtzwLUKbDTtma9uxfycLFM0XSPOr2wh08wuE?= =?us-ascii?Q?TuaeV+cYrlkCN4z1DOHm6x2hnyqSHSD3haOgOLhk+tIkVSCnmRRdngg3kbjE?= =?us-ascii?Q?Ti7PK4j2sqmUUc1pVjO+Ib5QDGshC7w7Z7w5F3QQI94ixf6ysxJKLywGbfI9?= =?us-ascii?Q?uzuh++Hgw07HgM5ddjorNTBThkAQRhpwdP/ePnpFI41rzGDPhWrr2IrLSMNg?= =?us-ascii?Q?sTiUgq5G805woi3gXG8s0nCcQiJv55JOCscdSt8XZdH3s79C4FwkIdRlbbN5?= =?us-ascii?Q?nLyw80mLQxWpwlrqvttQuBsRiVlJorGNjPg8cFqd/4MR2PZW0mBPZyZCTPUQ?= =?us-ascii?Q?Ild7aALKE2ZKK5YMDX7TGbNEsCOYj19H7SRtEm/ZdFtXaF3hVwC3OaEIQ58T?= =?us-ascii?Q?TEPaK0IEE3Pb2OEn9T9ltII05CLZfCPWNruuqjvVqP4mz6pjpAtbnDT2AjLA?= =?us-ascii?Q?N3cSTe8RPZhgH0d2m1rev3DtToFxIx4tTr0ntS0KQ10qrWW9KOTDrVr94r5g?= =?us-ascii?Q?rMJ/lef+cjTvtYI/koRuF/UJJ3liZzG6hJHCk8LlGVl3rJ+Qcp5Njm1qd4fP?= =?us-ascii?Q?KqDE8Q9xpLmEJvJzWeWA5ObgpG6+OKvUuME1fIdyT1rdYpmoEnnAgacJPzXX?= =?us-ascii?Q?KhcCP8omoJ0a1Kx5LHVqzRZ/A7k36KAjQkcflYLlShpBydDxSVRafAaqLC+9?= =?us-ascii?Q?X+h9QtVgr/qv7/f4ioCtReG/RfKafsCzNJKu74xU52XGngT9a4c542UirBZQ?= =?us-ascii?Q?frj0R/Vjy+frlW4YHAegr8jXU53uc6QMebQ0gGiU0+tJ4ZJzdEkCJmw3r+no?= =?us-ascii?Q?ajxz2puu5iQnkplji+HununDUOHsvc8OkotWAWqJxjZEW5ETzxTZGEV0sv+9?= =?us-ascii?Q?+h3bvItJUCA8TbEESH6tmtQYdSg/n8LwSg/cKlaD+5nnLkeJTx+2+pMRZ5ug?= =?us-ascii?Q?+035fZEHtLYCMUto1vF30Z/5TJP+3qkhJbZqYuvpOqxnFFAV396xieBJCnaH?= =?us-ascii?Q?66LCnvv0EMBX803CdlpiE7agfelIAXXzmWrUN54ZT6oBFrhLyy/s2CWZHz6m?= =?us-ascii?Q?Qi3aEgqHuziXXgr00ITFJMQABINA=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB0606;6:mrcMhMYq9REmzhlB2H/wykLVfbrQ1dN4na090XRe?= =?us-ascii?Q?4ezn9FkB8vuqHOa17JVPwopMIZZO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OI6mSGYAVNOZBCCJ29otD06+fgDoB/kuqozczjQqEseYRdYpupN5e8vfHTHuJmTCQ9wL5ogs/lb2JqXgFjYtekgteEK6Yoo37vu/eZasNsN48M+5/FqoRIjgRcUa4XhY5LIqAkdx9Ev9uZnMa9uGSwiVgGctahOSYZQqYhofpEUsmYMih1vYQLsjUumeE0AOhABdeZlKDXWyyUkhHlVOzYzuYltb7pHwqC3z/Y4D9PIJEgAGZh7HeIgP6fXETtaqaEn7uzy1zc8p32K9buiTKlPlj22q5U4RZLyFkJVpdXm0eftkpfsF1bpmMhLKBQNfw2Y/An8ru0sHcA8MNWluQpjWTTvOIy1jbOXeU/VGPgrA86zQhksqtsyjO74ueTLm8wUWwp5YyFpPZVcyll/XUiBc0OqhIsofmDn4ZeCKMJWqIqgP12CQLM0gKniGEp4FJlT8+J4PFHucPkr21r/7JzB0Dy010s8Cmv844labaU+m9W35EEGDzt/SeRyV+uh9VArRYCtBH4Oqx/rrgFBE2r6JoW22apqBTO2JVEBKUs= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2017 11:47:41.8424 (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: DM2PR0301MB0606 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4280 Lines: 151 The imx composite clk is designed for Peripheral Clock Control (PCC) module observed in IMX ULP SoC series. e.g. i.MX7ULP. NOTE pcc can only be operated when clk is gated. Cc: Stephen Boyd Cc: Michael Turquette Cc: Shawn Guo Cc: Anson Huang Cc: Bai Ping Signed-off-by: Dong Aisheng --- ChangeLog: v1->v2: * remove an unneeded blank line change * use clk_hw_register --- drivers/clk/imx/Makefile | 1 + drivers/clk/imx/clk-composite.c | 90 +++++++++++++++++++++++++++++++++++++++++ drivers/clk/imx/clk.h | 6 +++ 3 files changed, 97 insertions(+) create mode 100644 drivers/clk/imx/clk-composite.c diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index ea4ef27..bf001ce 100644 --- a/drivers/clk/imx/Makefile +++ b/drivers/clk/imx/Makefile @@ -3,6 +3,7 @@ obj-y += \ clk.o \ clk-busy.o \ clk-cpu.o \ + clk-composite.o \ clk-fixup-div.o \ clk-fixup-mux.o \ clk-gate-exclusive.o \ diff --git a/drivers/clk/imx/clk-composite.c b/drivers/clk/imx/clk-composite.c new file mode 100644 index 0000000..78b891e --- /dev/null +++ b/drivers/clk/imx/clk-composite.c @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * Copyright 2017 NXP + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +#include +#include +#include + +#define PCG_PCS_SHIFT 24 +#define PCG_PCS_MASK 0x7 +#define PCG_CGC_SHIFT 30 +#define PCG_FRAC_SHIFT 3 +#define PCG_FRAC_WIDTH 1 +#define PCG_FRAC_MASK BIT(3) +#define PCG_PCD_SHIFT 0 +#define PCG_PCD_WIDTH 3 +#define PCG_PCD_MASK 0x7 + +struct clk_hw *imx_clk_composite(const char *name, + const char * const *parent_names, + int num_parents, bool mux_present, + bool rate_present, bool gate_present, + void __iomem *reg) +{ + struct clk_hw *mux_hw = NULL, *fd_hw = NULL, *gate_hw = NULL; + struct clk_fractional_divider *fd = NULL; + struct clk_gate *gate = NULL; + struct clk_mux *mux = NULL; + struct clk_hw *hw; + + if (mux_present) { + mux = kzalloc(sizeof(*mux), GFP_KERNEL); + if (!mux) + return ERR_PTR(-ENOMEM); + mux_hw = &mux->hw; + mux->reg = reg; + mux->shift = PCG_PCS_SHIFT; + mux->mask = PCG_PCS_MASK; + } + + if (rate_present) { + fd = kzalloc(sizeof(*fd), GFP_KERNEL); + if (!fd) { + kfree(mux); + return ERR_PTR(-ENOMEM); + } + fd_hw = &fd->hw; + fd->reg = reg; + fd->mshift = PCG_FRAC_SHIFT; + fd->mwidth = PCG_FRAC_WIDTH; + fd->mmask = PCG_FRAC_MASK; + fd->nshift = PCG_PCD_SHIFT; + fd->nwidth = PCG_PCD_WIDTH; + fd->nmask = PCG_PCD_MASK; + fd->flags = CLK_FRAC_DIVIDER_ZERO_BASED; + } + + if (gate_present) { + gate = kzalloc(sizeof(*gate), GFP_KERNEL); + if (!gate) { + kfree(mux); + kfree(fd); + return ERR_PTR(-ENOMEM); + } + gate_hw = &gate->hw; + gate->reg = reg; + gate->bit_idx = PCG_CGC_SHIFT; + } + + hw = clk_hw_register_composite(NULL, name, parent_names, num_parents, + mux_hw, &clk_mux_ops, fd_hw, + &clk_fractional_divider_ops, gate_hw, + &clk_gate_ops, CLK_SET_RATE_GATE | + CLK_SET_PARENT_GATE); + if (IS_ERR(hw)) { + kfree(mux); + kfree(fd); + kfree(gate); + } + + return hw; +} diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index cf3ea92..702faba 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -70,6 +70,12 @@ struct clk *imx_clk_busy_mux(const char *name, void __iomem *reg, u8 shift, u8 width, void __iomem *busy_reg, u8 busy_shift, const char **parent_names, int num_parents); +struct clk_hw *imx_clk_composite(const char *name, + const char * const *parent_names, + int num_parents, bool mux_present, + bool rate_present, bool gate_present, + void __iomem *reg); + struct clk *imx_clk_fixup_divider(const char *name, const char *parent, void __iomem *reg, u8 shift, u8 width, void (*fixup)(u32 *val)); -- 2.7.4