diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-12-20 04:19:46 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-01-03 04:13:44 +0000 |
commit | bc17b6f98f50a9c295d59290328f439b49defc8d (patch) | |
tree | 0cf810261c87ed649a06c22e9a186adc3ce93228 /src/soc/amd/common/block/acpimmio/mmio_util.c | |
parent | ec35a3d88588f847b717ab8445bcb428714b222e (diff) |
amdblocks/biosram: Force use of abstraction
Hide the fundamental BIOSRAM accessors to force use of the
memory space via abstraction functions.
Change-Id: I774b6640cdd9873f52e446c4ca41b7c537a87883
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37862
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/common/block/acpimmio/mmio_util.c')
-rw-r--r-- | src/soc/amd/common/block/acpimmio/mmio_util.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/soc/amd/common/block/acpimmio/mmio_util.c b/src/soc/amd/common/block/acpimmio/mmio_util.c index a589ef549a..202e47ac10 100644 --- a/src/soc/amd/common/block/acpimmio/mmio_util.c +++ b/src/soc/amd/common/block/acpimmio/mmio_util.c @@ -72,28 +72,3 @@ void pm_io_write32(uint8_t reg, uint32_t value) value >>= 16; pm_io_write16(reg + sizeof(uint16_t), value & 0xffff); } - -uint16_t biosram_read16(uint8_t reg) /* Must be 1 byte at a time */ -{ - return (biosram_read8(reg + sizeof(uint8_t)) << 8 | biosram_read8(reg)); -} - -uint32_t biosram_read32(uint8_t reg) -{ - uint32_t value = biosram_read16(reg + sizeof(uint16_t)) << 16; - return value | biosram_read16(reg); -} - -void biosram_write16(uint8_t reg, uint16_t value) -{ - biosram_write8(reg, value & 0xff); - value >>= 8; - biosram_write8(reg + sizeof(uint8_t), value & 0xff); -} - -void biosram_write32(uint8_t reg, uint32_t value) -{ - biosram_write16(reg, value & 0xffff); - value >>= 16; - biosram_write16(reg + sizeof(uint16_t), value & 0xffff); -} |