Lines Matching +full:gpio +full:- +full:restart
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.
31 struct xgene_reboot_context *ctx = data->cb_data; in xgene_restart_handler()
34 writel(ctx->mask, ctx->csr); in xgene_restart_handler()
38 dev_emerg(ctx->dev, "Unable to restart system\n"); in xgene_restart_handler()
46 struct device *dev = &pdev->dev; in xgene_reboot_probe()
51 return -ENOMEM; in xgene_reboot_probe()
53 ctx->csr = devm_platform_ioremap_resource(pdev, 0); in xgene_reboot_probe()
54 if (IS_ERR(ctx->csr)) { in xgene_reboot_probe()
56 return PTR_ERR(ctx->csr); in xgene_reboot_probe()
59 if (of_property_read_u32(dev->of_node, "mask", &ctx->mask)) in xgene_reboot_probe()
60 ctx->mask = 0xFFFFFFFF; in xgene_reboot_probe()
62 ctx->dev = dev; in xgene_reboot_probe()
66 dev_err(dev, "cannot register restart handler (err=%d)\n", err); in xgene_reboot_probe()
72 { .compatible = "apm,xgene-reboot" },
79 .name = "xgene-reboot",