This patch adds an optional property which allows to specify the
reset source priority. This priority is used by the kernel restart
handler call chain to sort out the proper reset/restart method.
Depending on the power design of a board or other machine/board
specific peculiarity, it is not possible to pick a generic priority.
- offset: offset in the register map for the reboot register (in bytes)
- mask: the reset value written to the reboot register (32 bit access)
+Optional properties:
+- priority: define the priority of the reset (0-255, defaults to 128)
+
Default will be little endian mode, 32 bit access only.
Examples:
if (of_property_read_u32(pdev->dev.of_node, "mask", &ctx->mask))
return -EINVAL;
- ctx->restart_handler.notifier_call = syscon_restart_handle;
ctx->restart_handler.priority = 128;
+ of_property_read_u32(pdev->dev.of_node, "priority",
+ &ctx->restart_handler.priority);
+
+ ctx->restart_handler.notifier_call = syscon_restart_handle;
err = register_restart_handler(&ctx->restart_handler);
if (err)
dev_err(dev, "can't register restart notifier (err=%d)\n", err);