Message ID | 1520502445-22576-2-git-send-email-ping.bai@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 2725660364 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 8 Mar 2018 09:45:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15BEC29815 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 8 Mar 2018 09:45:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0977D29838; Thu, 8 Mar 2018 09:45:49 +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 D4EA529815 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 8 Mar 2018 09:45:47 +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=JWFBwvUzwoP1f2f7Fj5+7EQk49uBB/OEVyaxJI8gnPQ=; b=aBna2oncoSoZqr 8wBymkJzJX/81H2J/ycOPrUoHWEhJkECXhOB8Ik63WDuV6n/6U+tdNlzOAvYq5pC4dGHOOA+ilvXQ ICinlBDJoSaUyLRLM117WonrvBbXY7q6nnqYX63yCJ2GU3pdqdz/Gx5lUl48doqp0d+WWCiR7sSjm /gRoriOfaKv4NvURd3gpjMdh7dUGGqMVQ1eJSGbXu9CMS3Vy8/MC8M7I129G2CyYu/ZKH8tzh04St N0ku8h6l8bGVieXy8lgmaL1iVqdeRlLxhhPfSgVIKDUpopKad6IsQpBB80aw7ZJ6tfvYSFMFoIqHA 1WOzVmLfoRsEp0MaxOxA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ets7G-0007R2-T4; Thu, 08 Mar 2018 09:45:39 +0000 Received: from mail-ve1eur03on061b.outbound.protection.outlook.com ([2a01:111:f400:fe09::61b] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ets6c-0005k1-Or for linux-arm-kernel@lists.infradead.org; Thu, 08 Mar 2018 09:45:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=TW7+lO1BmdjnFc/saMuWbPVkTnoCyWckBT8CYWzX2XY=; b=mQOxRmcAAxNlkXFgpLsoMQDtGFLuASeo8Ca4erBWdExl50+oWCKy5Nk7oXwnvYwTqDWpe+9MoGTZf0ml14yewX4xQaBqNnAhXbTMCULGkwDnJ8R9jN+I5iak9wrtJjnqEx4x8/Ao4QBaHJVfaT5fBqNfb2AGt2bGtDt8PEXsqH4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ping.bai@nxp.com; Received: from localhost.localdomain (92.121.68.129) by AM5PR04MB3108.eurprd04.prod.outlook.com (2603:10a6:206:c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Thu, 8 Mar 2018 09:44:44 +0000 From: Bai Ping <ping.bai@nxp.com> To: sboyd@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, kernel@pengutronix.de Subject: [PATCH v4 2/4] driver: clk: imx: add new gate/gate2 wrapper funtion Date: Thu, 8 Mar 2018 17:47:23 +0800 Message-Id: <1520502445-22576-2-git-send-email-ping.bai@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520502445-22576-1-git-send-email-ping.bai@nxp.com> References: <1520502445-22576-1-git-send-email-ping.bai@nxp.com> MIME-Version: 1.0 X-Originating-IP: [92.121.68.129] X-ClientProxiedBy: KL1PR06CA0060.apcprd06.prod.outlook.com (2603:1096:802:14::28) To AM5PR04MB3108.eurprd04.prod.outlook.com (2603:10a6:206:c::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a46986dd-40d7-451c-d4f9-08d584d93b30 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM5PR04MB3108; X-Microsoft-Exchange-Diagnostics: 1; AM5PR04MB3108; 3:d6opBwAHfMpXpufy5alcGtPNvlMqCP7EMt/k+Z21xpCp7DuqeW+eB8GDOsswWWhA8QQGbzwRi4FOnTumpfZvAT2h/KHgj+QCTyK45i/tyZBetYMpDuEEm1Rq+M+z76qZ5Hj00XD4la0wOg3RtwPdcMSD6Mb0OdmOWvQHjfQE2gzqrWgJA/BWAuyOm15r5yHeiHi9rqmi3vuC4dDdj1sIzYy9BMB4JNl6dn9lMnz+oGAdehOn5Mgbdx7q9fYv1X05; 25:gBVDIu3ay2i+bj+oIGqTR7dKlBAas561k5SVvqsBJp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IqRTxfYcRLH0TaeXzaBMeqrM2umO7YrVHGp75CTy1eiX4; 4:xnfGRLyvSExRLZWQ/3NrGhrs3ArL3CTIbp6CVa69/DAMzLNykPQmIzmRrVeJQfFkxDhV7kh5Tke1E7n/x7EQu6J/L8pOp39aZP3Bx+XyD0UllDSNoM6Vh1FW5Zc1LhmxS9JiC6KPjkiJLt32nGqcoaAHw6DC9j/POkOWdrRnFr3TqIcqmuWbp+bYAVZz//zqFl8IbF9Jh3c2dJpzhAa+MW27ga2xTn43EOPJ9qP3IWb4bNDVDYDcMTG3CzXh9pR2sszwoqkwy6lRbLZEAulteqLOdkVWtCIsyYGmGRUSVNL/TgKAhFi0jgTZJhsFEapS X-Microsoft-Antispam-PRVS: <AM5PR04MB31087F842BFB81D945271D1F87DF0@AM5PR04MB3108.eurprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(8121501046)(5005006)(3002001)(3231220)(944501244)(52105095)(93006095)(93001095)(10201501046)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:AM5PR04MB3108; BCL:0; PCL:0; RULEID:; SRVR:AM5PR04MB3108; X-Forefront-PRVS: 060503E79B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(396003)(39860400002)(376002)(346002)(39380400002)(366004)(199004)(189003)(47776003)(7736002)(66066001)(6512007)(53936002)(39060400002)(3846002)(6116002)(48376002)(305945005)(6506007)(86362001)(186003)(97736004)(386003)(81166006)(26005)(16526019)(81156014)(52116002)(51416003)(316002)(76176011)(59450400001)(50226002)(8936002)(8676002)(478600001)(16586007)(5660300001)(36756003)(50466002)(106356001)(2950100002)(105586002)(6666003)(25786009)(4326008)(68736007)(2906002)(6486002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR04MB3108; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR04MB3108; 23:NI0XxvR+KgcljmNtbh6nEueyDD7VEMW3f/CNYN8IX?= =?us-ascii?Q?M9tRSX+J/us/UPPkZ5LQqAYrgDMm9ZYj0BE1C9rQlxNvQQqlAz0006auXb47?= =?us-ascii?Q?XUTJMM5z2v1Mce3pv/nJQbtSgtfCbGqseUwphclgBXTSFa217lB87S97NIYY?= =?us-ascii?Q?Tj//OdaX3LToEUM0Q8C8jY5GtxOpp10sie8Uy5a2ehO7BojN3P3CEDee1VF3?= =?us-ascii?Q?LZRLFt+ZgcsXR25Eo8B5RtvL2yHB9KCmSFg1+75juXl2+biXpQX6jJ/qIzVa?= =?us-ascii?Q?6iOUMuNSAf/fBrSntSq5r/+E0qB8wR1g5CfwSfdd42Urfu1Hb0nniUYbIxS2?= =?us-ascii?Q?/yrkKge4BFfsop0y3wr/7qV+jX3zqg7nLIpzFItVwUSO+dS63/4xm/fYYzht?= =?us-ascii?Q?H0NNyN9DC+MCQGep4GAznCXbZbUzMWMx4dZEjaduP8Z2B9pQAQ1nAe/R1H2j?= =?us-ascii?Q?4jqjpvWwI+STFKTO3W3inKs1fFOCTNq6IQW3CoKFvhlAbk2F96ho3tP09Ywz?= =?us-ascii?Q?xOnnGJq9z9Y+EKujbLImHXLlg+MCc/b84SkIglu0TXMeZRFmwEuNiK3EzeHR?= =?us-ascii?Q?ew8oQ95qvHn+5W59FldhjBnWJ4/Hvn3zS82D+9IcGUoJsrgWkdUzFjHgt5Su?= =?us-ascii?Q?3qWq8h8c9QQZsiphoySm5ylGvkVkTrkJ1kZIsDKI5X37KIipZ4Q80Y47D4gg?= =?us-ascii?Q?HWAAkFocLlG8wh+AeXzVKgKI9J4gVHb49OLC3hnZMFaahSGJoV2xSNhCQRuh?=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3tyU3/AdWG95pliuExCozMWKkFnr2rxcXtW/w3TMVf/wIyy84BWkNDyzsIyzho=; 5:U4ZTU96rS0Ug77gjqxfJudfLmUjkWmqSz+khB8LAvIEoC+ecjX8e3fryZkI1TPzN84XPdJeOCF+nXrBHBMTrejuM4AYpYi/s9caLeEMCcbD8QRo+dCLC36X5hNTi3E4WCUhvGhnYggEBIixyoddKwtVP5KBKorPLC8k7KdY8klo=; 24:6e+LB9s3lcyOobK+NTHTvB9xxw799yts9TE/Yv5fDJmwbjV4913zx9Zx/bKs34F7uxthEy/EURZmVLk1+b4v3ygB4HAdr7GuhEWZV1Wrlu0=; 7:U3uveneTXOB3vsbuKhwxX5QcJIMkNCyl5wBzjY5AbL8X+AYXmEY72Fw4YCoaQky+xeo4Iaz8mgFCJ+/k9pBDO5IVbsknG/VtrWDf79oef1B8m8PhXjfhXMsWu0O3y+Ftdsoxai4ynXsG0+Q3WCeLt6TrNNbIxJoNvGX7o5C0mV8CBCQkZGzaXxU+roENeX0nxkYZ4wWUUytGeqJG0l1xAzErAeoBnZaTQQD7jvnKWmw/9HpqGB97T+zzCOOPqhdP SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2018 09:44:44.6430 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a46986dd-40d7-451c-d4f9-08d584d93b30 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR04MB3108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180308_014458_862784_F92A7B8F X-CRM114-Status: UNSURE ( 8.60 ) 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: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: aisheng.dong@nxp.com, linux-imx@nxp.com, jacky.baip@gmail.com, fabio.estevam@nxp.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index d69c4bb..8076ec0 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -123,6 +123,13 @@ static inline struct clk *imx_clk_gate(const char *name, const char *parent, shift, 0, &imx_ccm_lock); } +static inline struct clk *imx_clk_gate_flags(const char *name, const char *parent, + void __iomem *reg, u8 shift, unsigned long flags) +{ + return clk_register_gate(NULL, name, parent, flags | 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) { @@ -137,6 +144,13 @@ static inline struct clk *imx_clk_gate2(const char *name, const char *parent, 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 | CLK_SET_RATE_PARENT, reg, + shift, 0x3, 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)
Add new gate/gate2 wrapper function to register clocks with optional flags. Signed-off-by: Bai Ping <ping.bai@nxp.com> --- change from v3->v4: - no --- drivers/clk/imx/clk.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)