diff options
author | Fred Reitberger <reitbergerfred@gmail.com> | 2022-10-14 14:04:04 -0400 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-10-17 13:42:46 +0000 |
commit | f73a3a5e08d7906e4ce1152a820ac52a3547a842 (patch) | |
tree | 645e60c7700f4ffabd75be7d67cf32a874b41eb0 /src/soc/amd/stoneyridge | |
parent | 9efe34a3960c7186cc3f88e442aaaf5d789a019f (diff) |
soc/amd/*/smihandler: Make fch_apmc_smi_handler common
Rename soc/amd/common/block/cpu/smm/smi_ampc_helper.c to smi_apmc.c and
add the fch_apmc_smi_handler function.
Remove the duplicated function from picasso, cezanne, mendocino, and
morgana SoC.
The stoneyridge soc does not implement the APM_CNT_SMMINFO handler, so
give the handler a unique name that does not conflict with the common
handler name.
Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Change-Id: I2e6fb59a1ee15b075ee3bbb5f95debe884b66789
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68441
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd/stoneyridge')
-rw-r--r-- | src/soc/amd/stoneyridge/smihandler.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/soc/amd/stoneyridge/smihandler.c b/src/soc/amd/stoneyridge/smihandler.c index 50a5111461..7ba9bb8853 100644 --- a/src/soc/amd/stoneyridge/smihandler.c +++ b/src/soc/amd/stoneyridge/smihandler.c @@ -15,7 +15,11 @@ #include <soc/southbridge.h> #include <types.h> -static void fch_apmc_smi_handler(void) +/* + * stoneyridge does not implement the APM_CNT_SMMINFO handler, + * so it needs a special version + */ +static void stoneyridge_fch_apmc_smi_handler(void) { const uint8_t cmd = inb(pm_acpi_smi_cmd_port()); @@ -135,7 +139,7 @@ int southbridge_io_trap_handler(int smif) * in southbridge.c is unrelated to this list. */ static const struct smi_sources_t smi_sources[] = { - { .type = SMITYPE_SMI_CMD_PORT, .handler = fch_apmc_smi_handler }, + { .type = SMITYPE_SMI_CMD_PORT, .handler = stoneyridge_fch_apmc_smi_handler }, { .type = SMITYPE_SLP_TYP, .handler = fch_slp_typ_handler}, }; |