Skip to content

Commit feb69ea

Browse files
committed
Merge tag 'reset-for-v6.8' of git://git.pengutronix.de/pza/linux into soc/drivers
Reset controller updates for v6.8 Make use of devm_platform_get_and_ioremap_resource() and device_get_match_data() in several drivers, support the Amlogic C3 reset controller, and improve various device tree binding documents. * tag 'reset-for-v6.8' of git://git.pengutronix.de/pza/linux: dt-bindings: reset: hisilicon,hi3660-reset: Drop providers and consumers from example dt-bindings: reset: imx-src: Simplify compatible schema and drop unneeded quotes dt-bindings: reset: qcom: drop unneeded quotes dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/Five SoC reset: Use device_get_match_data() reset: reset-meson: add support for Amlogic C3 SoC Reset Controller dt-bindings: reset: Add compatible and DT bindings for Amlogic C3 Reset Controller reset: uniphier-glue: Use devm_platform_get_and_ioremap_resource() reset: sunplus: Use devm_platform_get_and_ioremap_resource() reset: simple: Convert to devm_platform_get_and_ioremap_resource() reset: qcom: Convert to devm_platform_ioremap_resource() reset: qcom-aoss: Convert to devm_platform_ioremap_resource() reset: meson-audio-arb: Convert to devm_platform_ioremap_resource() reset: brcmstb: Use devm_platform_get_and_ioremap_resource() Link: https://lore.kernel.org/r/20231213153313.278867-1-p.zabel@pengutronix.de Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 740f4bd + c3c46ac commit feb69ea

17 files changed

Lines changed: 157 additions & 80 deletions

Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ properties:
1818
- amlogic,meson-axg-reset # Reset Controller on AXG and compatible SoCs
1919
- amlogic,meson-a1-reset # Reset Controller on A1 and compatible SoCs
2020
- amlogic,meson-s4-reset # Reset Controller on S4 and compatible SoCs
21+
- amlogic,c3-reset # Reset Controller on C3 and compatible SoCs
2122

2223
reg:
2324
maxItems: 1

Documentation/devicetree/bindings/reset/fsl,imx-src.yaml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,17 @@ description: |
2828
properties:
2929
compatible:
3030
oneOf:
31-
- const: "fsl,imx51-src"
31+
- const: fsl,imx51-src
3232
- items:
33-
- const: "fsl,imx50-src"
34-
- const: "fsl,imx51-src"
35-
- items:
36-
- const: "fsl,imx53-src"
37-
- const: "fsl,imx51-src"
38-
- items:
39-
- const: "fsl,imx6q-src"
40-
- const: "fsl,imx51-src"
41-
- items:
42-
- const: "fsl,imx6sx-src"
43-
- const: "fsl,imx51-src"
44-
- items:
45-
- const: "fsl,imx6sl-src"
46-
- const: "fsl,imx51-src"
47-
- items:
48-
- const: "fsl,imx6ul-src"
49-
- const: "fsl,imx51-src"
50-
- items:
51-
- const: "fsl,imx6sll-src"
52-
- const: "fsl,imx51-src"
33+
- enum:
34+
- fsl,imx50-src
35+
- fsl,imx53-src
36+
- fsl,imx6q-src
37+
- fsl,imx6sx-src
38+
- fsl,imx6sl-src
39+
- fsl,imx6ul-src
40+
- fsl,imx6sll-src
41+
- const: fsl,imx51-src
5342

5443
reg:
5544
maxItems: 1

Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -50,32 +50,9 @@ additionalProperties: false
5050

