platform/x86: amd-pmc: Export Idlemask values based on the APU
authorSanket Goswami <Sanket.Goswami@amd.com>
Thu, 16 Sep 2021 12:40:02 +0000 (18:10 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:57:05 +0000 (12:57 +0100)
commit32e3a6c4a756bf503e3b668adc71fee588bf1bd4
tree7d55b6a516662d5f16d2f6ae3e8d0d2bd04a9a46
parent1723efa4c375cc9851a8845b73aa4522f165f7e7
platform/x86: amd-pmc: Export Idlemask values based on the APU

commit f6045de1f53268131ea75a99b210b869dcc150b2 upstream.

IdleMask is the metric used by the PM firmware to know the status of each
of the Hardware IP blocks monitored by the PM firmware.

Knowing this value is key to get the information of s2idle suspend/resume
status. This value is mapped to PMC scratch registers, retrieve them
accordingly based on the CPU family and the underlying firmware support.

Co-developed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20210916124002.2529-1-Sanket.Goswami@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/amd-pmc.c