summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/shared
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-20 11:44:04 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-21 10:26:10 +0200
commitade27c69eb4f520645caedd3be5af7fb9a9e691e (patch)
treeb8f0bf0edb35dc53937e494207ca673bcf036c8e /c/src/lib/libbsp/shared
parentbsps/powerpc: Delete bsp_exceptions_in_RAM (diff)
downloadrtems-ade27c69eb4f520645caedd3be5af7fb9a9e691e.tar.bz2
bsps: Move bsp_generic_fatal_code to new file
Add bsp_generic_fatal().
Diffstat (limited to 'c/src/lib/libbsp/shared')
-rw-r--r--c/src/lib/libbsp/shared/include/bootcard.h13
-rw-r--r--c/src/lib/libbsp/shared/include/generic-fatal.h42
-rw-r--r--c/src/lib/libbsp/shared/src/irq-generic.c7
3 files changed, 46 insertions, 16 deletions
diff --git a/c/src/lib/libbsp/shared/include/bootcard.h b/c/src/lib/libbsp/shared/include/bootcard.h
index f3de76036c..ca27832ec2 100644
--- a/c/src/lib/libbsp/shared/include/bootcard.h
+++ b/c/src/lib/libbsp/shared/include/bootcard.h
@@ -7,10 +7,10 @@
*/
/*
- * Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2008-2013 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
- * Obere Lagerstr. 30
+ * Dornierstr. 4
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
@@ -51,15 +51,6 @@ extern "C" {
*/
/**
- * @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_code;
-
-/**
* @brief Global pointer to the command line of boot_card().
*/
extern const char *bsp_boot_cmdline;
diff --git a/c/src/lib/libbsp/shared/include/generic-fatal.h b/c/src/lib/libbsp/shared/include/generic-fatal.h
new file mode 100644
index 0000000000..4edf4675a9
--- /dev/null
+++ b/c/src/lib/libbsp/shared/include/generic-fatal.h
@@ -0,0 +1,42 @@
+/*
+ * 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_code;
+
+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 */
diff --git a/c/src/lib/libbsp/shared/src/irq-generic.c b/c/src/lib/libbsp/shared/src/irq-generic.c
index 5cf9c91d77..b2d712a273 100644
--- a/c/src/lib/libbsp/shared/src/irq-generic.c
+++ b/c/src/lib/libbsp/shared/src/irq-generic.c
@@ -23,7 +23,7 @@
*/
#include <bsp/irq-generic.h>
-#include <bsp/bootcard.h>
+#include <bsp/generic-fatal.h>
#include <stdlib.h>
@@ -170,10 +170,7 @@ void bsp_interrupt_initialize(void)
sc = bsp_interrupt_facility_initialize();
if (sc != RTEMS_SUCCESSFUL) {
- rtems_fatal(
- RTEMS_FATAL_SOURCE_BSP_GENERIC,
- BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION
- );
+ bsp_generic_fatal(BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION);
}
bsp_interrupt_set_initialized();