Commit 74f73cd5 authored by Yong Cong Sin's avatar Yong Cong Sin Committed by Chris Friedt
Browse files

arch/common: add 64bit register access functions for 64bit arch



Some 64bit arch SoC happens to have 64bit registers.

Signed-off-by: default avatarYong Cong Sin <ycsin@meta.com>
parent b489a754
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -50,6 +50,16 @@ static ALWAYS_INLINE void sys_write32(uint32_t data, mem_addr_t addr)
	*(volatile uint32_t *)addr = data;
}

static ALWAYS_INLINE uint64_t sys_read64(mem_addr_t addr)
{
	return *(volatile uint64_t *)addr;
}

static ALWAYS_INLINE void sys_write64(uint64_t data, mem_addr_t addr)
{
	*(volatile uint64_t *)addr = data;
}

#ifdef __cplusplus
}
#endif