diff mbox series

[U-Boot,v4,05/16] powerpc: mpc8xx: remove get_immr() argument

Message ID 0d0b34531f19bcb17c669d4fb25ea5cec7838d1a.1521215903.git.christophe.leroy@c-s.fr
State Accepted
Commit 0ebb5388b4aff65934730cc187826919c8f33a25
Delegated to: Tom Rini
Headers show
Series Powerpc: mpc8xx: cleanup before migration to DM model | expand

Commit Message

Christophe Leroy March 16, 2018, 4:20 p.m. UTC
get_immr() is always called with 0 as an argument, so it is useless.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/cpu/mpc8xx/cpu.c     | 2 +-
 arch/powerpc/cpu/mpc8xx/reginfo.c | 2 +-
 arch/powerpc/include/asm/ppc.h    | 6 ++----
 3 files changed, 4 insertions(+), 6 deletions(-)

Comments

Tom Rini April 6, 2018, 9:03 p.m. UTC | #1
On Fri, Mar 16, 2018 at 05:20:39PM +0100, Christophe Leroy wrote:

> get_immr() is always called with 0 as an argument, so it is useless.
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 5a81bed5a10..78874926e33 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -90,7 +90,7 @@  static int check_CPU(long clock, uint pvr, uint immr)
 int checkcpu(void)
 {
 	ulong clock = gd->cpu_clk;
-	uint immr = get_immr(0);	/* Return full IMMR contents */
+	uint immr = get_immr();	/* Return full IMMR contents */
 	uint pvr = get_pvr();
 
 	puts("CPU:   ");
diff --git a/arch/powerpc/cpu/mpc8xx/reginfo.c b/arch/powerpc/cpu/mpc8xx/reginfo.c
index 277d2753b25..d48ea265f83 100644
--- a/arch/powerpc/cpu/mpc8xx/reginfo.c
+++ b/arch/powerpc/cpu/mpc8xx/reginfo.c
@@ -22,7 +22,7 @@  void print_reginfo(void)
 	 */
 
 	printf("\nSystem Configuration registers\n"
-		"\tIMMR\t0x%08X\n", get_immr(0));
+		"\tIMMR\t0x%08X\n", get_immr());
 
 	printf("\tSIUMCR\t0x%08X", in_be32(&sysconf->sc_siumcr));
 	printf("\tSYPCR\t0x%08X\n", in_be32(&sysconf->sc_sypcr));
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
index 6ba10974b6d..c3f73ef8858 100644
--- a/arch/powerpc/include/asm/ppc.h
+++ b/arch/powerpc/include/asm/ppc.h
@@ -40,11 +40,9 @@ 
 
 #include <asm/processor.h>
 
-static inline uint get_immr(uint mask)
+static inline uint get_immr(void)
 {
-	uint immr = mfspr(SPRN_IMMR);
-
-	return mask ? (immr & mask) : immr;
+	return mfspr(SPRN_IMMR);
 }
 
 static inline uint get_pvr(void)