Skip to content

Commit 4f1e19b

Browse files
committed
Merge tag 'sunxi-clk-for-5.17-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner
Pull Allwinner clk driver updates from Maxime Ripard: Our usual PR for the Allwinner SoCs, this time enabling our sub-framework to be built as a module, converting most drivers to platform drivers and allow them to be built as modules, and support for the Allwinner D1 * tag 'sunxi-clk-for-5.17-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: Add support for the D1 SoC clocks clk: sunxi-ng: gate: Add macros for gates with fixed dividers clk: sunxi-ng: mux: Add macros using clk_parent_data and clk_hw clk: sunxi-ng: mp: Add macros using clk_parent_data and clk_hw clk: sunxi-ng: div: Add macros using clk_parent_data and clk_hw dt-bindings: clk: Add compatibles for D1 CCUs clk: sunxi-ng: Allow the CCU core to be built as a module clk: sunxi-ng: Convert early providers to platform drivers clk: sunxi-ng: Allow drivers to be built as modules clk: sunxi-ng: Export symbols used by CCU drivers
2 parents fa55b7d + 35b97bb commit 4f1e19b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2530
-253
lines changed

Documentation/devicetree/bindings/clock/allwinner,sun4i-a10-ccu.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ properties:
3434
- allwinner,sun8i-v3-ccu
3535
- allwinner,sun8i-v3s-ccu
3636
- allwinner,sun9i-a80-ccu
37+
- allwinner,sun20i-d1-ccu
38+
- allwinner,sun20i-d1-r-ccu
3739
- allwinner,sun50i-a64-ccu
3840
- allwinner,sun50i-a64-r-ccu
3941
- allwinner,sun50i-a100-ccu
@@ -79,6 +81,7 @@ if:
7981
enum:
8082
- allwinner,sun8i-a83t-r-ccu
8183
- allwinner,sun8i-h3-r-ccu
84+
- allwinner,sun20i-d1-r-ccu
8285
- allwinner,sun50i-a64-r-ccu
8386
- allwinner,sun50i-a100-r-ccu
8487
- allwinner,sun50i-h6-r-ccu
@@ -99,6 +102,7 @@ else:
99102
properties:
100103
compatible:
101104
enum:
105+
- allwinner,sun20i-d1-ccu
102106
- allwinner,sun50i-a100-ccu
103107
- allwinner,sun50i-h6-ccu
104108
- allwinner,sun50i-h616-ccu

drivers/clk/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ obj-$(CONFIG_PLAT_SPEAR) += spear/
110110
obj-y += sprd/
111111
obj-$(CONFIG_ARCH_STI) += st/
112112
obj-$(CONFIG_ARCH_SUNXI) += sunxi/
113-
obj-$(CONFIG_SUNXI_CCU) += sunxi-ng/
113+
obj-y += sunxi-ng/
114114
obj-$(CONFIG_ARCH_TEGRA) += tegra/
115115
obj-y += ti/
116116
obj-$(CONFIG_CLK_UNIPHIER) += uniphier/

drivers/clk/sunxi-ng/Kconfig

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,59 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
config SUNXI_CCU
3-
bool "Clock support for Allwinner SoCs"
3+
tristate "Clock support for Allwinner SoCs"
44
depends on ARCH_SUNXI || COMPILE_TEST
55
select RESET_CONTROLLER
66
default ARCH_SUNXI
77

88
if SUNXI_CCU
99

1010
config SUNIV_F1C100S_CCU
11-
bool "Support for the Allwinner newer F1C100s CCU"
11+
tristate "Support for the Allwinner newer F1C100s CCU"
1212
default MACH_SUNIV
1313
depends on MACH_SUNIV || COMPILE_TEST
1414

15+
config SUN20I_D1_CCU
16+
tristate "Support for the Allwinner D1 CCU"
17+
default RISCV && ARCH_SUNXI
18+
depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST
19+
20+
config SUN20I_D1_R_CCU
21+
tristate "Support for the Allwinner D1 PRCM CCU"
22+
default RISCV && ARCH_SUNXI
23+
depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST
24+
1525
config SUN50I_A64_CCU
16-
bool "Support for the Allwinner A64 CCU"
26+
tristate "Support for the Allwinner A64 CCU"
1727
default ARM64 && ARCH_SUNXI
1828
depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST
1929

