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)
committerHans de Goede <hdegoede@redhat.com>
Thu, 16 Sep 2021 13:29:13 +0000 (15:29 +0200)
commitf6045de1f53268131ea75a99b210b869dcc150b2
treef41c80b6193bf8ab9f85d62aab5cce7d7bcc7a33
parent9cfe02023cf67a36c2dfb05d1ea3eb79811a8720
platform/x86: amd-pmc: Export Idlemask values based on the APU

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>
drivers/platform/x86/amd-pmc.c