Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp230928ybl; Tue, 7 Jan 2020 17:58:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxOnk6DHxMg2VE3+/YVf/naFKHpnXIwLjfQzqxNUfAMXHkN9MixNBb2njn93BMSrWU60rgK X-Received: by 2002:aca:aa15:: with SMTP id t21mr1226772oie.177.1578448724915; Tue, 07 Jan 2020 17:58:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578448724; cv=none; d=google.com; s=arc-20160816; b=hH2sxzGT4wwcV4a+gYLGgYPB9I9UCkyc/Qam5yOapdguPDft4U/ZeC3EBE+MWDg+sC Q/7xjjYsDnUR5n/WfHKdKWAULfKdGi63qZiVjyQ9l4+6GVXvsYESsV3wAJ00FeLG6onk Yus3rR/j15VlcRoVgHF5pTk/CZ8852F0hotaxU46Z9Td1trHWpblsG2Yes5wa3osldwj khOph3WkDxHOszLIu72ha6+EM3w1pZ4+qFWQJmzHgoGIniEU2qIYTqaIfNZvFdSEgLDv AO3CaLjM2k+myL9OK6L5n8O3q2Q7HY57VizaLzkkl/CMdNJ1sY78xREJw8HvcN8LNTZK p91Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=a4v6qhcWLSKGWRTW2VVzuKv392a43zverDIOLpPwvtI=; b=WgL31e2XeWl0ZkF9sZhr5NJieD2e3FdQnHVGT3mlLK2P/XYL8KXwCG8HVmSAnKwasK rgLMNLh4PDUvJ06BXM6QWzvikO7Gp2c7/dU7GX0w6RFmqR1YVwyGhsXLJKpVdp+/C0O3 MgHgwie6Wc2RBHDB/9nrEc+p70+dODvwcmXEX/0ZzEFj1uyavOg+ZGha8gCUdUrgJqMt 5k5ZRk7i5Al/CuxiY+9JJQ28kVhGKa4R3vbsoQeuuKPX0Ouv+94Dntf/8VNCXCtlpz1B wGnBjBU7Y3YPoKlry6FyNDs2ZN9d6yvpXlR1On7tPqPaRKiqh7PuwCTqydMq1/wmWC+t 6bTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si948138oic.263.2020.01.07.17.58.33; Tue, 07 Jan 2020 17:58:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726759AbgAHB5u (ORCPT + 99 others); Tue, 7 Jan 2020 20:57:50 -0500 Received: from inva021.nxp.com ([92.121.34.21]:52374 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbgAHB5u (ORCPT ); Tue, 7 Jan 2020 20:57:50 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BD1402002C6; Wed, 8 Jan 2020 02:57:47 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 70EFC2001C3; Wed, 8 Jan 2020 02:57:32 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 2478840285; Wed, 8 Jan 2020 09:57:18 +0800 (SGT) From: Anson Huang To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, bjorn.andersson@linaro.org, olof@lixom.net, maxime@cerno.tech, leonard.crestez@nxp.com, dinguyen@kernel.org, marcin.juszkiewicz@linaro.org, ping.bai@nxp.com, abel.vesa@nxp.com, nsekhar@ti.com, t-kristo@ti.com, peng.fan@nxp.com, yuehaibing@huawei.com, aisheng.dong@nxp.com, sfr@canb.auug.org.au, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH V3 1/4] clk: imx: gate4: Switch imx_clk_gate4_flags() to clk_hw based API Date: Wed, 8 Jan 2020 09:53:34 +0800 Message-Id: <1578448417-17760-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch the imx_clk_gate4_flags() function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Anson Huang --- Changes since V2: - Switch to latest i.MX clock driver base to redo the patch. --- drivers/clk/imx/clk.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index 65d80c6..b05213b 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -390,15 +390,18 @@ static inline struct clk_hw *imx_clk_hw_gate4(const char *name, const char *pare reg, shift, 0x3, 0, &imx_ccm_lock, NULL); } -static inline struct clk *imx_clk_gate4_flags(const char *name, +static inline struct clk_hw *imx_clk_hw_gate4_flags(const char *name, const char *parent, void __iomem *reg, u8 shift, unsigned long flags) { - return clk_register_gate2(NULL, name, parent, + return clk_hw_register_gate2(NULL, name, parent, flags | CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, reg, shift, 0x3, 0, &imx_ccm_lock, NULL); } +#define imx_clk_gate4_flags(name, parent, reg, shift, flags) \ + to_clk(imx_clk_hw_gate4_flags(name, parent, reg, shift, flags)) + static inline struct clk_hw *imx_clk_hw_mux(const char *name, void __iomem *reg, u8 shift, u8 width, const char * const *parents, int num_parents) -- 2.7.4