Commit e6cedaa9 authored by Arnd Bergmann's avatar Arnd Bergmann

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.deSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 347cdfc8 417a3a5a
......@@ -32,6 +32,7 @@ properties:
enum:
- xlnx,zynqmp-reset
- xlnx,versal-reset
- xlnx,versal-net-reset
"#reset-cells":
const: 1
......
......@@ -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>
......
......@@ -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,
......
......@@ -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);
......
......@@ -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);
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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)
......
......@@ -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");
......
......@@ -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>
......
......@@ -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;
......
......@@ -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>
......
......@@ -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>
......
......@@ -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");
......
......@@ -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 {
......
......@@ -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>
......
......@@ -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>
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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>
......
......@@ -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");
......
......@@ -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 */ },
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment