summaryrefslogtreecommitdiffstats
path: root/bsps
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-17 06:57:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-20 09:49:36 +0200
commitc4ccf26cb7808786e15312b41c3055b2da75203b (patch)
treef25c7d75c2543e447847e84d978db3d23a433418 /bsps
parentbsp/motorola_powerpc: Move bspstart.c to bsps (diff)
downloadrtems-c4ccf26cb7808786e15312b41c3055b2da75203b.tar.bz2
bsps: Convert all bsp_predriver_hook()
Use RTEMS_SYSINIT_ITEM() instead. Update #2408.
Diffstat (limited to 'bsps')
-rw-r--r--bsps/include/bsp/bootcard.h2
-rw-r--r--bsps/m68k/mrm332/start/bspstart.c28
-rw-r--r--bsps/powerpc/motorola_powerpc/start/bspstart.c8
-rw-r--r--bsps/powerpc/mvme3100/include/bsp.h1
-rw-r--r--bsps/shared/start/bootcard.c6
-rw-r--r--bsps/sparc/erc32/start/bspstart.c40
6 files changed, 76 insertions, 9 deletions
diff --git a/bsps/include/bsp/bootcard.h b/bsps/include/bsp/bootcard.h
index aaac42e8e2..4dc3f4c2b0 100644
--- a/bsps/include/bsp/bootcard.h
+++ b/bsps/include/bsp/bootcard.h
@@ -53,8 +53,6 @@ extern const char *bsp_boot_cmdline;
void bsp_start(void);
-void bsp_predriver_hook(void);
-
void bsp_reset(void);
/**
diff --git a/bsps/m68k/mrm332/start/bspstart.c b/bsps/m68k/mrm332/start/bspstart.c
new file mode 100644
index 0000000000..285f34de9d
--- /dev/null
+++ b/bsps/m68k/mrm332/start/bspstart.c
@@ -0,0 +1,28 @@
+/*
+ * COPYRIGHT (c) 1989-2014.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <bsp.h>
+#include <bsp/bootcard.h>
+#include <rtems/sysinit.h>
+
+extern void Spurious_Initialize(void);
+
+/*
+ * Must be called after the _ISR_Vector_Table allocation
+ */
+RTEMS_SYSINIT_ITEM(
+ Spurious_Initialize,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
+void bsp_start(void)
+{
+ /* Nothing to do */
+}
diff --git a/bsps/powerpc/motorola_powerpc/start/bspstart.c b/bsps/powerpc/motorola_powerpc/start/bspstart.c
index dac4b2452d..3ab9588af0 100644
--- a/bsps/powerpc/motorola_powerpc/start/bspstart.c
+++ b/bsps/powerpc/motorola_powerpc/start/bspstart.c
@@ -20,6 +20,7 @@
#include <bsp/bootcard.h>
#include <rtems/bspIo.h>
#include <rtems/counter.h>
+#include <rtems/sysinit.h>
#include <bsp/consoleIo.h>
#include <libcpu/spr.h>
#include <bsp/residual.h>
@@ -30,6 +31,7 @@
#include <libcpu/pte121.h>
#include <libcpu/cpuIdent.h>
#include <bsp/vectors.h>
+#include <bsp/VME.h>
#include <bsp/motorola.h>
#include <rtems/powerpc/powerpc.h>
@@ -374,3 +376,9 @@ void bsp_start( void )
printk("Exit from bspstart\n");
#endif
}
+
+RTEMS_SYSINIT_ITEM(
+ BSP_vme_config,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
diff --git a/bsps/powerpc/mvme3100/include/bsp.h b/bsps/powerpc/mvme3100/include/bsp.h
index 2959e96813..671c8180f4 100644
--- a/bsps/powerpc/mvme3100/include/bsp.h
+++ b/bsps/powerpc/mvme3100/include/bsp.h
@@ -176,7 +176,6 @@ extern "C" {
*
*/
int BSP_i2c_initialize(void);
-#define BSP_PREDRIVER_I2C_INIT
/* System Control Register */
#define BSP_MVME3100_SYS_CR ((volatile uint8_t *)0xe2000001)
diff --git a/bsps/shared/start/bootcard.c b/bsps/shared/start/bootcard.c
index 3e243d2569..83030f29ba 100644
--- a/bsps/shared/start/bootcard.c
+++ b/bsps/shared/start/bootcard.c
@@ -49,12 +49,6 @@ RTEMS_SYSINIT_ITEM(
RTEMS_SYSINIT_ORDER_MIDDLE
);
-RTEMS_SYSINIT_ITEM(
- bsp_predriver_hook,
- RTEMS_SYSINIT_BSP_PRE_DRIVERS,
- RTEMS_SYSINIT_ORDER_MIDDLE
-);
-
/*
* This is the initialization framework routine that weaves together
* calls to RTEMS and the BSP in the proper sequence to initialize
diff --git a/bsps/sparc/erc32/start/bspstart.c b/bsps/sparc/erc32/start/bspstart.c
new file mode 100644
index 0000000000..80447b9457
--- /dev/null
+++ b/bsps/sparc/erc32/start/bspstart.c
@@ -0,0 +1,40 @@
+/* Installs the BSP pre-driver hook
+ */
+
+/*
+ * COPYRIGHT (c) 2011
+ * Aeroflex Gaisler
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <bsp.h>
+#include <bsp/bootcard.h>
+#include <rtems/sysinit.h>
+
+/*
+ * Called just before drivers are initialized. Is used to initialize shared
+ * interrupt handling.
+ */
+static void erc32_pre_driver_hook( void )
+{
+ bsp_spurious_initialize();
+
+ /* Initialize shared interrupt handling, must be done after IRQ
+ * controller has been found and initialized.
+ */
+ BSP_shared_interrupt_init();
+}
+
+RTEMS_SYSINIT_ITEM(
+ erc32_pre_driver_hook,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
+void bsp_start(void)
+{
+ /* Nothing to do */
+}