diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2021-03-10 22:55:22 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-03-12 00:47:30 +0000 |
commit | e995684fa1212784bb2642ad21e4e0ce60b19130 (patch) | |
tree | c5d9f32152c33a8b5796752626b45649c362c8c0 /src/soc/amd/common/block/include/amdblocks | |
parent | 5a702653cdc9562ece3c7ab5da121d42af7edb10 (diff) |
soc/amd/common: factor out SMN access function from SMU code
The SMU mailbox interface gets accessed over the SMN register space, so
factor out those access functions into a separate common code SMN access
building block.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iabac181972c02ae641da99f47b2aa9aa28dae333
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51399
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/soc/amd/common/block/include/amdblocks')
-rw-r--r-- | src/soc/amd/common/block/include/amdblocks/smn.h | 11 | ||||
-rw-r--r-- | src/soc/amd/common/block/include/amdblocks/smu.h | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/soc/amd/common/block/include/amdblocks/smn.h b/src/soc/amd/common/block/include/amdblocks/smn.h new file mode 100644 index 0000000000..962c8acd82 --- /dev/null +++ b/src/soc/amd/common/block/include/amdblocks/smn.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef AMD_BLOCK_SMN_H +#define AMD_BLOCK_SMN_H + +#include <types.h> + +uint32_t smn_read32(uint32_t reg); +void smn_write32(uint32_t reg, uint32_t val); + +#endif /* AMD_BLOCK_SMN_H */ diff --git a/src/soc/amd/common/block/include/amdblocks/smu.h b/src/soc/amd/common/block/include/amdblocks/smu.h index ca5e37a7ee..eeca3c6e7f 100644 --- a/src/soc/amd/common/block/include/amdblocks/smu.h +++ b/src/soc/amd/common/block/include/amdblocks/smu.h @@ -6,10 +6,6 @@ #include <types.h> #include <soc/smu.h> /* SoC-dependent definitions for SMU access */ -/* SMU registers accessed indirectly using an index/data pair in D0F00 config space */ -#define SMU_INDEX_ADDR 0xb8 /* 32 bit */ -#define SMU_DATA_ADDR 0xbc /* 32 bit */ - /* Arguments indexed locations are contiguous; the number is SoC-dependent */ #define REG_ADDR_MESG_ARG(x) (REG_ADDR_MESG_ARGS_BASE + ((x) * sizeof(uint32_t))) |