Lines Matching +full:syscon +full:- +full:reboot
1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
11 #include <linux/mfd/syscon.h>
15 #include <linux/reboot.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()
74 struct device *dev = &pdev->dev; in ocelot_reset_probe()
77 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in ocelot_reset_probe()
79 return -ENOMEM; in ocelot_reset_probe()
82 ctx->base = devm_ioremap_resource(dev, res); in ocelot_reset_probe()
83 if (IS_ERR(ctx->base)) in ocelot_reset_probe()
84 return PTR_ERR(ctx->base); in ocelot_reset_probe()
86 ctx->props = device_get_match_data(dev); in ocelot_reset_probe()
88 ctx->cpu_ctrl = syscon_regmap_lookup_by_compatible(ctx->props->syscon); in ocelot_reset_probe()
89 if (IS_ERR(ctx->cpu_ctrl)) { in ocelot_reset_probe()
90 dev_err(dev, "No syscon map: %s\n", ctx->props->syscon); in ocelot_reset_probe()
91 return PTR_ERR(ctx->cpu_ctrl); in ocelot_reset_probe()
94 ctx->restart_handler.notifier_call = ocelot_restart_handle; in ocelot_reset_probe()
95 ctx->restart_handler.priority = 192; in ocelot_reset_probe()
96 err = register_restart_handler(&ctx->restart_handler); in ocelot_reset_probe()
104 .syscon = "mscc,ocelot-cpu-syscon",
111 .syscon = "mscc,ocelot-cpu-syscon",
118 .syscon = "mscc,ocelot-cpu-syscon",
125 .syscon = "microchip,sparx5-cpu-syscon",
133 .compatible = "mscc,jaguar2-chip-reset",
136 .compatible = "mscc,luton-chip-reset",
139 .compatible = "mscc,ocelot-chip-reset",
142 .compatible = "microchip,sparx5-chip-reset",
151 .name = "ocelot-chip-reset",