summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include/arm
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/include/arm')
-rw-r--r--payloads/libpayload/include/arm/arch/io.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/payloads/libpayload/include/arm/arch/io.h b/payloads/libpayload/include/arm/arch/io.h
index 6d549dedd1..ce48baf72e 100644
--- a/payloads/libpayload/include/arm/arch/io.h
+++ b/payloads/libpayload/include/arm/arch/io.h
@@ -98,6 +98,12 @@ static inline uint32_t read32(const void *addr)
return *(volatile uint32_t *)addr;
}
+static inline uint64_t read64(const void *addr)
+{
+ dmb();
+ return *(volatile uint64_t *)addr;
+}
+
static inline void write8(void *addr, uint8_t val)
{
dmb();
@@ -119,4 +125,11 @@ static inline void write32(void *addr, uint32_t val)
dmb();
}
+static inline void write64(void *addr, uint64_t val)
+{
+ dmb();
+ *(volatile uint64_t *)addr = val;
+ dmb();
+}
+
#endif