summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/include')
-rw-r--r--payloads/libpayload/include/arm/arch/io.h16
-rw-r--r--payloads/libpayload/include/arm64/arch/io.h16
2 files changed, 16 insertions, 16 deletions
diff --git a/payloads/libpayload/include/arm/arch/io.h b/payloads/libpayload/include/arm/arch/io.h
index ce48baf72e..c36494ded3 100644
--- a/payloads/libpayload/include/arm/arch/io.h
+++ b/payloads/libpayload/include/arm/arch/io.h
@@ -80,52 +80,52 @@ static inline void writel(uint32_t _v, volatile void *_a)
dmb();
}
-static inline uint8_t read8(const void *addr)
+static inline uint8_t read8(volatile const void *addr)
{
dmb();
return *(volatile uint8_t *)addr;
}
-static inline uint16_t read16(const void *addr)
+static inline uint16_t read16(volatile const void *addr)
{
dmb();
return *(volatile uint16_t *)addr;
}
-static inline uint32_t read32(const void *addr)
+static inline uint32_t read32(volatile const void *addr)
{
dmb();
return *(volatile uint32_t *)addr;
}
-static inline uint64_t read64(const void *addr)
+static inline uint64_t read64(volatile const void *addr)
{
dmb();
return *(volatile uint64_t *)addr;
}
-static inline void write8(void *addr, uint8_t val)
+static inline void write8(volatile void *addr, uint8_t val)
{
dmb();
*(volatile uint8_t *)addr = val;
dmb();
}
-static inline void write16(void *addr, uint16_t val)
+static inline void write16(volatile void *addr, uint16_t val)
{
dmb();
*(volatile uint16_t *)addr = val;
dmb();
}
-static inline void write32(void *addr, uint32_t val)
+static inline void write32(volatile void *addr, uint32_t val)
{
dmb();
*(volatile uint32_t *)addr = val;
dmb();
}
-static inline void write64(void *addr, uint64_t val)
+static inline void write64(volatile void *addr, uint64_t val)
{
dmb();
*(volatile uint64_t *)addr = val;
diff --git a/payloads/libpayload/include/arm64/arch/io.h b/payloads/libpayload/include/arm64/arch/io.h
index 092198842f..9d67716f89 100644
--- a/payloads/libpayload/include/arm64/arch/io.h
+++ b/payloads/libpayload/include/arm64/arch/io.h
@@ -81,52 +81,52 @@ static inline void writel(uint32_t _v, volatile void *_a)
dmb();
}
-static inline uint8_t read8(const void *addr)
+static inline uint8_t read8(volatile const void *addr)
{
dmb();
return *(volatile uint8_t *)addr;
}
-static inline uint16_t read16(const void *addr)
+static inline uint16_t read16(volatile const void *addr)
{
dmb();
return *(volatile uint16_t *)addr;
}
-static inline uint32_t read32(const void *addr)
+static inline uint32_t read32(volatile const void *addr)
{
dmb();
return *(volatile uint32_t *)addr;
}
-static inline uint64_t read64(const void *addr)
+static inline uint64_t read64(volatile const void *addr)
{
dmb();
return *(volatile uint64_t *)addr;
}
-static inline void write8(void *addr, uint8_t val)
+static inline void write8(volatile void *addr, uint8_t val)
{
dmb();
*(volatile uint8_t *)addr = val;
dmb();
}
-static inline void write16(void *addr, uint16_t val)
+static inline void write16(volatile void *addr, uint16_t val)
{
dmb();
*(volatile uint16_t *)addr = val;
dmb();
}
-static inline void write32(void *addr, uint32_t val)
+static inline void write32(volatile void *addr, uint32_t val)
{
dmb();
*(volatile uint32_t *)addr = val;
dmb();
}
-static inline void write64(void *addr, uint64_t val)
+static inline void write64(volatile void *addr, uint64_t val)
{
dmb();
*(volatile uint64_t *)addr = val;