cpufreq: amd-pstate: implement suspend and resume callbacks
authorPerry Yuan <Perry.Yuan@amd.com>
Tue, 31 Jan 2023 09:00:11 +0000 (17:00 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 3 Feb 2023 20:59:42 +0000 (21:59 +0100)
commit50ddd2f7826927e6dc111a43b3a183f53c260fa4
treefe0477a57bca5aa1575c3c2068ad854c8826ae11
parentd4da12f8033a123353eccf993cb95ee5bff21e7c
cpufreq: amd-pstate: implement suspend and resume callbacks

add suspend and resume support for the AMD processors by amd_pstate_epp
driver instance.

When the CPPC is suspended, EPP driver will set EPP profile to 'power'
profile and set max/min perf to lowest perf value.
When resume happens, it will restore the MSR registers with
previous cached value.

Acked-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Mario Limonciello <Mario.Limonciello@amd.com>
Reviewed-by: Wyes Karny <wyes.karny@amd.com>
Tested-by: Wyes Karny <wyes.karny@amd.com>
Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/amd-pstate.c