From patchwork Fri Mar 16 16:20:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 886974 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 402rT4305Gz9sBj for ; Sat, 17 Mar 2018 03:27:04 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id E8DD8C21E4E; Fri, 16 Mar 2018 16:22:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id AF420C21E44; Fri, 16 Mar 2018 16:21:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1CBD7C21E52; Fri, 16 Mar 2018 16:20:43 +0000 (UTC) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lists.denx.de (Postfix) with ESMTPS id 524B5C21D4A for ; Fri, 16 Mar 2018 16:20:40 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 402rKX03V3z9tvlw; Fri, 16 Mar 2018 17:20:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id W_tFxEzsdV8y; Fri, 16 Mar 2018 17:20:31 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 402rKW69Gvz9tvls; Fri, 16 Mar 2018 17:20:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id B5BC18BBB1; Fri, 16 Mar 2018 17:20:39 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id spoXYCMY7XCz; Fri, 16 Mar 2018 17:20:39 +0100 (CET) Received: from po15720vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.30]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 901488BBAA; Fri, 16 Mar 2018 17:20:39 +0100 (CET) Received: by po15720vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 7AE766F128; Fri, 16 Mar 2018 17:20:39 +0100 (CET) Message-Id: <0d0b34531f19bcb17c669d4fb25ea5cec7838d1a.1521215903.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy To: Tom Rini , Wolfgang Denk Date: Fri, 16 Mar 2018 17:20:39 +0100 (CET) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v4 05/16] powerpc: mpc8xx: remove get_immr() argument X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" get_immr() is always called with 0 as an argument, so it is useless. Signed-off-by: Christophe Leroy --- 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(-) 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 -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)