soc/amd/common/block/lpc: use 32 bit accesses in lpc_enable_port80
commitf6205d3deb8f0b2f22cb2ccc8d708312aeb2c8fa
authorFelix Held <felix-coreboot@felixheld.de>
Thu, 25 Nov 2021 18:53:37 +0000 (25 19:53 +0100)
committerFelix Held <felix-coreboot@felixheld.de>
Mon, 29 Nov 2021 20:46:12 +0000 (29 20:46 +0000)
treee5186467a1c8410eebef6ba01c050fdd487bc704
parent8c4fe3f0f66f27a5657db472d7114ab2af19d8ed
soc/amd/common/block/lpc: use 32 bit accesses in lpc_enable_port80

When using 32 bit PCI accesses in lpc_enable_port80, we can use the
LPC_IO_OR_MEM_DECODE_ENABLE and DECODE_IO_PORT_ENABLE4 defines and don't
need to re-define bits with offsets from the beginning of the third byte
within this 32 bit register. This allows to drop the
LPC_IO_OR_MEM_DEC_EN_HIGH register definition which points to
LPC_IO_OR_MEM_DECODE_ENABLE + 2 and to drop the re-definitions of the
bit re-definitions with a different offset.

The code in lpc_enable_port80 was originally copied from sb/amd/agesa/
hudson/early_setup.c which might be sort-of a copy from what the AGESA
reference code does.

TEST=When commenting out SOC_AMD_COMMON_BLOCK_USE_ESPI in the Kconfig of
Mandolin and selecting AMD_LPC_DEBUG_CARD, all POST codes still get
shown on the POST code LED display when this patch is applied.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I001bb1c2ccf99e36d4fbd73d3bf96b78ddb87d67
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59676
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
src/soc/amd/common/block/include/amdblocks/lpc.h
src/soc/amd/common/block/lpc/lpc_util.c