Skip to content

Commit 7094702

Browse files
superm1Ingo Molnar
authored andcommitted
platform/x86/amd/pmc: Use FCH_PM_BASE definition
The s2idle MMIO quirk uses a scratch register in the FCH. Adjust the code to clarify that. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Hans de Goede <[email protected]> Cc: Ilpo Järvinen <[email protected]> Cc: Shyam Sundar S K <[email protected]> Cc: Yazen Ghannam <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
1 parent 624b0d5 commit 7094702

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

arch/x86/include/asm/amd/fch.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
/* Register offsets from PM base: */
88
#define FCH_PM_DECODEEN 0x00
99
#define FCH_PM_DECODEEN_SMBUS0SEL GENMASK(20, 19)
10+
#define FCH_PM_SCRATCH 0x80
1011

1112
#endif /* _ASM_X86_AMD_FCH_H_ */

drivers/platform/x86/amd/pmc/pmc-quirks.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/dmi.h>
1212
#include <linux/io.h>
1313
#include <linux/ioport.h>
14+
#include <asm/amd/fch.h>
1415

1516
#include "pmc.h"
1617

@@ -20,7 +21,7 @@ struct quirk_entry {
2021
};
2122

2223
static struct quirk_entry quirk_s2idle_bug = {
23-
.s2idle_bug_mmio = 0xfed80380,
24+
.s2idle_bug_mmio = FCH_PM_BASE + FCH_PM_SCRATCH,
2425
};
2526

2627
static struct quirk_entry quirk_spurious_8042 = {

0 commit comments

Comments
 (0)