Skip to content

Commit

Permalink
reset: reset-zynqmp: add support for Versal NET platform
Browse files Browse the repository at this point in the history
Updated the reset driver to support Versal NET platform.
As part of adding support
- Added specific compatible string
- Reset Id and number of resets

Signed-off-by: Piyush Mehta <piyush.mehta@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
  • Loading branch information
PiyushXilinx authored and michalsimek committed Aug 30, 2022
1 parent 6ac6595 commit b7d1313
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/reset/reset-zynqmp.c
Expand Up @@ -14,6 +14,7 @@
#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;
Expand Down Expand Up @@ -88,6 +89,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,
Expand Down Expand Up @@ -122,6 +128,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 */ },
};

Expand Down

0 comments on commit b7d1313

Please sign in to comment.