summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block
diff options
context:
space:
mode:
authorMarshall Dawson <marshalldawson3rd@gmail.com>2020-01-02 16:04:28 -0700
committerMichał Żygowski <michal.zygowski@3mdeb.com>2020-01-29 19:00:07 +0000
commitd5f0b4a17b7a3b617614d8b8c100a274a49fc49e (patch)
tree866dd54f9dbc46468db967dce5adc5d74e8c651e /src/soc/amd/common/block
parentc4a71467d1f9807d93f0a943219f511773447050 (diff)
amdblocks/biosram: Do small reformatting
Remove two blank lines and reorder functions by read/write sizes. Change-Id: I7bd6ed44546d49b65135a98e424a5669d90f2867 Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38146 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/common/block')
-rw-r--r--src/soc/amd/common/block/acpimmio/biosram.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/soc/amd/common/block/acpimmio/biosram.c b/src/soc/amd/common/block/acpimmio/biosram.c
index 814fdf3b00..1b1fcadee3 100644
--- a/src/soc/amd/common/block/acpimmio/biosram.c
+++ b/src/soc/amd/common/block/acpimmio/biosram.c
@@ -38,12 +38,6 @@ static 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));
}
-static uint32_t biosram_read32(uint8_t reg)
-{
- uint32_t value = biosram_read16(reg + sizeof(uint16_t)) << 16;
- return value | biosram_read16(reg);
-}
-
static void biosram_write16(uint8_t reg, uint16_t value)
{
biosram_write8(reg, value & 0xff);
@@ -51,6 +45,12 @@ static void biosram_write16(uint8_t reg, uint16_t value)
biosram_write8(reg + sizeof(uint8_t), value & 0xff);
}
+static uint32_t biosram_read32(uint8_t reg)
+{
+ uint32_t value = biosram_read16(reg + sizeof(uint16_t)) << 16;
+ return value | biosram_read16(reg);
+}
+
static void biosram_write32(uint8_t reg, uint32_t value)
{
biosram_write16(reg, value & 0xffff);
@@ -58,7 +58,6 @@ static void biosram_write32(uint8_t reg, uint32_t value)
biosram_write16(reg + sizeof(uint16_t), value & 0xffff);
}
-
/* Access to BIOSRAM is only allowed through the abstractions below. */
void *get_ap_entry_ptr(void)
@@ -71,7 +70,6 @@ void set_ap_entry_ptr(void *entry)
biosram_write32(BIOSRAM_AP_ENTRY, (uintptr_t)entry);
}
-
void backup_top_of_low_cacheable(uintptr_t ramtop)
{
biosram_write32(BIOSRAM_CBMEM_TOP, ramtop);