Lines Matching +full:sparx5 +full:- +full:cpu +full:- +full:syscon
1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
12 #include <linux/mfd/syscon.h>
19 const char *syscon; member
48 u32 if_si_owner_bit = ctx->props->if_si_owner_bit; in ocelot_restart_handle()
51 regmap_update_bits(ctx->cpu_ctrl, ctx->props->protect_reg, in ocelot_restart_handle()
52 ctx->props->vcore_protect, 0); in ocelot_restart_handle()
56 regmap_update_bits(ctx->cpu_ctrl, in ocelot_restart_handle()
63 writel(SOFT_CHIP_RST, ctx->base); in ocelot_restart_handle()
72 struct device *dev = &pdev->dev; in ocelot_reset_probe()
75 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in ocelot_reset_probe()
77 return -ENOMEM; in ocelot_reset_probe()
79 ctx->base = devm_platform_ioremap_resource(pdev, 0); in ocelot_reset_probe()
80 if (IS_ERR(ctx->base)) in ocelot_reset_probe()
81 return PTR_ERR(ctx->base); in ocelot_reset_probe()
83 ctx->props = device_get_match_data(dev); in ocelot_reset_probe()
85 ctx->cpu_ctrl = syscon_regmap_lookup_by_compatible(ctx->props->syscon); in ocelot_reset_probe()
86 if (IS_ERR(ctx->cpu_ctrl)) { in ocelot_reset_probe()
87 dev_err(dev, "No syscon map: %s\n", ctx->props->syscon); in ocelot_reset_probe()
88 return PTR_ERR(ctx->cpu_ctrl); in ocelot_reset_probe()
91 ctx->restart_handler.notifier_call = ocelot_restart_handle; in ocelot_reset_probe()
92 ctx->restart_handler.priority = 192; in ocelot_reset_probe()
93 err = register_restart_handler(&ctx->restart_handler); in ocelot_reset_probe()
101 .syscon = "mscc,ocelot-cpu-syscon",
108 .syscon = "mscc,ocelot-cpu-syscon",
115 .syscon = "mscc,ocelot-cpu-syscon",
122 .syscon = "microchip,sparx5-cpu-syscon",
130 .compatible = "mscc,jaguar2-chip-reset",
133 .compatible = "mscc,luton-chip-reset",
136 .compatible = "mscc,ocelot-chip-reset",
139 .compatible = "microchip,sparx5-chip-reset",
148 .name = "ocelot-chip-reset",