summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2022-04-30 08:35:49 +0200
committerMartin L Roth <gaumless@tutanota.com>2022-05-16 02:29:58 +0000
commitc9b219804b0d8cc168e9d8f63fac0854b3af7de3 (patch)
tree41cbf7b4dcffd2abc5a5468e0cfc1da0bdd26b93 /src/mainboard
parent14c49e36461e8c37df824c1f52b06d9adbd8d199 (diff)
mainboard/amd/padmelon: Use pci_or_config32()
Change-Id: I8d55fc93f6ec413d0cbcea2f8e0a90a76f1803cd Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63970 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@tutanota.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/amd/padmelon/bootblock/bootblock.c6
-rw-r--r--src/mainboard/amd/padmelon/fan_init.c5
2 files changed, 3 insertions, 8 deletions
diff --git a/src/mainboard/amd/padmelon/bootblock/bootblock.c b/src/mainboard/amd/padmelon/bootblock/bootblock.c
index f1b6822f8b..4b28e208c9 100644
--- a/src/mainboard/amd/padmelon/bootblock/bootblock.c
+++ b/src/mainboard/amd/padmelon/bootblock/bootblock.c
@@ -13,11 +13,9 @@
/* Enable IO access to port, then enable UART HW control pins */
static void enable_serial(unsigned int base_port, unsigned int io_enable)
{
- u32 temp;
u8 reg;
- temp = pci_read_config32(SOC_LPC_DEV, LPC_IO_PORT_DECODE_ENABLE);
- temp |= io_enable;
- pci_write_config32(SOC_LPC_DEV, LPC_IO_PORT_DECODE_ENABLE, temp);
+
+ pci_or_config32(SOC_LPC_DEV, LPC_IO_PORT_DECODE_ENABLE, io_enable);
/*
* Remove this section if HW handshake is not needed. This is needed
diff --git a/src/mainboard/amd/padmelon/fan_init.c b/src/mainboard/amd/padmelon/fan_init.c
index 574ef7fe9b..a2db5eaafc 100644
--- a/src/mainboard/amd/padmelon/fan_init.c
+++ b/src/mainboard/amd/padmelon/fan_init.c
@@ -72,11 +72,8 @@ struct fintek_fan system_fan = {
static void init_fan_control(void *unused)
{
- u32 temp;
/* Open a LPC IO access to 0x0220-0x0227 */
- temp = pci_read_config32(SOC_LPC_DEV, LPC_IO_PORT_DECODE_ENABLE);
- temp |= DECODE_ENABLE_SERIAL_PORT2;
- pci_write_config32(SOC_LPC_DEV, LPC_IO_PORT_DECODE_ENABLE, temp);
+ pci_or_config32(SOC_LPC_DEV, LPC_IO_PORT_DECODE_ENABLE, DECODE_ENABLE_SERIAL_PORT2);
set_fan(&cpu_fan);
set_fan(&system_fan);