summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-12-02 04:55:46 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-12-03 03:45:23 +0000
commitf82437852634d21f1ba2ee7a31ec825220807224 (patch)
tree38e77e6645c3ed2e40124d1345525e93be80fb08
parentc487ac1a9fea07023ca3a8e95b8f44eb67a9a01d (diff)
AGESA,binaryPI: Remove unused s3_load/save_nvram
This is access to BIOSRAM region in ACPIMMIO. While we use the region, we do not use these functions. Change-Id: I39d1ae811cfe23595587ae0fe51c6549ecbaba6c Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37408 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
-rw-r--r--src/southbridge/amd/agesa/hudson/early_setup.c30
-rw-r--r--src/southbridge/amd/agesa/hudson/hudson.h3
-rw-r--r--src/southbridge/amd/pi/hudson/early_setup.c30
-rw-r--r--src/southbridge/amd/pi/hudson/hudson.h2
4 files changed, 0 insertions, 65 deletions
diff --git a/src/southbridge/amd/agesa/hudson/early_setup.c b/src/southbridge/amd/agesa/hudson/early_setup.c
index c3a4d41c8e..c5e6c25b68 100644
--- a/src/southbridge/amd/agesa/hudson/early_setup.c
+++ b/src/southbridge/amd/agesa/hudson/early_setup.c
@@ -87,34 +87,4 @@ void hudson_lpc_port80(void)
pci_write_config8(dev, 0x4a, byte);
}
-int s3_save_nvram_early(u32 dword, int size, int nvram_pos)
-{
- int i;
- printk(BIOS_DEBUG, "Writing %x of size %d to nvram pos: %d\n", dword, size, nvram_pos);
-
- for (i = 0; i < size; i++) {
- outb(nvram_pos, BIOSRAM_INDEX);
- outb((dword >> (8 * i)) & 0xff, BIOSRAM_DATA);
- nvram_pos++;
- }
-
- return nvram_pos;
-}
-
-int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos)
-{
- u32 data = *old_dword;
- int i;
- for (i = 0; i < size; i++) {
- outb(nvram_pos, BIOSRAM_INDEX);
- data &= ~(0xff << (i * 8));
- data |= inb(BIOSRAM_DATA) << (i *8);
- nvram_pos++;
- }
- *old_dword = data;
- printk(BIOS_DEBUG, "Loading %x of size %d to nvram pos:%d\n", *old_dword, size,
- nvram_pos-size);
- return nvram_pos;
-}
-
#endif /* _HUDSON_EARLY_SETUP_C_ */
diff --git a/src/southbridge/amd/agesa/hudson/hudson.h b/src/southbridge/amd/agesa/hudson/hudson.h
index 18303fc5cb..4927a3adfd 100644
--- a/src/southbridge/amd/agesa/hudson/hudson.h
+++ b/src/southbridge/amd/agesa/hudson/hudson.h
@@ -65,9 +65,6 @@ void hudson_lpc_port80(void);
void hudson_pci_port80(void);
void hudson_clk_output_48Mhz(void);
-int s3_save_nvram_early(u32 dword, int size, int nvram_pos);
-int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos);
-
void hudson_enable(struct device *dev);
#endif /* HUDSON_H */
diff --git a/src/southbridge/amd/pi/hudson/early_setup.c b/src/southbridge/amd/pi/hudson/early_setup.c
index 34a3513b63..3453021a5e 100644
--- a/src/southbridge/amd/pi/hudson/early_setup.c
+++ b/src/southbridge/amd/pi/hudson/early_setup.c
@@ -230,36 +230,6 @@ void lpc_wideio_16_window(uint16_t base)
lpc_wideio_window(base, 16);
}
-int s3_save_nvram_early(u32 dword, int size, int nvram_pos)
-{
- int i;
- printk(BIOS_DEBUG, "Writing %x of size %d to nvram pos: %d\n", dword, size, nvram_pos);
-
- for (i = 0; i < size; i++) {
- outb(nvram_pos, BIOSRAM_INDEX);
- outb((dword >> (8 * i)) & 0xff, BIOSRAM_DATA);
- nvram_pos++;
- }
-
- return nvram_pos;
-}
-
-int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos)
-{
- u32 data = *old_dword;
- int i;
- for (i = 0; i < size; i++) {
- outb(nvram_pos, BIOSRAM_INDEX);
- data &= ~(0xff << (i * 8));
- data |= inb(BIOSRAM_DATA) << (i *8);
- nvram_pos++;
- }
- *old_dword = data;
- printk(BIOS_DEBUG, "Loading %x of size %d to nvram pos:%d\n", *old_dword, size,
- nvram_pos-size);
- return nvram_pos;
-}
-
void hudson_clk_output_48Mhz(void)
{
u32 ctrl;
diff --git a/src/southbridge/amd/pi/hudson/hudson.h b/src/southbridge/amd/pi/hudson/hudson.h
index b24629f0a1..ac35536bc2 100644
--- a/src/southbridge/amd/pi/hudson/hudson.h
+++ b/src/southbridge/amd/pi/hudson/hudson.h
@@ -180,8 +180,6 @@ void hudson_set_readspeed(u16 norm, u16 fast);
void lpc_wideio_512_window(uint16_t base);
void lpc_wideio_16_window(uint16_t base);
void hudson_tpm_decode_spi(void);
-int s3_save_nvram_early(u32 dword, int size, int nvram_pos);
-int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos);
void configure_hudson_uart(void);
void hudson_enable(struct device *dev);