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().
 -----BEGIN PGP SIGNATURE-----
 
 iI0EABYIADUWIQRRO6F6WdpH1R0vGibVhaclGDdiwAUCZNJX4RcccC56YWJlbEBw
 ZW5ndXRyb25peC5kZQAKCRDVhaclGDdiwHzTAQCA8iBvxFJ0eZbTpXUlEyJCqFJR
 Or6nNEwk5ogG3c51pQEAw+l3N0v5+65K7DCXWPOVtMtg/e3GIagP3POXiWNHHgw=
 =RuSy
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmTXWisACgkQYKtH/8kJ
 Uifa1BAAldB2vOw2huUGT2Utd95Ta3Os05y4TujIBuK/VSsAK6hWqhcoEFjzpvzs
 k7viGxD1tqAt8s+3q4gRDb74cQxSZhH489xAbvbEWCJ5BAHBjtwnG8Ox2EzXYrib
 xNwHEFg3WCe6N+NOKcqBBNKeZDjBDoy0qq5dJ3tS79k+39QH8hT6VXrGSyDGh2pY
 P7g68k8FQ7BsFOK9ga9Ksjtommd5ylClBrFLnWtKlLhE7jeg1XoQtZsemLm5xREh
 M17zyYjzu3XvhhRgyA12aDp9Ca9L5np5PJ26FwafazKi5Fhr5QQYdnQYxzgZlbja
 W5VfaF180y4UKfflpN54cyNT7bMdU31Gg7M4b4un+xgaDt2izFL4PHuDWcA+fXz2
 J5RUjE0Ty4XjhDciLNtdJGEs1+F9kkyDH7uGafWlenJsKwxM8tIKx9de9TTw/A//
 RyT8tKsF7UWkakqlFfUl/FrxBBGl8NziUnSHkVV0jZFa8T018Zw2gcJFmAWzMnc0
 iEzUT21dq/c/ndmINXou3A7WprnJ870iIU2rbF4/+EGIas9S7SV0aHQMCiW9fbRG
 ql+TOpkazT48k/9f/mZD5niahei7j0eUsXv4NU+VUugrsRwqdG2e5xHVY/1TSPDg
 b1zjOjWeGT2VubIuw5EdjI4tv5qPMI4Tc6qkiENxXfs6LMrCOvA=
 =H1wH
 -----END PGP SIGNATURE-----

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>
This commit is contained in:
Arnd Bergmann 2023-08-12 12:08:42 +02:00
commit e6cedaa902
23 changed files with 21 additions and 34 deletions

View File

@ -32,6 +32,7 @@ properties:
enum:
- xlnx,zynqmp-reset
- xlnx,versal-reset
- xlnx,versal-net-reset
"#reset-cells":
const: 1

View File

@ -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>

View File

@ -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,

View File

@ -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);

View File

@ -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);

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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)

View File

@ -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");

View File

@ -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>

View File

@ -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;

View File

@ -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>

View File

@ -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>

View File

@ -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");

View File

@ -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 {

View File

@ -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>

View File

@ -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>

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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>

View File

@ -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");

View File

@ -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 */ },
};