summaryrefslogtreecommitdiff
path: root/src/arch/arm
diff options
context:
space:
mode:
authorJianjun Wang <jianjun.wang@mediatek.com>2022-03-02 10:20:26 +0800
committerHung-Te Lin <hungte@chromium.org>2022-03-08 08:25:36 +0000
commit8565b94a5396f8112a9b86c1c7529217dd603c17 (patch)
tree27e54396d7816d924b95660401a11c0424752eb7 /src/arch/arm
parent0e834a94556854751a321d28acf20605c75aa4da (diff)
device/mmio.h: Move readXp/writeXp helpers to device/mmio.h
These helpers are not architecture dependent and it might be used for different platform. Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com> Change-Id: Ic13a94d91affb7cf65a2f22f08ea39ed671bc8e8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62561 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch/arm')
-rw-r--r--src/arch/arm/include/armv4/arch/mmio.h6
-rw-r--r--src/arch/arm/include/armv7/arch/mmio.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/arch/arm/include/armv4/arch/mmio.h b/src/arch/arm/include/armv4/arch/mmio.h
index d7d9a9979f..0ea41d21f9 100644
--- a/src/arch/arm/include/armv4/arch/mmio.h
+++ b/src/arch/arm/include/armv4/arch/mmio.h
@@ -24,6 +24,9 @@ static inline uint32_t read32(const void *addr)
return *(volatile uint32_t *)addr;
}
+/* Not supported */
+uint64_t read64(const void *addr);
+
static inline void write8(void *addr, uint8_t val)
{
*(volatile uint8_t *)addr = val;
@@ -39,4 +42,7 @@ static inline void write32(void *addr, uint32_t val)
*(volatile uint32_t *)addr = val;
}
+/* Not supported */
+void write64(void *addr, uint64_t val);
+
#endif /* __ARCH_MMIO_H__ */
diff --git a/src/arch/arm/include/armv7/arch/mmio.h b/src/arch/arm/include/armv7/arch/mmio.h
index 45868b573a..affa0977c8 100644
--- a/src/arch/arm/include/armv7/arch/mmio.h
+++ b/src/arch/arm/include/armv7/arch/mmio.h
@@ -29,6 +29,9 @@ static inline uint32_t read32(const void *addr)
return *(volatile uint32_t *)__builtin_assume_aligned(addr, sizeof(uint32_t));
}
+/* Not supported */
+uint64_t read64(const void *addr);
+
static inline void write8(void *addr, uint8_t val)
{
dmb();
@@ -50,4 +53,7 @@ static inline void write32(void *addr, uint32_t val)
dmb();
}
+/* Not supported */
+void write64(void *addr, uint64_t val);
+
#endif /* __ARCH_MMIO_H__ */