5151
examples:
5252
- |
53-
#include <dt-bindings/interrupt-controller/irq.h>
54-
#include <dt-bindings/interrupt-controller/arm-gic.h>
55-
#include <dt-bindings/clock/hi3660-clock.h>
56-
57-
iomcu: iomcu@ffd7e000 {
58-
compatible = "hisilicon,hi3660-iomcu", "syscon";
59-
reg = <0xffd7e000 0x1000>;
60-
};
61-
62-
iomcu_rst: iomcu_rst_controller {
53+
iomcu_rst_controller {
6354
compatible = "hisilicon,hi3660-reset";
6455
hisilicon,rst-syscon = <&iomcu>;
6556
#reset-cells = <2>;
6657
};
67-
68-
/* Specifying reset lines connected to IP modules */
69-
i2c@ffd71000 {
70-
compatible = "snps,designware-i2c";
71-
reg = <0xffd71000 0x1000>;
72-
interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
73-
#address-cells = <1>;
74-
#size-cells = <0>;
75-
clock-frequency = <400000>;
76-
clocks = <&crg_ctrl HI3660_CLK_GATE_I2C0>;
77-
resets = <&iomcu_rst 0x20 3>;
78-
pinctrl-names = "default";
79-
pinctrl-0 = <&i2c0_pmx_func &i2c0_cfg_func>;
80-
};
8158
...

Documentation/devicetree/bindings/reset/qcom,aoss-reset.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ properties:
1818
oneOf:
1919
- description: on SC7180 SoCs the following compatibles must be specified
2020
items:
21-
- const: "qcom,sc7180-aoss-cc"
22-
- const: "qcom,sdm845-aoss-cc"
21+
- const: qcom,sc7180-aoss-cc
22+
- const: qcom,sdm845-aoss-cc
2323

2424
- description: on SC7280 SoCs the following compatibles must be specified
2525
items:
26-
- const: "qcom,sc7280-aoss-cc"
27-
- const: "qcom,sdm845-aoss-cc"
26+
- const: qcom,sc7280-aoss-cc
27+
- const: qcom,sdm845-aoss-cc
2828

2929
- description: on SDM845 SoCs the following compatibles must be specified
3030
items:
31-
- const: "qcom,sdm845-aoss-cc"
31+
- const: qcom,sdm845-aoss-cc
3232

3333
reg:
3434
maxItems: 1

Documentation/devicetree/bindings/reset/qcom,pdc-global.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ properties:
1818
oneOf:
1919
- description: on SC7180 SoCs the following compatibles must be specified
2020
items:
21-
- const: "qcom,sc7180-pdc-global"
22-
- const: "qcom,sdm845-pdc-global"
21+
- const: qcom,sc7180-pdc-global
22+
- const: qcom,sdm845-pdc-global
2323

2424
- description: on SC7280 SoCs the following compatibles must be specified
2525
items:
26-
- const: "qcom,sc7280-pdc-global"
26+
- const: qcom,sc7280-pdc-global
2727

2828
- description: on SDM845 SoCs the following compatibles must be specified
2929
items:
30-
- const: "qcom,sdm845-pdc-global"
30+
- const: qcom,sdm845-pdc-global
3131

3232
reg:
3333
maxItems: 1

Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ properties:
1717
compatible:
1818
items:
1919
- enum:
20-
- renesas,r9a07g043-usbphy-ctrl # RZ/G2UL
20+
- renesas,r9a07g043-usbphy-ctrl # RZ/G2UL and RZ/Five
2121
- renesas,r9a07g044-usbphy-ctrl # RZ/G2{L,LC}
2222
- renesas,r9a07g054-usbphy-ctrl # RZ/V2L
2323
- const: renesas,rzg2l-usbphy-ctrl

drivers/reset/reset-brcmstb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ static int brcmstb_reset_probe(struct platform_device *pdev)
9090
if (!priv)
9191
return -ENOMEM;
9292

93-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
94-
priv->base = devm_ioremap_resource(kdev, res);
93+
priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
9594
if (IS_ERR(priv->base))
9695
return PTR_ERR(priv->base);
9796

drivers/reset/reset-meson-audio-arb.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ static int meson_audio_arb_probe(struct platform_device *pdev)
139139
struct device *dev = &pdev->dev;
140140
const struct meson_audio_arb_match_data *data;
141141
struct meson_audio_arb_data *arb;
142-
struct resource *res;
143142
int ret;
144143

145144
data = of_device_get_match_data(dev);
@@ -155,8 +154,7 @@ static int meson_audio_arb_probe(struct platform_device *pdev)
155154
if (IS_ERR(arb->clk))
156155
return dev_err_probe(dev, PTR_ERR(arb->clk), "failed to get clock\n");
157156

158-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
159-
arb->regs = devm_ioremap_resource(dev, res);
157+
arb->regs = devm_platform_ioremap_resource(pdev, 0);
160158
if (IS_ERR(arb->regs))
161159
return PTR_ERR(arb->regs);
162160

drivers/reset/reset-meson.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ static const struct of_device_id meson_reset_dt_ids[] = {
108108
{ .compatible = "amlogic,meson-axg-reset", .data = &meson8b_param},
109109
{ .compatible = "amlogic,meson-a1-reset", .data = &meson_a1_param},
110110
{ .compatible = "amlogic,meson-s4-reset", .data = &meson_s4_param},
111+
{ .compatible = "amlogic,c3-reset", .data = &meson_s4_param},
111112
{ /* sentinel */ },
112113
};
113114
MODULE_DEVICE_TABLE(of, meson_reset_dt_ids);

drivers/reset/reset-npcm.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include <linux/io.h>
77
#include <linux/init.h>
88
#include <linux/of.h>
9-
#include <linux/of_device.h>
109
#include <linux/platform_device.h>
10+
#include <linux/property.h>
1111
#include <linux/reboot.h>
1212
#include <linux/reset-controller.h>
1313
#include <linux/spinlock.h>
@@ -351,8 +351,7 @@ static int npcm_usb_reset(struct platform_device *pdev, struct npcm_rc_data *rc)
351351
}
352352
}
353353

354-
rc->info = (const struct npcm_reset_info *)
355-
of_match_device(dev->driver->of_match_table, dev)->data;
354+
rc->info = device_get_match_data(dev);
356355
switch (rc->info->bmc_id) {
357356
case BMC_NPCM7XX:
358357
npcm_usb_reset_npcm7xx(rc);

0 commit comments

Comments
 (0)