2030
config SUN50I_A100_CCU
21-
bool "Support for the Allwinner A100 CCU"
31+
tristate "Support for the Allwinner A100 CCU"
2232
default ARM64 && ARCH_SUNXI
2333
depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST
2434

2535
config SUN50I_A100_R_CCU
26-
bool "Support for the Allwinner A100 PRCM CCU"
36+
tristate "Support for the Allwinner A100 PRCM CCU"
2737
default ARM64 && ARCH_SUNXI
2838
depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST
2939

3040
config SUN50I_H6_CCU
31-
bool "Support for the Allwinner H6 CCU"
41+
tristate "Support for the Allwinner H6 CCU"
3242
default ARM64 && ARCH_SUNXI
3343
depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST
3444

3545
config SUN50I_H616_CCU
36-
bool "Support for the Allwinner H616 CCU"
46+
tristate "Support for the Allwinner H616 CCU"
3747
default ARM64 && ARCH_SUNXI
3848
depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST
3949

4050
config SUN50I_H6_R_CCU
41-
bool "Support for the Allwinner H6 and H616 PRCM CCU"
51+
tristate "Support for the Allwinner H6 and H616 PRCM CCU"
4252
default ARM64 && ARCH_SUNXI
4353
depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST
4454

4555
config SUN4I_A10_CCU
46-
bool "Support for the Allwinner A10/A20 CCU"
56+
tristate "Support for the Allwinner A10/A20 CCU"
4757
default MACH_SUN4I
4858
default MACH_SUN7I
4959
depends on MACH_SUN4I || MACH_SUN7I || COMPILE_TEST
@@ -52,53 +62,54 @@ config SUN5I_CCU
5262
bool "Support for the Allwinner sun5i family CCM"
5363
default MACH_SUN5I
5464
depends on MACH_SUN5I || COMPILE_TEST
65+
depends on SUNXI_CCU=y
5566

5667
config SUN6I_A31_CCU
57-
bool "Support for the Allwinner A31/A31s CCU"
68+
tristate "Support for the Allwinner A31/A31s CCU"
5869
default MACH_SUN6I
5970
depends on MACH_SUN6I || COMPILE_TEST
6071

6172
config SUN8I_A23_CCU
62-
bool "Support for the Allwinner A23 CCU"
73+
tristate "Support for the Allwinner A23 CCU"
6374
default MACH_SUN8I
6475
depends on MACH_SUN8I || COMPILE_TEST
6576

6677
config SUN8I_A33_CCU
67-
bool "Support for the Allwinner A33 CCU"
78+
tristate "Support for the Allwinner A33 CCU"
6879
default MACH_SUN8I
6980
depends on MACH_SUN8I || COMPILE_TEST
7081

7182
config SUN8I_A83T_CCU
72-
bool "Support for the Allwinner A83T CCU"
83+
tristate "Support for the Allwinner A83T CCU"
7384
default MACH_SUN8I
7485
depends on MACH_SUN8I || COMPILE_TEST
7586

7687
config SUN8I_H3_CCU
77-
bool "Support for the Allwinner H3 CCU"
88+
tristate "Support for the Allwinner H3 CCU"
7889
default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
7990
depends on MACH_SUN8I || (ARM64 && ARCH_SUNXI) || COMPILE_TEST
8091

8192
config SUN8I_V3S_CCU
82-
bool "Support for the Allwinner V3s CCU"
93+
tristate "Support for the Allwinner V3s CCU"
8394
default MACH_SUN8I
8495
depends on MACH_SUN8I || COMPILE_TEST
8596

8697
config SUN8I_DE2_CCU
87-
bool "Support for the Allwinner SoCs DE2 CCU"
98+
tristate "Support for the Allwinner SoCs DE2 CCU"
8899
default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
89100

