summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2021-07-07 16:47:28 +0200
committerDaniel Hellstrom <daniel@gaisler.com>2021-08-26 11:47:45 +0200
commit375b26928fc2df6297c2eba2523f084680112a5a (patch)
tree671bc37fe5e653f93e7d69243bde27734608e1a3
parent339de54f9fc49799719080c9ed7c355758db597a (diff)
grlib,ambapp: change from exit to rtems fatal handling
-rw-r--r--bsps/shared/grlib/drvmgr/ambapp_bus.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bsps/shared/grlib/drvmgr/ambapp_bus.c b/bsps/shared/grlib/drvmgr/ambapp_bus.c
index 931d5d2a61..dc3006b17d 100644
--- a/bsps/shared/grlib/drvmgr/ambapp_bus.c
+++ b/bsps/shared/grlib/drvmgr/ambapp_bus.c
@@ -26,6 +26,7 @@
#include <bsp.h>
#include <grlib/ambapp.h>
#include <rtems/bspIo.h>
+#include <rtems/fatal.h>
/*#define DEBUG 1*/
#define DBG(args...)
@@ -661,7 +662,7 @@ static int ambapp_dev_register(struct ambapp_dev *dev, int index, void *arg)
type = "AHB SLV";
else if ( dev->dev_type == DEV_APB_SLV )
type = "APB SLV";
-
+
DBG("Found [%d:%x:%x], %s\n", index, dev->vendor, dev->device, type);
#endif
@@ -674,7 +675,7 @@ static int ambapp_dev_register(struct ambapp_dev *dev, int index, void *arg)
if ( p->ahb_mst ) {
/* This should not happen */
printk("ambapp_dev_register: ahb_mst not NULL!\n");
- exit(1);
+ rtems_fatal_error_occurred(RTEMS_IO_ERROR);
}
/* Remember AHB Master */
@@ -711,7 +712,7 @@ static int ambapp_dev_register(struct ambapp_dev *dev, int index, void *arg)
if ( p->apb_slv ) {
/* This should not happen */
printk("ambapp_dev_register: apb_slv not NULL!\n");
- exit(1);
+ rtems_fatal_error_occurred(RTEMS_IO_ERROR);
}
/* Remember APB Slave */
p->apb_slv = dev;