aboutsummaryrefslogtreecommitdiff
path: root/lib/mmio.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mmio.c')
-rw-r--r--lib/mmio.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/mmio.c b/lib/mmio.c
index 36ff780..b654be7 100644
--- a/lib/mmio.c
+++ b/lib/mmio.c
@@ -35,7 +35,17 @@ void mmio_write_32(uintptr_t addr, uint32_t value)
*(volatile uint32_t*)addr = value;
}
-unsigned mmio_read_32(uintptr_t addr)
+uint32_t mmio_read_32(uintptr_t addr)
{
return *(volatile uint32_t*)addr;
}
+
+void mmio_write_64(uintptr_t addr, uint64_t value)
+{
+ *(volatile uint64_t*)addr = value;
+}
+
+uint64_t mmio_read_64(uintptr_t addr)
+{
+ return *(volatile uint64_t*)addr;
+}