firmware: ti_sci: add CPU latency constraint management
authorKevin Hilman <khilman@baylibre.com>
Mon, 7 Oct 2024 06:08:58 +0000 (08:08 +0200)
committerNishanth Menon <nm@ti.com>
Fri, 25 Oct 2024 15:45:07 +0000 (10:45 -0500)
commita7a15754c7f70a833ffeb9ad996b358924f10305
tree5020f42f6bf4947c91301dd173c945338bd6e692
parent60357991f6b9d4bd4dc442a368da3f468cfa4903
firmware: ti_sci: add CPU latency constraint management

During system-wide suspend, check if any of the CPUs have PM QoS
resume latency constraints set.  If so, set TI SCI constraint.

TI SCI has a single system-wide latency constraint, so use the max of
any of the CPU latencies as the system-wide value.

Note: DM firmware clears all constraints at resume time, so
constraints need to be checked/updated/sent at each system suspend.

Co-developed-by: Vibhore Vardhan <vibhore@ti.com>
Signed-off-by: Vibhore Vardhan <vibhore@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Roger Quadros <rogerq@kernel.org>
Link: https://lore.kernel.org/r/20241007-tisci-syssuspendresume-v13-5-ed54cd659a49@baylibre.com
Signed-off-by: Nishanth Menon <nm@ti.com>
drivers/firmware/ti_sci.c