Skip to content

Commit db2a28e

Browse files
committed
Merge tag 'clk-imx-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-imx
Pull i.MX clk driver updates from Shawn Guo: - A series from Anson Huang to support building i.MX ARMv8 platforms clock driver as module - Remove i.MX21 clock driver, as i.MX21 platform support is being dropped - A couple of minor imx8mp clock correction from Jacky Bai - Add clock for CRC block found on vf610 SoC - A couple of clock flag fix-up from Peng Fan - Minor kerneldoc fix-up for i.MX clock drivers * tag 'clk-imx-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: clk: imx: imx21: Remove clock driver clk: imx: gate2: Fix a few typos clk: imx: Fix and update kerneldoc clk: imx: fix i.MX7D peripheral clk mux flags clk: imx: fix composite peripheral flags clk: imx: Correct the memrepair clock on imx8mp clk: imx: Correct the root clk of media ldb on imx8mp clk: imx: vf610: Add CRC clock clk: imx: Explicitly include bits.h clk: imx8qxp: Support building i.MX8QXP clock driver as module clk: imx8m: Support module build clk: imx: Add clock configuration for ARMv7 platforms clk: imx: Support building i.MX common clock driver as module clk: composite: Export clk_hw_register_composite() clk: imx6sl: Use BIT(x) to avoid shifting signed 32-bit value by 31 bits
2 parents 9123e3a + 8058377 commit db2a28e

34 files changed

Lines changed: 281 additions & 323 deletions

‎drivers/clk/clk-composite.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ struct clk_hw *clk_hw_register_composite(struct device *dev, const char *name,
328328
rate_hw, rate_ops, gate_hw,
329329
gate_ops, flags);
330330
}
331+
EXPORT_SYMBOL_GPL(clk_hw_register_composite);
331332

