diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-08-12 12:08:42 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2023-08-12 12:08:43 +0200 |
commit | e6cedaa9025e4410b14a8496f430823ad46fd940 (patch) | |
tree | 459fed68419bc611b8a82aa8db22906a9c43a5ab /drivers | |
parent | 347cdfc86b0c6b869722d02ba2bde421099621c9 (diff) | |
parent | 417a3a5ae44a14b4eeb3df514b2c006b19771f82 (diff) | |
download | linux-stable-e6cedaa9025e4410b14a8496f430823ad46fd940.tar.gz linux-stable-e6cedaa9025e4410b14a8496f430823ad46fd940.tar.bz2 linux-stable-e6cedaa9025e4410b14a8496f430823ad46fd940.zip |
Merge tag 'reset-for-v6.6' of git://git.pengutronix.de/pza/linux into soc/drivers
Reset controller updates for v6.6
Clean up DT includes and remove unneeded platform_set_drvdata() calls
across reset drivers, add support for the Versal NET platform to the
zynqmp driver, and let the hisilicon driver use dev_err_probe().
* tag 'reset-for-v6.6' of git://git.pengutronix.de/pza/linux:
reset: ti: syscon: remove unneeded call to platform_set_drvdata()
reset: zynqmp: removed unneeded call to platform_set_drvdata()
reset: zynq: remove unneeded call to platfrom_set_drvdata()
reset: uniphier-glue: remove unneeded call to platform_set_drvdata()
reset: npcm: remove unneeded call to platform_set_drvdata()
reset: meson: remove unneeded call to platform_set_drvdata()
reset: lpc18xx: remove unneeded call to platform_set_drvdata()
reset: lantiq: remove unneeded call to platform_set_drvdata()
reset: bcm6345: remove unneeded call to platform_set_drvdata()
reset: ath79: remove unneeded call to platform_set_drvdata()
reset: hisilicon: Use dev_err_probe instead of dev_err
reset: reset-zynqmp: add support for Versal NET platform
dt-bindings: reset: Updated binding for Versal-NET reset driver
reset: Explicitly include correct DT includes
Link: https://lore.kernel.org/r/20230808145950.3057250-1-p.zabel@pengutronix.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/reset/hisilicon/hi6220_reset.c | 1 | ||||
-rw-r--r-- | drivers/reset/hisilicon/reset-hi3660.c | 6 | ||||
-rw-r--r-- | drivers/reset/reset-ath79.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-bcm6345.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-imx7.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-intel-gw.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-k210.c | 1 | ||||
-rw-r--r-- | drivers/reset/reset-lantiq.c | 1 | ||||
-rw-r--r-- | drivers/reset/reset-lpc18xx.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-meson-audio-arb.c | 3 | ||||
-rw-r--r-- | drivers/reset/reset-meson.c | 3 | ||||
-rw-r--r-- | drivers/reset/reset-microchip-sparx5.c | 3 | ||||
-rw-r--r-- | drivers/reset/reset-mpfs.c | 1 | ||||
-rw-r--r-- | drivers/reset/reset-npcm.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-qcom-aoss.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-qcom-pdc.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-simple.c | 1 | ||||
-rw-r--r-- | drivers/reset/reset-ti-syscon.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-uniphier-glue.c | 4 | ||||
-rw-r--r-- | drivers/reset/reset-uniphier.c | 1 | ||||
-rw-r--r-- | drivers/reset/reset-zynq.c | 1 | ||||
-rw-r--r-- | drivers/reset/reset-zynqmp.c | 10 |
22 files changed, 20 insertions, 34 deletions
diff --git a/drivers/reset/hisilicon/hi6220_reset.c b/drivers/reset/hisilicon/hi6220_reset.c index 5ca145b64e63..8d1fce18ded7 100644 --- a/drivers/reset/hisilicon/hi6220_reset.c +++ b/drivers/reset/hisilicon/hi6220_reset.c @@ -13,7 +13,6 @@ #include <linux/module.h> #include <linux/bitops.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/regmap.h> #include <linux/mfd/syscon.h> #include <linux/reset-controller.h> diff --git a/drivers/reset/hisilicon/reset-hi3660.c b/drivers/reset/hisilicon/reset-hi3660.c index 965f5ceba7d8..1beb275275ad 100644 --- a/drivers/reset/hisilicon/reset-hi3660.c +++ b/drivers/reset/hisilicon/reset-hi3660.c @@ -6,7 +6,7 @@ #include <linux/kernel.h> #include <linux/mfd/syscon.h> #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/reset-controller.h> @@ -90,8 +90,8 @@ static int hi3660_reset_probe(struct platform_device *pdev) "hisi,rst-syscon"); } if (IS_ERR(rc->map)) { - dev_err(dev, "failed to get hisilicon,rst-syscon\n"); - return PTR_ERR(rc->map); + return dev_err_probe(dev, PTR_ERR(rc->map), + "failed to get hisilicon,rst-syscon\n"); } rc->rst.ops = &hi3660_reset_ops, diff --git a/drivers/reset/reset-ath79.c b/drivers/reset/reset-ath79.c index a8b8f5ea77ec..b5d620132052 100644 --- a/drivers/reset/reset-ath79.c +++ b/drivers/reset/reset-ath79.c @@ -93,8 +93,6 @@ static int ath79_reset_probe(struct platform_device *pdev) if (!ath79_reset) return -ENOMEM; - platform_set_drvdata(pdev, ath79_reset); - ath79_reset->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ath79_reset->base)) return PTR_ERR(ath79_reset->base); diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c index ac6c7ad1deda..aa9353439e70 100644 --- a/drivers/reset/reset-bcm6345.c +++ b/drivers/reset/reset-bcm6345.c @@ -102,8 +102,6 @@ static int bcm6345_reset_probe(struct platform_device *pdev) if (!bcm6345_reset) return -ENOMEM; - platform_set_drvdata(pdev, bcm6345_reset); - bcm6345_reset->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(bcm6345_reset->base)) return PTR_ERR(bcm6345_reset->base); diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c index d2408725eb2c..dd01fe11c5cb 100644 --- a/drivers/reset/reset-imx7.c +++ b/drivers/reset/reset-imx7.c @@ -9,7 +9,7 @@ #include <linux/mfd/syscon.h> #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/reset-controller.h> #include <linux/regmap.h> diff --git a/drivers/reset/reset-intel-gw.c b/drivers/reset/reset-intel-gw.c index effc177db80a..a5a01388ae7f 100644 --- a/drivers/reset/reset-intel-gw.c +++ b/drivers/reset/reset-intel-gw.c @@ -6,7 +6,7 @@ #include <linux/bitfield.h> #include <linux/init.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/reboot.h> #include <linux/regmap.h> diff --git a/drivers/reset/reset-k210.c b/drivers/reset/reset-k210.c index 1b6e03522b40..b62a2fd44e4e 100644 --- a/drivers/reset/reset-k210.c +++ b/drivers/reset/reset-k210.c @@ -3,7 +3,6 @@ * Copyright (c) 2020 Western Digital Corporation or its affiliates. */ #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/reset-controller.h> #include <linux/delay.h> diff --git a/drivers/reset/reset-lantiq.c b/drivers/reset/reset-lantiq.c index 549ba45d8597..652a45890cb2 100644 --- a/drivers/reset/reset-lantiq.c +++ b/drivers/reset/reset-lantiq.c @@ -173,7 +173,6 @@ static int lantiq_rcu_reset_probe(struct platform_device *pdev) return -ENOMEM; priv->dev = &pdev->dev; - platform_set_drvdata(pdev, priv); err = lantiq_rcu_reset_of_parse(pdev, priv); if (err) diff --git a/drivers/reset/reset-lpc18xx.c b/drivers/reset/reset-lpc18xx.c index 36ec95518905..28fb85772b3e 100644 --- a/drivers/reset/reset-lpc18xx.c +++ b/drivers/reset/reset-lpc18xx.c @@ -188,8 +188,6 @@ static int lpc18xx_rgu_probe(struct platform_device *pdev) rc->rcdev.ops = &lpc18xx_rgu_ops; rc->rcdev.of_node = pdev->dev.of_node; - platform_set_drvdata(pdev, rc); - ret = reset_controller_register(&rc->rcdev); if (ret) { dev_err(&pdev->dev, "unable to register device\n"); diff --git a/drivers/reset/reset-meson-audio-arb.c b/drivers/reset/reset-meson-audio-arb.c index 6a3f6a6a3bbf..7e46dbc04998 100644 --- a/drivers/reset/reset-meson-audio-arb.c +++ b/drivers/reset/reset-meson-audio-arb.c @@ -5,7 +5,8 @@ #include <linux/clk.h> #include <linux/io.h> #include <linux/module.h> -#include <linux/of_platform.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <linux/reset-controller.h> #include <linux/spinlock.h> diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c index 13878ca2779d..a7af051b17fb 100644 --- a/drivers/reset/reset-meson.c +++ b/drivers/reset/reset-meson.c @@ -14,7 +14,6 @@ #include <linux/reset-controller.h> #include <linux/slab.h> #include <linux/types.h> -#include <linux/of_device.h> #define BITS_PER_REG 32 @@ -129,8 +128,6 @@ static int meson_reset_probe(struct platform_device *pdev) if (!data->param) return -ENODEV; - platform_set_drvdata(pdev, data); - spin_lock_init(&data->lock); data->rcdev.owner = THIS_MODULE; diff --git a/drivers/reset/reset-microchip-sparx5.c b/drivers/reset/reset-microchip-sparx5.c index ead25942061d..636e85c388b0 100644 --- a/drivers/reset/reset-microchip-sparx5.c +++ b/drivers/reset/reset-microchip-sparx5.c @@ -7,9 +7,10 @@ * https://github.com/microchip-ung/sparx-5_reginfo */ #include <linux/mfd/syscon.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/module.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/regmap.h> #include <linux/reset-controller.h> diff --git a/drivers/reset/reset-mpfs.c b/drivers/reset/reset-mpfs.c index e71ab73092ab..7f3fb2d472f4 100644 --- a/drivers/reset/reset-mpfs.c +++ b/drivers/reset/reset-mpfs.c @@ -9,6 +9,7 @@ #include <linux/auxiliary_bus.h> #include <linux/delay.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/reset-controller.h> #include <dt-bindings/clock/microchip,mpfs-clock.h> diff --git a/drivers/reset/reset-npcm.c b/drivers/reset/reset-npcm.c index f2333506b0a6..f6c4f854f2be 100644 --- a/drivers/reset/reset-npcm.c +++ b/drivers/reset/reset-npcm.c @@ -394,8 +394,6 @@ static int npcm_rc_probe(struct platform_device *pdev) rc->rcdev.of_reset_n_cells = 2; rc->rcdev.of_xlate = npcm_reset_xlate; - platform_set_drvdata(pdev, rc); - ret = devm_reset_controller_register(&pdev->dev, &rc->rcdev); if (ret) { dev_err(&pdev->dev, "unable to register device\n"); diff --git a/drivers/reset/reset-qcom-aoss.c b/drivers/reset/reset-qcom-aoss.c index 9333b923dda0..f52e90e36194 100644 --- a/drivers/reset/reset-qcom-aoss.c +++ b/drivers/reset/reset-qcom-aoss.c @@ -8,7 +8,7 @@ #include <linux/reset-controller.h> #include <linux/delay.h> #include <linux/io.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <dt-bindings/reset/qcom,sdm845-aoss.h> struct qcom_aoss_reset_map { diff --git a/drivers/reset/reset-qcom-pdc.c b/drivers/reset/reset-qcom-pdc.c index f22bb49a4ac8..a3aae3f902e6 100644 --- a/drivers/reset/reset-qcom-pdc.c +++ b/drivers/reset/reset-qcom-pdc.c @@ -4,7 +4,7 @@ */ #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/reset-controller.h> diff --git a/drivers/reset/reset-simple.c b/drivers/reset/reset-simple.c index 361a68314265..7ea5adbf2097 100644 --- a/drivers/reset/reset-simple.c +++ b/drivers/reset/reset-simple.c @@ -16,7 +16,6 @@ #include <linux/err.h> #include <linux/io.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/reset-controller.h> #include <linux/reset/reset-simple.h> diff --git a/drivers/reset/reset-ti-syscon.c b/drivers/reset/reset-ti-syscon.c index f0dd7ffc3b72..23f86ddb8668 100644 --- a/drivers/reset/reset-ti-syscon.c +++ b/drivers/reset/reset-ti-syscon.c @@ -204,8 +204,6 @@ static int ti_syscon_reset_probe(struct platform_device *pdev) data->controls = controls; data->nr_controls = nr_controls; - platform_set_drvdata(pdev, data); - return devm_reset_controller_register(dev, &data->rcdev); } diff --git a/drivers/reset/reset-uniphier-glue.c b/drivers/reset/reset-uniphier-glue.c index 15abac9fc72c..97b3ddcdade1 100644 --- a/drivers/reset/reset-uniphier-glue.c +++ b/drivers/reset/reset-uniphier-glue.c @@ -6,7 +6,7 @@ #include <linux/clk.h> #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/reset.h> #include <linux/reset/reset-simple.h> @@ -99,8 +99,6 @@ static int uniphier_glue_reset_probe(struct platform_device *pdev) priv->rdata.rcdev.of_node = dev->of_node; priv->rdata.active_low = true; - platform_set_drvdata(pdev, priv); - return devm_reset_controller_register(dev, &priv->rdata.rcdev); } diff --git a/drivers/reset/reset-uniphier.c b/drivers/reset/reset-uniphier.c index ff7580f38056..79c43c204d46 100644 --- a/drivers/reset/reset-uniphier.c +++ b/drivers/reset/reset-uniphier.c @@ -7,7 +7,6 @@ #include <linux/mfd/syscon.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/reset-controller.h> diff --git a/drivers/reset/reset-zynq.c b/drivers/reset/reset-zynq.c index 706bbbbb4ec7..688b512882ec 100644 --- a/drivers/reset/reset-zynq.c +++ b/drivers/reset/reset-zynq.c @@ -94,7 +94,6 @@ static int zynq_reset_probe(struct platform_device *pdev) priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; - platform_set_drvdata(pdev, priv); priv->slcr = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, "syscon"); diff --git a/drivers/reset/reset-zynqmp.c b/drivers/reset/reset-zynqmp.c index 59dc0ff9af9e..c770ea3a1894 100644 --- a/drivers/reset/reset-zynqmp.c +++ b/drivers/reset/reset-zynqmp.c @@ -9,11 +9,11 @@ #include <linux/platform_device.h> #include <linux/reset-controller.h> #include <linux/firmware/xlnx-zynqmp.h> -#include <linux/of_device.h> #define ZYNQMP_NR_RESETS (ZYNQMP_PM_RESET_END - ZYNQMP_PM_RESET_START) #define ZYNQMP_RESET_ID ZYNQMP_PM_RESET_START #define VERSAL_NR_RESETS 95 +#define VERSAL_NET_NR_RESETS 176 struct zynqmp_reset_soc_data { u32 reset_id; @@ -88,6 +88,11 @@ static const struct zynqmp_reset_soc_data versal_reset_data = { .num_resets = VERSAL_NR_RESETS, }; +static const struct zynqmp_reset_soc_data versal_net_reset_data = { + .reset_id = 0, + .num_resets = VERSAL_NET_NR_RESETS, +}; + static const struct reset_control_ops zynqmp_reset_ops = { .reset = zynqmp_reset_reset, .assert = zynqmp_reset_assert, @@ -107,8 +112,6 @@ static int zynqmp_reset_probe(struct platform_device *pdev) if (!priv->data) return -EINVAL; - platform_set_drvdata(pdev, priv); - priv->rcdev.ops = &zynqmp_reset_ops; priv->rcdev.owner = THIS_MODULE; priv->rcdev.of_node = pdev->dev.of_node; @@ -122,6 +125,7 @@ static int zynqmp_reset_probe(struct platform_device *pdev) static const struct of_device_id zynqmp_reset_dt_ids[] = { { .compatible = "xlnx,zynqmp-reset", .data = &zynqmp_reset_data, }, { .compatible = "xlnx,versal-reset", .data = &versal_reset_data, }, + { .compatible = "xlnx,versal-net-reset", .data = &versal_net_reset_data, }, { /* sentinel */ }, }; |