Skip to content

Commit b9a4050

Browse files
committed
Merge branches 'clk-imx', 'clk-microchip', 'clk-cleanup', 'clk-bindings', 'clk-ti' and 'clk-kasprintf' into clk-next
- Handle allocation failures from kasprintf() and friends * clk-imx: clk: imx: clk-imx8mp: improve error handling in imx8mp_clocks_probe() clk: imx93: fix memory leak and missing unwind goto in imx93_clocks_probe clk: imx: clk-imx8mn: fix memory leak in imx8mn_clocks_probe dt-bindings: clock: imx8m: Add missing interrupt property clk: imx: clk-imxrt1050: fix memory leak in imxrt1050_clocks_probe clk: imx: composite-8m: Add imx8m_divider_determine_rate clk: imx: scu: use _safe list iterator to avoid a use after free clk: imx: drop imx_unregister_clocks clk: imx6ul: retain early UART clocks during kernel init clk: imx: imx6sx: Remove CLK_SET_RATE_PARENT from the LDB clocks * clk-microchip: dt-bindings: clocks: at91sam9x5-sckc: convert to yaml dt-bindings: clocks: atmel,at91rm9200-pmc: convert to yaml clk: microchip: Use of_property_read_bool() for boolean properties clk: microchip: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE * clk-cleanup: clk: fix typo in clk_hw_register_fixed_rate_parent_data() macro clk: Fix memory leak in devm_clk_notifier_register() clk: mvebu: Iterate over possible CPUs instead of DT CPU nodes clk: mvebu: Use of_get_cpu_hwid() to read CPU ID MAINTAINERS: Add Marvell mvebu clock drivers clk: mvebu: Use of_address_to_resource() clk: tegra: tegra124-emc: Fix potential memory leak clk: clocking-wizard: Fix Oops in clk_wzrd_register_divider() clk: bcm: rpi: Fix off by one in raspberrypi_discover_clocks() clk: sifive: Use devm_platform_ioremap_resource() * clk-bindings: dt-bindings: clock: drop unneeded quotes and use absolute /schemas path dt-bindings: rcc: stm32: Sync with u-boot copy for STM32MP13 SoC * clk-ti: clk: keystone: syscon-clk: Add support for audio refclk dt-bindings: clock: Add binding documentation for TI Audio REFCLK dt-bindings: clock: ehrpwm: Remove unneeded syscon compatible clk: keystone: syscon-clk: Allow the clock node to not be of type syscon * clk-kasprintf: clk: clocking-wizard: check return value of devm_kasprintf() clk: ti: clkctrl: check return value of kasprintf() clk: keystone: sci-clk: check return value of kasprintf() clk: si5341: free unused memory on probe failure clk: si5341: check return value of {devm_}kasprintf() clk: si5341: return error if one synth clock registration fails clk: cdce925: check return value of kasprintf() clk: vc5: check memory returned by kasprintf()
7 parents 6e11940 + 989e465 + 3973bcc + ebf5157 + f562514 + 6acab96 + b1356ed commit b9a4050

38 files changed

+505
-169
lines changed

Documentation/devicetree/bindings/clock/at91-clock.txt

