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>
enum:
- xlnx,zynqmp-reset
- xlnx,versal-reset
+ - xlnx,versal-net-reset
"#reset-cells":
const: 1
#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>
#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>
"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,
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);
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);
#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>
#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>
* 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>
return -ENOMEM;
priv->dev = &pdev->dev;
- platform_set_drvdata(pdev, priv);
err = lantiq_rcu_reset_of_parse(pdev, priv);
if (err)
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");
#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>
#include <linux/reset-controller.h>
#include <linux/slab.h>
#include <linux/types.h>
-#include <linux/of_device.h>
#define BITS_PER_REG 32
if (!data->param)
return -ENODEV;
- platform_set_drvdata(pdev, data);
-
spin_lock_init(&data->lock);
data->rcdev.owner = THIS_MODULE;
* 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>
#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>
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");
#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 {
*/
#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>
#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>
data->controls = controls;
data->nr_controls = nr_controls;
- platform_set_drvdata(pdev, data);
-
return devm_reset_controller_register(dev, &data->rcdev);
}
#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>
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);
}
#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>
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");
#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;
.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,
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;
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 */ },
};