summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/shared
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-16 17:02:09 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-19 17:00:57 -0500
commit9ffca502445a69bbe3c83c1d733239752dac3c10 (patch)
treed5acc8edfc83ddb622d6d70232a0dba01655cd36 /c/src/lib/libbsp/powerpc/shared
parentgen68302/console: Fix warnings (diff)
downloadrtems-9ffca502445a69bbe3c83c1d733239752dac3c10.tar.bz2
libbsp/powerpc/shared and motorola_powerpc: Fix warnings
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared')
-rw-r--r--c/src/lib/libbsp/powerpc/shared/irq/irq_init.c2
-rw-r--r--c/src/lib/libbsp/powerpc/shared/motorola/motorola.h2
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/bspstart.c15
-rw-r--r--c/src/lib/libbsp/powerpc/shared/vme/VMEConfig.h109
4 files changed, 66 insertions, 62 deletions
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 a58cd246c4..11b66c31a3 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 0c95fc451b..14360d56d1 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 6d7696cd1b..1d5d5d56f2 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 dfdf25d214..9b355819f1 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@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