Lines Matching +full:zynqmp +full:- +full:reset
1 // SPDX-License-Identifier: GPL-2.0+
10 #include <linux/reset-controller.h>
11 #include <linux/firmware/xlnx-zynqmp.h>
13 #define ZYNQMP_NR_RESETS (ZYNQMP_PM_RESET_END - ZYNQMP_PM_RESET_START)
39 return zynqmp_pm_reset_assert(priv->data->reset_id + id, in zynqmp_reset_assert()
48 return zynqmp_pm_reset_assert(priv->data->reset_id + id, in zynqmp_reset_deassert()
59 err = zynqmp_pm_reset_get_status(priv->data->reset_id + id, &val); in zynqmp_reset_status()
71 return zynqmp_pm_reset_assert(priv->data->reset_id + id, in zynqmp_reset_reset()
78 return reset_spec->args[0]; in zynqmp_reset_of_xlate()
97 .reset = zynqmp_reset_reset,
107 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); in zynqmp_reset_probe()
109 return -ENOMEM; in zynqmp_reset_probe()
111 priv->data = of_device_get_match_data(&pdev->dev); in zynqmp_reset_probe()
112 if (!priv->data) in zynqmp_reset_probe()
113 return -EINVAL; in zynqmp_reset_probe()
115 priv->rcdev.ops = &zynqmp_reset_ops; in zynqmp_reset_probe()
116 priv->rcdev.owner = THIS_MODULE; in zynqmp_reset_probe()
117 priv->rcdev.of_node = pdev->dev.of_node; in zynqmp_reset_probe()
118 priv->rcdev.nr_resets = priv->data->num_resets; in zynqmp_reset_probe()
119 priv->rcdev.of_reset_n_cells = 1; in zynqmp_reset_probe()
120 priv->rcdev.of_xlate = zynqmp_reset_of_xlate; in zynqmp_reset_probe()
122 return devm_reset_controller_register(&pdev->dev, &priv->rcdev); in zynqmp_reset_probe()
126 { .compatible = "xlnx,zynqmp-reset", .data = &zynqmp_reset_data, },
127 { .compatible = "xlnx,versal-reset", .data = &versal_reset_data, },
128 { .compatible = "xlnx,versal-net-reset", .data = &versal_net_reset_data, },