summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2022-09-29 15:58:37 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-09-30 14:49:07 +0000
commit78ba98a797e3392c61bc98dd1a3bc4d8e6501eb7 (patch)
tree356e4095ba8c65d0d3904369360943c958d1c731 /src/soc
parent73a0d0af6419c493c4787c3f59cba76cfb04817b (diff)
soc/amd/stoneyridge/fch: use read[16,32]p to avoid typecasts
Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I6372741284ad5f0453f0d4dfd8ebaddd7385f8ea Reviewed-on: https://review.coreboot.org/c/coreboot/+/67977 Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/stoneyridge/fch.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/soc/amd/stoneyridge/fch.c b/src/soc/amd/stoneyridge/fch.c
index 2b2c6deb12..9680fb2c4a 100644
--- a/src/soc/amd/stoneyridge/fch.c
+++ b/src/soc/amd/stoneyridge/fch.c
@@ -152,12 +152,10 @@ static void set_sb_gnvs(struct global_nvs *gnvs)
size_t fwsize;
amdfw_rom = 0x20000 - (0x80000 << CONFIG_AMD_FWM_POSITION_INDEX);
- xhci_fw = read32((void *)(amdfw_rom + XHCI_FW_SIG_OFFSET));
+ xhci_fw = read32p(amdfw_rom + XHCI_FW_SIG_OFFSET);
- fwaddr = 2 + read16((void *)(xhci_fw + XHCI_FW_ADDR_OFFSET
- + XHCI_FW_BOOTRAM_SIZE));
- fwsize = read16((void *)(xhci_fw + XHCI_FW_SIZE_OFFSET
- + XHCI_FW_BOOTRAM_SIZE));
+ fwaddr = 2 + read16p(xhci_fw + XHCI_FW_ADDR_OFFSET + XHCI_FW_BOOTRAM_SIZE);
+ fwsize = read16p(xhci_fw + XHCI_FW_SIZE_OFFSET + XHCI_FW_BOOTRAM_SIZE);
gnvs->fw00 = 0;
gnvs->fw01 = ((32 * KiB) << 16) + 0;
gnvs->fw02 = fwaddr + XHCI_FW_BOOTRAM_SIZE;