mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-26 22:52:18 +00:00
armv8: Add read_mpidr() function
This patch adds the read_mpidr() function which returns the MPIDR_EL1 register value Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com> Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
19de81502b
commit
ba5648cd91
1 changed files with 11 additions and 0 deletions
|
@ -72,6 +72,17 @@ static inline void set_sctlr(unsigned int val)
|
|||
asm volatile("isb");
|
||||
}
|
||||
|
||||
static inline unsigned long read_mpidr(void)
|
||||
{
|
||||
unsigned long val;
|
||||
|
||||
asm volatile("mrs %0, mpidr_el1" : "=r" (val));
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
#define BSP_COREID 0
|
||||
|
||||
void __asm_flush_dcache_all(void);
|
||||
void __asm_invalidate_dcache_all(void);
|
||||
void __asm_flush_dcache_range(u64 start, u64 end);
|
||||
|
|
Loading…
Reference in a new issue