mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
powerpc, 8xx: move get_immr() into C
Avoid unnecessary assembly functions when they can easily be written in C. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
This commit is contained in:
parent
1e7cefef58
commit
7fd697fd54
2 changed files with 8 additions and 16 deletions
|
@ -305,21 +305,6 @@ int_return:
|
|||
SYNC
|
||||
rfi
|
||||
|
||||
/*
|
||||
* unsigned int get_immr (unsigned int mask)
|
||||
*
|
||||
* return (mask ? (IMMR & mask) : IMMR);
|
||||
*/
|
||||
.globl get_immr
|
||||
get_immr:
|
||||
mr r4,r3 /* save mask */
|
||||
mfspr r3, IMMR /* IMMR */
|
||||
cmpwi 0,r4,0 /* mask != 0 ? */
|
||||
beq 4f
|
||||
and r3,r3,r4 /* IMMR & mask */
|
||||
4:
|
||||
blr
|
||||
|
||||
.globl get_pvr
|
||||
get_pvr:
|
||||
mfspr r3, PVR
|
||||
|
|
|
@ -38,8 +38,15 @@
|
|||
#include <asm/arch/immap_lsch2.h>
|
||||
#endif
|
||||
|
||||
#include <asm/processor.h>
|
||||
|
||||
#if defined(CONFIG_8xx)
|
||||
uint get_immr(uint);
|
||||
static inline uint get_immr(uint mask)
|
||||
{
|
||||
uint immr = mfspr(SPRN_IMMR);
|
||||
|
||||
return mask ? (immr & mask) : immr;
|
||||
}
|
||||
#endif
|
||||
uint get_pvr(void);
|
||||
uint get_svr(void);
|
||||
|
|
Loading…
Reference in a new issue