Re: [PATCH v4 3/5] firmware: ti_sci: Allocate memory for the LPM modes
From: Nishanth Menon
Date: Mon Nov 21 2022 - 13:56:43 EST
On 20:13-20221116, Georgi Vlaev wrote:
> + /*
> + * Attempt to call prepare_sleep, this will be NAK'd if suspend is not
> + * supported by firmware in use, in which case we will not attempt to
> + * init suspend.
> + */
> + ret = ti_sci_cmd_prepare_sleep(&info->handle, 0,
> + (u32)(info->ctx_mem_addr & 0xffffffff),
> + (u32)((u64)info->ctx_mem_addr >> 32), 0);
> +
https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#tisci-msg-prepare-sleep
"Prepare the SOC for entering into a low power mode."
But we are in the init process here. From the documentation, firmware
does'nt seem to guarantee it would do something unexpected (like setup
io daisy chain or something like that which normal LP entry state
would have to do) - How is it safe to use it as a discovery of
capability API?
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D