Lines Matching +full:reboot +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * AppliedMicro X-Gene SoC Reboot Driver
9 * This driver provides system reboot functionality for APM X-Gene SoC.
11 * implements GPIO shutdown, use the gpio-poweroff.c driver.
19 #include <linux/reboot.h>
31 unsigned long mode, void *cmd) in xgene_restart_handler() argument
37 /* Issue the reboot */ in xgene_restart_handler()
38 writel(ctx->mask, ctx->csr); in xgene_restart_handler()
42 dev_emerg(ctx->dev, "Unable to restart system\n"); in xgene_restart_handler()
50 struct device *dev = &pdev->dev; in xgene_reboot_probe()
55 return -ENOMEM; in xgene_reboot_probe()
57 ctx->csr = of_iomap(dev->of_node, 0); in xgene_reboot_probe()
58 if (!ctx->csr) { in xgene_reboot_probe()
60 return -ENODEV; in xgene_reboot_probe()
63 if (of_property_read_u32(dev->of_node, "mask", &ctx->mask)) in xgene_reboot_probe()
64 ctx->mask = 0xFFFFFFFF; in xgene_reboot_probe()
66 ctx->dev = dev; in xgene_reboot_probe()
67 ctx->restart_handler.notifier_call = xgene_restart_handler; in xgene_reboot_probe()
68 ctx->restart_handler.priority = 128; in xgene_reboot_probe()
69 err = register_restart_handler(&ctx->restart_handler); in xgene_reboot_probe()
71 iounmap(ctx->csr); in xgene_reboot_probe()
79 { .compatible = "apm,xgene-reboot" },
86 .name = "xgene-reboot",