ARM: use system.h's get_cr() for cpuinfo
Instead of open-coding the get_cr(), use the already available helper
in <asm/system.h> same as we do for 64-bit ARMv8.
The only difference is that the "memory" clobber is replaced by "cc".
This is ok as we don't expect get_cr() to affect memory and because
we do it elsewhere in barebox without a "memory" clobber already.

While at it, move it out the #if/#else clause as the helper changes
behavior depending on the same CONFIG option anyway.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent d52102d commit f7dd361dc20d72978be8cc65dd06e1286b4dc7e2
@Ahmad Fatoum Ahmad Fatoum authored on 7 Oct 2019
Sascha Hauer committed on 14 Oct 2019
Showing 1 changed file
View
arch/arm/cpu/cpuinfo.c