332333
struct clk_hw *clk_hw_register_composite_pdata(struct device *dev,
333334
const char *name,

‎drivers/clk/imx/Kconfig‎

Lines changed: 76 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,102 @@
11
# SPDX-License-Identifier: GPL-2.0
22
# common clock support for NXP i.MX SoC family.
33
config MXC_CLK
4-
bool
5-
def_bool ARCH_MXC
4+
tristate "IMX clock"
5+
depends on ARCH_MXC || COMPILE_TEST
66

77
config MXC_CLK_SCU
8-
bool
9-
depends on IMX_SCU
8+
tristate "IMX SCU clock"
9+
depends on ARCH_MXC || COMPILE_TEST
10+
depends on IMX_SCU && HAVE_ARM_SMCCC
11+
12+
config CLK_IMX1
13+
def_bool SOC_IMX1
14+
select MXC_CLK
15+
16+
config CLK_IMX25
17+
def_bool SOC_IMX25
18+
select MXC_CLK
19+
20+
config CLK_IMX27
21+
def_bool SOC_IMX27
22+
select MXC_CLK
23+
24+
config CLK_IMX31
25+
def_bool SOC_IMX31
26+
select MXC_CLK
27+
28+
config CLK_IMX35
29+
def_bool SOC_IMX35
30+
select MXC_CLK
31+
32+
config CLK_IMX5
33+
def_bool SOC_IMX5
34+
select MXC_CLK
35+
36+
config CLK_IMX6Q
37+
def_bool SOC_IMX6Q
38+
select MXC_CLK
39+
40+
config CLK_IMX6SL
41+
def_bool SOC_IMX6SL
42+
select MXC_CLK
43+
44+
config CLK_IMX6SLL
45+
def_bool SOC_IMX6SLL
46+
select MXC_CLK
47+
48+
config CLK_IMX6SX
49+
def_bool SOC_IMX6SX
50+
select MXC_CLK
51+
52+
config CLK_IMX6UL
53+
def_bool SOC_IMX6UL
54+
select MXC_CLK
55+
56+
config CLK_IMX7D
57+
def_bool SOC_IMX7D
58+
select MXC_CLK
59+
60+
config CLK_IMX7ULP
61+
def_bool SOC_IMX7ULP
62+
select MXC_CLK
63+
64+
config CLK_VF610
65+
def_bool SOC_VF610
66+
select MXC_CLK
1067

1168
config CLK_IMX8MM
12-
bool "IMX8MM CCM Clock Driver"
13-
depends on ARCH_MXC
69+
tristate "IMX8MM CCM Clock Driver"
70+
depends on ARCH_MXC || COMPILE_TEST
71+
select MXC_CLK
1472
help
1573
Build the driver for i.MX8MM CCM Clock Driver
1674

1775
config CLK_IMX8MN
18-
bool "IMX8MN CCM Clock Driver"
19-
depends on ARCH_MXC
76+
tristate "IMX8MN CCM Clock Driver"
77+
depends on ARCH_MXC || COMPILE_TEST
78+
select MXC_CLK
2079
help
2180
Build the driver for i.MX8MN CCM Clock Driver
2281

2382
config CLK_IMX8MP
24-
bool "IMX8MP CCM Clock Driver"
25-
depends on ARCH_MXC
83+
tristate "IMX8MP CCM Clock Driver"
84+
depends on ARCH_MXC || COMPILE_TEST
85+
select MXC_CLK
2686
help
2787
Build the driver for i.MX8MP CCM Clock Driver
2888

2989
config CLK_IMX8MQ
30-
bool "IMX8MQ CCM Clock Driver"
31-
depends on ARCH_MXC
90+
tristate "IMX8MQ CCM Clock Driver"
91+
depends on ARCH_MXC || COMPILE_TEST
92+
select MXC_CLK
3293
help
3394
Build the driver for i.MX8MQ CCM Clock Driver
3495

3596
config CLK_IMX8QXP
36-
bool "IMX8QXP SCU Clock"
37-
depends on ARCH_MXC && IMX_SCU && ARM64
97+
tristate "IMX8QXP SCU Clock"
98+
depends on (ARCH_MXC && ARM64) || COMPILE_TEST
99+
depends on IMX_SCU && HAVE_ARM_SMCCC
38100
select MXC_CLK_SCU
39101
help
40102
Build the driver for IMX8QXP SCU based clocks.

‎drivers/clk/imx/Makefile‎

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,46 @@
11
# SPDX-License-Identifier: GPL-2.0
22

3-
obj-$(CONFIG_MXC_CLK) += \
4-
clk.o \
5-
clk-busy.o \
6-
clk-composite-8m.o \
7-
clk-cpu.o \
8-
clk-composite-7ulp.o \
9-
clk-divider-gate.o \
10-
clk-fixup-div.o \
11-
clk-fixup-mux.o \
12-
clk-frac-pll.o \
13-
clk-gate-exclusive.o \
14-
clk-gate2.o \
15-
clk-pfd.o \
16-
clk-pfdv2.o \
17-
clk-pllv1.o \
18-
clk-pllv2.o \
19-
clk-pllv3.o \
20-
clk-pllv4.o \
21-
clk-sscg-pll.o \
22-
clk-pll14xx.o
23-
24-
obj-$(CONFIG_MXC_CLK_SCU) += \
25-
clk-scu.o \
26-
clk-lpcg-scu.o
3+
mxc-clk-objs += clk.o
4+
mxc-clk-objs += clk-busy.o
5+
mxc-clk-objs += clk-composite-7ulp.o
6+
mxc-clk-objs += clk-composite-8m.o
7+
mxc-clk-objs += clk-cpu.o
8+
mxc-clk-objs += clk-divider-gate.o
9+
mxc-clk-objs += clk-fixup-div.o
10+
mxc-clk-objs += clk-fixup-mux.o
11+
mxc-clk-objs += clk-frac-pll.o
12+
mxc-clk-objs += clk-gate2.o
13+
mxc-clk-objs += clk-gate-exclusive.o
14+
mxc-clk-objs += clk-pfd.o
15+
mxc-clk-objs += clk-pfdv2.o
16+
mxc-clk-objs += clk-pllv1.o
17+
mxc-clk-objs += clk-pllv2.o
18+
mxc-clk-objs += clk-pllv3.o
19+
mxc-clk-objs += clk-pllv4.o
20+
mxc-clk-objs += clk-pll14xx.o
21+
mxc-clk-objs += clk-sscg-pll.o
22+
obj-$(CONFIG_MXC_CLK) += mxc-clk.o
2723

2824
obj-$(CONFIG_CLK_IMX8MM) += clk-imx8mm.o
2925
obj-$(CONFIG_CLK_IMX8MN) += clk-imx8mn.o
3026
obj-$(CONFIG_CLK_IMX8MP) += clk-imx8mp.o
3127
obj-$(CONFIG_CLK_IMX8MQ) += clk-imx8mq.o
32-
obj-$(CONFIG_CLK_IMX8QXP) += clk-imx8qxp.o clk-imx8qxp-lpcg.o
3328

34-
obj-$(CONFIG_SOC_IMX1) += clk-imx1.o
35-
obj-$(CONFIG_SOC_IMX21) += clk-imx21.o
36-
obj-$(CONFIG_SOC_IMX25) += clk-imx25.o
37-
obj-$(CONFIG_SOC_IMX27) += clk-imx27.o
38-
obj-$(CONFIG_SOC_IMX31) += clk-imx31.o
39-
obj-$(CONFIG_SOC_IMX35) += clk-imx35.o
40-
obj-$(CONFIG_SOC_IMX5) += clk-imx5.o
41-
obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o
42-
obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o
43-
obj-$(CONFIG_SOC_IMX6SLL) += clk-imx6sll.o
44-
obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o
45-
obj-$(CONFIG_SOC_IMX6UL) += clk-imx6ul.o
46-
obj-$(CONFIG_SOC_IMX7D) += clk-imx7d.o
47-
obj-$(CONFIG_SOC_IMX7ULP) += clk-imx7ulp.o
48-
obj-$(CONFIG_SOC_VF610) += clk-vf610.o
29+
obj-$(CONFIG_MXC_CLK_SCU) += clk-imx-scu.o clk-imx-lpcg-scu.o
30+
clk-imx-scu-$(CONFIG_CLK_IMX8QXP) += clk-scu.o clk-imx8qxp.o
31+
clk-imx-lpcg-scu-$(CONFIG_CLK_IMX8QXP) += clk-lpcg-scu.o clk-imx8qxp-lpcg.o
32+
33+
obj-$(CONFIG_CLK_IMX1) += clk-imx1.o
34+
obj-$(CONFIG_CLK_IMX25) += clk-imx25.o
35+
obj-$(CONFIG_CLK_IMX27) += clk-imx27.o
36+
obj-$(CONFIG_CLK_IMX31) += clk-imx31.o
37+
obj-$(CONFIG_CLK_IMX35) += clk-imx35.o
38+
obj-$(CONFIG_CLK_IMX5) += clk-imx5.o
39+
obj-$(CONFIG_CLK_IMX6Q) += clk-imx6q.o
40+
obj-$(CONFIG_CLK_IMX6SL) += clk-imx6sl.o
41+
obj-$(CONFIG_CLK_IMX6SLL) += clk-imx6sll.o
42+
obj-$(CONFIG_CLK_IMX6SX) += clk-imx6sx.o
43+
obj-$(CONFIG_CLK_IMX6UL) += clk-imx6ul.o
44+
obj-$(CONFIG_CLK_IMX7D) += clk-imx7d.o
45+
obj-$(CONFIG_CLK_IMX7ULP) += clk-imx7ulp.o
46+
obj-$(CONFIG_CLK_VF610) += clk-vf610.o

‎drivers/clk/imx/clk-busy.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright 2012 Linaro Ltd.
55
*/
66

7+
#include <linux/bits.h>
78
#include <linux/clk.h>
89
#include <linux/clk-provider.h>
910
#include <linux/io.h>

‎drivers/clk/imx/clk-composite-7ulp.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*
66
*/
77

8+
#include <linux/bits.h>
89
#include <linux/clk-provider.h>
910
#include <linux/err.h>
1011
#include <linux/slab.h>

‎drivers/clk/imx/clk-composite-8m.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <linux/clk-provider.h>
77
#include <linux/errno.h>
8+
#include <linux/export.h>
89
#include <linux/io.h>
910
#include <linux/slab.h>
1011

@@ -215,6 +216,7 @@ struct clk_hw *imx8m_clk_hw_composite_flags(const char *name,
215216
div->width = PCG_PREDIV_WIDTH;
216217
divider_ops = &imx8m_clk_composite_divider_ops;
217218
mux_ops = &clk_mux_ops;
219+
flags |= CLK_SET_PARENT_GATE;
218220
}
219221

220222
div->lock = &imx_ccm_lock;
@@ -243,3 +245,4 @@ struct clk_hw *imx8m_clk_hw_composite_flags(const char *name,
243245
kfree(mux);
244246
return ERR_CAST(hw);
245247
}
248+
EXPORT_SYMBOL_GPL(imx8m_clk_hw_composite_flags);

‎drivers/clk/imx/clk-cpu.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <linux/clk.h>
77
#include <linux/clk-provider.h>
8+
#include <linux/export.h>
89
#include <linux/slab.h>
910
#include "clk.h"
1011

@@ -104,3 +105,4 @@ struct clk_hw *imx_clk_hw_cpu(const char *name, const char *parent_name,
104105

105106
return hw;
106107
}
108+
EXPORT_SYMBOL_GPL(imx_clk_hw_cpu);

‎drivers/clk/imx/clk-fixup-mux.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright (C) 2013 Freescale Semiconductor, Inc.
44
*/
55

6+
#include <linux/bits.h>
67
#include <linux/clk-provider.h>
78
#include <linux/err.h>
89
#include <linux/io.h>

‎drivers/clk/imx/clk-frac-pll.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <linux/clk-provider.h>
1212
#include <linux/err.h>
13+
#include <linux/export.h>
1314
#include <linux/io.h>
1415
#include <linux/iopoll.h>
1516
#include <linux/slab.h>
@@ -233,3 +234,4 @@ struct clk_hw *imx_clk_hw_frac_pll(const char *name,
233234

234235
return hw;
235236
}
237+
EXPORT_SYMBOL_GPL(imx_clk_hw_frac_pll);

‎drivers/clk/imx/clk-gate2.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
#include <linux/clk-provider.h>
10+
#include <linux/export.h>
1011
#include <linux/module.h>
1112
#include <linux/slab.h>
1213
#include <linux/io.h>
@@ -15,7 +16,7 @@
1516
#include "clk.h"
1617

1718
/**
18-
* DOC: basic gatable clock which can gate and ungate it's ouput
19+
* DOC: basic gateable clock which can gate and ungate its output
1920
*
2021
* Traits of this clock:
2122
* prepare - clk_(un)prepare only ensures parent is (un)prepared
@@ -177,3 +178,4 @@ struct clk_hw *clk_hw_register_gate2(struct device *dev, const char *name,
177178

178179
return hw;
179180
}
181+
EXPORT_SYMBOL_GPL(clk_hw_register_gate2);

0 commit comments

Comments
 (0)