[U-Boot,v3,13/15] powerpc: mpc8xx: use PVR related defines and macros
diff mbox series

Message ID fccddebeb0481c6d9692489ab7c52a345bf3a6b7.1520334961.git.christophe.leroy@c-s.fr
State Deferred
Delegated to: Tom Rini
Headers show
Series
  • Powerpc: mpc8xx: cleanup before migration to DM model
Related show

Commit Message

Christophe Leroy March 6, 2018, 12:06 p.m. UTC
Avoid hardcoding the PVR values in C since they are defined
in processor.h

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/cpu/mpc8xx/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index c5669e6a8e0..07139544156 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -42,7 +42,7 @@  static int check_CPU(long clock, uint pvr, uint immr)
 
 	/* the highest 16 bits should be 0x0050 for a 860 */
 
-	if ((pvr >> 16) != 0x0050)
+	if (PVR_VER(pvr) != PVR_VER(PVR_8xx))
 		return -1;
 
 	k = (immr << 16) |