diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2020-04-22 16:14:26 +0200 |
---|---|---|
committer | Michał Żygowski <michal.zygowski@3mdeb.com> | 2020-04-27 11:32:23 +0000 |
commit | 49f63e0aa1fa36dd5d7028955beb63b659de075c (patch) | |
tree | 7aaa37457c5c1934ba405dfb251b7d925b49ecf3 /src/southbridge/amd/agesa/hudson/early_setup.c | |
parent | fcfca1da5ea4eee266c830948ec117f06a3553cd (diff) | |
download | coreboot-49f63e0aa1fa36dd5d7028955beb63b659de075c.tar.gz |
sb/amd/agesa/hudson: Const'ify pci_devfn_t devices
Change-Id: I5a9078baa2224865d0746b6d41f6053ac3a51e09
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40603
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/southbridge/amd/agesa/hudson/early_setup.c')
-rw-r--r-- | src/southbridge/amd/agesa/hudson/early_setup.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/southbridge/amd/agesa/hudson/early_setup.c b/src/southbridge/amd/agesa/hudson/early_setup.c index a4399c9b2d..ed2b18eaf2 100644 --- a/src/southbridge/amd/agesa/hudson/early_setup.c +++ b/src/southbridge/amd/agesa/hudson/early_setup.c @@ -60,10 +60,9 @@ void hudson_pci_port80(void) void hudson_lpc_port80(void) { u8 byte; - pci_devfn_t dev; /* Enable port 80 LPC decode in pci function 3 configuration space. */ - dev = PCI_DEV(0, 0x14, 3); + const pci_devfn_t dev = PCI_DEV(0, 0x14, 3); byte = pci_read_config8(dev, 0x4a); byte |= 1 << 5; /* enable port 80 */ pci_write_config8(dev, 0x4a, byte); @@ -71,13 +70,12 @@ void hudson_lpc_port80(void) void hudson_lpc_decode(void) { - pci_devfn_t dev; u32 tmp; /* Enable LPC controller */ pm_write8(0xec, pm_read8(0xec) | 0x01); - dev = PCI_DEV(0, 0x14, 3); + const pci_devfn_t dev = PCI_DEV(0, 0x14, 3); /* Serial port enumeration on Hudson: * PORT0 - 0x3f8 * PORT1 - 0x2f8 |