forked from Imagelibrary/rtems
score: Add RTEMS_FATAL_SOURCE_BSP
Merge RTEMS_FATAL_SOURCE_BSP_GENERIC and RTEMS_FATAL_SOURCE_BSP_SPECIFIC into new fatal source RTEMS_FATAL_SOURCE_BSP. This makes it easier to figure out the code position given a fatal source and code.
This commit is contained in:
@@ -33,7 +33,7 @@ include_bspdir = $(includedir)/bsp
|
|||||||
|
|
||||||
include_bsp_HEADERS =
|
include_bsp_HEADERS =
|
||||||
include_bsp_HEADERS += shared/include/default-initial-extension.h
|
include_bsp_HEADERS += shared/include/default-initial-extension.h
|
||||||
include_bsp_HEADERS += shared/include/generic-fatal.h
|
include_bsp_HEADERS += shared/include/fatal.h
|
||||||
|
|
||||||
include $(srcdir)/preinstall.am
|
include $(srcdir)/preinstall.am
|
||||||
include $(top_srcdir)/automake/subdirs.am
|
include $(top_srcdir)/automake/subdirs.am
|
||||||
|
|||||||
@@ -117,16 +117,6 @@ bool lpc24xx_uart_probe_2(int minor);
|
|||||||
|
|
||||||
bool lpc24xx_uart_probe_3(int minor);
|
bool lpc24xx_uart_probe_3(int minor);
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
BSP_ARM_PL111_FATAL_REGISTER_DEV,
|
|
||||||
BSP_ARM_PL111_FATAL_SEM_CREATE,
|
|
||||||
BSP_ARM_PL111_FATAL_SEM_RELEASE,
|
|
||||||
LPC24XX_FATAL_PL111_SET_UP,
|
|
||||||
LPC24XX_FATAL_PL111_PINS_SET_UP,
|
|
||||||
LPC24XX_FATAL_PL111_PINS_TEAR_DOWN,
|
|
||||||
LPC24XX_FATAL_PL111_TEAR_DOWN
|
|
||||||
} lpc24xx_fatal_code;
|
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#include <bsp/arm-pl111-fb.h>
|
#include <bsp/arm-pl111-fb.h>
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <bsp/io.h>
|
#include <bsp/io.h>
|
||||||
#include <bsp/lcd.h>
|
#include <bsp/lcd.h>
|
||||||
#include <bsp/lpc24xx.h>
|
#include <bsp/lpc24xx.h>
|
||||||
@@ -48,7 +49,7 @@ static void fb_set_up(const pl111_fb_config *cfg)
|
|||||||
|
|
||||||
sc = lpc24xx_module_enable(LPC24XX_MODULE_LCD, LPC24XX_MODULE_PCLK_DEFAULT);
|
sc = lpc24xx_module_enable(LPC24XX_MODULE_LCD, LPC24XX_MODULE_PCLK_DEFAULT);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
rtems_fatal(RTEMS_FATAL_SOURCE_BSP_SPECIFIC, LPC24XX_FATAL_PL111_SET_UP);
|
bsp_fatal(LPC24XX_FATAL_PL111_SET_UP);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARM_MULTILIB_ARCH_V4
|
#ifdef ARM_MULTILIB_ARCH_V4
|
||||||
@@ -68,10 +69,7 @@ static void fb_pins_set_up(const pl111_fb_config *cfg)
|
|||||||
|
|
||||||
sc = lpc24xx_pin_config(tft_16_bit_5_6_5_pins, LPC24XX_PIN_SET_FUNCTION);
|
sc = lpc24xx_pin_config(tft_16_bit_5_6_5_pins, LPC24XX_PIN_SET_FUNCTION);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
rtems_fatal(
|
bsp_fatal(LPC24XX_FATAL_PL111_PINS_SET_UP);
|
||||||
RTEMS_FATAL_SOURCE_BSP_SPECIFIC,
|
|
||||||
LPC24XX_FATAL_PL111_PINS_SET_UP
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,10 +79,7 @@ static void fb_pins_tear_down(const pl111_fb_config *cfg)
|
|||||||
|
|
||||||
sc = lpc24xx_pin_config(tft_16_bit_5_6_5_pins, LPC24XX_PIN_SET_INPUT);
|
sc = lpc24xx_pin_config(tft_16_bit_5_6_5_pins, LPC24XX_PIN_SET_INPUT);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
rtems_fatal(
|
bsp_fatal(LPC24XX_FATAL_PL111_PINS_TEAR_DOWN);
|
||||||
RTEMS_FATAL_SOURCE_BSP_SPECIFIC,
|
|
||||||
LPC24XX_FATAL_PL111_PINS_TEAR_DOWN
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,10 +93,7 @@ static void fb_tear_down(const pl111_fb_config *cfg)
|
|||||||
|
|
||||||
sc = lpc24xx_module_disable(LPC24XX_MODULE_LCD);
|
sc = lpc24xx_module_disable(LPC24XX_MODULE_LCD);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
rtems_fatal(
|
bsp_fatal(LPC24XX_FATAL_PL111_TEAR_DOWN);
|
||||||
RTEMS_FATAL_SOURCE_BSP_SPECIFIC,
|
|
||||||
LPC24XX_FATAL_PL111_TEAR_DOWN
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,16 +51,6 @@ extern "C" {
|
|||||||
|
|
||||||
#define BSP_ARM_GIC_DIST_BASE 0x1f001000
|
#define BSP_ARM_GIC_DIST_BASE 0x1f001000
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
BSP_ARM_A9MPCORE_FATAL_CLOCK_IRQ_INSTALL,
|
|
||||||
BSP_ARM_A9MPCORE_FATAL_CLOCK_IRQ_REMOVE,
|
|
||||||
BSP_ARM_PL111_FATAL_REGISTER_DEV,
|
|
||||||
BSP_ARM_PL111_FATAL_SEM_CREATE,
|
|
||||||
BSP_ARM_PL111_FATAL_SEM_RELEASE
|
|
||||||
} rvpbxa9_fatal_code;
|
|
||||||
|
|
||||||
void rvpbxa9_fatal(rvpbxa9_fatal_code code) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|||||||
@@ -16,11 +16,6 @@
|
|||||||
#include <bsp/bootcard.h>
|
#include <bsp/bootcard.h>
|
||||||
#include <bsp/irq-generic.h>
|
#include <bsp/irq-generic.h>
|
||||||
|
|
||||||
void rvpbxa9_fatal(rvpbxa9_fatal_code code)
|
|
||||||
{
|
|
||||||
rtems_fatal(RTEMS_FATAL_SOURCE_BSP_SPECIFIC, code);
|
|
||||||
}
|
|
||||||
|
|
||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
{
|
{
|
||||||
bsp_interrupt_initialize();
|
bsp_interrupt_initialize();
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#include <rtems/counter.h>
|
#include <rtems/counter.h>
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <bsp/irq.h>
|
#include <bsp/irq.h>
|
||||||
#include <bsp/arm-a9mpcore-regs.h>
|
#include <bsp/arm-a9mpcore-regs.h>
|
||||||
#include <bsp/arm-a9mpcore-clock.h>
|
#include <bsp/arm-a9mpcore-clock.h>
|
||||||
@@ -51,10 +52,7 @@ static void a9mpcore_clock_handler_install(void)
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
rtems_fatal(
|
bsp_fatal(BSP_ARM_A9MPCORE_FATAL_CLOCK_IRQ_INSTALL);
|
||||||
RTEMS_FATAL_SOURCE_BSP_SPECIFIC,
|
|
||||||
BSP_ARM_A9MPCORE_FATAL_CLOCK_IRQ_INSTALL
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,10 +119,7 @@ static void a9mpcore_clock_cleanup(void)
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
rtems_fatal(
|
bsp_fatal(BSP_ARM_A9MPCORE_FATAL_CLOCK_IRQ_REMOVE);
|
||||||
RTEMS_FATAL_SOURCE_BSP_SPECIFIC,
|
|
||||||
BSP_ARM_A9MPCORE_FATAL_CLOCK_IRQ_REMOVE
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <bsp/arm-pl111-fb.h>
|
#include <bsp/arm-pl111-fb.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
rtems_id semaphore;
|
rtems_id semaphore;
|
||||||
@@ -154,10 +155,7 @@ static void pl111_fb_release(const pl111_fb_context *ctx)
|
|||||||
{
|
{
|
||||||
rtems_status_code sc = rtems_semaphore_release(ctx->semaphore);
|
rtems_status_code sc = rtems_semaphore_release(ctx->semaphore);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
rtems_fatal(
|
bsp_fatal(BSP_ARM_PL111_FATAL_SEM_RELEASE);
|
||||||
RTEMS_FATAL_SOURCE_BSP_SPECIFIC,
|
|
||||||
BSP_ARM_PL111_FATAL_SEM_RELEASE
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,10 +170,7 @@ rtems_device_driver frame_buffer_initialize(
|
|||||||
|
|
||||||
sc = rtems_io_register_name(FRAMEBUFFER_DEVICE_0_NAME, major, 0);
|
sc = rtems_io_register_name(FRAMEBUFFER_DEVICE_0_NAME, major, 0);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
rtems_fatal(
|
bsp_fatal(BSP_ARM_PL111_FATAL_REGISTER_DEV);
|
||||||
RTEMS_FATAL_SOURCE_BSP_SPECIFIC,
|
|
||||||
BSP_ARM_PL111_FATAL_REGISTER_DEV
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sc = rtems_semaphore_create(
|
sc = rtems_semaphore_create(
|
||||||
@@ -186,10 +181,7 @@ rtems_device_driver frame_buffer_initialize(
|
|||||||
&ctx->semaphore
|
&ctx->semaphore
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
rtems_fatal(
|
bsp_fatal(BSP_ARM_PL111_FATAL_SEM_CREATE);
|
||||||
RTEMS_FATAL_SOURCE_BSP_SPECIFIC,
|
|
||||||
BSP_ARM_PL111_FATAL_SEM_CREATE
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return sc;
|
return sc;
|
||||||
|
|||||||
@@ -55,13 +55,6 @@ extern "C" {
|
|||||||
|
|
||||||
#define BSP_ARM_GIC_DIST_BASE 0xf8f01000
|
#define BSP_ARM_GIC_DIST_BASE 0xf8f01000
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
BSP_ARM_A9MPCORE_FATAL_CLOCK_IRQ_INSTALL,
|
|
||||||
BSP_ARM_A9MPCORE_FATAL_CLOCK_IRQ_REMOVE
|
|
||||||
} zynq_fatal_code;
|
|
||||||
|
|
||||||
void zynq_fatal(zynq_fatal_code code) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Zynq specific set up of the MMU.
|
* @brief Zynq specific set up of the MMU.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -16,11 +16,6 @@
|
|||||||
#include <bsp/bootcard.h>
|
#include <bsp/bootcard.h>
|
||||||
#include <bsp/irq-generic.h>
|
#include <bsp/irq-generic.h>
|
||||||
|
|
||||||
void zynq_fatal(zynq_fatal_code code)
|
|
||||||
{
|
|
||||||
rtems_fatal(RTEMS_FATAL_SOURCE_BSP_SPECIFIC, code);
|
|
||||||
}
|
|
||||||
|
|
||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
{
|
{
|
||||||
bsp_interrupt_initialize();
|
bsp_interrupt_initialize();
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <bsp/generic-fatal.h>
|
#include <bsp/fatal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
const char * const _Spurious_Error_[] = {"Reset","Bus Error","Address Error",
|
const char * const _Spurious_Error_[] = {"Reset","Bus Error","Address Error",
|
||||||
@@ -72,7 +72,7 @@ rtems_isr Spurious_Isr(
|
|||||||
RAW_PUTI(sp);
|
RAW_PUTI(sp);
|
||||||
RAW_PUTS("\n\r");
|
RAW_PUTS("\n\r");
|
||||||
#endif
|
#endif
|
||||||
bsp_generic_fatal( BSP_GENERIC_FATAL_SPURIOUS_INTERRUPT );
|
bsp_fatal( MRM332_FATAL_SPURIOUS_INTERRUPT );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spurious_Initialize(void)
|
void Spurious_Initialize(void)
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include <libcpu/powerpc-utility.h>
|
#include <libcpu/powerpc-utility.h>
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <bsp/irq.h>
|
#include <bsp/irq.h>
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@@ -182,7 +183,7 @@ void ata_driver_dma_pio_single_create(ata_driver_dma_pio_single *self, const cha
|
|||||||
self
|
self
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc5200_fatal(MPC5200_FATAL_ATA_DMA_SINGLE_IRQ_INSTALL);
|
bsp_fatal(MPC5200_FATAL_ATA_DMA_SINGLE_IRQ_INSTALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bsp/ata.h>
|
#include <bsp/ata.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
|
|
||||||
#include <libchip/ata.h>
|
#include <libchip/ata.h>
|
||||||
|
|
||||||
@@ -33,7 +34,7 @@ rtems_status_code rtems_ata_initialize(
|
|||||||
|
|
||||||
ata_driver_dma_pio_single_create(&ata_driver_instance, "/dev/hda", TASK_PCI_TX);
|
ata_driver_dma_pio_single_create(&ata_driver_instance, "/dev/hda", TASK_PCI_TX);
|
||||||
} else {
|
} else {
|
||||||
mpc5200_fatal(MPC5200_FATAL_ATA_DISK_IO_INIT);
|
bsp_fatal(MPC5200_FATAL_ATA_DISK_IO_INIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sc;
|
return sc;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#include <bsp/ata.h>
|
#include <bsp/ata.h>
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <bsp/mpc5200.h>
|
#include <bsp/mpc5200.h>
|
||||||
|
|
||||||
#include <libcpu/powerpc-utility.h>
|
#include <libcpu/powerpc-utility.h>
|
||||||
@@ -125,7 +126,7 @@ static void create_lock(ata_driver *self)
|
|||||||
&self->lock
|
&self->lock
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc5200_fatal(MPC5200_FATAL_ATA_LOCK_CREATE);
|
bsp_fatal(MPC5200_FATAL_ATA_LOCK_CREATE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,7 +134,7 @@ static void destroy_lock(const ata_driver *self)
|
|||||||
{
|
{
|
||||||
rtems_status_code sc = rtems_semaphore_delete(self->lock);
|
rtems_status_code sc = rtems_semaphore_delete(self->lock);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc5200_fatal(MPC5200_FATAL_ATA_LOCK_DESTROY);
|
bsp_fatal(MPC5200_FATAL_ATA_LOCK_DESTROY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +163,7 @@ void ata_driver_create(ata_driver *self, const char *device_file_path, rtems_blo
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc5200_fatal(MPC5200_FATAL_ATA_DISK_CREATE);
|
bsp_fatal(MPC5200_FATAL_ATA_DISK_CREATE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -254,24 +254,6 @@ void BSP_IRQ_Benchmarking_Report(void);
|
|||||||
|
|
||||||
void cpu_init(void);
|
void cpu_init(void);
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
MPC5200_FATAL_PCF8563_INVALID_YEAR,
|
|
||||||
MPC5200_FATAL_SLICETIMER_0_IRQ_INSTALL,
|
|
||||||
MPC5200_FATAL_SLICETIMER_1_IRQ_INSTALL,
|
|
||||||
MPC5200_FATAL_TM27_IRQ_INSTALL,
|
|
||||||
MPC5200_FATAL_MSCAN_A_INIT,
|
|
||||||
MPC5200_FATAL_MSCAN_B_INIT,
|
|
||||||
MPC5200_FATAL_MSCAN_A_SET_MODE,
|
|
||||||
MPC5200_FATAL_MSCAN_B_SET_MODE,
|
|
||||||
MPC5200_FATAL_ATA_DISK_IO_INIT,
|
|
||||||
MPC5200_FATAL_ATA_DISK_CREATE,
|
|
||||||
MPC5200_FATAL_ATA_DMA_SINGLE_IRQ_INSTALL,
|
|
||||||
MPC5200_FATAL_ATA_LOCK_CREATE,
|
|
||||||
MPC5200_FATAL_ATA_LOCK_DESTROY
|
|
||||||
} mpc5200_fatal_code;
|
|
||||||
|
|
||||||
void mpc5200_fatal(mpc5200_fatal_code code) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#ifndef __tm27_h
|
#ifndef __tm27_h
|
||||||
#define __tm27_h
|
#define __tm27_h
|
||||||
|
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <bsp/irq.h>
|
#include <bsp/irq.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -37,7 +38,7 @@ void Install_tm27_vector(void (*_handler)())
|
|||||||
clockIrqData.hdl = _handler;
|
clockIrqData.hdl = _handler;
|
||||||
if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
|
if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
|
||||||
printk("Error installing clock interrupt handler!\n");
|
printk("Error installing clock interrupt handler!\n");
|
||||||
mpc5200_fatal(MPC5200_FATAL_TM27_IRQ_INSTALL);
|
bsp_fatal(MPC5200_FATAL_TM27_IRQ_INSTALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../include/bsp.h"
|
#include "../include/bsp.h"
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <bsp/irq.h>
|
#include <bsp/irq.h>
|
||||||
#include "../mscan/mscan_int.h"
|
#include "../mscan/mscan_int.h"
|
||||||
|
|
||||||
@@ -770,20 +771,20 @@ rtems_device_driver mscan_initialize(rtems_device_major_number major,
|
|||||||
|
|
||||||
/* Initialization requested via RTEMS */
|
/* Initialization requested via RTEMS */
|
||||||
if ((status = mscan_channel_initialize(major, MSCAN_A)) != RTEMS_SUCCESSFUL)
|
if ((status = mscan_channel_initialize(major, MSCAN_A)) != RTEMS_SUCCESSFUL)
|
||||||
mpc5200_fatal(MPC5200_FATAL_MSCAN_A_INIT);
|
bsp_fatal(MPC5200_FATAL_MSCAN_A_INIT);
|
||||||
|
|
||||||
if ((status = mscan_channel_initialize(major, MSCAN_B)) != RTEMS_SUCCESSFUL)
|
if ((status = mscan_channel_initialize(major, MSCAN_B)) != RTEMS_SUCCESSFUL)
|
||||||
mpc5200_fatal(MPC5200_FATAL_MSCAN_B_INIT);
|
bsp_fatal(MPC5200_FATAL_MSCAN_B_INIT);
|
||||||
|
|
||||||
if ((status =
|
if ((status =
|
||||||
mpc5200_mscan_set_mode(MSCAN_A,
|
mpc5200_mscan_set_mode(MSCAN_A,
|
||||||
MSCAN_INIT_NORMAL_MODE)) != RTEMS_SUCCESSFUL)
|
MSCAN_INIT_NORMAL_MODE)) != RTEMS_SUCCESSFUL)
|
||||||
mpc5200_fatal(MPC5200_FATAL_MSCAN_A_SET_MODE);
|
bsp_fatal(MPC5200_FATAL_MSCAN_A_SET_MODE);
|
||||||
|
|
||||||
if ((status =
|
if ((status =
|
||||||
mpc5200_mscan_set_mode(MSCAN_B,
|
mpc5200_mscan_set_mode(MSCAN_B,
|
||||||
MSCAN_INIT_NORMAL_MODE)) != RTEMS_SUCCESSFUL)
|
MSCAN_INIT_NORMAL_MODE)) != RTEMS_SUCCESSFUL)
|
||||||
mpc5200_fatal(MPC5200_FATAL_MSCAN_B_SET_MODE);
|
bsp_fatal(MPC5200_FATAL_MSCAN_B_SET_MODE);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,7 @@
|
|||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <rtems/bspIo.h>
|
#include <rtems/bspIo.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <bsp/irq.h>
|
#include <bsp/irq.h>
|
||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
@@ -338,7 +339,7 @@ rtems_device_driver slt_initialize
|
|||||||
{
|
{
|
||||||
|
|
||||||
printk("Unable to connect PSC Irq handler\n");
|
printk("Unable to connect PSC Irq handler\n");
|
||||||
mpc5200_fatal(MPC5200_FATAL_SLICETIMER_0_IRQ_INSTALL);
|
bsp_fatal(MPC5200_FATAL_SLICETIMER_0_IRQ_INSTALL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -353,7 +354,7 @@ rtems_device_driver slt_initialize
|
|||||||
{
|
{
|
||||||
|
|
||||||
printk("Unable to connect PSC Irq handler\n");
|
printk("Unable to connect PSC Irq handler\n");
|
||||||
mpc5200_fatal(MPC5200_FATAL_SLICETIMER_1_IRQ_INSTALL);
|
bsp_fatal(MPC5200_FATAL_SLICETIMER_1_IRQ_INSTALL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,11 +124,6 @@ void _BSP_Fatal_error(unsigned int v)
|
|||||||
__asm__ __volatile ("sc");
|
__asm__ __volatile ("sc");
|
||||||
}
|
}
|
||||||
|
|
||||||
void mpc5200_fatal(mpc5200_fatal_code code)
|
|
||||||
{
|
|
||||||
rtems_fatal(RTEMS_FATAL_SOURCE_BSP_SPECIFIC, code);
|
|
||||||
}
|
|
||||||
|
|
||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
{
|
{
|
||||||
ppc_cpu_id_t myCpu;
|
ppc_cpu_id_t myCpu;
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <libchip/rtc.h>
|
#include <libchip/rtc.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "../tod/pcf8563.h"
|
#include "../tod/pcf8563.h"
|
||||||
@@ -185,7 +186,7 @@ pcf8563_set_time(int minor, const rtems_time_of_day *time)
|
|||||||
addr = RTC_Table[minor].ulDataPort;
|
addr = RTC_Table[minor].ulDataPort;
|
||||||
|
|
||||||
if ((time->year >= 2100) || (time->year < 1900)) {
|
if ((time->year >= 2100) || (time->year < 1900)) {
|
||||||
mpc5200_fatal(MPC5200_FATAL_PCF8563_INVALID_YEAR);
|
bsp_fatal(MPC5200_FATAL_PCF8563_INVALID_YEAR);
|
||||||
}
|
}
|
||||||
info[0] = PCF8563_SECOND_ADR;
|
info[0] = PCF8563_SECOND_ADR;
|
||||||
info[1 + PCF8563_YEAR_ADR -PCF8563_SECOND_ADR] = To_BCD(time->year % 100);
|
info[1 + PCF8563_YEAR_ADR -PCF8563_SECOND_ADR] = To_BCD(time->year % 100);
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <bsp/irq.h>
|
#include <bsp/irq.h>
|
||||||
|
|
||||||
#include <mpc55xx/regs.h>
|
#include <mpc55xx/regs.h>
|
||||||
@@ -53,7 +54,7 @@ static void mpc55xx_clock_handler_install(rtems_isr_entry isr)
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CLOCK_EMIOS_IRQ_INSTALL);
|
bsp_fatal(MPC55XX_FATAL_CLOCK_EMIOS_IRQ_INSTALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,12 +74,12 @@ static void mpc55xx_clock_initialize(void)
|
|||||||
if (prescaler > 0) {
|
if (prescaler > 0) {
|
||||||
interval /= (uint64_t) prescaler;
|
interval /= (uint64_t) prescaler;
|
||||||
} else {
|
} else {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CLOCK_EMIOS_PRESCALER);
|
bsp_fatal(MPC55XX_FATAL_CLOCK_EMIOS_PRESCALER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check interval */
|
/* Check interval */
|
||||||
if (interval == 0 || interval > MPC55XX_EMIOS_VALUE_MAX) {
|
if (interval == 0 || interval > MPC55XX_EMIOS_VALUE_MAX) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CLOCK_EMIOS_INTERVAL);
|
bsp_fatal(MPC55XX_FATAL_CLOCK_EMIOS_INTERVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Configure eMIOS channel */
|
/* Configure eMIOS channel */
|
||||||
@@ -159,7 +160,7 @@ static void mpc55xx_clock_handler_install(rtems_isr_entry isr)
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CLOCK_PIT_IRQ_INSTALL);
|
bsp_fatal(MPC55XX_FATAL_CLOCK_PIT_IRQ_INSTALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include <bsp/console-esci.h>
|
#include <bsp/console-esci.h>
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <bsp/irq.h>
|
#include <bsp/irq.h>
|
||||||
|
|
||||||
#ifdef MPC55XX_HAS_ESCI
|
#ifdef MPC55XX_HAS_ESCI
|
||||||
@@ -268,12 +269,12 @@ static int mpc55xx_esci_first_open(int major, int minor, void *arg)
|
|||||||
|
|
||||||
rv = rtems_termios_set_initial_baud(tty, BSP_DEFAULT_BAUD_RATE);
|
rv = rtems_termios_set_initial_baud(tty, BSP_DEFAULT_BAUD_RATE);
|
||||||
if (rv != 0) {
|
if (rv != 0) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_ESCI_BAUD);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_ESCI_BAUD);
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = mpc55xx_esci_set_attributes(minor, &tty->termios);
|
rv = mpc55xx_esci_set_attributes(minor, &tty->termios);
|
||||||
if (rv != 0) {
|
if (rv != 0) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_ESCI_ATTRIBUTES);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_ESCI_ATTRIBUTES);
|
||||||
}
|
}
|
||||||
|
|
||||||
sc = mpc55xx_interrupt_handler_install(
|
sc = mpc55xx_interrupt_handler_install(
|
||||||
@@ -285,7 +286,7 @@ static int mpc55xx_esci_first_open(int major, int minor, void *arg)
|
|||||||
self
|
self
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_ESCI_IRQ_INSTALL);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_ESCI_IRQ_INSTALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
mpc55xx_esci_interrupts_clear_and_enable(self);
|
mpc55xx_esci_interrupts_clear_and_enable(self);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <bsp/console-generic.h>
|
#include <bsp/console-generic.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
|
|
||||||
#include <rtems/console.h>
|
#include <rtems/console.h>
|
||||||
|
|
||||||
@@ -80,7 +81,7 @@ rtems_device_driver console_initialize(
|
|||||||
rtems_device_minor_number console = console_generic_minor;
|
rtems_device_minor_number console = console_generic_minor;
|
||||||
|
|
||||||
if (count <= 0) {
|
if (count <= 0) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_GENERIC_COUNT);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_GENERIC_COUNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
rtems_termios_initialize();
|
rtems_termios_initialize();
|
||||||
@@ -90,13 +91,13 @@ rtems_device_driver console_initialize(
|
|||||||
|
|
||||||
sc = rtems_io_register_name(info->device_path, major, minor);
|
sc = rtems_io_register_name(info->device_path, major, minor);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sc = rtems_io_register_name(CONSOLE_DEVICE_NAME, major, console);
|
sc = rtems_io_register_name(CONSOLE_DEVICE_NAME, major, console);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER_CONSOLE);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER_CONSOLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
console_generic_char_out_do_init();
|
console_generic_char_out_do_init();
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include <bsp/console-linflex.h>
|
#include <bsp/console-linflex.h>
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <bsp/irq.h>
|
#include <bsp/irq.h>
|
||||||
|
|
||||||
#ifdef MPC55XX_HAS_LINFLEX
|
#ifdef MPC55XX_HAS_LINFLEX
|
||||||
@@ -261,12 +262,12 @@ static int mpc55xx_linflex_first_open(int major, int minor, void *arg)
|
|||||||
|
|
||||||
rv = rtems_termios_set_initial_baud(tty, BSP_DEFAULT_BAUD_RATE);
|
rv = rtems_termios_set_initial_baud(tty, BSP_DEFAULT_BAUD_RATE);
|
||||||
if (rv != 0) {
|
if (rv != 0) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_BAUD);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_BAUD);
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = mpc55xx_linflex_set_attributes(minor, &tty->termios);
|
rv = mpc55xx_linflex_set_attributes(minor, &tty->termios);
|
||||||
if (rv != 0) {
|
if (rv != 0) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_ATTRIBUTES);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_ATTRIBUTES);
|
||||||
}
|
}
|
||||||
|
|
||||||
sc = mpc55xx_interrupt_handler_install(
|
sc = mpc55xx_interrupt_handler_install(
|
||||||
@@ -278,7 +279,7 @@ static int mpc55xx_linflex_first_open(int major, int minor, void *arg)
|
|||||||
self
|
self
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_INSTALL);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_INSTALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
sc = mpc55xx_interrupt_handler_install(
|
sc = mpc55xx_interrupt_handler_install(
|
||||||
@@ -290,7 +291,7 @@ static int mpc55xx_linflex_first_open(int major, int minor, void *arg)
|
|||||||
self
|
self
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_INSTALL);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_INSTALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -303,7 +304,7 @@ static int mpc55xx_linflex_first_open(int major, int minor, void *arg)
|
|||||||
self
|
self
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_INSTALL);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_INSTALL);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -333,7 +334,7 @@ static int mpc55xx_linflex_last_close(int major, int minor, void* arg)
|
|||||||
self
|
self
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_REMOVE);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_REMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
sc = rtems_interrupt_handler_remove(
|
sc = rtems_interrupt_handler_remove(
|
||||||
@@ -342,7 +343,7 @@ static int mpc55xx_linflex_last_close(int major, int minor, void* arg)
|
|||||||
self
|
self
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_REMOVE);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_REMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -352,7 +353,7 @@ static int mpc55xx_linflex_last_close(int major, int minor, void* arg)
|
|||||||
self
|
self
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_REMOVE);
|
bsp_fatal(MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_REMOVE);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -99,32 +99,6 @@ LINKER_SYMBOL(bsp_section_sysram_load_end)
|
|||||||
|
|
||||||
#define BSP_SYSRAM_SECTION __attribute__((section(".bsp_sysram")))
|
#define BSP_SYSRAM_SECTION __attribute__((section(".bsp_sysram")))
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
MPC55XX_FATAL_FMPLL_LOCK,
|
|
||||||
MPC55XX_FATAL_CLOCK_EMIOS_IRQ_INSTALL,
|
|
||||||
MPC55XX_FATAL_CLOCK_EMIOS_PRESCALER,
|
|
||||||
MPC55XX_FATAL_CLOCK_EMIOS_INTERVAL,
|
|
||||||
MPC55XX_FATAL_CLOCK_PIT_IRQ_INSTALL,
|
|
||||||
MPC55XX_FATAL_CONSOLE_GENERIC_COUNT,
|
|
||||||
MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER,
|
|
||||||
MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER_CONSOLE,
|
|
||||||
MPC55XX_FATAL_CONSOLE_ESCI_BAUD,
|
|
||||||
MPC55XX_FATAL_CONSOLE_ESCI_ATTRIBUTES,
|
|
||||||
MPC55XX_FATAL_CONSOLE_ESCI_IRQ_INSTALL,
|
|
||||||
MPC55XX_FATAL_CONSOLE_LINFLEX_BAUD,
|
|
||||||
MPC55XX_FATAL_CONSOLE_LINFLEX_ATTRIBUTES,
|
|
||||||
MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_INSTALL,
|
|
||||||
MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_INSTALL,
|
|
||||||
MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_INSTALL,
|
|
||||||
MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_REMOVE,
|
|
||||||
MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_REMOVE,
|
|
||||||
MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_REMOVE,
|
|
||||||
MPC55XX_FATAL_EDMA_IRQ_INSTALL,
|
|
||||||
MPC55XX_FATAL_EDMA_IRQ_REMOVE
|
|
||||||
} mpc55xx_fatal_code;
|
|
||||||
|
|
||||||
void mpc55xx_fatal(mpc55xx_fatal_code code) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|||||||
@@ -61,11 +61,6 @@ void _BSP_Fatal_error(unsigned n)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mpc55xx_fatal(mpc55xx_fatal_code code)
|
|
||||||
{
|
|
||||||
rtems_fatal(RTEMS_FATAL_SOURCE_BSP_SPECIFIC, code);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void null_pointer_protection(void)
|
static void null_pointer_protection(void)
|
||||||
{
|
{
|
||||||
#ifdef MPC55XX_NULL_POINTER_PROTECTION
|
#ifdef MPC55XX_NULL_POINTER_PROTECTION
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <bsp/start.h>
|
#include <bsp/start.h>
|
||||||
#include <bsp/bootcard.h>
|
#include <bsp/bootcard.h>
|
||||||
#include <bsp/mpc55xx-config.h>
|
#include <bsp/mpc55xx-config.h>
|
||||||
@@ -38,7 +39,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!lock) {
|
if (!lock) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_FMPLL_LOCK);
|
bsp_fatal(MPC55XX_FATAL_FMPLL_LOCK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ $(PROJECT_INCLUDE)/bsp/default-initial-extension.h: shared/include/default-initi
|
|||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/default-initial-extension.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/default-initial-extension.h
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/default-initial-extension.h
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/default-initial-extension.h
|
||||||
|
|
||||||
$(PROJECT_INCLUDE)/bsp/generic-fatal.h: shared/include/generic-fatal.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
$(PROJECT_INCLUDE)/bsp/fatal.h: shared/include/fatal.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/generic-fatal.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/fatal.h
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/generic-fatal.h
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/fatal.h
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <bsp/generic-fatal.h>
|
#include <bsp/fatal.h>
|
||||||
#include <rtems/libio.h>
|
#include <rtems/libio.h>
|
||||||
#include <rtems/console.h>
|
#include <rtems/console.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -49,7 +49,7 @@ static void console_initialize_pointers(void)
|
|||||||
Console_Port_Count = Console_Configuration_Count;
|
Console_Port_Count = Console_Configuration_Count;
|
||||||
Console_Port_Tbl = malloc( Console_Port_Count * sizeof( console_tbl * ) );
|
Console_Port_Tbl = malloc( Console_Port_Count * sizeof( console_tbl * ) );
|
||||||
if (Console_Port_Tbl == NULL)
|
if (Console_Port_Tbl == NULL)
|
||||||
bsp_generic_fatal( BSP_GENERIC_FATAL_CONSOLE_NO_MEMORY_0 );
|
bsp_fatal( BSP_FATAL_CONSOLE_NO_MEMORY_0 );
|
||||||
|
|
||||||
for (i=0 ; i < Console_Port_Count ; i++)
|
for (i=0 ; i < Console_Port_Count ; i++)
|
||||||
Console_Port_Tbl[i] = &Console_Configuration_Ports[i];
|
Console_Port_Tbl[i] = &Console_Configuration_Ports[i];
|
||||||
@@ -76,7 +76,7 @@ void console_register_devices(
|
|||||||
* register devices.
|
* register devices.
|
||||||
*/
|
*/
|
||||||
if ( console_initialized ) {
|
if ( console_initialized ) {
|
||||||
bsp_generic_fatal( BSP_GENERIC_FATAL_CONSOLE_MULTI_INIT );
|
bsp_fatal( BSP_FATAL_CONSOLE_MULTI_INIT );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -89,12 +89,12 @@ void console_register_devices(
|
|||||||
Console_Port_Count * sizeof( console_tbl * )
|
Console_Port_Count * sizeof( console_tbl * )
|
||||||
);
|
);
|
||||||
if ( Console_Port_Tbl == NULL ) {
|
if ( Console_Port_Tbl == NULL ) {
|
||||||
bsp_generic_fatal( BSP_GENERIC_FATAL_CONSOLE_NO_MEMORY_1 );
|
bsp_fatal( BSP_FATAL_CONSOLE_NO_MEMORY_1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
Console_Port_Data = calloc( Console_Port_Count, sizeof( console_data ) );
|
Console_Port_Data = calloc( Console_Port_Count, sizeof( console_data ) );
|
||||||
if ( Console_Port_Data == NULL ) {
|
if ( Console_Port_Data == NULL ) {
|
||||||
bsp_generic_fatal( BSP_GENERIC_FATAL_CONSOLE_NO_MEMORY_2 );
|
bsp_fatal( BSP_FATAL_CONSOLE_NO_MEMORY_2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -255,7 +255,7 @@ rtems_device_driver console_initialize(
|
|||||||
console_initialize_pointers();
|
console_initialize_pointers();
|
||||||
Console_Port_Data = calloc( Console_Port_Count, sizeof( console_data ) );
|
Console_Port_Data = calloc( Console_Port_Count, sizeof( console_data ) );
|
||||||
if ( Console_Port_Data == NULL ) {
|
if ( Console_Port_Data == NULL ) {
|
||||||
bsp_generic_fatal( BSP_GENERIC_FATAL_CONSOLE_NO_MEMORY_3 );
|
bsp_fatal( BSP_FATAL_CONSOLE_NO_MEMORY_3 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,14 +290,14 @@ rtems_device_driver console_initialize(
|
|||||||
if (port->sDeviceName != NULL) {
|
if (port->sDeviceName != NULL) {
|
||||||
status = rtems_io_register_name( port->sDeviceName, major, minor );
|
status = rtems_io_register_name( port->sDeviceName, major, minor );
|
||||||
if (status != RTEMS_SUCCESSFUL) {
|
if (status != RTEMS_SUCCESSFUL) {
|
||||||
bsp_generic_fatal( BSP_GENERIC_FATAL_CONSOLE_REGISTER_DEV_0 );
|
bsp_fatal( BSP_FATAL_CONSOLE_REGISTER_DEV_0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (minor == Console_Port_Minor) {
|
if (minor == Console_Port_Minor) {
|
||||||
status = rtems_io_register_name( CONSOLE_DEVICE_NAME, major, minor );
|
status = rtems_io_register_name( CONSOLE_DEVICE_NAME, major, minor );
|
||||||
if (status != RTEMS_SUCCESSFUL) {
|
if (status != RTEMS_SUCCESSFUL) {
|
||||||
bsp_generic_fatal( BSP_GENERIC_FATAL_CONSOLE_REGISTER_DEV_1 );
|
bsp_fatal( BSP_FATAL_CONSOLE_REGISTER_DEV_1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <bsp/generic-fatal.h>
|
#include <bsp/fatal.h>
|
||||||
#include <rtems/libio.h>
|
#include <rtems/libio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@@ -72,7 +72,7 @@ static rtems_device_minor_number bsp_First_Available_Device( void )
|
|||||||
/*
|
/*
|
||||||
* Error No devices were found. We will want to bail here.
|
* Error No devices were found. We will want to bail here.
|
||||||
*/
|
*/
|
||||||
bsp_generic_fatal(BSP_GENERIC_FATAL_CONSOLE_NO_DEV);
|
bsp_fatal(BSP_FATAL_CONSOLE_NO_DEV);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bsp_console_select(void)
|
void bsp_console_select(void)
|
||||||
|
|||||||
113
c/src/lib/libbsp/shared/include/fatal.h
Normal file
113
c/src/lib/libbsp/shared/include/fatal.h
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2012-2014 embedded brains GmbH. All rights reserved.
|
||||||
|
*
|
||||||
|
* embedded brains GmbH
|
||||||
|
* Dornierstr. 4
|
||||||
|
* 82178 Puchheim
|
||||||
|
* Germany
|
||||||
|
* <rtems@embedded-brains.de>
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.com/license/LICENSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef LIBBSP_SHARED_BSP_FATAL_H
|
||||||
|
#define LIBBSP_SHARED_BSP_FATAL_H
|
||||||
|
|
||||||
|
#include <rtems.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#define BSP_FATAL_CODE_BLOCK(idx) ((unsigned long) (idx) * 256UL)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief BSP fatal error codes.
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
/* Generic BSP fatal codes */
|
||||||
|
BSP_FATAL_INTERRUPT_INITIALIZATION = BSP_FATAL_CODE_BLOCK(0),
|
||||||
|
BSP_FATAL_SPURIOUS_INTERRUPT,
|
||||||
|
BSP_FATAL_CONSOLE_MULTI_INIT,
|
||||||
|
BSP_FATAL_CONSOLE_NO_MEMORY_0,
|
||||||
|
BSP_FATAL_CONSOLE_NO_MEMORY_1,
|
||||||
|
BSP_FATAL_CONSOLE_NO_MEMORY_2,
|
||||||
|
BSP_FATAL_CONSOLE_NO_MEMORY_3,
|
||||||
|
BSP_FATAL_CONSOLE_REGISTER_DEV_0,
|
||||||
|
BSP_FATAL_CONSOLE_REGISTER_DEV_1,
|
||||||
|
BSP_FATAL_CONSOLE_NO_DEV,
|
||||||
|
|
||||||
|
/* ARM fatal codes */
|
||||||
|
BSP_ARM_A9MPCORE_FATAL_CLOCK_IRQ_INSTALL = BSP_FATAL_CODE_BLOCK(1),
|
||||||
|
BSP_ARM_A9MPCORE_FATAL_CLOCK_IRQ_REMOVE,
|
||||||
|
BSP_ARM_PL111_FATAL_REGISTER_DEV,
|
||||||
|
BSP_ARM_PL111_FATAL_SEM_CREATE,
|
||||||
|
BSP_ARM_PL111_FATAL_SEM_RELEASE,
|
||||||
|
|
||||||
|
/* LEON3 fatal codes */
|
||||||
|
LEON3_FATAL_CPU_COUNTER_INIT = BSP_FATAL_CODE_BLOCK(2),
|
||||||
|
|
||||||
|
/* LPC24XX fatal codes */
|
||||||
|
LPC24XX_FATAL_PL111_SET_UP = BSP_FATAL_CODE_BLOCK(3),
|
||||||
|
LPC24XX_FATAL_PL111_PINS_SET_UP,
|
||||||
|
LPC24XX_FATAL_PL111_PINS_TEAR_DOWN,
|
||||||
|
LPC24XX_FATAL_PL111_TEAR_DOWN,
|
||||||
|
|
||||||
|
/* MPC5200 fatal codes */
|
||||||
|
MPC5200_FATAL_PCF8563_INVALID_YEAR = BSP_FATAL_CODE_BLOCK(4),
|
||||||
|
MPC5200_FATAL_SLICETIMER_0_IRQ_INSTALL,
|
||||||
|
MPC5200_FATAL_SLICETIMER_1_IRQ_INSTALL,
|
||||||
|
MPC5200_FATAL_TM27_IRQ_INSTALL,
|
||||||
|
MPC5200_FATAL_MSCAN_A_INIT,
|
||||||
|
MPC5200_FATAL_MSCAN_B_INIT,
|
||||||
|
MPC5200_FATAL_MSCAN_A_SET_MODE,
|
||||||
|
MPC5200_FATAL_MSCAN_B_SET_MODE,
|
||||||
|
MPC5200_FATAL_ATA_DISK_IO_INIT,
|
||||||
|
MPC5200_FATAL_ATA_DISK_CREATE,
|
||||||
|
MPC5200_FATAL_ATA_DMA_SINGLE_IRQ_INSTALL,
|
||||||
|
MPC5200_FATAL_ATA_LOCK_CREATE,
|
||||||
|
MPC5200_FATAL_ATA_LOCK_DESTROY,
|
||||||
|
|
||||||
|
/* MPC55XX fatal codes */
|
||||||
|
MPC55XX_FATAL_FMPLL_LOCK = BSP_FATAL_CODE_BLOCK(5),
|
||||||
|
MPC55XX_FATAL_CLOCK_EMIOS_IRQ_INSTALL,
|
||||||
|
MPC55XX_FATAL_CLOCK_EMIOS_PRESCALER,
|
||||||
|
MPC55XX_FATAL_CLOCK_EMIOS_INTERVAL,
|
||||||
|
MPC55XX_FATAL_CLOCK_PIT_IRQ_INSTALL,
|
||||||
|
MPC55XX_FATAL_CONSOLE_GENERIC_COUNT,
|
||||||
|
MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER,
|
||||||
|
MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER_CONSOLE,
|
||||||
|
MPC55XX_FATAL_CONSOLE_ESCI_BAUD,
|
||||||
|
MPC55XX_FATAL_CONSOLE_ESCI_ATTRIBUTES,
|
||||||
|
MPC55XX_FATAL_CONSOLE_ESCI_IRQ_INSTALL,
|
||||||
|
MPC55XX_FATAL_CONSOLE_LINFLEX_BAUD,
|
||||||
|
MPC55XX_FATAL_CONSOLE_LINFLEX_ATTRIBUTES,
|
||||||
|
MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_INSTALL,
|
||||||
|
MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_INSTALL,
|
||||||
|
MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_INSTALL,
|
||||||
|
MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_REMOVE,
|
||||||
|
MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_REMOVE,
|
||||||
|
MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_REMOVE,
|
||||||
|
MPC55XX_FATAL_EDMA_IRQ_INSTALL,
|
||||||
|
MPC55XX_FATAL_EDMA_IRQ_REMOVE,
|
||||||
|
|
||||||
|
/* MRM332 fatal codes */
|
||||||
|
MRM332_FATAL_SPURIOUS_INTERRUPT = BSP_FATAL_CODE_BLOCK(6),
|
||||||
|
|
||||||
|
/* PowerPC fatal codes */
|
||||||
|
PPC_FATAL_EXCEPTION_INITIALIZATION = BSP_FATAL_CODE_BLOCK(7)
|
||||||
|
} bsp_fatal_code;
|
||||||
|
|
||||||
|
RTEMS_COMPILER_NO_RETURN_ATTRIBUTE static inline void
|
||||||
|
bsp_fatal( bsp_fatal_code code )
|
||||||
|
{
|
||||||
|
rtems_fatal( RTEMS_FATAL_SOURCE_BSP, (rtems_fatal_code) code );
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* LIBBSP_SHARED_BSP_FATAL_H */
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2012-2013 embedded brains GmbH. All rights reserved.
|
|
||||||
*
|
|
||||||
* embedded brains GmbH
|
|
||||||
* Dornierstr. 4
|
|
||||||
* 82178 Puchheim
|
|
||||||
* Germany
|
|
||||||
* <rtems@embedded-brains.de>
|
|
||||||
*
|
|
||||||
* The license and distribution terms for this file may be
|
|
||||||
* found in the file LICENSE in this distribution or at
|
|
||||||
* http://www.rtems.com/license/LICENSE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef LIBBSP_SHARED_BSP_GENERIC_FATAL_H
|
|
||||||
#define LIBBSP_SHARED_BSP_GENERIC_FATAL_H
|
|
||||||
|
|
||||||
#include <rtems.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Generic BSP fatal error codes.
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
BSP_GENERIC_FATAL_EXCEPTION_INITIALIZATION,
|
|
||||||
BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION,
|
|
||||||
BSP_GENERIC_FATAL_SPURIOUS_INTERRUPT,
|
|
||||||
BSP_GENERIC_FATAL_CONSOLE_MULTI_INIT,
|
|
||||||
BSP_GENERIC_FATAL_CONSOLE_NO_MEMORY_0,
|
|
||||||
BSP_GENERIC_FATAL_CONSOLE_NO_MEMORY_1,
|
|
||||||
BSP_GENERIC_FATAL_CONSOLE_NO_MEMORY_2,
|
|
||||||
BSP_GENERIC_FATAL_CONSOLE_NO_MEMORY_3,
|
|
||||||
BSP_GENERIC_FATAL_CONSOLE_REGISTER_DEV_0,
|
|
||||||
BSP_GENERIC_FATAL_CONSOLE_REGISTER_DEV_1,
|
|
||||||
BSP_GENERIC_FATAL_CONSOLE_NO_DEV
|
|
||||||
} bsp_generic_fatal_code;
|
|
||||||
|
|
||||||
RTEMS_COMPILER_NO_RETURN_ATTRIBUTE static inline void
|
|
||||||
bsp_generic_fatal( bsp_generic_fatal_code code )
|
|
||||||
{
|
|
||||||
rtems_fatal( RTEMS_FATAL_SOURCE_BSP_GENERIC, (rtems_fatal_code) code );
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#endif /* LIBBSP_SHARED_BSP_GENERIC_FATAL_H */
|
|
||||||
@@ -171,8 +171,8 @@ void bsp_interrupt_handler_default(rtems_vector_number vector);
|
|||||||
* specific bsp_interrupt_facility_initialize() function will be called after
|
* specific bsp_interrupt_facility_initialize() function will be called after
|
||||||
* all internals are initialized. If the BSP specific initialization fails,
|
* all internals are initialized. If the BSP specific initialization fails,
|
||||||
* then this is a fatal error. The fatal error source is
|
* then this is a fatal error. The fatal error source is
|
||||||
* RTEMS_FATAL_SOURCE_BSP_GENERIC and the fatal error code is
|
* RTEMS_FATAL_SOURCE_BSP and the fatal error code is
|
||||||
* BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION.
|
* BSP_FATAL_INTERRUPT_INITIALIZATION.
|
||||||
*/
|
*/
|
||||||
void bsp_interrupt_initialize(void);
|
void bsp_interrupt_initialize(void);
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bsp/irq-generic.h>
|
#include <bsp/irq-generic.h>
|
||||||
#include <bsp/generic-fatal.h>
|
#include <bsp/fatal.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ void bsp_interrupt_initialize(void)
|
|||||||
|
|
||||||
sc = bsp_interrupt_facility_initialize();
|
sc = bsp_interrupt_facility_initialize();
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
bsp_generic_fatal(BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION);
|
bsp_fatal(BSP_FATAL_INTERRUPT_INITIALIZATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
bsp_interrupt_set_initialized();
|
bsp_interrupt_set_initialized();
|
||||||
|
|||||||
@@ -209,10 +209,6 @@ extern void BSP_shared_interrupt_unmask(int irq);
|
|||||||
*/
|
*/
|
||||||
extern void BSP_shared_interrupt_mask(int irq);
|
extern void BSP_shared_interrupt_mask(int irq);
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
LEON3_FATAL_CPU_COUNTER_INIT
|
|
||||||
} leon3_fatal_code;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <leon.h>
|
#include <leon.h>
|
||||||
|
|
||||||
#include <rtems/counter.h>
|
#include <rtems/counter.h>
|
||||||
@@ -37,7 +38,7 @@ void leon3_cpu_counter_initialize(void)
|
|||||||
&idx
|
&idx
|
||||||
);
|
);
|
||||||
if (adev == NULL) {
|
if (adev == NULL) {
|
||||||
rtems_fatal(RTEMS_FATAL_SOURCE_BSP_SPECIFIC, LEON3_FATAL_CPU_COUNTER_INIT);
|
bsp_fatal(LEON3_FATAL_CPU_COUNTER_INIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
gpt = (volatile struct gptimer_regs *) DEV_TO_APB(adev)->start;
|
gpt = (volatile struct gptimer_regs *) DEV_TO_APB(adev)->start;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
|
#include <bsp/fatal.h>
|
||||||
#include <bsp/irq.h>
|
#include <bsp/irq.h>
|
||||||
|
|
||||||
#define EDMA_CHANNELS_PER_GROUP 32U
|
#define EDMA_CHANNELS_PER_GROUP 32U
|
||||||
@@ -199,7 +200,7 @@ void mpc55xx_edma_init(void)
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_EDMA_IRQ_INSTALL);
|
bsp_fatal(MPC55XX_FATAL_EDMA_IRQ_INSTALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -283,7 +284,7 @@ void mpc55xx_edma_release_channel(edma_channel_context *ctx)
|
|||||||
ctx
|
ctx
|
||||||
);
|
);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
mpc55xx_fatal(MPC55XX_FATAL_EDMA_IRQ_REMOVE);
|
bsp_fatal(MPC55XX_FATAL_EDMA_IRQ_REMOVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
|
|
||||||
#include <bsp/vectors.h>
|
#include <bsp/vectors.h>
|
||||||
#include <bsp/generic-fatal.h>
|
#include <bsp/fatal.h>
|
||||||
|
|
||||||
#define PPC_EXC_ASSERT_OFFSET(field, off) \
|
#define PPC_EXC_ASSERT_OFFSET(field, off) \
|
||||||
RTEMS_STATIC_ASSERT( \
|
RTEMS_STATIC_ASSERT( \
|
||||||
@@ -145,7 +145,7 @@ static void ppc_exc_initialize_booke(void *vector_base)
|
|||||||
|
|
||||||
static void ppc_exc_fatal_error(void)
|
static void ppc_exc_fatal_error(void)
|
||||||
{
|
{
|
||||||
bsp_generic_fatal(BSP_GENERIC_FATAL_EXCEPTION_INITIALIZATION);
|
bsp_fatal(PPC_FATAL_EXCEPTION_INITIALIZATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ppc_exc_initialize_with_vector_base(
|
void ppc_exc_initialize_with_vector_base(
|
||||||
|
|||||||
@@ -370,8 +370,8 @@ void ppc_exc_initialize_with_vector_base(
|
|||||||
* @brief Initializes the exception handling.
|
* @brief Initializes the exception handling.
|
||||||
*
|
*
|
||||||
* If the initialization fails, then this is a fatal error. The fatal error
|
* If the initialization fails, then this is a fatal error. The fatal error
|
||||||
* source is RTEMS_FATAL_SOURCE_BSP_GENERIC and the fatal error code is
|
* source is RTEMS_FATAL_SOURCE_BSP and the fatal error code is
|
||||||
* BSP_GENERIC_FATAL_EXCEPTION_INITIALIZATION.
|
* PPC_FATAL_EXCEPTION_INITIALIZATION.
|
||||||
*
|
*
|
||||||
* Possible error reasons are
|
* Possible error reasons are
|
||||||
* - no category set available for the current CPU,
|
* - no category set available for the current CPU,
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ static const char *const fatal_source_text[] = {
|
|||||||
"RTEMS_FATAL_SOURCE_BDBUF",
|
"RTEMS_FATAL_SOURCE_BDBUF",
|
||||||
"RTEMS_FATAL_SOURCE_APPLICATION",
|
"RTEMS_FATAL_SOURCE_APPLICATION",
|
||||||
"RTEMS_FATAL_SOURCE_EXIT",
|
"RTEMS_FATAL_SOURCE_EXIT",
|
||||||
"RTEMS_FATAL_SOURCE_BSP_GENERIC",
|
"RTEMS_FATAL_SOURCE_BSP",
|
||||||
"RTEMS_FATAL_SOURCE_BSP_SPECIFIC",
|
|
||||||
"RTEMS_FATAL_SOURCE_ASSERT",
|
"RTEMS_FATAL_SOURCE_ASSERT",
|
||||||
"RTEMS_FATAL_SOURCE_STACK_CHECKER",
|
"RTEMS_FATAL_SOURCE_STACK_CHECKER",
|
||||||
"RTEMS_FATAL_SOURCE_EXCEPTION"
|
"RTEMS_FATAL_SOURCE_EXCEPTION"
|
||||||
|
|||||||
@@ -69,21 +69,14 @@ typedef enum {
|
|||||||
RTEMS_FATAL_SOURCE_EXIT,
|
RTEMS_FATAL_SOURCE_EXIT,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Fatal source for generic BSP errors.
|
* @brief Fatal source for BSP errors.
|
||||||
*
|
*
|
||||||
* The fatal codes are defined in <bsp/generic-fatal.h>. Examples are
|
* The fatal codes are defined in <bsp/fatal.h>. Examples are interrupt and
|
||||||
* interrupt and exception initialization.
|
* exception initialization.
|
||||||
*
|
*
|
||||||
* @see bsp_generic_fatal_code and bsp_generic_fatal().
|
* @see bsp_fatal_code and bsp_fatal().
|
||||||
*/
|
*/
|
||||||
RTEMS_FATAL_SOURCE_BSP_GENERIC,
|
RTEMS_FATAL_SOURCE_BSP,
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Fatal source for BSP specific errors.
|
|
||||||
*
|
|
||||||
* The fatal code is BSP specific.
|
|
||||||
*/
|
|
||||||
RTEMS_FATAL_SOURCE_BSP_SPECIFIC,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Fatal source of assert().
|
* @brief Fatal source of assert().
|
||||||
|
|||||||
@@ -32,8 +32,7 @@ INTERNAL_ERROR_POSIX_API
|
|||||||
RTEMS_FATAL_SOURCE_BDBUF
|
RTEMS_FATAL_SOURCE_BDBUF
|
||||||
RTEMS_FATAL_SOURCE_APPLICATION
|
RTEMS_FATAL_SOURCE_APPLICATION
|
||||||
RTEMS_FATAL_SOURCE_EXIT
|
RTEMS_FATAL_SOURCE_EXIT
|
||||||
RTEMS_FATAL_SOURCE_BSP_GENERIC
|
RTEMS_FATAL_SOURCE_BSP
|
||||||
RTEMS_FATAL_SOURCE_BSP_SPECIFIC
|
|
||||||
RTEMS_FATAL_SOURCE_ASSERT
|
RTEMS_FATAL_SOURCE_ASSERT
|
||||||
RTEMS_FATAL_SOURCE_STACK_CHECKER
|
RTEMS_FATAL_SOURCE_STACK_CHECKER
|
||||||
RTEMS_FATAL_SOURCE_EXCEPTION
|
RTEMS_FATAL_SOURCE_EXCEPTION
|
||||||
|
|||||||
Reference in New Issue
Block a user