]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
platform/x86/amd/pmc: Use FCH_PM_BASE definition
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 22 Apr 2025 23:48:29 +0000 (18:48 -0500)
committerIngo Molnar <mingo@kernel.org>
Sat, 26 Apr 2025 09:41:16 +0000 (11:41 +0200)
The s2idle MMIO quirk uses a scratch register in the FCH.
Adjust the code to clarify that.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Cc: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Cc: Yazen Ghannam <yazen.ghannam@amd.com>
Cc: platform-driver-x86@vger.kernel.org
Link: https://lore.kernel.org/r/20250422234830.2840784-5-superm1@kernel.org
arch/x86/include/asm/amd/fch.h
drivers/platform/x86/amd/pmc/pmc-quirks.c

index 28972bd8f7157c380bc52b78ba44c49131c9c5e9..01ee15bcd25f1c442a0eff0cc773fb6aaf09e3fd 100644 (file)
@@ -7,5 +7,6 @@
 /* Register offsets from PM base: */
 #define FCH_PM_DECODEEN                        0x00
 #define FCH_PM_DECODEEN_SMBUS0SEL      GENMASK(20, 19)
+#define FCH_PM_SCRATCH                 0x80
 
 #endif /* _ASM_X86_AMD_FCH_H_ */
index b4f49720c87f62aa6e8349af12797382f740c2b7..b706b1f4d94bfce637e94603e02083525b9edf69 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/dmi.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
+#include <asm/amd/fch.h>
 
 #include "pmc.h"
 
@@ -20,7 +21,7 @@ struct quirk_entry {
 };
 
 static struct quirk_entry quirk_s2idle_bug = {
-       .s2idle_bug_mmio = 0xfed80380,
+       .s2idle_bug_mmio = FCH_PM_BASE + FCH_PM_SCRATCH,
 };
 
 static struct quirk_entry quirk_spurious_8042 = {