From patchwork Wed Jul 12 09:43:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 787110 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3x6vQV3KCGz9s65 for ; Wed, 12 Jul 2017 19:53:06 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 2AA7DC21F86; Wed, 12 Jul 2017 09:51:45 +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=RCVD_IN_DNSWL_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 BAB5DC21F5B; Wed, 12 Jul 2017 09:44:44 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D9C29C21F80; Wed, 12 Jul 2017 09:43:48 +0000 (UTC) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lists.denx.de (Postfix) with ESMTPS id F0B61C21C51 for ; Wed, 12 Jul 2017 09:43:43 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3x6vCT0fp9z9ttBg; Wed, 12 Jul 2017 11:43:33 +0200 (CEST) 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 LZIDBK-2pwRX; Wed, 12 Jul 2017 11:43:33 +0200 (CEST) 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 3x6vCT02dLz9ttBV; Wed, 12 Jul 2017 11:43:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 62D4B8B830; Wed, 12 Jul 2017 11:43:43 +0200 (CEST) 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 Knp2wV3uJjUz; Wed, 12 Jul 2017 11:43:43 +0200 (CEST) Received: from pc13941vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.8]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 2F32E8B7FE; Wed, 12 Jul 2017 11:43:43 +0200 (CEST) Received: by pc13941vm.idsi0.si.c-s.fr (Postfix, from userid 0) id EA6186A666; Wed, 12 Jul 2017 11:43:42 +0200 (CEST) Message-Id: In-Reply-To: References: From: Christophe Leroy To: Wolfgang Denk , Heiko Schocher , Tom Rini , Joe Hershberger Date: Wed, 12 Jul 2017 11:43:42 +0200 (CEST) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 13/14] powerpc, 8xx: fix missing function declarations. 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" Add missing .h and add missing declarations in .h Declare local functions as static Based on warnings reported by 'make C=2' Signed-off-by: Christophe Leroy --- arch/powerpc/cpu/mpc8xx/immap.c | 13 +++++++------ arch/powerpc/cpu/mpc8xx/traps.c | 2 +- arch/powerpc/include/asm/ppc.h | 5 +++++ arch/powerpc/lib/bootm.c | 2 ++ arch/powerpc/lib/interrupts.c | 3 --- drivers/net/mpc8xx_fec.c | 1 + 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c index 6da085325d..2284979dd6 100644 --- a/arch/powerpc/cpu/mpc8xx/immap.c +++ b/arch/powerpc/cpu/mpc8xx/immap.c @@ -19,7 +19,7 @@ DECLARE_GLOBAL_DATA_PTR; -int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; sysconf8xx_t __iomem *sc = &immap->im_siu_conf; @@ -36,7 +36,8 @@ int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } -int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc, + char * const argv[]) { immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; memctl8xx_t __iomem *memctl = &immap->im_memctl; @@ -58,7 +59,7 @@ int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } -int do_carinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_carinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; car8xx_t __iomem *car = &immap->im_clkrst; @@ -119,7 +120,7 @@ static void binary(char *label, uint value, int nbits) #define PC_NBITS 12 #define PD_NBITS 13 -int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; iop8xx_t __iomem *iop = &immap->im_ioport; @@ -172,7 +173,7 @@ int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * this needs a clean up for smaller tighter code * use *uint and set the address based on cmd + port */ -int do_iopset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_iopset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { uint rcode = 0; iopin_t iopin; @@ -328,7 +329,7 @@ static void prbrg(int n, uint val) putc('\n'); } -int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; cpm8xx_t __iomem *cp = &immap->im_cpm; diff --git a/arch/powerpc/cpu/mpc8xx/traps.c b/arch/powerpc/cpu/mpc8xx/traps.c index ebf4e412c9..23646adadd 100644 --- a/arch/powerpc/cpu/mpc8xx/traps.c +++ b/arch/powerpc/cpu/mpc8xx/traps.c @@ -52,7 +52,7 @@ static void print_backtrace(unsigned long *sp) printf("\n"); } -void show_regs(struct pt_regs *regs) +static void show_regs(struct pt_regs *regs) { int i; diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h index e8650e4388..a640c7320d 100644 --- a/arch/powerpc/include/asm/ppc.h +++ b/arch/powerpc/include/asm/ppc.h @@ -122,6 +122,11 @@ static inline void set_msr(unsigned long msr) void mpc8xxx_reginfo(void); #endif +void cpu_init_f(immap_t __iomem *immr); +int interrupt_init_cpu(unsigned *); +void timer_interrupt_cpu(struct pt_regs *); +unsigned long search_exception_table(unsigned long addr); + #endif /* !__ASSEMBLY__ */ #ifdef CONFIG_PPC diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 42a6afbc31..0e204027af 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -18,6 +18,8 @@ #include #include #include +#include +#include #if defined(CONFIG_OF_LIBFDT) #include diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c index ccba829710..46fa18c63f 100644 --- a/arch/powerpc/lib/interrupts.c +++ b/arch/powerpc/lib/interrupts.c @@ -28,9 +28,6 @@ void __board_show_activity (ulong dummy) #define CONFIG_SYS_WATCHDOG_FREQ (CONFIG_SYS_HZ / 2) #endif -extern int interrupt_init_cpu (unsigned *); -extern void timer_interrupt_cpu (struct pt_regs *); - static unsigned decrementer_count; /* count value for 1e6/HZ microseconds */ static __inline__ unsigned long get_dec (void) diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c index e525d3b593..71fe984a5d 100644 --- a/drivers/net/mpc8xx_fec.c +++ b/drivers/net/mpc8xx_fec.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include