Lines changed: 0 additions & 58 deletions
This file was deleted.
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/atmel,at91rm9200-pmc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Atmel Power Management Controller (PMC)
8+
9+
maintainers:
10+
- Claudiu Beznea <[email protected]>
11+
12+
description:
13+
The power management controller optimizes power consumption by controlling all
14+
system and user peripheral clocks. The PMC enables/disables the clock inputs
15+
to many of the peripherals and to the processor.
16+
17+
properties:
18+
compatible:
19+
oneOf:
20+
- items:
21+
- const: atmel,at91sam9g20-pmc
22+
- const: atmel,at91sam9260-pmc
23+
- const: syscon
24+
- items:
25+
- enum:
26+
- atmel,at91sam9g15-pmc
27+
- atmel,at91sam9g25-pmc
28+
- atmel,at91sam9g35-pmc
29+
- atmel,at91sam9x25-pmc
30+
- atmel,at91sam9x35-pmc
31+
- const: atmel,at91sam9x5-pmc
32+
- const: syscon
33+
- items:
34+
- enum:
35+
- atmel,at91rm9200-pmc
36+
- atmel,at91sam9260-pmc
37+
- atmel,at91sam9g45-pmc
38+
- atmel,at91sam9n12-pmc
39+
- atmel,at91sam9rl-pmc
40+
- atmel,at91sam9x5-pmc
41+
- atmel,sama5d2-pmc
42+
- atmel,sama5d3-pmc
43+
- atmel,sama5d4-pmc
44+
- microchip,sam9x60-pmc
45+
- microchip,sama7g5-pmc
46+
- const: syscon
47+
48+
reg:
49+
maxItems: 1
50+
51+
interrupts:
52+
maxItems: 1
53+
54+
"#clock-cells":
55+
description: |
56+
- 1st cell is the clock type, one of PMC_TYPE_CORE, PMC_TYPE_SYSTEM,
57+
PMC_TYPE_PERIPHERAL, PMC_TYPE_GCK, PMC_TYPE_PROGRAMMABLE (as defined
58+
in <dt-bindings/clock/at91.h>)
59+
- 2nd cell is the clock identifier as defined in <dt-bindings/clock/at91.h
60+
(for core clocks) or as defined in datasheet (for system, peripheral,
61+
gck and programmable clocks).
62+
const: 2
63+
64+
clocks:
65+
minItems: 2
66+
maxItems: 3
67+
68+
clock-names:
69+
minItems: 2
70+
maxItems: 3
71+
72+
atmel,osc-bypass:
73+
description: set when a clock signal is directly provided on XIN
74+
type: boolean
75+
76+
required:
77+
- compatible
78+
- reg
79+
- interrupts
80+
- "#clock-cells"
81+
- clocks
82+
- clock-names
83+
84+
allOf:
85+
- if:
86+
properties:
87+
compatible:
88+
contains:
89+
enum:
90+
- microchip,sam9x60-pmc
91+
- microchip,sama7g5-pmc
92+
then:
93+
properties:
94+
clocks:
95+
minItems: 3
96+
maxItems: 3
97+
clock-names:
98+
items:
99+
- const: td_slck
100+
- const: md_slck
101+
- const: main_xtal
102+
103+
- if:
104+
properties:
105+
compatible:
106+
contains:
107+
enum:
108+
- atmel,at91rm9200-pmc
109+
- atmel,at91sam9260-pmc
110+
- atmel,at91sam9g20-pmc
111+
then:
112+
properties:
113+
clocks:
114+
minItems: 2
115+
maxItems: 2
116+
clock-names:
117+
items:
118+
- const: slow_xtal
119+
- const: main_xtal
120+
121+
- if:
122+
properties:
123+
compatible:
124+
contains:
125+
enum:
126+
- atmel,sama5d2-pmc
127+
- atmel,sama5d3-pmc
128+
- atmel,sama5d4-pmc
129+
then:
130+
properties:
131+
clocks:
132+
minItems: 2
133+
maxItems: 2
134+
clock-names:
135+
items:
136+
- const: slow_clk
137+
- const: main_xtal
138+
139+
additionalProperties: false
140+
141+
examples:
142+
- |
143+
#include <dt-bindings/interrupt-controller/irq.h>
144+
145+
pmc: clock-controller@f0018000 {
146+
compatible = "atmel,sama5d4-pmc", "syscon";
147+
reg = <0xf0018000 0x120>;
148+
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
149+
#clock-cells = <2>;
150+
clocks = <&clk32k>, <&main_xtal>;
151+
clock-names = "slow_clk", "main_xtal";
152+
};
153+
154+
...
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/atmel,at91sam9x5-sckc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Atmel Slow Clock Controller (SCKC)
8+
9+
maintainers:
10+
- Claudiu Beznea <[email protected]>
11+
12+
properties:
13+
compatible:
14+
oneOf:
15+
- enum:
16+
- atmel,at91sam9x5-sckc
17+
- atmel,sama5d3-sckc
18+
- atmel,sama5d4-sckc
19+
- microchip,sam9x60-sckc
20+
- items:
21+
- const: microchip,sama7g5-sckc
22+
- const: microchip,sam9x60-sckc
23+
24+
reg:
25+
maxItems: 1
26+
27+
clocks:
28+
maxItems: 1
29+
30+
"#clock-cells":
31+
enum: [0, 1]
32+
33+
atmel,osc-bypass:
34+
type: boolean
35+
description: set when a clock signal is directly provided on XIN
36+
37+
required:
38+
- compatible
39+
- reg
40+
- clocks
41+
- "#clock-cells"
42+
43+
allOf:
44+
- if:
45+
properties:
46+
compatible:
47+
contains:
48+
enum:
49+
- microchip,sam9x60-sckc
50+
then:
51+
properties:
52+
"#clock-cells":
53+
const: 1
54+
else:
55+
properties:
56+
"#clock-cells":
57+
const: 0
58+
59+
additionalProperties: false
60+
61+
examples:
62+
- |
63+
clk32k: clock-controller@fffffe50 {
64+
compatible = "microchip,sam9x60-sckc";
65+
reg = <0xfffffe50 0x4>;
66+
clocks = <&slow_xtal>;
67+
#clock-cells = <1>;
68+
};
69+
70+
...

