diff mbox

[V2,6/8] clk: imx: add clk api for supporting CLK_OPS_PARENT_ENABLE clocks

Message ID 1467212351-16626-7-git-send-email-aisheng.dong@nxp.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Aisheng Dong June 29, 2016, 2:59 p.m. UTC
IMX SoCs like i.MX7D requires using CLK_OPS_PARENT_ENABLE flags,
adding the corresponding clock APIs variants for easily to use.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 drivers/clk/imx/clk.h | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Comments

kernel test robot June 29, 2016, 6:05 p.m. UTC | #1
Hi,

[auto build test ERROR on clk/clk-next]
[also build test ERROR on v4.7-rc5 next-20160629]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Dong-Aisheng/clk-core-support-clocks-which-requires-parents-enable/20160629-231445
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: arm-imx_v6_v7_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   In file included from drivers/clk/imx/clk.c:6:0:
   drivers/clk/imx/clk.h: In function 'imx_clk_divider2':
>> drivers/clk/imx/clk.h:104:26: error: 'CLK_OPS_PARENT_ON' undeclared (first use in this function)
       CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ON,
                             ^
   drivers/clk/imx/clk.h:104:26: note: each undeclared identifier is reported only once for each function it appears in
   drivers/clk/imx/clk.h: In function 'imx_clk_gate3':
   drivers/clk/imx/clk.h:148:26: error: 'CLK_OPS_PARENT_ON' undeclared (first use in this function)
       CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ON,
                             ^
   drivers/clk/imx/clk.h: In function 'imx_clk_gate4':
   drivers/clk/imx/clk.h:156:26: error: 'CLK_OPS_PARENT_ON' undeclared (first use in this function)
       CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ON,
                             ^
   drivers/clk/imx/clk.h: In function 'imx_clk_mux2':
   drivers/clk/imx/clk.h:172:31: error: 'CLK_OPS_PARENT_ON' undeclared (first use in this function)
       CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ON,
                                  ^

vim +/CLK_OPS_PARENT_ON +104 drivers/clk/imx/clk.h

    98	}
    99	
   100	static inline struct clk *imx_clk_divider2(const char *name, const char *parent,
   101			void __iomem *reg, u8 shift, u8 width)
   102	{
   103		return clk_register_divider(NULL, name, parent,
 > 104				CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ON,
   105				reg, shift, width, 0, &imx_ccm_lock);
   106	}
   107	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index df87d8888d80..6736e858b8f0 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -97,6 +97,14 @@  static inline struct clk *imx_clk_divider_flags(const char *name,
 			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)
+{
+	return clk_register_divider(NULL, name, parent,
+			CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ON,
+			reg, shift, width, 0, &imx_ccm_lock);
+}
+
 static inline struct clk *imx_clk_gate(const char *name, const char *parent,
 		void __iomem *reg, u8 shift)
 {
@@ -133,6 +141,22 @@  static inline struct clk *imx_clk_gate2_cgr(const char *name, const char *parent
 			shift, cgr_val, 0, &imx_ccm_lock, NULL);
 }
 
+static inline struct clk *imx_clk_gate3(const char *name, const char *parent,
+		void __iomem *reg, u8 shift)
+{
+	return clk_register_gate(NULL, name, parent,
+			CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ON,
+			reg, shift, 0, &imx_ccm_lock);
+}
+
+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_ON,
+			reg, shift, 0x3, 0, &imx_ccm_lock, NULL);
+}
+
 static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg,
 		u8 shift, u8 width, const char **parents, int num_parents)
 {
@@ -141,6 +165,14 @@  static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg,
 			width, 0, &imx_ccm_lock);
 }
 
+static inline struct clk *imx_clk_mux2(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 | CLK_OPS_PARENT_ON,
+			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 **parents,
 		int num_parents, unsigned long flags)