[PATCH v4 3/5] firmware: ti_sci: Allocate memory for the LPM modes

Georgi Vlaev g-vlaev at ti.com
Mon Nov 21 14:03:31 PST 2022


Hi Nishanth,

On 11/21/22 20:56, Nishanth Menon wrote:
> 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?
> 
> 

Well, you're correct, there's no guarantee. It is safe to call it now on AM62x
in both places we actually use it. However, this may change in the future
and it's not a good idea to misuse that API. We'll switch the detection part
to a more appropriate message, that's better suited for this purpose on all
K3 platforms.

-- 
Regards,
Georgi



More information about the linux-arm-kernel mailing list