90101
config SUN8I_R40_CCU
91-
bool "Support for the Allwinner R40 CCU"
102+
tristate "Support for the Allwinner R40 CCU"
92103
default MACH_SUN8I
93104
depends on MACH_SUN8I || COMPILE_TEST
94105

95106
config SUN9I_A80_CCU
96-
bool "Support for the Allwinner A80 CCU"
107+
tristate "Support for the Allwinner A80 CCU"
97108
default MACH_SUN9I
98109
depends on MACH_SUN9I || COMPILE_TEST
99110

100111
config SUN8I_R_CCU
101-
bool "Support for Allwinner SoCs' PRCM CCUs"
112+
tristate "Support for Allwinner SoCs' PRCM CCUs"
102113
default MACH_SUN8I || (ARCH_SUNXI && ARM64)
103114

104115
endif

drivers/clk/sunxi-ng/Makefile

Lines changed: 65 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,73 @@
11
# SPDX-License-Identifier: GPL-2.0
2+
3+
obj-$(CONFIG_SUNXI_CCU) += sunxi-ccu.o
4+
25
# Common objects
3-
obj-y += ccu_common.o
4-
obj-y += ccu_mmc_timing.o
5-
obj-y += ccu_reset.o
6+
sunxi-ccu-y += ccu_common.o
7+
sunxi-ccu-y += ccu_mmc_timing.o
8+
sunxi-ccu-y += ccu_reset.o
69

710
# Base clock types
8-
obj-y += ccu_div.o
9-
obj-y += ccu_frac.o
10-
obj-y += ccu_gate.o
11-
obj-y += ccu_mux.o
12-
obj-y += ccu_mult.o
13-
obj-y += ccu_phase.o
14-
obj-y += ccu_sdm.o
11+
sunxi-ccu-y += ccu_div.o
12+
sunxi-ccu-y += ccu_frac.o
13+
sunxi-ccu-y += ccu_gate.o
14+
sunxi-ccu-y += ccu_mux.o
15+
sunxi-ccu-y += ccu_mult.o
16+
sunxi-ccu-y += ccu_phase.o
17+
sunxi-ccu-y += ccu_sdm.o
1518

1619
# Multi-factor clocks
17-
obj-y += ccu_nk.o
18-
obj-y += ccu_nkm.o
19-
obj-y += ccu_nkmp.o
20-
obj-y += ccu_nm.o
21-
obj-y += ccu_mp.o
20+
sunxi-ccu-y += ccu_nk.o
21+
sunxi-ccu-y += ccu_nkm.o
22+
sunxi-ccu-y += ccu_nkmp.o
23+
sunxi-ccu-y += ccu_nm.o
24+
sunxi-ccu-y += ccu_mp.o
2225

