From patchwork Thu Mar 22 09:55:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 10301369 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 B22A160385 for ; Thu, 22 Mar 2018 11:57:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F841287E0 for ; Thu, 22 Mar 2018 11:57:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93F4D29B31; Thu, 22 Mar 2018 11:57:06 +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=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E98D5287E0 for ; Thu, 22 Mar 2018 11:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=akLaWiP6MdDMM6Rh65ANp511mKq1wIW3XMbSFb4rOHE=; b=ZDc+2JKgAClHxv tjtv0ggDgosOtuQ52PrAAgBdV/bQw2WtM4R8R7CROAKqc0ncZ8ds8Y6h+Xq2M9zSadQb7jkz8Kxad jfROSGocr9chbxrYrgFKGe9GAEVTtxXUvl5aoeBXHFy0giLRCDbLMu8JANriPOzfg9g4VZGudCRIh vksHIkpIg6cF7qvM06N6b0T+9utJpOW9mCg0UQCpKU1GWynnBx2ONtRq5Wa5H/CFJPeSqWhufFSbc AofWisYwqqtgP5yACIShQ3O+dQq7mT0cnaJFDNacH7LnGYyYVCpf5Ovr7t0xXAcngARgjTsVOr+dQ A0/+N77yKR5eJyA/dU4A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyyq5-0001Pw-HC; Thu, 22 Mar 2018 11:57:01 +0000 Received: from mail-bl2nam02on062d.outbound.protection.outlook.com ([2a01:111:f400:fe46::62d] helo=NAM02-BL2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyyp4-0000XD-Gc for linux-arm-kernel@lists.infradead.org; Thu, 22 Mar 2018 11:56:02 +0000 Received: from MWHPR03CA0036.namprd03.prod.outlook.com (2603:10b6:301:3b::25) by CY4PR03MB2872.namprd03.prod.outlook.com (2603:10b6:903:130::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Thu, 22 Mar 2018 11:55:44 +0000 Received: from BN1BFFO11FD008.protection.gbl (2a01:111:f400:7c10::1:156) by MWHPR03CA0036.outlook.office365.com (2603:10b6:301:3b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.609.10 via Frontend Transport; Thu, 22 Mar 2018 11:55:44 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD008.mail.protection.outlook.com (10.58.144.71) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.527.18 via Frontend Transport; Thu, 22 Mar 2018 11:55:43 +0000 Received: from fsr-ub1664-175.ea.freescale.net (fsr-ub1664-175 [134.27.109.41] (may be forged)) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w2M9tY8o022099; Thu, 22 Mar 2018 02:55:38 -0700 From: Abel Vesa To: , , , , Subject: [PATCH 1/4] arm: imx: Update clk driver API Date: Thu, 22 Mar 2018 11:55:26 +0200 Message-ID: <1521712529-632-2-git-send-email-abel.vesa@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521712529-632-1-git-send-email-abel.vesa@nxp.com> References: <1521712529-632-1-git-send-email-abel.vesa@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131661933440645616; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:CAL; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39380400002)(346002)(376002)(39860400002)(396003)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(36756003)(316002)(106466001)(26005)(5660300001)(336012)(15650500001)(8676002)(956003)(50466002)(16586007)(81156014)(81166006)(446003)(305945005)(2906002)(8936002)(498600001)(26826003)(51416003)(50226002)(105606002)(48376002)(68736007)(53936002)(47776003)(59450400001)(85426001)(356003)(2950100002)(86362001)(110136005)(6666003)(2201001)(104016004)(54906003)(4326008)(97736004)(76176011)(42866002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2872; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD008; 1:x5JwND41oyWk9A7vRO/KL5Gae2QVK+/3WnGeoh4iDVDO4Hzd3wX1Vw488FwQ5PuhnkmCfXT4nhTIQxDrv/R6PbOOKtTQBqcH1GsKZXtY9QkifNpw0IENOmu557J47qP0 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 01f65fc1-75a6-482f-b9f0-08d58febd7a2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603328); SRVR:CY4PR03MB2872; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2872; 3:Gga6p2xUjKdVC7Zm3wgggpr5lySPe4COYCHiZ7zh0eGcPYuanlXukcjoDZ3PyG/4qANDDrB53KNrfLzXTBj4EE+x0O2/lUEchMcVRHnQO+KS5QyfcKzWUxT8ZJnimRZPy9ALipAB9mj60pJmmeZZCPVfmcTVeu/b+pleOQ7/oBPbz/g+O0jltVXw2PrBt5Cboill/g75TdUItYkOLffh48EYHavmTQVrv1bInZdWl+iDMSr1PxZebBtuGECdVsSp2ncJSpI9jY33rEsWoEncTJbAWhq0LgZlKwopPXQPYwEonUrigbBuDrP3QLD6Uhe56hrO1IbCoMXNVOfxTue/3aDRoJM+nuDw9QKYJXWB83A=; 25:2MJyCVDv5AT2aSkpWpYYyMCxccBcCqFB+XtoQkAZ/wH/AOOoojOfu5q4AUAKRbpnYoJNGSrZOU3bpsp19ffBCau2ZjfCFOEArAeE9oZBF/DhGHOQ7ss+ZKnS/28j9S+EymkprgtRinTNMQrTqz9BCbPQBtGzTDzBZTolQe2tj5+Jdbqxdvqz5E9Rx3dmq0gEt3ER6gf4v/s15TghX4OEOM+mp3e8zUZaIbEtlkiT8zM8jSMPT4NlfFpEjqhp9/iXVo1SMNN7Rj7aZaG7TGCD4Z6E4htgQVAvJXAFF8wA4Ips9KjizPSug8Dv41p/7iDwX2senzDWYqe97XGCP1nk1A== X-MS-TrafficTypeDiagnostic: CY4PR03MB2872: X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2872; 31:PkhoVA3cTWTPWzMJI+JcVz9/i5+89UgtLVcwqpEZaV87F4vqx7lOhTSTGKyEMEd2b8OLnArFmAwQNCEnrypKSrQuQw81jbI/1o+jEk5JH1Q0bN9QGbeOuNATmo3sQcyVsd6/PDTu3MfDQMadpL66pR/pG9cbTumXa1Z9Ko4cdqZSDk7eTrVambfbJs0cpuMP0hDof0Hih2M6pUs7oRUOnTDuzphEA0/o+zwSeu7JKas=; 4:jNUtiV+w4eHNuuOruOrsItV73LjnsEHdoYNpb3pmmkGOFozRJ3/OAUMI/RnCrWyhTKgOn7QjgiCsU37oe1hnu6oSjFzU3e4Z1O3MrAVdxH8q334lSMDgvHq7bFtR0BxrtKufTBS4OQjp/+qLQTcn0BdZkcuqjV2EqyFYZadK/9PglweQEWi2pT3Hsc02PthG08PnJFcHv7tSDM0Q0IMmBASfHpIUf2h6EAUxY5ZH4iRGK7jj1zDkr4uLVkwX4QuPl5dZ9Mmcscj4rj81HixVyEYIAVNjhYlJl1N65mxXmU+iDoTLS8M7rJcxAnyIOih8 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231221)(944501327)(52105095)(93006095)(93001095)(6055026)(6096035)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123561025)(20161123559100)(20161123565025)(20161123563025)(20161123556025)(201708071742011); SRVR:CY4PR03MB2872; BCL:0; PCL:0; RULEID:(400006); SRVR:CY4PR03MB2872; X-Forefront-PRVS: 0619D53754 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2872; 23:7ZiOAveGHenjLr5RDji/8bKkYNJRopFAAXxky7c+z?= =?us-ascii?Q?M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+JWlbpvTf+IY3n5O3+5B72NoUnXRnHSOHK+2VeL42z7+mMbscTIHiw2t+aJ1GObh/j2FkgC0=; 24:d+sgMdCk9G4bI9I0HIlzVRkifDAT2i8CJYLUfi1XnBj2qpdiYBGC7ieZXk22SA1/MtAeZ3MKaFt7mggVVqr5szqQNEF3CBLh+JKd8hBOfpQ=; 7:AlIsXdOSgjwRGvLCqIa+MpwoEFUhCPP+J2m/YxOfahAFByBeFXmG2hTBteZ9aJl36pi4P2zsOVDswXbSkfRiWV2/22D6O+AJd47UVMbwQOVtqT9EHXB4meOhNz74O+qeArkCs49J2kfVgnyBJbHLDVbQLC3rafPZodYTwrzK6NZHn34bCGr0DARjTQ+gQjLvDE9MKRWwhjX52xJooUaOgonOLo/kMrQOXiQihl21OEuF84MmZXDpFHx5RRcekwBy SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Mar 2018 11:55:43.3781 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 01f65fc1-75a6-482f-b9f0-08d58febd7a2 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: CY4PR03MB2872 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180322_045558_787308_E604A176 X-CRM114-Status: UNSURE ( 8.46 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Abel Vesa , anson.huang@nxp.com, linux-kernel@vger.kernel.org, linux-imx@nxp.com, linux-clk@vger.kernel.org, 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-Virus-Scanned: ClamAV using ClamSMTP This adds the following new wrappers: - imx_clk_gate2_flag - imx_clk_set_parent It also updates the flags for the old wrappers. Signed-off-by: Anson Huang Signed-off-by: Abel Vesa --- drivers/clk/imx/clk.h | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index d69c4bb..466c37f3 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -4,6 +4,7 @@ #include #include +#include extern spinlock_t imx_ccm_lock; @@ -54,6 +55,15 @@ 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 void imx_clk_set_parent(struct clk *clk, struct clk *parent) +{ + int ret = clk_set_parent(clk, parent); + + if (ret) + pr_err("failed to set parent of clk %s to %s: %d\n", + __clk_get_name(clk), __clk_get_name(parent), ret); +} + struct clk *imx_clk_pfd(const char *name, const char *parent_name, void __iomem *reg, u8 idx); @@ -96,7 +106,8 @@ static inline struct clk *imx_clk_fixed_factor(const char *name, static inline struct clk *imx_clk_divider(const char *name, const char *parent, void __iomem *reg, u8 shift, u8 width) { - return clk_register_divider(NULL, name, parent, CLK_SET_RATE_PARENT, + return clk_register_divider(NULL, name, parent, + CLK_SET_RATE_PARENT | CLK_SET_RATE_GATE, reg, shift, width, 0, &imx_ccm_lock); } @@ -112,7 +123,7 @@ static inline struct clk *imx_clk_divider2(const char *name, const char *parent, void __iomem *reg, u8 shift, u8 width) { return clk_register_divider(NULL, name, parent, - CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, + CLK_SET_RATE_PARENT | CLK_SET_RATE_GATE | CLK_OPS_PARENT_ENABLE, reg, shift, width, 0, &imx_ccm_lock); } @@ -133,7 +144,15 @@ static inline struct clk *imx_clk_gate_dis(const char *name, const char *parent, 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, + return clk_register_gate2(NULL, name, parent, + CLK_SET_RATE_PARENT | CLK_SET_RATE_GATE, reg, + shift, 0x3, 0, &imx_ccm_lock, NULL); +} + +static inline struct clk *imx_clk_gate2_flags(const char *name, const char *parent, + void __iomem *reg, u8 shift, unsigned long flags) +{ + return clk_register_gate2(NULL, name, parent, flags, reg, shift, 0x3, 0, &imx_ccm_lock, NULL); } @@ -141,7 +160,8 @@ 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, + return clk_register_gate2(NULL, name, parent, + CLK_SET_RATE_PARENT | CLK_SET_RATE_GATE, reg, shift, 0x3, 0, &imx_ccm_lock, share_count); } @@ -150,8 +170,8 @@ static inline struct clk *imx_clk_gate2_shared2(const char *name, unsigned int *share_count) { return clk_register_gate2(NULL, name, parent, CLK_SET_RATE_PARENT | - CLK_OPS_PARENT_ENABLE, reg, shift, 0x3, 0, - &imx_ccm_lock, share_count); + CLK_SET_RATE_GATE | CLK_OPS_PARENT_ENABLE, + reg, shift, 0x3, 0, &imx_ccm_lock, share_count); } static inline struct clk *imx_clk_gate2_cgr(const char *name, @@ -173,7 +193,7 @@ static inline struct clk *imx_clk_gate4(const char *name, const char *parent, void __iomem *reg, u8 shift) { return clk_register_gate2(NULL, name, parent, - CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, + CLK_SET_RATE_PARENT | CLK_SET_RATE_GATE | CLK_OPS_PARENT_ENABLE, reg, shift, 0x3, 0, &imx_ccm_lock, NULL); } @@ -181,8 +201,8 @@ static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg, u8 shift, u8 width, const char **parents, int num_parents) { return clk_register_mux(NULL, name, parents, num_parents, - CLK_SET_RATE_NO_REPARENT, reg, shift, - width, 0, &imx_ccm_lock); + CLK_SET_RATE_NO_REPARENT | CLK_SET_PARENT_GATE, + reg, shift, width, 0, &imx_ccm_lock); } static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg, @@ -198,8 +218,8 @@ static inline struct clk *imx_clk_mux_flags(const char *name, int num_parents, unsigned long flags) { return clk_register_mux(NULL, name, parents, num_parents, - flags | CLK_SET_RATE_NO_REPARENT, reg, shift, width, 0, - &imx_ccm_lock); + flags | CLK_SET_RATE_NO_REPARENT | CLK_SET_PARENT_GATE, + reg, shift, width, 0, &imx_ccm_lock); } struct clk *imx_clk_cpu(const char *name, const char *parent_name,