summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2022-12-08 08:41:28 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-12-09 23:59:02 +0000
commit456482c8ca01b17c1744eb86b2e90d69ff3c28e7 (patch)
tree883680f8afe6745d42c87dbbd6e95636922f5985 /src/drivers
parented8bdefcdf6c19258febb9931d1e8eb12b958bcc (diff)
drivers/generic/bayhub/bh720.c: Use {read,write}32p()
Change-Id: I97b073bfc291b13719a199b277f22b477647db8e Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70470 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/generic/bayhub/bh720.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/drivers/generic/bayhub/bh720.c b/src/drivers/generic/bayhub/bh720.c
index 8358b6a8e9..03c3b46f39 100644
--- a/src/drivers/generic/bayhub/bh720.c
+++ b/src/drivers/generic/bayhub/bh720.c
@@ -14,14 +14,14 @@
static u32 bh720_read_pcr(u32 sdbar, u32 addr)
{
- write32((void *)(sdbar + BH720_MEM_RW_ADR), BH720_MEM_RW_READ | addr);
- return read32((void *)(sdbar + BH720_MEM_RW_DATA));
+ write32p(sdbar + BH720_MEM_RW_ADR, BH720_MEM_RW_READ | addr);
+ return read32p(sdbar + BH720_MEM_RW_DATA);
}
static void bh720_write_pcr(u32 sdbar, u32 addr, u32 data)
{
- write32((void *)(sdbar + BH720_MEM_RW_DATA), data);
- write32((void *)(sdbar + BH720_MEM_RW_ADR), BH720_MEM_RW_WRITE | addr);
+ write32p(sdbar + BH720_MEM_RW_DATA, data);
+ write32p(sdbar + BH720_MEM_RW_ADR, BH720_MEM_RW_WRITE | addr);
}
static void bh720_rmw_pcr(u32 sdbar, u32 addr, u32 clear, u32 set)
@@ -37,7 +37,7 @@ static void bh720_program_hs200_mode(struct device *dev)
u32 sdbar = pci_read_config32(dev, PCI_BASE_ADDRESS_1);
/* Enable Memory Access Function */
- write32((void *)(sdbar + BH720_MEM_ACCESS_EN), 0x40000000);
+ write32p(sdbar + BH720_MEM_ACCESS_EN, 0x40000000);
bh720_write_pcr(sdbar, 0xd0, 0x80000000);
/* Set EMMC VCCQ 1.8V PCR 0x308[4] */
@@ -51,7 +51,7 @@ static void bh720_program_hs200_mode(struct device *dev)
/* Disable Memory Access */
bh720_write_pcr(sdbar, 0xd0, 0x80000001);
- write32((void *)(sdbar + BH720_MEM_ACCESS_EN), 0x80000000);
+ write32p(sdbar + BH720_MEM_ACCESS_EN, 0x80000000);
}
static void bh720_init(struct device *dev)