Documentation/devicetree/bindings/clock/imx8m-clock.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ properties:
2424
reg:
2525
maxItems: 1
2626

27+
interrupts:
28+
maxItems: 2
29+
2730
clocks:
2831
minItems: 6
2932
maxItems: 7

Documentation/devicetree/bindings/clock/ingenic,cgu.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ required:
9898

9999
patternProperties:
100100
"^usb-phy@[a-f0-9]+$":
101-
allOf: [ $ref: "../phy/ingenic,phy-usb.yaml#" ]
101+
$ref: /schemas/phy/ingenic,phy-usb.yaml#
102102
"^mac-phy-ctrl@[a-f0-9]+$":
103-
allOf: [ $ref: "../net/ingenic,mac.yaml#" ]
103+
$ref: /schemas/net/ingenic,mac.yaml#
104104

105105
additionalProperties: false
106106

Documentation/devicetree/bindings/clock/renesas,r9a06g032-sysctrl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ properties:
4848
patternProperties:
4949
"^dma-router@[a-f0-9]+$":
5050
type: object
51-
$ref: "../dma/renesas,rzn1-dmamux.yaml#"
51+
$ref: /schemas/dma/renesas,rzn1-dmamux.yaml#
5252

5353
required:
5454
- compatible
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/ti,am62-audio-refclk.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: TI Audio Reference Clock
8+
9+
maintainers:
10+
- Jai Luthra <[email protected]>
11+
12+
properties:
13+
compatible:
14+
items:
15+
- const: ti,am62-audio-refclk
16+
17+
reg:
18+
maxItems: 1
19+
20+
"#clock-cells":
21+
const: 0
22+
23+
clocks:
24+
maxItems: 1
25+
26+
required:
27+
- compatible
28+
- reg
29+
- "#clock-cells"
30+
- clocks
31+
32+
additionalProperties: false
33+
34+
examples:
35+
- |
36+
audio_refclk0: clock@82e0 {
37+
compatible = "ti,am62-audio-refclk";
38+
reg = <0x82e0 0x4>;
39+
clocks = <&k3_clks 157 0>;
40+
assigned-clocks = <&k3_clks 157 0>;
41+
assigned-clock-parents = <&k3_clks 157 8>;
42+
#clock-cells = <0>;
43+
};

Documentation/devicetree/bindings/clock/ti,am654-ehrpwm-tbclk.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ properties:
1616
- ti,am654-ehrpwm-tbclk
1717
- ti,am64-epwm-tbclk
1818
- ti,am62-epwm-tbclk
19-
- const: syscon
2019

2120
"#clock-cells":
2221
const: 1
@@ -33,8 +32,8 @@ additionalProperties: false
3332

3433
examples:
3534
- |
36-
ehrpwm_tbclk: syscon@4140 {
37-
compatible = "ti,am654-ehrpwm-tbclk", "syscon";
35+
ehrpwm_tbclk: clock@4140 {
36+
compatible = "ti,am654-ehrpwm-tbclk";
3837
reg = <0x4140 0x18>;
3938
#clock-cells = <1>;
4039
};

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2365,6 +2365,7 @@ F: arch/arm/configs/mvebu_*_defconfig
23652365
F: arch/arm/mach-mvebu/
23662366
F: arch/arm64/boot/dts/marvell/armada*
23672367
F: arch/arm64/boot/dts/marvell/cn913*
2368+
F: drivers/clk/mvebu/
23682369
F: drivers/cpufreq/armada-37xx-cpufreq.c
23692370
F: drivers/cpufreq/armada-8k-cpufreq.c
23702371
F: drivers/cpufreq/mvebu-cpufreq.c

drivers/clk/bcm/clk-raspberrypi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,9 @@ static int raspberrypi_discover_clocks(struct raspberrypi_clk *rpi,
356356
while (clks->id) {
357357
struct raspberrypi_clk_variant *variant;
358358

359-
if (clks->id > RPI_FIRMWARE_NUM_CLK_ID) {
359+
if (clks->id >= RPI_FIRMWARE_NUM_CLK_ID) {
360360
dev_err(rpi->dev, "Unknown clock id: %u (max: %u)\n",
361-
clks->id, RPI_FIRMWARE_NUM_CLK_ID);
361+
clks->id, RPI_FIRMWARE_NUM_CLK_ID - 1);
362362
return -EINVAL;
363363
}
364364

0 commit comments

Comments
 (0)