arch/common: add 64bit register access functions for 64bit arch
Some 64bit arch SoC happens to have 64bit registers. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This commit is contained in:
parent
b489a75403
commit
74f73cd535
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue