firmware: ti_sci: Add support for reboot core service
Since system controller now has control over SoC power management, it needs to be explicitly requested to reboot the SoC. Add support for it. In some systems however, SoC needs to toggle a GPIO or send event to an external entity (like a PMIC) for a system reboot to take place. To facilitate that, we allow for a DT property to determine if the reboot handler will be registered and further, the service is also made available to other drivers (such as PMIC driver) to sequence the additional operation and trigger the SoC reboot as the last step. Tested-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com>
This commit is contained in:

committed by
Tero Kristo

parent
9f72322050
commit
912cffb4ed
@@ -35,6 +35,16 @@ struct ti_sci_version_info {
|
||||
|
||||
struct ti_sci_handle;
|
||||
|
||||
/**
|
||||
* struct ti_sci_core_ops - SoC Core Operations
|
||||
* @reboot_device: Reboot the SoC
|
||||
* Returns 0 for successful request(ideally should never return),
|
||||
* else returns corresponding error value.
|
||||
*/
|
||||
struct ti_sci_core_ops {
|
||||
int (*reboot_device)(const struct ti_sci_handle *handle);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ti_sci_dev_ops - Device control operations
|
||||
* @get_device: Command to request for device managed by TISCI
|
||||
@@ -196,6 +206,7 @@ struct ti_sci_clk_ops {
|
||||
* @clk_ops: Clock specific operations
|
||||
*/
|
||||
struct ti_sci_ops {
|
||||
struct ti_sci_core_ops core_ops;
|
||||
struct ti_sci_dev_ops dev_ops;
|
||||
struct ti_sci_clk_ops clk_ops;
|
||||
};
|
||||
|
Reference in New Issue
Block a user