platform/x86: amd-pmc: Add support for logging s0ix counters
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Tue, 29 Jun 2021 08:48:01 +0000 (14:18 +0530)
committerHans de Goede <hdegoede@redhat.com>
Wed, 14 Jul 2021 13:09:50 +0000 (15:09 +0200)
commitb9a4fa6978bef902409858737fa180fa7b9346ac
treecd7324177f4deccd48c1cb6afe83e2cf320b85b2
parent76620567496237f1f1f54683ec7da1755ee501d7
platform/x86: amd-pmc: Add support for logging s0ix counters

Even the FCH SSC registers provides certain level of information
about the s0ix entry and exit times which comes handy when the SMU
fails to report the statistics via the mailbox communication.

This information is captured via a new debugfs file "s0ix_stats".
A non-zero entry in this counters would mean that the system entered
the s0ix state.

If s0ix entry time and exit time don't change during suspend to idle,
the silicon has not entered the deepest state.

Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210629084803.248498-6-Shyam-sundar.S-k@amd.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd-pmc.c