mirror of
https://xff.cz/git/u-boot/
synced 2025-10-07 03:05:19 +02:00
arm: Implement read_mpidr on armv7
Implement read_mpidr() on armv7 to make use of it in generic code that compiles on both armv7 and armv8. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Tom Rini
parent
92e02b01ec
commit
080be069f5
@@ -394,6 +394,15 @@ void switch_to_hypervisor_ret(void);
|
||||
#define wfi()
|
||||
#endif
|
||||
|
||||
static inline unsigned long read_mpidr(void)
|
||||
{
|
||||
unsigned long val;
|
||||
|
||||
asm volatile("mrc p15, 0, %0, c0, c0, 5" : "=r" (val));
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline unsigned long get_cpsr(void)
|
||||
{
|
||||
unsigned long cpsr;
|
||||
|
Reference in New Issue
Block a user