From: Mario Limonciello <mario.limonciello@amd.com>
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>
---
v5:
* Move <asm> header after <linux> headers
v4:
* Use fch.h instead
---
arch/x86/include/asm/amd/fch.h | 1 +
drivers/platform/x86/amd/pmc/pmc-quirks.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/amd/fch.h b/arch/x86/include/asm/amd/fch.h
index a5fd91ff92df3..9b32e8a03193e 100644
--- a/arch/x86/include/asm/amd/fch.h
+++ b/arch/x86/include/asm/amd/fch.h
@@ -8,5 +8,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
diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c
index b4f49720c87f6..b706b1f4d94bf 100644
--- a/drivers/platform/x86/amd/pmc/pmc-quirks.c
+++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c
@@ -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 = {
--
2.43.0
On Tue, 22 Apr 2025, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
>
> 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>
This is quite trivial change, but here is this for completeness in case
x86 maintainers want to have it:
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
> ---
> v5:
> * Move <asm> header after <linux> headers
> v4:
> * Use fch.h instead
> ---
> arch/x86/include/asm/amd/fch.h | 1 +
> drivers/platform/x86/amd/pmc/pmc-quirks.c | 3 ++-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/include/asm/amd/fch.h b/arch/x86/include/asm/amd/fch.h
> index a5fd91ff92df3..9b32e8a03193e 100644
> --- a/arch/x86/include/asm/amd/fch.h
> +++ b/arch/x86/include/asm/amd/fch.h
> @@ -8,5 +8,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
> diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c
> index b4f49720c87f6..b706b1f4d94bf 100644
> --- a/drivers/platform/x86/amd/pmc/pmc-quirks.c
> +++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c
> @@ -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 = {
>
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 7094702a9e6d1256f1444ceff7be97414db51dbb
Gitweb: https://git.kernel.org/tip/7094702a9e6d1256f1444ceff7be97414db51dbb
Author: Mario Limonciello <mario.limonciello@amd.com>
AuthorDate: Tue, 22 Apr 2025 18:48:29 -05:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Sat, 26 Apr 2025 11:41:16 +02:00
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 <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 | 1 +
drivers/platform/x86/amd/pmc/pmc-quirks.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/amd/fch.h b/arch/x86/include/asm/amd/fch.h
index 28972bd..01ee15b 100644
--- a/arch/x86/include/asm/amd/fch.h
+++ b/arch/x86/include/asm/amd/fch.h
@@ -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_ */
diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c
index b4f4972..b706b1f 100644
--- a/drivers/platform/x86/amd/pmc/pmc-quirks.c
+++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c
@@ -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 = {
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 0fbe08e78dfd4a680806132673c520f0fc5f84d9
Gitweb: https://git.kernel.org/tip/0fbe08e78dfd4a680806132673c520f0fc5f84d9
Author: Mario Limonciello <mario.limonciello@amd.com>
AuthorDate: Tue, 22 Apr 2025 18:48:29 -05:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Thu, 24 Apr 2025 17:55:18 +02:00
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 <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 | 1 +
drivers/platform/x86/amd/pmc/pmc-quirks.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/amd/fch.h b/arch/x86/include/asm/amd/fch.h
index 28972bd..01ee15b 100644
--- a/arch/x86/include/asm/amd/fch.h
+++ b/arch/x86/include/asm/amd/fch.h
@@ -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_ */
diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c
index b4f4972..b706b1f 100644
--- a/drivers/platform/x86/amd/pmc/pmc-quirks.c
+++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c
@@ -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 = {
© 2016 - 2026 Red Hat, Inc.