2326
# SoC support
24-
obj-$(CONFIG_SUNIV_F1C100S_CCU) += ccu-suniv-f1c100s.o
25-
obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o
26-
obj-$(CONFIG_SUN50I_A100_CCU) += ccu-sun50i-a100.o
27-
obj-$(CONFIG_SUN50I_A100_R_CCU) += ccu-sun50i-a100-r.o
28-
obj-$(CONFIG_SUN50I_H6_CCU) += ccu-sun50i-h6.o
29-
obj-$(CONFIG_SUN50I_H616_CCU) += ccu-sun50i-h616.o
30-
obj-$(CONFIG_SUN50I_H6_R_CCU) += ccu-sun50i-h6-r.o
31-
obj-$(CONFIG_SUN4I_A10_CCU) += ccu-sun4i-a10.o
32-
obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o
33-
obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o
34-
obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o
35-
obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o
36-
obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o
37-
obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o
38-
obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o
39-
obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o
40-
obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o
41-
obj-$(CONFIG_SUN8I_R40_CCU) += ccu-sun8i-r40.o
42-
obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o
43-
obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o
44-
obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o
27+
obj-$(CONFIG_SUNIV_F1C100S_CCU) += suniv-f1c100s-ccu.o
28+
obj-$(CONFIG_SUN20I_D1_CCU) += sun20i-d1-ccu.o
29+
obj-$(CONFIG_SUN20I_D1_R_CCU) += sun20i-d1-r-ccu.o
30+
obj-$(CONFIG_SUN50I_A64_CCU) += sun50i-a64-ccu.o
31+
obj-$(CONFIG_SUN50I_A100_CCU) += sun50i-a100-ccu.o
32+
obj-$(CONFIG_SUN50I_A100_R_CCU) += sun50i-a100-r-ccu.o
33+
obj-$(CONFIG_SUN50I_H6_CCU) += sun50i-h6-ccu.o
34+
obj-$(CONFIG_SUN50I_H6_R_CCU) += sun50i-h6-r-ccu.o
35+
obj-$(CONFIG_SUN50I_H616_CCU) += sun50i-h616-ccu.o
36+
obj-$(CONFIG_SUN4I_A10_CCU) += sun4i-a10-ccu.o
37+
obj-$(CONFIG_SUN5I_CCU) += sun5i-ccu.o
38+
obj-$(CONFIG_SUN6I_A31_CCU) += sun6i-a31-ccu.o
39+
obj-$(CONFIG_SUN8I_A23_CCU) += sun8i-a23-ccu.o
40+
obj-$(CONFIG_SUN8I_A33_CCU) += sun8i-a33-ccu.o
41+
obj-$(CONFIG_SUN8I_A83T_CCU) += sun8i-a83t-ccu.o
42+
obj-$(CONFIG_SUN8I_H3_CCU) += sun8i-h3-ccu.o
43+
obj-$(CONFIG_SUN8I_R40_CCU) += sun8i-r40-ccu.o
44+
obj-$(CONFIG_SUN8I_V3S_CCU) += sun8i-v3s-ccu.o
45+
obj-$(CONFIG_SUN8I_DE2_CCU) += sun8i-de2-ccu.o
46+
obj-$(CONFIG_SUN8I_R_CCU) += sun8i-r-ccu.o
47+
obj-$(CONFIG_SUN9I_A80_CCU) += sun9i-a80-ccu.o
48+
obj-$(CONFIG_SUN9I_A80_CCU) += sun9i-a80-de-ccu.o
49+
obj-$(CONFIG_SUN9I_A80_CCU) += sun9i-a80-usb-ccu.o
50+
51+
suniv-f1c100s-ccu-y += ccu-suniv-f1c100s.o
52+
sun20i-d1-ccu-y += ccu-sun20i-d1.o
53+
sun20i-d1-r-ccu-y += ccu-sun20i-d1-r.o
54+
sun50i-a64-ccu-y += ccu-sun50i-a64.o
55+
sun50i-a100-ccu-y += ccu-sun50i-a100.o
56+
sun50i-a100-r-ccu-y += ccu-sun50i-a100-r.o
57+
sun50i-h6-ccu-y += ccu-sun50i-h6.o
58+
sun50i-h6-r-ccu-y += ccu-sun50i-h6-r.o
59+
sun50i-h616-ccu-y += ccu-sun50i-h616.o
60+
sun4i-a10-ccu-y += ccu-sun4i-a10.o
61+
sun5i-ccu-y += ccu-sun5i.o
62+
sun6i-a31-ccu-y += ccu-sun6i-a31.o
63+
sun8i-a23-ccu-y += ccu-sun8i-a23.o
64+
sun8i-a33-ccu-y += ccu-sun8i-a33.o
65+
sun8i-a83t-ccu-y += ccu-sun8i-a83t.o
66+
sun8i-h3-ccu-y += ccu-sun8i-h3.o
67+
sun8i-r40-ccu-y += ccu-sun8i-r40.o
68+
sun8i-v3s-ccu-y += ccu-sun8i-v3s.o
69+
sun8i-de2-ccu-y += ccu-sun8i-de2.o
70+
sun8i-r-ccu-y += ccu-sun8i-r.o
71+
sun9i-a80-ccu-y += ccu-sun9i-a80.o
72+
sun9i-a80-de-ccu-y += ccu-sun9i-a80-de.o
73+
sun9i-a80-usb-ccu-y += ccu-sun9i-a80-usb.o

0 commit comments

Comments
 (0)