From 9b7631105c1b0434b3b67c2cdfc13dac70bfe3e1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 16 Oct 2014 13:11:58 -0500 Subject: powerpc/mvme3100: Fix warnings --- .../lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c.c | 2 +- c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h | 46 ++++++++++++++-------- .../lib/libbsp/powerpc/mvme3100/startup/bspstart.c | 14 +++---- c/src/lib/libbsp/powerpc/mvme3100/vme/VMEConfig.h | 4 +- 4 files changed, 41 insertions(+), 25 deletions(-) diff --git a/c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c.c b/c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c.c index 94dfcd94a0..5682091a5a 100644 --- a/c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c.c +++ b/c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c.c @@ -65,7 +65,7 @@ #include "mpc8540_i2c_busdrv.h" -#define STATIC +#define STATIC static /* I2C controller register definitions */ #define I2CADR 0x3000 diff --git a/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h b/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h index a5ab7761ab..62992398fd 100644 --- a/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h @@ -7,7 +7,6 @@ */ /* - * * Copyright (C) 1999 Eric Valette. valette@crf.canon.fr * * The license and distribution terms for this file may be @@ -19,6 +18,8 @@ #ifndef _BSP_H #define _BSP_H +#ifndef ASM + #include #include @@ -176,8 +177,7 @@ extern "C" { * /dev/i2c0.ds1375-raw (read-write; transfer bytes to/from the ds1375) * */ -int -BSP_i2c_initialize(); +int BSP_i2c_initialize(void); /* System Control Register */ #define BSP_MVME3100_SYS_CR ((volatile uint8_t *)0xe2000001) @@ -213,8 +213,7 @@ BSP_i2c_initialize(); * any changes this call may be used * to read the current status w/o modifying it. */ -uint8_t -BSP_setSysReg(volatile uint8_t *r, uint8_t mask); +uint8_t BSP_setSysReg(volatile uint8_t *r, uint8_t mask); /* Atomically clear bits in a sys-register; The bits set in 'mask' * are cleared in the register; others are left unmodified. @@ -226,22 +225,19 @@ BSP_setSysReg(volatile uint8_t *r, uint8_t mask); * to read the current status w/o modifying it. */ -uint8_t -BSP_clrSysReg(volatile uint8_t *r, uint8_t mask); +uint8_t BSP_clrSysReg(volatile uint8_t *r, uint8_t mask); /* Convenience wrappers around BSP_setSysReg()/BSP_clrSysReg() */ /* Set write-protection for all EEPROM devices * RETURNS: old status */ -uint8_t -BSP_eeprom_write_protect(); +uint8_t BSP_eeprom_write_protect(void); /* Disengage write-protection for all EEPROM devices * RETURNS: old status */ -uint8_t -BSP_eeprom_write_enable(); +uint8_t BSP_eeprom_write_enable(void); /* Set LEDs that have their bit set in the mask * @@ -251,8 +247,7 @@ BSP_eeprom_write_enable(); * any changes this call may be used * to read the current status w/o modifying it. */ -uint8_t -BSP_setLEDs(uint8_t mask); +uint8_t BSP_setLEDs(uint8_t mask); /* Clear LEDs that have their bit set in the mask * @@ -260,8 +255,7 @@ BSP_setLEDs(uint8_t mask); * * NOTE: : see above (BSP_setLEDs) */ -uint8_t -BSP_clrLEDs(uint8_t mask); +uint8_t BSP_clrLEDs(uint8_t mask); #if 0 #define outport_byte(port,value) outb(value,port) @@ -314,7 +308,7 @@ extern int BSP_connect_clock_handler (void); * on PCI config space access to empty slots. */ extern unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet); -extern void BSP_motload_pci_fixup(); +extern void BSP_motload_pci_fixup(void); struct rtems_bsdnet_ifconfig; @@ -324,8 +318,28 @@ rtems_tsec_attach(struct rtems_bsdnet_ifconfig *ifcfg, int attaching); #define RTEMS_BSP_NETWORK_DRIVER_NAME "tse1" #define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_tsec_attach +/* + * Prototypes for methods called only from .S for dependency tracking + */ +char *save_boot_params( + void *r3, + void *r4, + void *r5, + char *cmdline_start, + char *cmdline_end +); +void zero_bss(void); + +/* + * Prototypes for methods in the BSP that cross file boundaries + */ +extern void BSP_vme_config(void); +extern void BSP_pciConfigDump_early( void ); + #ifdef __cplusplus } #endif +#endif /* !ASM */ + #endif diff --git a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c index 5a143497db..86b9ec0744 100644 --- a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c @@ -47,8 +47,6 @@ #endif extern unsigned long __rtems_end[]; -extern void BSP_vme_config(void); -extern void BSP_pciConfigDump_early( void ); extern unsigned ppc_exc_lock_std, ppc_exc_gpr3_std; /* @@ -123,14 +121,16 @@ char *rtems_progname; /* * Use the shared implementations of the following routines */ -char * save_boot_params( - void* r3, +char *save_boot_params( + void *r3, void *r4, - void* r5, - char *additional_boot_options) + void *r5, + char *cmdline_start, + char *cmdline_end +) { - strncpy(cmdline_buf, additional_boot_options, CMDLINE_BUF_SIZE); + strncpy(cmdline_buf, cmdline_start, CMDLINE_BUF_SIZE); cmdline_buf[CMDLINE_BUF_SIZE - 1] ='\0'; return cmdline_buf; } diff --git a/c/src/lib/libbsp/powerpc/mvme3100/vme/VMEConfig.h b/c/src/lib/libbsp/powerpc/mvme3100/vme/VMEConfig.h index 5692ac57d5..10b424c2a8 100644 --- a/c/src/lib/libbsp/powerpc/mvme3100/vme/VMEConfig.h +++ b/c/src/lib/libbsp/powerpc/mvme3100/vme/VMEConfig.h @@ -104,6 +104,9 @@ * sharing. */ +extern int BSP_VMEInit(void); +extern int BSP_VMEIrqMgrInstall(void); + /** * @defgroup powerpc_vme BSP_VME_INSTALL_IRQ_MGR Support * @@ -111,7 +114,6 @@ * * @brief BSP_VME_INSTALL_IRQ_MGR Support Package */ - #define BSP_VME_INSTALL_IRQ_MGR(err) \ do { \ err = vmeTsi148InstallIrqMgrAlt(\ -- cgit v1.2.3