forked from Imagelibrary/rtems
libbsp/powerpc/shared and motorola_powerpc: Fix warnings
This commit is contained in:
@@ -71,46 +71,45 @@ polledIO_rel_CPPFLAGS = $(AM_CPPFLAGS) $(polledIO_CPPFLAGS)
|
|||||||
polledIO_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
polledIO_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||||
|
|
||||||
# console
|
# console
|
||||||
libbsp_a_SOURCES += \
|
libbsp_a_SOURCES += ../../powerpc/shared/console/uart.c
|
||||||
../../powerpc/shared/console/uart.c \
|
libbsp_a_SOURCES += ../../powerpc/shared/console/console.c
|
||||||
../../powerpc/shared/console/console.c \
|
libbsp_a_SOURCES += ../../powerpc/shared/console/consoleIo.h
|
||||||
../../powerpc/shared/console/inch.c \
|
libbsp_a_SOURCES += ../../powerpc/shared/console/keyboard.h
|
||||||
../../powerpc/shared/console/consoleIo.h \
|
libbsp_a_SOURCES += ../../powerpc/shared/console/uart.h
|
||||||
../../powerpc/shared/console/keyboard.h \
|
|
||||||
../../powerpc/shared/console/uart.h
|
|
||||||
|
|
||||||
include_bsp_HEADERS += ../../powerpc/shared/irq/irq.h \
|
include_bsp_HEADERS += ../../powerpc/shared/irq/irq.h \
|
||||||
../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/irq_supp.h
|
../../../libcpu/@RTEMS_CPU@/@exceptions@/bspsupport/irq_supp.h
|
||||||
|
|
||||||
# irq
|
# irq
|
||||||
libbsp_a_SOURCES += ../../powerpc/shared/irq/irq_init.c \
|
libbsp_a_SOURCES += ../../powerpc/shared/irq/irq_init.c
|
||||||
../../powerpc/shared/irq/openpic_i8259_irq.c \
|
libbsp_a_SOURCES += ../../powerpc/shared/irq/openpic_i8259_irq.c
|
||||||
../../powerpc/shared/irq/i8259.c ../../powerpc/shared/irq/irq.h
|
libbsp_a_SOURCES += ../../powerpc/shared/irq/i8259.c ../../powerpc/shared/irq/irq.h
|
||||||
|
|
||||||
include_bsp_HEADERS += ../../powerpc/shared/motorola/motorola.h
|
include_bsp_HEADERS += ../../powerpc/shared/motorola/motorola.h
|
||||||
# motorola
|
# motorola
|
||||||
libbsp_a_SOURCES += ../../powerpc/shared/motorola/motorola.h \
|
libbsp_a_SOURCES += ../../powerpc/shared/motorola/motorola.h
|
||||||
../../powerpc/shared/motorola/motorola.c
|
libbsp_a_SOURCES += ../../powerpc/shared/motorola/motorola.c
|
||||||
|
|
||||||
include_bsp_HEADERS += ../../powerpc/shared/openpic/openpic.h
|
include_bsp_HEADERS += ../../powerpc/shared/openpic/openpic.h
|
||||||
# openpic
|
# openpic
|
||||||
libbsp_a_SOURCES += ../../powerpc/shared/openpic/openpic.h \
|
libbsp_a_SOURCES += ../../powerpc/shared/openpic/openpic.h
|
||||||
../../powerpc/shared/openpic/openpic.c \
|
libbsp_a_SOURCES += ../../powerpc/shared/openpic/openpic.c
|
||||||
../../powerpc/shared/openpic/openpic.h
|
libbsp_a_SOURCES += ../../powerpc/shared/openpic/openpic.h
|
||||||
|
|
||||||
include_bsp_HEADERS += ../../powerpc/shared/pci/pci.h
|
include_bsp_HEADERS += ../../powerpc/shared/pci/pci.h
|
||||||
# pci
|
# pci
|
||||||
libbsp_a_SOURCES += ../../powerpc/shared/pci/pci.c \
|
libbsp_a_SOURCES += ../../powerpc/shared/pci/pci.c
|
||||||
../../powerpc/shared/pci/detect_raven_bridge.c \
|
libbsp_a_SOURCES += ../../powerpc/shared/pci/detect_raven_bridge.c
|
||||||
../../powerpc/shared/pci/generic_clear_hberrs.c \
|
libbsp_a_SOURCES += ../../powerpc/shared/pci/generic_clear_hberrs.c
|
||||||
../../powerpc/shared/pci/pcifinddevice.c ../../powerpc/shared/pci/pci.h
|
libbsp_a_SOURCES += ../../powerpc/shared/pci/pcifinddevice.c
|
||||||
|
libbsp_a_SOURCES += ../../powerpc/shared/pci/pci.h
|
||||||
|
|
||||||
include_bsp_HEADERS += ../../powerpc/shared/residual/residual.h \
|
include_bsp_HEADERS += ../../powerpc/shared/residual/residual.h \
|
||||||
../../powerpc/shared/residual/pnp.h
|
../../powerpc/shared/residual/pnp.h
|
||||||
# residual
|
# residual
|
||||||
libbsp_a_SOURCES += ../../powerpc/shared/residual/pnp.h \
|
libbsp_a_SOURCES += ../../powerpc/shared/residual/pnp.h
|
||||||
../../powerpc/shared/residual/residual.h \
|
libbsp_a_SOURCES += ../../powerpc/shared/residual/residual.h
|
||||||
../../powerpc/shared/residual/residual.c
|
libbsp_a_SOURCES += ../../powerpc/shared/residual/residual.c
|
||||||
|
|
||||||
include_bsp_HEADERS += ../../shared/vmeUniverse/vmeUniverse.h \
|
include_bsp_HEADERS += ../../shared/vmeUniverse/vmeUniverse.h \
|
||||||
../../shared/vmeUniverse/vme_am_defs.h \
|
../../shared/vmeUniverse/vme_am_defs.h \
|
||||||
@@ -120,14 +119,14 @@ include_bsp_HEADERS += ../../shared/vmeUniverse/vmeUniverse.h \
|
|||||||
../../shared/vmeUniverse/bspVmeDmaList.h\
|
../../shared/vmeUniverse/bspVmeDmaList.h\
|
||||||
../../shared/vmeUniverse/VMEDMA.h
|
../../shared/vmeUniverse/VMEDMA.h
|
||||||
# vme
|
# vme
|
||||||
libbsp_a_SOURCES += ../../shared/vmeUniverse/vmeUniverse.c \
|
libbsp_a_SOURCES += ../../shared/vmeUniverse/vmeUniverse.c
|
||||||
../../shared/vmeUniverse/bspVmeDmaList.c \
|
libbsp_a_SOURCES += ../../shared/vmeUniverse/bspVmeDmaList.c
|
||||||
../../shared/vmeUniverse/vmeUniverse.h \
|
libbsp_a_SOURCES += ../../shared/vmeUniverse/vmeUniverse.h
|
||||||
../../shared/vmeUniverse/vme_am_defs.h \
|
libbsp_a_SOURCES += ../../shared/vmeUniverse/vme_am_defs.h
|
||||||
../../shared/vmeUniverse/VME.h \
|
libbsp_a_SOURCES += ../../shared/vmeUniverse/VME.h
|
||||||
../../powerpc/shared/vme/vmeconfig.c \
|
libbsp_a_SOURCES += ../../powerpc/shared/vme/vmeconfig.c
|
||||||
../../powerpc/shared/vme/vme_universe.c \
|
libbsp_a_SOURCES += ../../powerpc/shared/vme/vme_universe.c
|
||||||
../../powerpc/shared/vme/VMEConfig.h
|
libbsp_a_SOURCES += ../../powerpc/shared/vme/VMEConfig.h
|
||||||
|
|
||||||
if QEMU
|
if QEMU
|
||||||
if HAS_NETWORKING
|
if HAS_NETWORKING
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* bsp.h -- contain BSP API definition.
|
|
||||||
*
|
|
||||||
* Copyright (C) 1999 Eric Valette. valette@crf.canon.fr
|
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
* found in the file LICENSE in this distribution or at
|
* found in the file LICENSE in this distribution or at
|
||||||
@@ -27,10 +24,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* confdefs.h overrides for this BSP:
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* diagram illustrating the role of the configuration
|
* diagram illustrating the role of the configuration
|
||||||
* constants
|
* constants
|
||||||
@@ -232,6 +225,18 @@ extern int BSP_connect_clock_handler (void);
|
|||||||
*/
|
*/
|
||||||
extern unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet);
|
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
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ static unsigned char mcp750_openpic_initsenses[] = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if BSP_ISA_IRQ_NUMBER > 0 && !defined(qemu)
|
#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;
|
pci_isa_bridge_device pci_dev;
|
||||||
uint32_t temp;
|
uint32_t temp;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ typedef enum {
|
|||||||
|
|
||||||
extern prep_t checkPrepBoardType(RESIDUAL *res);
|
extern prep_t checkPrepBoardType(RESIDUAL *res);
|
||||||
extern prep_t currentPrepType;
|
extern prep_t currentPrepType;
|
||||||
extern motorolaBoard getMotorolaBoard();
|
extern motorolaBoard getMotorolaBoard(void);
|
||||||
extern motorolaBoard currentBoard;
|
extern motorolaBoard currentBoard;
|
||||||
extern const char* motorolaBoardToString(motorolaBoard);
|
extern const char* motorolaBoardToString(motorolaBoard);
|
||||||
extern const struct _int_map *motorolaIntMap(motorolaBoard board);
|
extern const struct _int_map *motorolaIntMap(motorolaBoard board);
|
||||||
|
|||||||
@@ -100,16 +100,17 @@ void _BSP_Fatal_error(unsigned int v)
|
|||||||
* Use the shared implementations of the following routines
|
* Use the shared implementations of the following routines
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char * save_boot_params(
|
char *save_boot_params(
|
||||||
RESIDUAL *r3,
|
void *r3,
|
||||||
void *r4,
|
void *r4,
|
||||||
void *r5,
|
void *r5,
|
||||||
char *additional_boot_options
|
char *cmdline_start,
|
||||||
|
char *cmdline_end
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
residualCopy = *r3;
|
residualCopy = *(RESIDUAL *)r3;
|
||||||
strncpy(loaderParam, additional_boot_options, MAX_LOADER_ADD_PARM);
|
strncpy(loaderParam, cmdline_start, MAX_LOADER_ADD_PARM);
|
||||||
loaderParam[MAX_LOADER_ADD_PARM - 1] ='\0';
|
loaderParam[MAX_LOADER_ADD_PARM - 1] ='\0';
|
||||||
return loaderParam;
|
return loaderParam;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,13 @@
|
|||||||
* ----------
|
* ----------
|
||||||
* This software was created by
|
* This software was created by
|
||||||
* Till Straumann <strauman@slac.stanford.edu>, 2002,
|
* Till Straumann <strauman@slac.stanford.edu>, 2002,
|
||||||
* Stanford Linear Accelerator Center, Stanford University.
|
* Stanford Linear Accelerator Center, Stanford University.
|
||||||
*
|
*
|
||||||
* Acknowledgement of sponsorship
|
* Acknowledgement of sponsorship
|
||||||
* ------------------------------
|
* ------------------------------
|
||||||
* This software was produced by
|
* This software was produced by
|
||||||
* the Stanford Linear Accelerator Center, Stanford University,
|
* 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
|
* Government disclaimer of liability
|
||||||
* ----------------------------------
|
* ----------------------------------
|
||||||
@@ -67,27 +67,27 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(mvme2100)
|
#if defined(mvme2100)
|
||||||
#define _VME_A32_WIN0_ON_PCI 0x90000000
|
#define _VME_A32_WIN0_ON_PCI 0x90000000
|
||||||
#define _VME_A24_ON_PCI 0x9f000000
|
#define _VME_A24_ON_PCI 0x9f000000
|
||||||
#define _VME_A16_ON_PCI 0x9fff0000
|
#define _VME_A16_ON_PCI 0x9fff0000
|
||||||
#define BSP_VME_BAT_IDX 1
|
#define BSP_VME_BAT_IDX 1
|
||||||
#else
|
#else
|
||||||
#define _VME_A32_WIN0_ON_PCI 0x10000000
|
#define _VME_A32_WIN0_ON_PCI 0x10000000
|
||||||
#define _VME_A24_ON_PCI 0x1f000000
|
#define _VME_A24_ON_PCI 0x1f000000
|
||||||
#define _VME_A16_ON_PCI 0x1fff0000
|
#define _VME_A16_ON_PCI 0x1fff0000
|
||||||
#define BSP_VME_BAT_IDX 0
|
#define BSP_VME_BAT_IDX 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* start of the A32 window on the VME bus
|
/* start of the A32 window on the VME bus
|
||||||
* TODO: this should perhaps be a run-time configuration option
|
* 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
|
/* if _VME_DRAM_OFFSET is defined, the BSP
|
||||||
* will map the board RAM onto the VME bus, starting
|
* will map the board RAM onto the VME bus, starting
|
||||||
* at _VME_DRAM_OFFSET
|
* 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
|
/* Define BSP_PCI_VME_DRIVER_DOES_EOI to let the vmeUniverse
|
||||||
* driver (Tsi148 driver doesn't implement this) implement
|
* driver (Tsi148 driver doesn't implement this) implement
|
||||||
@@ -184,47 +184,50 @@ extern int _BSP_vme_bridge_irq;
|
|||||||
#include <bsp/motorola.h>
|
#include <bsp/motorola.h>
|
||||||
#include <bsp/pci.h>
|
#include <bsp/pci.h>
|
||||||
|
|
||||||
#define BSP_VME_UNIVERSE_INSTALL_IRQ_MGR(err) \
|
#define BSP_VME_UNIVERSE_INSTALL_IRQ_MGR(err) \
|
||||||
do { \
|
do { \
|
||||||
int bus, dev, i = 0, j; \
|
int bus, dev, i = 0, j; \
|
||||||
const struct _int_map *bspmap; \
|
const struct _int_map *bspmap; \
|
||||||
/* install the VME interrupt manager; \
|
/* install the VME interrupt manager; \
|
||||||
* if there's a bsp route map, use it to \
|
* if there's a bsp route map, use it to \
|
||||||
* configure additional lines... \
|
* configure additional lines... \
|
||||||
*/ \
|
*/ \
|
||||||
err = -1; \
|
err = -1; \
|
||||||
if (0 == pci_find_device(0x10e3, 0x0000, 0, &bus, &dev, &i)){ \
|
if (0 == pci_find_device(0x10e3, 0x0000, 0, &bus, &dev, &i)){ \
|
||||||
if ( (bspmap = motorolaIntMap(currentBoard)) ) { \
|
if ( (bspmap = motorolaIntMap(currentBoard)) ) { \
|
||||||
for ( i=0; bspmap[i].bus >= 0; i++ ) { \
|
for ( i=0; bspmap[i].bus >= 0; i++ ) { \
|
||||||
if ( bspmap[i].bus == bus && bspmap[i].slot == dev ) { \
|
if ( bspmap[i].bus == bus && bspmap[i].slot == dev ) { \
|
||||||
int pins[5], names[4]; \
|
int pins[5], names[4]; \
|
||||||
/* found it; use info here... */ \
|
/* found it; use info here... */ \
|
||||||
/* copy up to 4 entries; terminated with -1 pin */ \
|
/* copy up to 4 entries; terminated with -1 pin */ \
|
||||||
for ( j=0; \
|
for ( j=0; \
|
||||||
j<5 && (pins[j]=bspmap[i].pin_route[j].pin-1)>=0; \
|
j<5 && (pins[j]=bspmap[i].pin_route[j].pin-1)>=0; \
|
||||||
j++) { \
|
j++) { \
|
||||||
names[j] = bspmap[i].pin_route[j].int_name[0]; \
|
names[j] = bspmap[i].pin_route[j].int_name[0]; \
|
||||||
} \
|
} \
|
||||||
pins[4] = -1; \
|
pins[4] = -1; \
|
||||||
if ( 0 == vmeUniverseInstallIrqMgrAlt( \
|
if ( 0 == vmeUniverseInstallIrqMgrAlt( \
|
||||||
VMEUNIVERSE_IRQ_MGR_FLAG_SHARED, /* shared IRQs */\
|
VMEUNIVERSE_IRQ_MGR_FLAG_SHARED, /* shared IRQs */\
|
||||||
pins[0], names[0], \
|
pins[0], names[0], \
|
||||||
pins[1], names[1], \
|
pins[1], names[1], \
|
||||||
pins[2], names[2], \
|
pins[2], names[2], \
|
||||||
pins[3], names[3], \
|
pins[3], names[3], \
|
||||||
-1) ) { \
|
-1) ) { \
|
||||||
i = -1; \
|
i = -1; \
|
||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
if ( i >= 0 ) \
|
if ( i >= 0 ) \
|
||||||
err = vmeUniverseInstallIrqMgrAlt( \
|
err = vmeUniverseInstallIrqMgrAlt( \
|
||||||
VMEUNIVERSE_IRQ_MGR_FLAG_SHARED, \
|
VMEUNIVERSE_IRQ_MGR_FLAG_SHARED, \
|
||||||
0,-1, \
|
0,-1, \
|
||||||
-1); \
|
-1); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
extern int BSP_VMEInit(void);
|
||||||
|
extern int BSP_VMEIrqMgrInstall(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user