Commit d614e6e3 authored by Huifeng Zhang's avatar Huifeng Zhang Committed by Fabio Baltieri
Browse files

arch: aarch32: cortex_a_r: introduce sys_read64



sys_read64 is useful when operating gicv3 register.

Signed-off-by: default avatarHuifeng Zhang <Huifeng.Zhang@arm.com>
parent d1614851
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -66,6 +66,14 @@ 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)
{
	uint64_t val = *(volatile uint64_t *)addr;

	__DMB();
	return val;
}

#ifdef __cplusplus
}
#endif