[PATCH 29/42] libbsp/powerpc/shared and motorola_powerpc: Fix warnings
Joel Sherrill
joel.sherrill at oarcorp.com
Fri Oct 17 15:23:45 UTC 2014
---
.../libbsp/powerpc/motorola_powerpc/Makefile.am | 59 ++++++-----
.../libbsp/powerpc/motorola_powerpc/include/bsp.h | 19 ++--
c/src/lib/libbsp/powerpc/shared/irq/irq_init.c | 2 +-
.../lib/libbsp/powerpc/shared/motorola/motorola.h | 2 +-
c/src/lib/libbsp/powerpc/shared/startup/bspstart.c | 15 +--
c/src/lib/libbsp/powerpc/shared/vme/VMEConfig.h | 109 +++++++++++----------
6 files changed, 107 insertions(+), 99 deletions(-)
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.am
index 9fc73c0..5e18b7e 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.am
@@ -71,46 +71,45 @@ polledIO_rel_CPPFLAGS = $(AM_CPPFLAGS) $(polledIO_CPPFLAGS)
polledIO_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
# console
-libbsp_a_SOURCES += \
- ../../powerpc/shared/console/uart.c \
- ../../powerpc/shared/console/console.c \
- ../../powerpc/shared/console/inch.c \
- ../../powerpc/shared/console/consoleIo.h \
- ../../powerpc/shared/console/keyboard.h \
- ../../powerpc/shared/console/uart.h
+libbsp_a_SOURCES += ../../powerpc/shared/console/uart.c
+libbsp_a_SOURCES += ../../powerpc/shared/console/console.c
+libbsp_a_SOURCES += ../../powerpc/shared/console/consoleIo.h
+libbsp_a_SOURCES += ../../powerpc/shared/console/keyboard.h
+libbsp_a_SOURCES += ../../powerpc/shared/console/uart.h
include_bsp_HEADERS += ../../powerpc/shared/irq/irq.h \
../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/irq_supp.h
# irq
-libbsp_a_SOURCES += ../../powerpc/shared/irq/irq_init.c \
- ../../powerpc/shared/irq/openpic_i8259_irq.c \
- ../../powerpc/shared/irq/i8259.c ../../powerpc/shared/irq/irq.h
+libbsp_a_SOURCES += ../../powerpc/shared/irq/irq_init.c
+libbsp_a_SOURCES += ../../powerpc/shared/irq/openpic_i8259_irq.c
+libbsp_a_SOURCES += ../../powerpc/shared/irq/i8259.c ../../powerpc/shared/irq/irq.h
include_bsp_HEADERS += ../../powerpc/shared/motorola/motorola.h
# motorola
-libbsp_a_SOURCES += ../../powerpc/shared/motorola/motorola.h \
- ../../powerpc/shared/motorola/motorola.c
+libbsp_a_SOURCES += ../../powerpc/shared/motorola/motorola.h
+libbsp_a_SOURCES += ../../powerpc/shared/motorola/motorola.c
include_bsp_HEADERS += ../../powerpc/shared/openpic/openpic.h
# openpic
-libbsp_a_SOURCES += ../../powerpc/shared/openpic/openpic.h \
- ../../powerpc/shared/openpic/openpic.c \
- ../../powerpc/shared/openpic/openpic.h
+libbsp_a_SOURCES += ../../powerpc/shared/openpic/openpic.h
+libbsp_a_SOURCES += ../../powerpc/shared/openpic/openpic.c
+libbsp_a_SOURCES += ../../powerpc/shared/openpic/openpic.h
include_bsp_HEADERS += ../../powerpc/shared/pci/pci.h
# pci
-libbsp_a_SOURCES += ../../powerpc/shared/pci/pci.c \
- ../../powerpc/shared/pci/detect_raven_bridge.c \
- ../../powerpc/shared/pci/generic_clear_hberrs.c \
- ../../powerpc/shared/pci/pcifinddevice.c ../../powerpc/shared/pci/pci.h
+libbsp_a_SOURCES += ../../powerpc/shared/pci/pci.c
+libbsp_a_SOURCES += ../../powerpc/shared/pci/detect_raven_bridge.c
+libbsp_a_SOURCES += ../../powerpc/shared/pci/generic_clear_hberrs.c
+libbsp_a_SOURCES += ../../powerpc/shared/pci/pcifinddevice.c
+libbsp_a_SOURCES += ../../powerpc/shared/pci/pci.h
include_bsp_HEADERS += ../../powerpc/shared/residual/residual.h \
../../powerpc/shared/residual/pnp.h
# residual
-libbsp_a_SOURCES += ../../powerpc/shared/residual/pnp.h \
- ../../powerpc/shared/residual/residual.h \
- ../../powerpc/shared/residual/residual.c
+libbsp_a_SOURCES += ../../powerpc/shared/residual/pnp.h
+libbsp_a_SOURCES += ../../powerpc/shared/residual/residual.h
+libbsp_a_SOURCES += ../../powerpc/shared/residual/residual.c
include_bsp_HEADERS += ../../shared/vmeUniverse/vmeUniverse.h \
../../shared/vmeUniverse/vme_am_defs.h \
@@ -120,14 +119,14 @@ include_bsp_HEADERS += ../../shared/vmeUniverse/vmeUniverse.h \
../../shared/vmeUniverse/bspVmeDmaList.h\
../../shared/vmeUniverse/VMEDMA.h
# vme
-libbsp_a_SOURCES += ../../shared/vmeUniverse/vmeUniverse.c \
- ../../shared/vmeUniverse/bspVmeDmaList.c \
- ../../shared/vmeUniverse/vmeUniverse.h \
- ../../shared/vmeUniverse/vme_am_defs.h \
- ../../shared/vmeUniverse/VME.h \
- ../../powerpc/shared/vme/vmeconfig.c \
- ../../powerpc/shared/vme/vme_universe.c \
- ../../powerpc/shared/vme/VMEConfig.h
+libbsp_a_SOURCES += ../../shared/vmeUniverse/vmeUniverse.c
+libbsp_a_SOURCES += ../../shared/vmeUniverse/bspVmeDmaList.c
+libbsp_a_SOURCES += ../../shared/vmeUniverse/vmeUniverse.h
+libbsp_a_SOURCES += ../../shared/vmeUniverse/vme_am_defs.h
+libbsp_a_SOURCES += ../../shared/vmeUniverse/VME.h
+libbsp_a_SOURCES += ../../powerpc/shared/vme/vmeconfig.c
+libbsp_a_SOURCES += ../../powerpc/shared/vme/vme_universe.c
+libbsp_a_SOURCES += ../../powerpc/shared/vme/VMEConfig.h
if QEMU
if HAS_NETWORKING
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h b/c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h
index b47801c..5e5e0a4 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h
@@ -1,7 +1,4 @@
/*
- * bsp.h -- contain BSP API definition.
- *
- * Copyright (C) 1999 Eric Valette. valette at crf.canon.fr
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -28,10 +25,6 @@ extern "C" {
#endif
/*
- * confdefs.h overrides for this BSP:
- */
-
-/*
* diagram illustrating the role of the configuration
* constants
* PCI_MEM_WIN0: CPU starting addr where PCI memory space is visible
@@ -232,6 +225,18 @@ extern int BSP_connect_clock_handler (void);
*/
extern unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet);
+/*
+ * 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);
+
#endif
#ifdef __cplusplus
diff --git a/c/src/lib/libbsp/powerpc/shared/irq/irq_init.c b/c/src/lib/libbsp/powerpc/shared/irq/irq_init.c
index a58cd24..11b66c3 100644
--- a/c/src/lib/libbsp/powerpc/shared/irq/irq_init.c
+++ b/c/src/lib/libbsp/powerpc/shared/irq/irq_init.c
@@ -164,7 +164,7 @@ static unsigned char mcp750_openpic_initsenses[] = {
#endif
#if BSP_ISA_IRQ_NUMBER > 0 && !defined(qemu)
-void VIA_isa_bridge_interrupts_setup(void)
+static void VIA_isa_bridge_interrupts_setup(void)
{
pci_isa_bridge_device pci_dev;
uint32_t temp;
diff --git a/c/src/lib/libbsp/powerpc/shared/motorola/motorola.h b/c/src/lib/libbsp/powerpc/shared/motorola/motorola.h
index 0c95fc4..14360d5 100644
--- a/c/src/lib/libbsp/powerpc/shared/motorola/motorola.h
+++ b/c/src/lib/libbsp/powerpc/shared/motorola/motorola.h
@@ -60,7 +60,7 @@ typedef enum {
extern prep_t checkPrepBoardType(RESIDUAL *res);
extern prep_t currentPrepType;
-extern motorolaBoard getMotorolaBoard();
+extern motorolaBoard getMotorolaBoard(void);
extern motorolaBoard currentBoard;
extern const char* motorolaBoardToString(motorolaBoard);
extern const struct _int_map *motorolaIntMap(motorolaBoard board);
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
index 6d7696c..1d5d5d5 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
@@ -100,16 +100,17 @@ void _BSP_Fatal_error(unsigned int v)
* Use the shared implementations of the following routines
*/
-char * save_boot_params(
- RESIDUAL *r3,
- void *r4,
- void *r5,
- char *additional_boot_options
+char *save_boot_params(
+ void *r3,
+ void *r4,
+ void *r5,
+ char *cmdline_start,
+ char *cmdline_end
)
{
- residualCopy = *r3;
- strncpy(loaderParam, additional_boot_options, MAX_LOADER_ADD_PARM);
+ residualCopy = *(RESIDUAL *)r3;
+ strncpy(loaderParam, cmdline_start, MAX_LOADER_ADD_PARM);
loaderParam[MAX_LOADER_ADD_PARM - 1] ='\0';
return loaderParam;
}
diff --git a/c/src/lib/libbsp/powerpc/shared/vme/VMEConfig.h b/c/src/lib/libbsp/powerpc/shared/vme/VMEConfig.h
index dfdf25d..9b35581 100644
--- a/c/src/lib/libbsp/powerpc/shared/vme/VMEConfig.h
+++ b/c/src/lib/libbsp/powerpc/shared/vme/VMEConfig.h
@@ -8,13 +8,13 @@
* ----------
* This software was created by
* Till Straumann <strauman at slac.stanford.edu>, 2002,
- * Stanford Linear Accelerator Center, Stanford University.
+ * Stanford Linear Accelerator Center, Stanford University.
*
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
- * under Contract DE-AC03-76SFO0515 with the Department of Energy.
+ * under Contract DE-AC03-76SFO0515 with the Department of Energy.
*
* Government disclaimer of liability
* ----------------------------------
@@ -67,27 +67,27 @@
*/
#if defined(mvme2100)
-#define _VME_A32_WIN0_ON_PCI 0x90000000
-#define _VME_A24_ON_PCI 0x9f000000
-#define _VME_A16_ON_PCI 0x9fff0000
-#define BSP_VME_BAT_IDX 1
+#define _VME_A32_WIN0_ON_PCI 0x90000000
+#define _VME_A24_ON_PCI 0x9f000000
+#define _VME_A16_ON_PCI 0x9fff0000
+#define BSP_VME_BAT_IDX 1
#else
-#define _VME_A32_WIN0_ON_PCI 0x10000000
-#define _VME_A24_ON_PCI 0x1f000000
-#define _VME_A16_ON_PCI 0x1fff0000
-#define BSP_VME_BAT_IDX 0
+#define _VME_A32_WIN0_ON_PCI 0x10000000
+#define _VME_A24_ON_PCI 0x1f000000
+#define _VME_A16_ON_PCI 0x1fff0000
+#define BSP_VME_BAT_IDX 0
#endif
/* start of the A32 window on the VME bus
* TODO: this should perhaps be a run-time configuration option
*/
-#define _VME_A32_WIN0_ON_VME 0x20000000
+#define _VME_A32_WIN0_ON_VME 0x20000000
/* if _VME_DRAM_OFFSET is defined, the BSP
* will map the board RAM onto the VME bus, starting
* at _VME_DRAM_OFFSET
*/
-#define _VME_DRAM_OFFSET 0xc0000000
+#define _VME_DRAM_OFFSET 0xc0000000
/* Define BSP_PCI_VME_DRIVER_DOES_EOI to let the vmeUniverse
* driver (Tsi148 driver doesn't implement this) implement
@@ -184,47 +184,50 @@ extern int _BSP_vme_bridge_irq;
#include <bsp/motorola.h>
#include <bsp/pci.h>
-#define BSP_VME_UNIVERSE_INSTALL_IRQ_MGR(err) \
-do { \
-int bus, dev, i = 0, j; \
-const struct _int_map *bspmap; \
- /* install the VME interrupt manager; \
- * if there's a bsp route map, use it to \
- * configure additional lines... \
- */ \
- err = -1; \
- if (0 == pci_find_device(0x10e3, 0x0000, 0, &bus, &dev, &i)){ \
- if ( (bspmap = motorolaIntMap(currentBoard)) ) { \
- for ( i=0; bspmap[i].bus >= 0; i++ ) { \
- if ( bspmap[i].bus == bus && bspmap[i].slot == dev ) { \
- int pins[5], names[4]; \
- /* found it; use info here... */ \
- /* copy up to 4 entries; terminated with -1 pin */ \
- for ( j=0; \
- j<5 && (pins[j]=bspmap[i].pin_route[j].pin-1)>=0; \
- j++) { \
- names[j] = bspmap[i].pin_route[j].int_name[0]; \
- } \
- pins[4] = -1; \
- if ( 0 == vmeUniverseInstallIrqMgrAlt( \
- VMEUNIVERSE_IRQ_MGR_FLAG_SHARED, /* shared IRQs */\
- pins[0], names[0], \
- pins[1], names[1], \
- pins[2], names[2], \
- pins[3], names[3], \
- -1) ) { \
- i = -1; \
- break; \
- } \
- } \
- } \
- } \
- if ( i >= 0 ) \
- err = vmeUniverseInstallIrqMgrAlt( \
- VMEUNIVERSE_IRQ_MGR_FLAG_SHARED, \
- 0,-1, \
- -1); \
- } \
+#define BSP_VME_UNIVERSE_INSTALL_IRQ_MGR(err) \
+do { \
+int bus, dev, i = 0, j; \
+const struct _int_map *bspmap; \
+ /* install the VME interrupt manager; \
+ * if there's a bsp route map, use it to \
+ * configure additional lines... \
+ */ \
+ err = -1; \
+ if (0 == pci_find_device(0x10e3, 0x0000, 0, &bus, &dev, &i)){ \
+ if ( (bspmap = motorolaIntMap(currentBoard)) ) { \
+ for ( i=0; bspmap[i].bus >= 0; i++ ) { \
+ if ( bspmap[i].bus == bus && bspmap[i].slot == dev ) { \
+ int pins[5], names[4]; \
+ /* found it; use info here... */ \
+ /* copy up to 4 entries; terminated with -1 pin */ \
+ for ( j=0; \
+ j<5 && (pins[j]=bspmap[i].pin_route[j].pin-1)>=0; \
+ j++) { \
+ names[j] = bspmap[i].pin_route[j].int_name[0]; \
+ } \
+ pins[4] = -1; \
+ if ( 0 == vmeUniverseInstallIrqMgrAlt( \
+ VMEUNIVERSE_IRQ_MGR_FLAG_SHARED, /* shared IRQs */\
+ pins[0], names[0], \
+ pins[1], names[1], \
+ pins[2], names[2], \
+ pins[3], names[3], \
+ -1) ) { \
+ i = -1; \
+ break; \
+ } \
+ } \
+ } \
+ } \
+ if ( i >= 0 ) \
+ err = vmeUniverseInstallIrqMgrAlt( \
+ VMEUNIVERSE_IRQ_MGR_FLAG_SHARED, \
+ 0,-1, \
+ -1); \
+ } \
} while (0)
+extern int BSP_VMEInit(void);
+extern int BSP_VMEIrqMgrInstall(void);
+
#endif
--
1.9.3
More information about the devel
mailing list