Lines Matching refs:ctx
47 struct xgene_reboot_context *ctx = in xgene_restart_handler() local
52 writel(ctx->mask, ctx->csr); in xgene_restart_handler()
56 dev_emerg(ctx->dev, "Unable to restart system\n"); in xgene_restart_handler()
63 struct xgene_reboot_context *ctx; in xgene_reboot_probe() local
67 ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); in xgene_reboot_probe()
68 if (!ctx) in xgene_reboot_probe()
71 ctx->csr = of_iomap(dev->of_node, 0); in xgene_reboot_probe()
72 if (!ctx->csr) { in xgene_reboot_probe()
77 if (of_property_read_u32(dev->of_node, "mask", &ctx->mask)) in xgene_reboot_probe()
78 ctx->mask = 0xFFFFFFFF; in xgene_reboot_probe()
80 ctx->dev = dev; in xgene_reboot_probe()
81 ctx->restart_handler.notifier_call = xgene_restart_handler; in xgene_reboot_probe()
82 ctx->restart_handler.priority = 128; in xgene_reboot_probe()
83 err = register_restart_handler(&ctx->restart_handler); in xgene_reboot_probe()