source: rtems/c/src/lib/libbsp/shared/include/fatal.h @ a387e944

4.115
Last change on this file since a387e944 was a387e944, checked in by Daniel Hellstrom <daniel@…>, on Jun 13, 2014 at 8:18:01 AM

LEON3: use interrupt layer in clock driver

Manupilating the interrupt control registers directly instead
of going through the interrupt layer can be deceiving.

  • Property mode set to 100644
File size: 3.6 KB
Line 
1/*
2 * Copyright (c) 2012-2014 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#ifndef LIBBSP_SHARED_BSP_FATAL_H
16#define LIBBSP_SHARED_BSP_FATAL_H
17
18#include <rtems.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif /* __cplusplus */
23
24#define BSP_FATAL_CODE_BLOCK(idx) ((unsigned long) (idx) * 256UL)
25
26/**
27 * @brief BSP fatal error codes.
28 */
29typedef enum {
30  /* Generic BSP fatal codes */
31  BSP_FATAL_INTERRUPT_INITIALIZATION = BSP_FATAL_CODE_BLOCK(0),
32  BSP_FATAL_SPURIOUS_INTERRUPT,
33  BSP_FATAL_CONSOLE_MULTI_INIT,
34  BSP_FATAL_CONSOLE_NO_MEMORY_0,
35  BSP_FATAL_CONSOLE_NO_MEMORY_1,
36  BSP_FATAL_CONSOLE_NO_MEMORY_2,
37  BSP_FATAL_CONSOLE_NO_MEMORY_3,
38  BSP_FATAL_CONSOLE_REGISTER_DEV_0,
39  BSP_FATAL_CONSOLE_REGISTER_DEV_1,
40  BSP_FATAL_CONSOLE_NO_DEV,
41  BSP_FATAL_CONSOLE_INSTALL_0,
42  BSP_FATAL_CONSOLE_INSTALL_1,
43
44  /* ARM fatal codes */
45  BSP_ARM_A9MPCORE_FATAL_CLOCK_IRQ_INSTALL = BSP_FATAL_CODE_BLOCK(1),
46  BSP_ARM_A9MPCORE_FATAL_CLOCK_IRQ_REMOVE,
47  BSP_ARM_PL111_FATAL_REGISTER_DEV,
48  BSP_ARM_PL111_FATAL_SEM_CREATE,
49  BSP_ARM_PL111_FATAL_SEM_RELEASE,
50
51  /* LEON3 fatal codes */
52  LEON3_FATAL_NO_IRQMP_CONTROLLER = BSP_FATAL_CODE_BLOCK(2),
53  LEON3_FATAL_CONSOLE_REGISTER_DEV,
54  LEON3_FATAL_CLOCK_INITIALIZATION,
55
56  /* LPC24XX fatal codes */
57  LPC24XX_FATAL_PL111_SET_UP = BSP_FATAL_CODE_BLOCK(3),
58  LPC24XX_FATAL_PL111_PINS_SET_UP,
59  LPC24XX_FATAL_PL111_PINS_TEAR_DOWN,
60  LPC24XX_FATAL_PL111_TEAR_DOWN,
61
62  /* MPC5200 fatal codes */
63  MPC5200_FATAL_PCF8563_INVALID_YEAR = BSP_FATAL_CODE_BLOCK(4),
64  MPC5200_FATAL_SLICETIMER_0_IRQ_INSTALL,
65  MPC5200_FATAL_SLICETIMER_1_IRQ_INSTALL,
66  MPC5200_FATAL_TM27_IRQ_INSTALL,
67  MPC5200_FATAL_MSCAN_A_INIT,
68  MPC5200_FATAL_MSCAN_B_INIT,
69  MPC5200_FATAL_MSCAN_A_SET_MODE,
70  MPC5200_FATAL_MSCAN_B_SET_MODE,
71  MPC5200_FATAL_ATA_DISK_IO_INIT,
72  MPC5200_FATAL_ATA_DISK_CREATE,
73  MPC5200_FATAL_ATA_DMA_SINGLE_IRQ_INSTALL,
74  MPC5200_FATAL_ATA_LOCK_CREATE,
75  MPC5200_FATAL_ATA_LOCK_DESTROY,
76
77  /* MPC55XX fatal codes */
78  MPC55XX_FATAL_FMPLL_LOCK = BSP_FATAL_CODE_BLOCK(5),
79  MPC55XX_FATAL_CLOCK_EMIOS_IRQ_INSTALL,
80  MPC55XX_FATAL_CLOCK_EMIOS_PRESCALER,
81  MPC55XX_FATAL_CLOCK_EMIOS_INTERVAL,
82  MPC55XX_FATAL_CLOCK_PIT_IRQ_INSTALL,
83  MPC55XX_FATAL_CONSOLE_GENERIC_COUNT,
84  MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER,
85  MPC55XX_FATAL_CONSOLE_GENERIC_REGISTER_CONSOLE,
86  MPC55XX_FATAL_CONSOLE_ESCI_BAUD,
87  MPC55XX_FATAL_CONSOLE_ESCI_ATTRIBUTES,
88  MPC55XX_FATAL_CONSOLE_ESCI_IRQ_INSTALL,
89  MPC55XX_FATAL_CONSOLE_LINFLEX_BAUD,
90  MPC55XX_FATAL_CONSOLE_LINFLEX_ATTRIBUTES,
91  MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_INSTALL,
92  MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_INSTALL,
93  MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_INSTALL,
94  MPC55XX_FATAL_CONSOLE_LINFLEX_RX_IRQ_REMOVE,
95  MPC55XX_FATAL_CONSOLE_LINFLEX_TX_IRQ_REMOVE,
96  MPC55XX_FATAL_CONSOLE_LINFLEX_ERR_IRQ_REMOVE,
97  MPC55XX_FATAL_EDMA_IRQ_INSTALL,
98  MPC55XX_FATAL_EDMA_IRQ_REMOVE,
99
100  /* MRM332 fatal codes */
101  MRM332_FATAL_SPURIOUS_INTERRUPT = BSP_FATAL_CODE_BLOCK(6),
102
103  /* PowerPC fatal codes */
104  PPC_FATAL_EXCEPTION_INITIALIZATION = BSP_FATAL_CODE_BLOCK(7),
105
106  /* Libchip fatal codes */
107  DWMAC_FATAL_TOO_MANY_RBUFS_CONFIGURED = BSP_FATAL_CODE_BLOCK(8)
108} bsp_fatal_code;
109
110RTEMS_COMPILER_NO_RETURN_ATTRIBUTE static inline void
111bsp_fatal( bsp_fatal_code code )
112{
113  rtems_fatal( RTEMS_FATAL_SOURCE_BSP, (rtems_fatal_code) code );
114}
115
116#ifdef __cplusplus
117}
118#endif /* __cplusplus */
119
120#endif /* LIBBSP_SHARED_BSP_FATAL_H */
Note: See TracBrowser for help on using the repository browser.