File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 2
2
/*
3
3
* Texas Instruments System Control Interface Protocol Driver
4
4
*
5
- * Copyright (C) 2015-2024 Texas Instruments Incorporated - https://www.ti.com/
5
+ * Copyright (C) 2015-2025 Texas Instruments Incorporated - https://www.ti.com/
6
6
* Nishanth Menon
7
7
*/
8
8
@@ -3670,6 +3670,7 @@ static int __maybe_unused ti_sci_suspend(struct device *dev)
3670
3670
struct ti_sci_info * info = dev_get_drvdata (dev );
3671
3671
struct device * cpu_dev , * cpu_dev_max = NULL ;
3672
3672
s32 val , cpu_lat = 0 ;
3673
+ u16 cpu_lat_ms ;
3673
3674
int i , ret ;
3674
3675
3675
3676
if (info -> fw_caps & MSG_FLAG_CAPS_LPM_DM_MANAGED ) {
@@ -3682,9 +3683,16 @@ static int __maybe_unused ti_sci_suspend(struct device *dev)
3682
3683
}
3683
3684
}
3684
3685
if (cpu_dev_max ) {
3685
- dev_dbg (cpu_dev_max , "%s: sending max CPU latency=%u\n" , __func__ , cpu_lat );
3686
+ /*
3687
+ * PM QoS latency unit is usecs, device manager uses msecs.
3688
+ * Convert to msecs and round down for device manager.
3689
+ */
3690
+ cpu_lat_ms = cpu_lat / USEC_PER_MSEC ;
3691
+ dev_dbg (cpu_dev_max , "%s: sending max CPU latency=%u ms\n" , __func__ ,
3692
+ cpu_lat_ms );
3686
3693
ret = ti_sci_cmd_set_latency_constraint (& info -> handle ,
3687
- cpu_lat , TISCI_MSG_CONSTRAINT_SET );
3694
+ cpu_lat_ms ,
3695
+ TISCI_MSG_CONSTRAINT_SET );
3688
3696
if (ret )
3689
3697
return ret ;
3690
3698
}
You can’t perform that action at this time.
0 commit comments