[rtems commit] bsps: Convert all bsp_predriver_hook()
Sebastian Huber
sebh at rtems.org
Fri Apr 20 13:25:48 UTC 2018
Module: rtems
Branch: master
Commit: c4ccf26cb7808786e15312b41c3055b2da75203b
Changeset: http://git.rtems.org/rtems/commit/?id=c4ccf26cb7808786e15312b41c3055b2da75203b
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Apr 17 06:57:46 2018 +0200
bsps: Convert all bsp_predriver_hook()
Use RTEMS_SYSINIT_ITEM() instead.
Update #2408.
---
bsps/include/bsp/bootcard.h | 2 -
.../m68k/mrm332/start/bspstart.c | 14 +++-
bsps/powerpc/motorola_powerpc/start/bspstart.c | 8 ++
bsps/powerpc/mvme3100/include/bsp.h | 1 -
bsps/shared/start/bootcard.c | 6 --
.../sparc/erc32/start/bspstart.c | 20 +++--
c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am | 1 -
c/src/lib/libbsp/arm/atsam/Makefile.am | 1 -
c/src/lib/libbsp/arm/beagle/Makefile.am | 1 -
c/src/lib/libbsp/arm/csb336/Makefile.am | 1 -
c/src/lib/libbsp/arm/csb337/Makefile.am | 2 +-
c/src/lib/libbsp/arm/edb7312/Makefile.am | 1 -
c/src/lib/libbsp/arm/gdbarmsim/Makefile.am | 1 -
c/src/lib/libbsp/arm/gumstix/Makefile.am | 1 -
c/src/lib/libbsp/arm/imx/Makefile.am | 1 -
c/src/lib/libbsp/arm/lm3s69xx/Makefile.am | 1 -
c/src/lib/libbsp/arm/lpc176x/Makefile.am | 1 -
c/src/lib/libbsp/arm/lpc24xx/Makefile.am | 1 -
c/src/lib/libbsp/arm/lpc32xx/Makefile.am | 1 -
c/src/lib/libbsp/arm/raspberrypi/Makefile.am | 1 -
c/src/lib/libbsp/arm/realview-pbx-a9/Makefile.am | 1 -
c/src/lib/libbsp/arm/rtl22xx/Makefile.am | 1 -
c/src/lib/libbsp/arm/smdk2410/Makefile.am | 1 -
c/src/lib/libbsp/arm/stm32f4/Makefile.am | 1 -
c/src/lib/libbsp/arm/tms570/Makefile.am | 1 -
c/src/lib/libbsp/arm/xilinx-zynq/Makefile.am | 1 -
c/src/lib/libbsp/bfin/TLL6527M/startup/bspstart.c | 13 ++--
.../lib/libbsp/bfin/bf537Stamp/startup/bspstart.c | 14 ++--
c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c | 14 ++--
c/src/lib/libbsp/epiphany/epiphany_sim/Makefile.am | 1 -
c/src/lib/libbsp/i386/pc386/Makefile.am | 1 -
c/src/lib/libbsp/lm32/shared/startup/bspstart.c | 6 --
c/src/lib/libbsp/m32c/m32cbsp/Makefile.am | 1 -
c/src/lib/libbsp/m68k/av5282/Makefile.am | 1 -
c/src/lib/libbsp/m68k/csb360/Makefile.am | 1 -
c/src/lib/libbsp/m68k/gen68340/Makefile.am | 1 -
c/src/lib/libbsp/m68k/gen68360/Makefile.am | 1 -
c/src/lib/libbsp/m68k/genmcf548x/Makefile.am | 1 -
c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am | 1 -
c/src/lib/libbsp/m68k/mcf52235/Makefile.am | 1 -
c/src/lib/libbsp/m68k/mcf5225x/Makefile.am | 1 -
c/src/lib/libbsp/m68k/mcf5235/Makefile.am | 1 -
c/src/lib/libbsp/m68k/mcf5329/Makefile.am | 1 -
c/src/lib/libbsp/m68k/mrm332/Makefile.am | 3 +-
c/src/lib/libbsp/m68k/mvme147/Makefile.am | 1 -
c/src/lib/libbsp/m68k/mvme147s/Makefile.am | 1 -
c/src/lib/libbsp/m68k/mvme162/Makefile.am | 1 -
c/src/lib/libbsp/m68k/mvme167/Makefile.am | 1 -
c/src/lib/libbsp/m68k/uC5282/Makefile.am | 1 -
c/src/lib/libbsp/mips/csb350/Makefile.am | 1 -
c/src/lib/libbsp/mips/hurricane/Makefile.am | 1 -
c/src/lib/libbsp/mips/jmr3904/Makefile.am | 1 -
c/src/lib/libbsp/mips/malta/Makefile.am | 1 -
c/src/lib/libbsp/mips/rbtx4925/Makefile.am | 1 -
c/src/lib/libbsp/mips/rbtx4938/Makefile.am | 1 -
c/src/lib/libbsp/moxie/moxiesim/Makefile.am | 1 -
c/src/lib/libbsp/nios2/nios2_iss/Makefile.am | 1 -
c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am | 1 -
c/src/lib/libbsp/or1k/generic_or1k/Makefile.am | 1 -
c/src/lib/libbsp/powerpc/beatnik/Makefile.am | 1 -
.../lib/libbsp/powerpc/beatnik/startup/bspstart.c | 8 ++
c/src/lib/libbsp/powerpc/gen5200/Makefile.am | 1 -
c/src/lib/libbsp/powerpc/gen83xx/Makefile.am | 1 -
c/src/lib/libbsp/powerpc/haleakala/Makefile.am | 1 -
.../libbsp/powerpc/motorola_powerpc/Makefile.am | 1 -
c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am | 1 -
c/src/lib/libbsp/powerpc/mpc8260ads/Makefile.am | 1 -
c/src/lib/libbsp/powerpc/mvme3100/Makefile.am | 1 -
.../lib/libbsp/powerpc/mvme3100/startup/bspstart.c | 19 +++++
c/src/lib/libbsp/powerpc/mvme5500/Makefile.am | 1 -
.../lib/libbsp/powerpc/mvme5500/startup/bspstart.c | 8 ++
c/src/lib/libbsp/powerpc/psim/Makefile.am | 1 -
c/src/lib/libbsp/powerpc/qemuppc/Makefile.am | 1 -
c/src/lib/libbsp/powerpc/qoriq/Makefile.am | 1 -
.../powerpc/qoriq/startup/bsppredriverhook.c | 31 --------
c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c | 10 +++
.../powerpc/shared/startup/bsppredriverhook.c | 70 -----------------
c/src/lib/libbsp/powerpc/ss555/Makefile.am | 1 -
c/src/lib/libbsp/powerpc/t32mppc/Makefile.am | 1 -
c/src/lib/libbsp/powerpc/tqm8xx/Makefile.am | 1 -
c/src/lib/libbsp/powerpc/virtex/Makefile.am | 1 -
c/src/lib/libbsp/powerpc/virtex4/start/start.S | 2 +-
.../lib/libbsp/powerpc/virtex4/startup/bspstart.c | 9 ++-
.../lib/libbsp/powerpc/virtex5/startup/bspstart.c | 9 ++-
c/src/lib/libbsp/riscv/riscv_generic/Makefile.am | 1 -
c/src/lib/libbsp/sh/gensh1/Makefile.am | 1 -
c/src/lib/libbsp/sh/gensh2/Makefile.am | 1 -
c/src/lib/libbsp/sh/gensh4/Makefile.am | 1 -
c/src/lib/libbsp/sh/shsim/Makefile.am | 1 -
c/src/lib/libbsp/shared/bsppredriverhook.c | 16 ----
c/src/lib/libbsp/sparc/erc32/Makefile.am | 3 +-
c/src/lib/libbsp/sparc/leon2/Makefile.am | 1 -
.../lib/libbsp/sparc/leon2/startup/bsppredriver.c | 88 ----------------------
c/src/lib/libbsp/sparc/leon2/startup/bspstart.c | 77 +++++++++++++++++++
c/src/lib/libbsp/sparc/leon3/Makefile.am | 1 -
.../lib/libbsp/sparc/leon3/startup/bsppredriver.c | 56 --------------
c/src/lib/libbsp/sparc/leon3/startup/bspstart.c | 43 +++++++++++
c/src/lib/libbsp/sparc64/niagara/Makefile.am | 1 -
c/src/lib/libbsp/sparc64/usiii/Makefile.am | 1 -
c/src/lib/libbsp/v850/gdbv850sim/Makefile.am | 1 -
100 files changed, 236 insertions(+), 389 deletions(-)
diff --git a/bsps/include/bsp/bootcard.h b/bsps/include/bsp/bootcard.h
index aaac42e..4dc3f4c 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/c/src/lib/libbsp/m68k/mrm332/startup/bsppredriverhook.c b/bsps/m68k/mrm332/start/bspstart.c
similarity index 59%
rename from c/src/lib/libbsp/m68k/mrm332/startup/bsppredriverhook.c
rename to bsps/m68k/mrm332/start/bspstart.c
index 004a705..285f34d 100644
--- a/c/src/lib/libbsp/m68k/mrm332/startup/bsppredriverhook.c
+++ b/bsps/m68k/mrm332/start/bspstart.c
@@ -9,14 +9,20 @@
#include <bsp.h>
#include <bsp/bootcard.h>
+#include <rtems/sysinit.h>
extern void Spurious_Initialize(void);
/*
- * Call Spurious_Initialize in bsp_predriver_hook because
- * bsp_predriver_hook is call after the _ISR_Vector_Table allocation
+ * Must be called after the _ISR_Vector_Table allocation
*/
-void bsp_predriver_hook(void)
+RTEMS_SYSINIT_ITEM(
+ Spurious_Initialize,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
+void bsp_start(void)
{
- Spurious_Initialize();
+ /* Nothing to do */
}
diff --git a/bsps/powerpc/motorola_powerpc/start/bspstart.c b/bsps/powerpc/motorola_powerpc/start/bspstart.c
index dac4b24..3ab9588 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 2959e96..671c818 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 3e243d2..83030f2 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/c/src/lib/libbsp/sparc/erc32/startup/bsppredriver.c b/bsps/sparc/erc32/start/bspstart.c
similarity index 60%
rename from c/src/lib/libbsp/sparc/erc32/startup/bsppredriver.c
rename to bsps/sparc/erc32/start/bspstart.c
index 6c6ea1e..80447b9 100644
--- a/c/src/lib/libbsp/sparc/erc32/startup/bsppredriver.c
+++ b/bsps/sparc/erc32/start/bspstart.c
@@ -12,14 +12,13 @@
#include <bsp.h>
#include <bsp/bootcard.h>
+#include <rtems/sysinit.h>
/*
- * bsp_predriver_hook
- *
- * BSP predriver hook. Called just before drivers are initialized.
- * Is used to initialize shared interrupt handling.
+ * Called just before drivers are initialized. Is used to initialize shared
+ * interrupt handling.
*/
-void bsp_predriver_hook( void )
+static void erc32_pre_driver_hook( void )
{
bsp_spurious_initialize();
@@ -28,3 +27,14 @@ void bsp_predriver_hook( void )
*/
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 */
+}
diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am b/c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am
index 4e94bec..b7625af 100644
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am
+++ b/c/src/lib/libbsp/arm/altera-cyclone-v/Makefile.am
@@ -80,7 +80,6 @@ librtemsbsp_a_SOURCES += hwlib/src/hwmgr/alt_reset_manager.c
# Shared
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterdiff.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../shared/timerstub.c
diff --git a/c/src/lib/libbsp/arm/atsam/Makefile.am b/c/src/lib/libbsp/arm/atsam/Makefile.am
index fd01c8a..a8db8b7 100644
--- a/c/src/lib/libbsp/arm/atsam/Makefile.am
+++ b/c/src/lib/libbsp/arm/atsam/Makefile.am
@@ -36,7 +36,6 @@ librtemsbsp_a_LIBADD =
# Shared
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterdiff.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/stackalloc.c
diff --git a/c/src/lib/libbsp/arm/beagle/Makefile.am b/c/src/lib/libbsp/arm/beagle/Makefile.am
index 3c1bf25..7d3167f 100644
--- a/c/src/lib/libbsp/arm/beagle/Makefile.am
+++ b/c/src/lib/libbsp/arm/beagle/Makefile.am
@@ -41,7 +41,6 @@ librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bsp-fdt.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/stackalloc.c
librtemsbsp_a_SOURCES += ../../shared/gpio.c
diff --git a/c/src/lib/libbsp/arm/csb336/Makefile.am b/c/src/lib/libbsp/arm/csb336/Makefile.am
index 51b3cf9..5833c94 100644
--- a/c/src/lib/libbsp/arm/csb336/Makefile.am
+++ b/c/src/lib/libbsp/arm/csb336/Makefile.am
@@ -19,7 +19,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
diff --git a/c/src/lib/libbsp/arm/csb337/Makefile.am b/c/src/lib/libbsp/arm/csb337/Makefile.am
index 8cce848..d81e433 100644
--- a/c/src/lib/libbsp/arm/csb337/Makefile.am
+++ b/c/src/lib/libbsp/arm/csb337/Makefile.am
@@ -24,9 +24,9 @@ dist_project_lib_DATA += startup/linkcmds.csb637
project_lib_LIBRARIES = librtemsbsp.a
+librtemsbsp_a_SOURCES =
# startup
-librtemsbsp_a_SOURCES = ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
diff --git a/c/src/lib/libbsp/arm/edb7312/Makefile.am b/c/src/lib/libbsp/arm/edb7312/Makefile.am
index 715b4a4..358aec8 100644
--- a/c/src/lib/libbsp/arm/edb7312/Makefile.am
+++ b/c/src/lib/libbsp/arm/edb7312/Makefile.am
@@ -18,7 +18,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
diff --git a/c/src/lib/libbsp/arm/gdbarmsim/Makefile.am b/c/src/lib/libbsp/arm/gdbarmsim/Makefile.am
index 1fc905b..cb1de3e 100644
--- a/c/src/lib/libbsp/arm/gdbarmsim/Makefile.am
+++ b/c/src/lib/libbsp/arm/gdbarmsim/Makefile.am
@@ -19,7 +19,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspstart-empty.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += startup/bspreset.c
diff --git a/c/src/lib/libbsp/arm/gumstix/Makefile.am b/c/src/lib/libbsp/arm/gumstix/Makefile.am
index 5f63008..23ac9d1 100644
--- a/c/src/lib/libbsp/arm/gumstix/Makefile.am
+++ b/c/src/lib/libbsp/arm/gumstix/Makefile.am
@@ -17,7 +17,6 @@ project_lib_DATA += linkcmds
project_lib_LIBRARIES = librtemsbsp.a
librtemsbsp_a_SOURCES =
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
diff --git a/c/src/lib/libbsp/arm/imx/Makefile.am b/c/src/lib/libbsp/arm/imx/Makefile.am
index ebb4e04..6bf4584 100644
--- a/c/src/lib/libbsp/arm/imx/Makefile.am
+++ b/c/src/lib/libbsp/arm/imx/Makefile.am
@@ -31,7 +31,6 @@ librtemsbsp_a_SOURCES =
# Shared
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterdiff.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
diff --git a/c/src/lib/libbsp/arm/lm3s69xx/Makefile.am b/c/src/lib/libbsp/arm/lm3s69xx/Makefile.am
index 171dee8..700ff5f 100644
--- a/c/src/lib/libbsp/arm/lm3s69xx/Makefile.am
+++ b/c/src/lib/libbsp/arm/lm3s69xx/Makefile.am
@@ -34,7 +34,6 @@ librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterread.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterdiff.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
diff --git a/c/src/lib/libbsp/arm/lpc176x/Makefile.am b/c/src/lib/libbsp/arm/lpc176x/Makefile.am
index a278b0a..ba69e7f 100644
--- a/c/src/lib/libbsp/arm/lpc176x/Makefile.am
+++ b/c/src/lib/libbsp/arm/lpc176x/Makefile.am
@@ -43,7 +43,6 @@ librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/stackalloc.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/uart-output-char.c
diff --git a/c/src/lib/libbsp/arm/lpc24xx/Makefile.am b/c/src/lib/libbsp/arm/lpc24xx/Makefile.am
index e58a174..33b9b54 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/Makefile.am
+++ b/c/src/lib/libbsp/arm/lpc24xx/Makefile.am
@@ -52,7 +52,6 @@ librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/stackalloc.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/uart-output-char.c
diff --git a/c/src/lib/libbsp/arm/lpc32xx/Makefile.am b/c/src/lib/libbsp/arm/lpc32xx/Makefile.am
index a38fb52..590ab76 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/Makefile.am
+++ b/c/src/lib/libbsp/arm/lpc32xx/Makefile.am
@@ -43,7 +43,6 @@ librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterdiff.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/stackalloc.c
diff --git a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
index 4c618e8..eb5d6b8 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
+++ b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
@@ -39,7 +39,6 @@ librtemsbsp_a_SOURCES =
# Shared
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterread.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterdiff.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
diff --git a/c/src/lib/libbsp/arm/realview-pbx-a9/Makefile.am b/c/src/lib/libbsp/arm/realview-pbx-a9/Makefile.am
index 5b4e942..7ed5d22 100644
--- a/c/src/lib/libbsp/arm/realview-pbx-a9/Makefile.am
+++ b/c/src/lib/libbsp/arm/realview-pbx-a9/Makefile.am
@@ -40,7 +40,6 @@ librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterdiff.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../shared/timerstub.c
diff --git a/c/src/lib/libbsp/arm/rtl22xx/Makefile.am b/c/src/lib/libbsp/arm/rtl22xx/Makefile.am
index 84834e0..b110954 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/Makefile.am
+++ b/c/src/lib/libbsp/arm/rtl22xx/Makefile.am
@@ -19,7 +19,6 @@ project_lib_LIBRARIES = librtemsbsp.a
librtemsbsp_a_SOURCES =
# startup
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
diff --git a/c/src/lib/libbsp/arm/smdk2410/Makefile.am b/c/src/lib/libbsp/arm/smdk2410/Makefile.am
index 6273aee..0d3b63e 100644
--- a/c/src/lib/libbsp/arm/smdk2410/Makefile.am
+++ b/c/src/lib/libbsp/arm/smdk2410/Makefile.am
@@ -24,7 +24,6 @@ librtemsbsp_a_SOURCES += startup/memmap.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterread.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterdiff.c
diff --git a/c/src/lib/libbsp/arm/stm32f4/Makefile.am b/c/src/lib/libbsp/arm/stm32f4/Makefile.am
index e7a2378..00950c0 100644
--- a/c/src/lib/libbsp/arm/stm32f4/Makefile.am
+++ b/c/src/lib/libbsp/arm/stm32f4/Makefile.am
@@ -33,7 +33,6 @@ librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterread.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterdiff.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
diff --git a/c/src/lib/libbsp/arm/tms570/Makefile.am b/c/src/lib/libbsp/arm/tms570/Makefile.am
index 0a0fe71..e188dbf 100644
--- a/c/src/lib/libbsp/arm/tms570/Makefile.am
+++ b/c/src/lib/libbsp/arm/tms570/Makefile.am
@@ -42,7 +42,6 @@ librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/stackalloc.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterdiff.c
diff --git a/c/src/lib/libbsp/arm/xilinx-zynq/Makefile.am b/c/src/lib/libbsp/arm/xilinx-zynq/Makefile.am
index ad96075..b557a0a 100644
--- a/c/src/lib/libbsp/arm/xilinx-zynq/Makefile.am
+++ b/c/src/lib/libbsp/arm/xilinx-zynq/Makefile.am
@@ -38,7 +38,6 @@ librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/cpucounterdiff.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../shared/timerstub.c
diff --git a/c/src/lib/libbsp/bfin/TLL6527M/startup/bspstart.c b/c/src/lib/libbsp/bfin/TLL6527M/startup/bspstart.c
index 2614273..4c8302a 100644
--- a/c/src/lib/libbsp/bfin/TLL6527M/startup/bspstart.c
+++ b/c/src/lib/libbsp/bfin/TLL6527M/startup/bspstart.c
@@ -16,6 +16,7 @@
#include <cplb.h>
#include <bsp/interrupt.h>
#include <libcpu/ebiuRegs.h>
+#include <rtems/sysinit.h>
const unsigned int dcplbs_table[16][2] = {
{ 0xFFA00000, (PAGE_SIZE_1MB | CPLB_D_PAGE_MGMT | CPLB_WT) },
@@ -121,13 +122,11 @@ static void Init_Flags(void)
*((uint16_t*)PORTHIO_SET) = 0x1<<15;
}
-/*
- * bsp_predriver_hook
- */
-void bsp_predriver_hook(void)
-{
- bfin_interrupt_init();
-}
+RTEMS_SYSINIT_ITEM(
+ bfin_interrupt_init,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
void bsp_start( void )
{
diff --git a/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c b/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c
index 074feb8..ffc2d95 100644
--- a/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c
+++ b/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c
@@ -22,7 +22,7 @@
#include <libcpu/mmu.h>
#include <libcpu/mmuRegs.h>
#include <libcpu/interrupt.h>
-
+#include <rtems/sysinit.h>
static bfin_mmu_config_t mmuRegions = {
/* instruction */
@@ -69,13 +69,11 @@ static void initPLL(void);
static void initEBIU(void);
static void initGPIO(void);
-/*
- * BSP predriver hook.
- */
-void bsp_predriver_hook(void)
-{
- bfin_interrupt_init();
-}
+RTEMS_SYSINIT_ITEM(
+ bfin_interrupt_init,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
void bsp_start(void)
{
diff --git a/c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c b/c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c
index 4b34e8c..3579dd7 100644
--- a/c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c
+++ b/c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c
@@ -17,6 +17,7 @@
#include <bsp/bootcard.h>
#include <cplb.h>
#include <libcpu/interrupt.h>
+#include <rtems/sysinit.h>
const unsigned int dcplbs_table[16][2] = {
{ 0xFFA00000, (PAGE_SIZE_1MB | CPLB_D_PAGE_MGMT | CPLB_WT) },
@@ -117,14 +118,11 @@ static void Init_Flags(void)
*((uint8_t*)FlashA_PortB_Data) = 0x00;
}
-/*
- * BSP predriver hook. Called just before drivers are initialized.
- * Used to setup libc and install any BSP extensions.
- */
-void bsp_predriver_hook(void)
-{
- bfin_interrupt_init();
-}
+RTEMS_SYSINIT_ITEM(
+ bfin_interrupt_init,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
void bsp_start( void )
{
diff --git a/c/src/lib/libbsp/epiphany/epiphany_sim/Makefile.am b/c/src/lib/libbsp/epiphany/epiphany_sim/Makefile.am
index 4022519..a13e767 100644
--- a/c/src/lib/libbsp/epiphany/epiphany_sim/Makefile.am
+++ b/c/src/lib/libbsp/epiphany/epiphany_sim/Makefile.am
@@ -37,7 +37,6 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspstart-empty.c
# Shared
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/stackalloc.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
diff --git a/c/src/lib/libbsp/i386/pc386/Makefile.am b/c/src/lib/libbsp/i386/pc386/Makefile.am
index 42fd1cc..d50edeb 100644
--- a/c/src/lib/libbsp/i386/pc386/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/Makefile.am
@@ -104,7 +104,6 @@ librtemsbsp_a_SOURCES += ../../shared/pci/pci_bus_count.c
librtemsbsp_a_SOURCES += ../../shared/pci/pci_find_device.c
# startup
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += startup/bsp_fatal_halt.c
librtemsbsp_a_SOURCES += startup/bspgetworkarea.c
librtemsbsp_a_SOURCES += startup/bspidle.S
diff --git a/c/src/lib/libbsp/lm32/shared/startup/bspstart.c b/c/src/lib/libbsp/lm32/shared/startup/bspstart.c
index c84b689..6a419e8 100644
--- a/c/src/lib/libbsp/lm32/shared/startup/bspstart.c
+++ b/c/src/lib/libbsp/lm32/shared/startup/bspstart.c
@@ -33,9 +33,3 @@ void bsp_start(void)
/* Setup console baud rate */
BSP_uart_init(UART_BAUD_RATE);
}
-
-void bsp_predriver_hook(void)
-{
-}
-
-
diff --git a/c/src/lib/libbsp/m32c/m32cbsp/Makefile.am b/c/src/lib/libbsp/m32c/m32cbsp/Makefile.am
index 0b96b79..46a587b 100644
--- a/c/src/lib/libbsp/m32c/m32cbsp/Makefile.am
+++ b/c/src/lib/libbsp/m32c/m32cbsp/Makefile.am
@@ -17,7 +17,6 @@ project_lib_DATA += linkcmds
project_lib_LIBRARIES = librtemsbsp.a
librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
librtemsbsp_a_SOURCES += startup/bspstart.c
diff --git a/c/src/lib/libbsp/m68k/av5282/Makefile.am b/c/src/lib/libbsp/m68k/av5282/Makefile.am
index 3509223..ff43403 100644
--- a/c/src/lib/libbsp/m68k/av5282/Makefile.am
+++ b/c/src/lib/libbsp/m68k/av5282/Makefile.am
@@ -19,7 +19,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-loop.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += startup/init5282.c
diff --git a/c/src/lib/libbsp/m68k/csb360/Makefile.am b/c/src/lib/libbsp/m68k/csb360/Makefile.am
index fc70964..c042d86 100644
--- a/c/src/lib/libbsp/m68k/csb360/Makefile.am
+++ b/c/src/lib/libbsp/m68k/csb360/Makefile.am
@@ -19,7 +19,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspstart-empty.c
librtemsbsp_a_SOURCES += startup/init5272.c
diff --git a/c/src/lib/libbsp/m68k/gen68340/Makefile.am b/c/src/lib/libbsp/m68k/gen68340/Makefile.am
index 2046210..1b0663f 100644
--- a/c/src/lib/libbsp/m68k/gen68340/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68340/Makefile.am
@@ -19,7 +19,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspstart-empty.c
librtemsbsp_a_SOURCES += startup/init68340.c
diff --git a/c/src/lib/libbsp/m68k/gen68360/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/Makefile.am
index ec16e6c..4dc4122 100644
--- a/c/src/lib/libbsp/m68k/gen68360/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68360/Makefile.am
@@ -22,7 +22,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += startup/alloc360.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspstart-empty.c
librtemsbsp_a_SOURCES += startup/init68360.c
diff --git a/c/src/lib/libbsp/m68k/genmcf548x/Makefile.am b/c/src/lib/libbsp/m68k/genmcf548x/Makefile.am
index d7b1a10..5e82719 100644
--- a/c/src/lib/libbsp/m68k/genmcf548x/Makefile.am
+++ b/c/src/lib/libbsp/m68k/genmcf548x/Makefile.am
@@ -25,7 +25,6 @@ librtemsbsp_a_CPPFLAGS = $(AM_CPPFLAGS)
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-loop.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += startup/init548x.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am b/c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am
index cefdbe2..32eb282 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am
@@ -24,7 +24,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspstart-empty.c
librtemsbsp_a_SOURCES += startup/init5206e.c
diff --git a/c/src/lib/libbsp/m68k/mcf52235/Makefile.am b/c/src/lib/libbsp/m68k/mcf52235/Makefile.am
index cce0f55..d3105cf 100644
--- a/c/src/lib/libbsp/m68k/mcf52235/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mcf52235/Makefile.am
@@ -19,7 +19,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-loop.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += startup/init52235.c
diff --git a/c/src/lib/libbsp/m68k/mcf5225x/Makefile.am b/c/src/lib/libbsp/m68k/mcf5225x/Makefile.am
index 49f12fe..1f182fe 100644
--- a/c/src/lib/libbsp/m68k/mcf5225x/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mcf5225x/Makefile.am
@@ -17,7 +17,6 @@ project_lib_DATA += linkcmds
project_lib_LIBRARIES = librtemsbsp.a
librtemsbsp_a_SOURCES = ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-loop.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += startup/init5225x.c
librtemsbsp_a_SOURCES += startup/bspstart.c
diff --git a/c/src/lib/libbsp/m68k/mcf5235/Makefile.am b/c/src/lib/libbsp/m68k/mcf5235/Makefile.am
index 61920da..c9b2d5f 100644
--- a/c/src/lib/libbsp/m68k/mcf5235/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mcf5235/Makefile.am
@@ -21,7 +21,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-loop.c
librtemsbsp_a_SOURCES += startup/bspgetcpuclockspeed.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
diff --git a/c/src/lib/libbsp/m68k/mcf5329/Makefile.am b/c/src/lib/libbsp/m68k/mcf5329/Makefile.am
index 08136d0..5398ec6 100644
--- a/c/src/lib/libbsp/m68k/mcf5329/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mcf5329/Makefile.am
@@ -20,7 +20,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-loop.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += startup/init5329.c
diff --git a/c/src/lib/libbsp/m68k/mrm332/Makefile.am b/c/src/lib/libbsp/m68k/mrm332/Makefile.am
index 282645a..150748b 100644
--- a/c/src/lib/libbsp/m68k/mrm332/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mrm332/Makefile.am
@@ -18,8 +18,7 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += startup/start_c.c
-librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspstart-empty.c
-librtemsbsp_a_SOURCES += startup/bsppredriverhook.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/m68k/mrm332/start/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
diff --git a/c/src/lib/libbsp/m68k/mvme147/Makefile.am b/c/src/lib/libbsp/m68k/mvme147/Makefile.am
index d65efa5..47193b0 100644
--- a/c/src/lib/libbsp/m68k/mvme147/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147/Makefile.am
@@ -23,7 +23,6 @@ librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += startup/bspclean.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../shared/setvec.c
diff --git a/c/src/lib/libbsp/m68k/mvme147s/Makefile.am b/c/src/lib/libbsp/m68k/mvme147s/Makefile.am
index 4ff43bb..06ba4c8 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147s/Makefile.am
@@ -21,7 +21,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../shared/setvec.c
diff --git a/c/src/lib/libbsp/m68k/mvme162/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/Makefile.am
index 19a621d..d6bd69b 100644
--- a/c/src/lib/libbsp/m68k/mvme162/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme162/Makefile.am
@@ -20,7 +20,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += startup/bspclean.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += startup/page_table.c
diff --git a/c/src/lib/libbsp/m68k/mvme167/Makefile.am b/c/src/lib/libbsp/m68k/mvme167/Makefile.am
index 922cf12..fc62a7d 100644
--- a/c/src/lib/libbsp/m68k/mvme167/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme167/Makefile.am
@@ -19,7 +19,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += startup/bspclean.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
diff --git a/c/src/lib/libbsp/m68k/uC5282/Makefile.am b/c/src/lib/libbsp/m68k/uC5282/Makefile.am
index c9f768d..f3ad1ef 100644
--- a/c/src/lib/libbsp/m68k/uC5282/Makefile.am
+++ b/c/src/lib/libbsp/m68k/uC5282/Makefile.am
@@ -20,7 +20,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += startup/bspclean.c
librtemsbsp_a_SOURCES += startup/bspreset.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += startup/init5282.c
librtemsbsp_a_SOURCES += startup/bspstart.c
diff --git a/c/src/lib/libbsp/mips/csb350/Makefile.am b/c/src/lib/libbsp/mips/csb350/Makefile.am
index 176ec62..11ac351 100644
--- a/c/src/lib/libbsp/mips/csb350/Makefile.am
+++ b/c/src/lib/libbsp/mips/csb350/Makefile.am
@@ -20,7 +20,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += startup/bspreset.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += startup/bspstart.c
diff --git a/c/src/lib/libbsp/mips/hurricane/Makefile.am b/c/src/lib/libbsp/mips/hurricane/Makefile.am
index 59edbe8..22bae1d 100644
--- a/c/src/lib/libbsp/mips/hurricane/Makefile.am
+++ b/c/src/lib/libbsp/mips/hurricane/Makefile.am
@@ -21,7 +21,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
diff --git a/c/src/lib/libbsp/mips/jmr3904/Makefile.am b/c/src/lib/libbsp/mips/jmr3904/Makefile.am
index 96fbbef..ef95674 100644
--- a/c/src/lib/libbsp/mips/jmr3904/Makefile.am
+++ b/c/src/lib/libbsp/mips/jmr3904/Makefile.am
@@ -20,7 +20,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
diff --git a/c/src/lib/libbsp/mips/malta/Makefile.am b/c/src/lib/libbsp/mips/malta/Makefile.am
index 0762838..14b8e21 100644
--- a/c/src/lib/libbsp/mips/malta/Makefile.am
+++ b/c/src/lib/libbsp/mips/malta/Makefile.am
@@ -25,7 +25,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += startup/simple_access.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += startup/bspreset.c
diff --git a/c/src/lib/libbsp/mips/rbtx4925/Makefile.am b/c/src/lib/libbsp/mips/rbtx4925/Makefile.am
index 912988c..5eb887c 100644
--- a/c/src/lib/libbsp/mips/rbtx4925/Makefile.am
+++ b/c/src/lib/libbsp/mips/rbtx4925/Makefile.am
@@ -21,7 +21,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
librtemsbsp_a_SOURCES += startup/bspstart.c
diff --git a/c/src/lib/libbsp/mips/rbtx4938/Makefile.am b/c/src/lib/libbsp/mips/rbtx4938/Makefile.am
index d4e8727..88d6749 100644
--- a/c/src/lib/libbsp/mips/rbtx4938/Makefile.am
+++ b/c/src/lib/libbsp/mips/rbtx4938/Makefile.am
@@ -22,7 +22,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
librtemsbsp_a_SOURCES += startup/bspstart.c
diff --git a/c/src/lib/libbsp/moxie/moxiesim/Makefile.am b/c/src/lib/libbsp/moxie/moxiesim/Makefile.am
index 0447f7e..950f69d 100644
--- a/c/src/lib/libbsp/moxie/moxiesim/Makefile.am
+++ b/c/src/lib/libbsp/moxie/moxiesim/Makefile.am
@@ -22,7 +22,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspstart-empty.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/Makefile.am b/c/src/lib/libbsp/nios2/nios2_iss/Makefile.am
index 4c17652..960d57b 100644
--- a/c/src/lib/libbsp/nios2/nios2_iss/Makefile.am
+++ b/c/src/lib/libbsp/nios2/nios2_iss/Makefile.am
@@ -27,7 +27,6 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-defa
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += startup/setvec.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
# clock
librtemsbsp_a_SOURCES += clock/clock.c
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am b/c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am
index 8ff6eb1..b78b30e 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am
@@ -14,7 +14,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/startup/bspgetworkarea.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
diff --git a/c/src/lib/libbsp/or1k/generic_or1k/Makefile.am b/c/src/lib/libbsp/or1k/generic_or1k/Makefile.am
index 846f5c8..60e3919 100644
--- a/c/src/lib/libbsp/or1k/generic_or1k/Makefile.am
+++ b/c/src/lib/libbsp/or1k/generic_or1k/Makefile.am
@@ -44,7 +44,6 @@ librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/stackalloc.c
diff --git a/c/src/lib/libbsp/powerpc/beatnik/Makefile.am b/c/src/lib/libbsp/powerpc/beatnik/Makefile.am
index c9eec22..2a741f7 100644
--- a/c/src/lib/libbsp/powerpc/beatnik/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/beatnik/Makefile.am
@@ -47,7 +47,6 @@ librtemsbsp_a_SOURCES += startup/bspreset.c
librtemsbsp_a_SOURCES += startup/i2c_init.c
librtemsbsp_a_SOURCES += ../shared/startup/bspgetworkarea.c
librtemsbsp_a_SOURCES += ../shared/startup/probeMemEnd.c
-librtemsbsp_a_SOURCES += ../shared/startup/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../shared/startup/zerobss.c
librtemsbsp_a_SOURCES += ../shared/startup/pgtbl_setup.c
librtemsbsp_a_SOURCES += ../shared/startup/pgtbl_activate.c
diff --git a/c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c b/c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c
index b6ac232..c3f2c0c 100644
--- a/c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c
@@ -32,6 +32,7 @@
#include <rtems/bspIo.h>
#include <rtems/counter.h>
#include <rtems/powerpc/powerpc.h>
+#include <rtems/sysinit.h>
/*#include <bsp/consoleIo.h>*/
#include <libcpu/spr.h> /* registers.h is included here */
#include <bsp.h>
@@ -44,6 +45,7 @@
#include <libcpu/pte121.h>
#include <libcpu/cpuIdent.h>
#include <bsp/vectors.h>
+#include <bsp/VME.h>
#include <bsp/vpd.h>
#define SHOW_MORE_INIT_SETTINGS
@@ -377,3 +379,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/c/src/lib/libbsp/powerpc/gen5200/Makefile.am b/c/src/lib/libbsp/powerpc/gen5200/Makefile.am
index 0c9b010..b844fb3 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/gen5200/Makefile.am
@@ -90,7 +90,6 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/rtc/rtc-support.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bsp-uboot-board-info.c
librtemsbsp_a_SOURCES += ../shared/showbats.c
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am b/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am
index cfc50a8..9ddd979 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am
@@ -31,7 +31,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../shared/src/tictac.c
librtemsbsp_a_SOURCES += startup/cpuinit.c
diff --git a/c/src/lib/libbsp/powerpc/haleakala/Makefile.am b/c/src/lib/libbsp/powerpc/haleakala/Makefile.am
index 3dcb486..a95999f 100644
--- a/c/src/lib/libbsp/powerpc/haleakala/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/haleakala/Makefile.am
@@ -21,7 +21,6 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-loop.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += mmu/mmu_405.c
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.am b/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.am
index 71567fc..7b29824 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/Makefile.am
@@ -37,7 +37,6 @@ librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/motorola_powerpc/start/bspstart.c
librtemsbsp_a_SOURCES += ../shared/startup/bspgetworkarea.c
librtemsbsp_a_SOURCES += ../shared/showbats.c
-librtemsbsp_a_SOURCES += ../shared/startup/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../shared/startup/zerobss.c
librtemsbsp_a_SOURCES += ../shared/startup/pgtbl_setup.c
librtemsbsp_a_SOURCES += ../shared/startup/pgtbl_activate.c
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am b/c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am
index fbbc2f9..a41bc57 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am
@@ -42,7 +42,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/stackalloc.c
librtemsbsp_a_SOURCES += ../shared/src/bsp-start-zero.S
librtemsbsp_a_SOURCES += ../shared/src/memcpy.c
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/Makefile.am b/c/src/lib/libbsp/powerpc/mpc8260ads/Makefile.am
index 8d13b32..6524244 100644
--- a/c/src/lib/libbsp/powerpc/mpc8260ads/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/mpc8260ads/Makefile.am
@@ -33,7 +33,6 @@ librtemsbsp_a_SOURCES += irq/irq.c
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../shared/startup/bspidle.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/Makefile.am b/c/src/lib/libbsp/powerpc/mvme3100/Makefile.am
index 1da4eff..3b6d0fd 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/mvme3100/Makefile.am
@@ -40,7 +40,6 @@ librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += startup/misc.c
librtemsbsp_a_SOURCES += ../shared/startup/bspgetworkarea.c
-librtemsbsp_a_SOURCES += ../shared/startup/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../shared/startup/zerobss.c
librtemsbsp_a_SOURCES += ../shared/startup/sbrk.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
index e0c30b6..27b4833 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
@@ -25,6 +25,7 @@
#include <bsp/bootcard.h>
#include <rtems/bspIo.h>
#include <rtems/counter.h>
+#include <rtems/sysinit.h>
#include <libcpu/spr.h>
#include <libcpu/io.h>
#include <libcpu/e500_mmu.h>
@@ -34,6 +35,7 @@
#include <bsp/vpd.h>
#include <libcpu/cpuIdent.h>
#include <bsp/vectors.h>
+#include <bsp/VME.h>
#include <rtems/powerpc/powerpc.h>
#define SHOW_MORE_INIT_SETTINGS
@@ -419,3 +421,20 @@ VpdBufRec vpdData [] = {
printk("Exit from bspstart\n");
#endif
}
+
+static void mvme3100_i2c_initialize(void)
+{
+ BSP_i2c_initialize();
+}
+
+RTEMS_SYSINIT_ITEM(
+ mvme3100_i2c_initialize,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
+RTEMS_SYSINIT_ITEM(
+ BSP_vme_config,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/Makefile.am b/c/src/lib/libbsp/powerpc/mvme5500/Makefile.am
index 122122d..d4c5201 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/mvme5500/Makefile.am
@@ -17,7 +17,6 @@ librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../shared/startup/pgtbl_setup.c
librtemsbsp_a_SOURCES += startup/pgtbl_activate.c
-librtemsbsp_a_SOURCES += ../shared/startup/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../shared/startup/zerobss.c
librtemsbsp_a_SOURCES += ../shared/startup/bspgetworkarea.c
librtemsbsp_a_SOURCES += ../shared/startup/sbrk.c
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c
index 2310be7..279524e 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <ctype.h>
+#include <rtems/sysinit.h>
#include <rtems/system.h>
#include <rtems/powerpc/powerpc.h>
@@ -37,6 +38,7 @@
#include <libcpu/pte121.h>
#include <libcpu/cpuIdent.h>
#include <bsp/vectors.h>
+#include <bsp/VME.h>
#include <bsp/bspException.h>
#include <rtems/bspIo.h>
@@ -341,3 +343,9 @@ unsigned char ReadConfVPD_buff(int offset)
{
return(ConfVPD_buff[offset]);
}
+
+RTEMS_SYSINIT_ITEM(
+ BSP_vme_config,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
diff --git a/c/src/lib/libbsp/powerpc/psim/Makefile.am b/c/src/lib/libbsp/powerpc/psim/Makefile.am
index 0c416ae..d38d759 100644
--- a/c/src/lib/libbsp/powerpc/psim/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/psim/Makefile.am
@@ -23,7 +23,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
diff --git a/c/src/lib/libbsp/powerpc/qemuppc/Makefile.am b/c/src/lib/libbsp/powerpc/qemuppc/Makefile.am
index f7320d7..f6d16d8 100644
--- a/c/src/lib/libbsp/powerpc/qemuppc/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/qemuppc/Makefile.am
@@ -22,7 +22,6 @@ project_lib_LIBRARIES = librtemsbsp.a
librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
diff --git a/c/src/lib/libbsp/powerpc/qoriq/Makefile.am b/c/src/lib/libbsp/powerpc/qoriq/Makefile.am
index baa3016..b973577 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/qoriq/Makefile.am
@@ -50,7 +50,6 @@ librtemsbsp_a_SOURCES += startup/mmu-tlb1.S
librtemsbsp_a_SOURCES += startup/mmu-config.c
librtemsbsp_a_SOURCES += startup/portal.c
librtemsbsp_a_SOURCES += startup/restart.S
-librtemsbsp_a_SOURCES += startup/bsppredriverhook.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += startup/bspreset.c
librtemsbsp_a_SOURCES += startup/bsprestart.c
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/bsppredriverhook.c b/c/src/lib/libbsp/powerpc/qoriq/startup/bsppredriverhook.c
deleted file mode 100644
index 26e9125..0000000
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/bsppredriverhook.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file
- *
- * @ingroup QorIQ
- *
- * @brief bsp_predriver_hook() implementation.
- */
-
-/*
- * Copyright (c) 2011 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems at 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.org/license/LICENSE.
- */
-
-#include <bsp/bootcard.h>
-#include <bsp/intercom.h>
-
-void bsp_predriver_hook(void)
-{
- #ifdef RTEMS_MULTIPROCESSING
- qoriq_intercom_init();
- #endif
-}
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c b/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c
index 9475c6f..7d9fa0d 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c
@@ -25,6 +25,7 @@
#include <rtems.h>
#include <rtems/config.h>
#include <rtems/counter.h>
+#include <rtems/sysinit.h>
#include <libcpu/powerpc-utility.h>
@@ -33,6 +34,7 @@
#include <bsp/console-termios.h>
#include <bsp/fatal.h>
#include <bsp/fdt.h>
+#include <bsp/intercom.h>
#include <bsp/irq-generic.h>
#include <bsp/linker-symbols.h>
#include <bsp/mmu.h>
@@ -185,3 +187,11 @@ uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells)
return intr[0];
#endif
}
+
+#ifdef RTEMS_MULTIPROCESSING
+RTEMS_SYSINIT_ITEM(
+ qoriq_intercom_init,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+#endif
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/bsppredriverhook.c b/c/src/lib/libbsp/powerpc/shared/startup/bsppredriverhook.c
deleted file mode 100644
index fc3916e..0000000
--- a/c/src/lib/libbsp/powerpc/shared/startup/bsppredriverhook.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * bsp_predriver_hook().
- * Optionally initializes I2C and VME.
- */
-
-/*
- * 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.
- *
- * Modified to support the MCP750.
- * Modifications Copyright (C) 1999 Eric Valette. valette at crf.canon.fr
- */
-
-#include <string.h>
-
-#include <bsp.h>
-#include <bsp/bootcard.h>
-#ifndef BSP_HAS_NO_VME
-#include <bsp/VME.h>
-#endif
-
-#ifdef SHOW_MORE_INIT_SETTINGS
-#include <rtems/bspIo.h>
-#endif
-
-/*
- * bsp_predriver_hook
- *
- * Description:
- * BSP predriver hook. Called just before drivers are initialized.
- *
- * NOTES:
- * Must not use libc (to do io) from here, since drivers are
- * not yet initialized.
- *
- */
-
-void bsp_predriver_hook(void)
-{
-#ifdef BSP_PREDRIVER_I2C_INIT
- /* Some drivers (RTC) may need i2c */
- BSP_i2c_initialize();
-#endif
-
- /* Note that VME support may be omitted also by
- * providing a no-op BSP_vme_config routine
- */
-#ifndef BSP_HAS_NO_VME
- /*
- * Initialize VME bridge - needs working PCI
- * and IRQ subsystems...
- *
- * NOTE: vmeUniverse driver now uses shared interrupts.
- * this requires malloc/free which are not available
- * from bspstart()...
- */
-#ifdef SHOW_MORE_INIT_SETTINGS
- printk("Going to initialize VME bridge\n");
-#endif
- BSP_vme_config();
-#endif
-
-#ifdef SHOW_MORE_INIT_SETTINGS
- printk("Leaving bsp_predriver_hook\n");
-#endif
-}
diff --git a/c/src/lib/libbsp/powerpc/ss555/Makefile.am b/c/src/lib/libbsp/powerpc/ss555/Makefile.am
index adbfa36..57e157e 100644
--- a/c/src/lib/libbsp/powerpc/ss555/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ss555/Makefile.am
@@ -22,7 +22,6 @@ librtemsbsp_a_SOURCES += clock/p_clock.c
librtemsbsp_a_SOURCES += console/console.c
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += startup/iss555.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
diff --git a/c/src/lib/libbsp/powerpc/t32mppc/Makefile.am b/c/src/lib/libbsp/powerpc/t32mppc/Makefile.am
index 32bc5d6..73c627a 100644
--- a/c/src/lib/libbsp/powerpc/t32mppc/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/t32mppc/Makefile.am
@@ -27,7 +27,6 @@ librtemsbsp_a_SOURCES =
# Startup
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/Makefile.am b/c/src/lib/libbsp/powerpc/tqm8xx/Makefile.am
index d185581..9037827 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/Makefile.am
@@ -39,7 +39,6 @@ librtemsbsp_a_SOURCES += spi/spi.c
librtemsbsp_a_SOURCES += timer/timer.c
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../shared/startup/bspidle.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += startup/bspgetworkarea.c
diff --git a/c/src/lib/libbsp/powerpc/virtex/Makefile.am b/c/src/lib/libbsp/powerpc/virtex/Makefile.am
index 13dcfa0..de384a7 100644
--- a/c/src/lib/libbsp/powerpc/virtex/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/virtex/Makefile.am
@@ -34,7 +34,6 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-defa
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-loop.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../shared/src/bsp-start-zero.S
diff --git a/c/src/lib/libbsp/powerpc/virtex4/start/start.S b/c/src/lib/libbsp/powerpc/virtex4/start/start.S
index e2c4534..2194840 100644
--- a/c/src/lib/libbsp/powerpc/virtex4/start/start.S
+++ b/c/src/lib/libbsp/powerpc/virtex4/start/start.S
@@ -284,7 +284,7 @@ startupBL:
* PowerPC EABI.
*
* boot_card() supervises the initialization of RTEMS and the C
- * library. It calls bsp_start(), bsp_predriver_hook(), etc.
+ * library. It calls bsp_start(), etc.
*------------------------------------------------------------------*/
lwz r2,toc_pointer-base_addr(r1) /* set r2 to toc */
lwz r1,stack_top-base_addr(r1) /* set r1 to stack_top */
diff --git a/c/src/lib/libbsp/powerpc/virtex4/startup/bspstart.c b/c/src/lib/libbsp/powerpc/virtex4/startup/bspstart.c
index f67c1c3..d5c255b 100644
--- a/c/src/lib/libbsp/powerpc/virtex4/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/virtex4/startup/bspstart.c
@@ -57,6 +57,7 @@
#include <rtems/counter.h>
#include <rtems/libio.h>
#include <rtems/libcsupport.h>
+#include <rtems/sysinit.h>
#include <libcpu/cpuIdent.h>
#include <libcpu/spr.h>
@@ -206,7 +207,13 @@ void bsp_start(void)
* BSP predriver hook. Called by boot_card() just before drivers are
* initialized. Clear out any stale interrupts here.
*/
-void bsp_predriver_hook(void)
+static void virtex4_pre_driver_hook(void)
{
app_bsp_predriver_hook();
}
+
+RTEMS_SYSINIT_ITEM(
+ virtex4_pre_driver_hook,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
diff --git a/c/src/lib/libbsp/powerpc/virtex5/startup/bspstart.c b/c/src/lib/libbsp/powerpc/virtex5/startup/bspstart.c
index 44e7512..ff82157 100644
--- a/c/src/lib/libbsp/powerpc/virtex5/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/virtex5/startup/bspstart.c
@@ -58,6 +58,7 @@
#include <rtems/counter.h>
#include <rtems/libio.h>
#include <rtems/libcsupport.h>
+#include <rtems/sysinit.h>
#include <libcpu/cpuIdent.h>
#include <libcpu/spr.h>
@@ -227,7 +228,13 @@ void bsp_start(void)
* BSP predriver hook. Called by boot_card() just before drivers are
* initialized. Clear out any stale interrupts here.
*/
-void bsp_predriver_hook(void)
+static void virtex5_pre_driver_hook(void)
{
app_bsp_predriver_hook();
}
+
+RTEMS_SYSINIT_ITEM(
+ virtex5_pre_driver_hook,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
diff --git a/c/src/lib/libbsp/riscv/riscv_generic/Makefile.am b/c/src/lib/libbsp/riscv/riscv_generic/Makefile.am
index b64548e..35f3b13 100644
--- a/c/src/lib/libbsp/riscv/riscv_generic/Makefile.am
+++ b/c/src/lib/libbsp/riscv/riscv_generic/Makefile.am
@@ -37,7 +37,6 @@ librtemsbsp_a_SOURCES += startup/bsp_fatal_halt.c
# Shared
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/stackalloc.c
diff --git a/c/src/lib/libbsp/sh/gensh1/Makefile.am b/c/src/lib/libbsp/sh/gensh1/Makefile.am
index 74bc75d..cd5aa48 100644
--- a/c/src/lib/libbsp/sh/gensh1/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh1/Makefile.am
@@ -24,7 +24,6 @@ BUILT_SOURCES = scitab.c
CLEANFILES = scitab.c
# startup
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../shared/startup/bspstart.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-loop.c
diff --git a/c/src/lib/libbsp/sh/gensh2/Makefile.am b/c/src/lib/libbsp/sh/gensh2/Makefile.am
index cf1f18a..4ad2813 100644
--- a/c/src/lib/libbsp/sh/gensh2/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh2/Makefile.am
@@ -27,7 +27,6 @@ CLEANFILES = scitab.c
# startup
librtemsbsp_a_SOURCES += startup/hw_init.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../shared/startup/bspstart.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
diff --git a/c/src/lib/libbsp/sh/gensh4/Makefile.am b/c/src/lib/libbsp/sh/gensh4/Makefile.am
index f7dae9e..860a3eb 100644
--- a/c/src/lib/libbsp/sh/gensh4/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh4/Makefile.am
@@ -18,7 +18,6 @@ project_lib_LIBRARIES = librtemsbsp.a
librtemsbsp_a_SOURCES =
# startup
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../shared/startup/bspstart.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
diff --git a/c/src/lib/libbsp/sh/shsim/Makefile.am b/c/src/lib/libbsp/sh/shsim/Makefile.am
index 35f036b..7f80ca9 100644
--- a/c/src/lib/libbsp/sh/shsim/Makefile.am
+++ b/c/src/lib/libbsp/sh/shsim/Makefile.am
@@ -17,7 +17,6 @@ project_lib_LIBRARIES = librtemsbsp.a
librtemsbsp_a_SOURCES =
# startup
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../shared/startup/bspstart.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
diff --git a/c/src/lib/libbsp/shared/bsppredriverhook.c b/c/src/lib/libbsp/shared/bsppredriverhook.c
deleted file mode 100644
index 10ee058..0000000
--- a/c/src/lib/libbsp/shared/bsppredriverhook.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * This is a dummy bsp_predriver_hook routine.
- *
- * COPYRIGHT (c) 1989-2007.
- * 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/bootcard.h>
-
-void bsp_predriver_hook( void )
-{
-}
diff --git a/c/src/lib/libbsp/sparc/erc32/Makefile.am b/c/src/lib/libbsp/sparc/erc32/Makefile.am
index 616da2b..526cf3f 100644
--- a/c/src/lib/libbsp/sparc/erc32/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/Makefile.am
@@ -21,10 +21,9 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += startup/bsppredriver.c
librtemsbsp_a_SOURCES += ../shared/startup/bspgetworkarea.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
-librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspstart-empty.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/erc32/start/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += startup/setvec.c
diff --git a/c/src/lib/libbsp/sparc/leon2/Makefile.am b/c/src/lib/libbsp/sparc/leon2/Makefile.am
index a6d5d48..edbe4ce 100644
--- a/c/src/lib/libbsp/sparc/leon2/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon2/Makefile.am
@@ -23,7 +23,6 @@ librtemsbsp_a_SOURCES =
# startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += startup/bsppredriver.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../shared/startup/bspgetworkarea.c
diff --git a/c/src/lib/libbsp/sparc/leon2/startup/bsppredriver.c b/c/src/lib/libbsp/sparc/leon2/startup/bsppredriver.c
deleted file mode 100644
index b11ad4c..0000000
--- a/c/src/lib/libbsp/sparc/leon2/startup/bsppredriver.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * @file
- * @ingroup sparc_leon2
- * @brief Installs BSP pre-driver hook
- */
-
-/* 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>
-
-/* If RTEMS_DRVMGR_STARTUP is defined extra code is added that
- * registers the LEON2 AMBA bus driver as root driver into the
- * driver manager.
- *
- * The structues here are declared weak so that the user can override
- * the configuration and add custom cores in the RTEMS project.
- */
-#ifdef RTEMS_DRVMGR_STARTUP
-#include <drvmgr/drvmgr.h>
-#include <drvmgr/leon2_amba_bus.h>
-
-/* All drivers included by BSP, this is overridden by the user by including
- * the devmgr_confdefs.h. No specifc drivers needed by BSP since IRQ/TIMER/UART
- * is not drvmgr drivers.
- */
-drvmgr_drv_reg_func drvmgr_drivers[] __attribute__((weak)) =
-{
- NULL /* End array with NULL */
-};
-
-/* Defines what cores are avilable on the bus in addition to the standard
- * LEON2 peripherals.
- */
-struct leon2_core leon2_amba_custom_cores[] __attribute__((weak)) =
-{
- EMPTY_LEON2_CORE
-};
-
-/* Configure LEON2 Root bus driver */
-struct leon2_bus leon2_bus_config __attribute__((weak)) =
-{
- &leon2_std_cores[0], /* The standard cores, defined by driver */
- &leon2_amba_custom_cores[0], /* custom cores, defined by us */
- DRVMGR_TRANSLATE_ONE2ONE,
- DRVMGR_TRANSLATE_ONE2ONE,
-};
-
-/* Driver resources on LEON2 AMBA bus. Used to set options for particular
- * LEON2 cores, it is up to the driver to look at the configuration paramters
- * once started.
- */
-struct drvmgr_bus_res leon2_amba_res __attribute__((weak)) =
-{
- .next = NULL,
- .resource = {
- DRVMGR_RES_EMPTY
- },
-};
-#endif /* RTEMS_DRVMGR_STARTUP */
-
-/*
- * bsp_predriver_hook
- *
- * BSP predriver hook. Called just before drivers are initialized.
- * Is used to initialize shared interrupt handling.
- */
-void bsp_predriver_hook( void )
-{
- bsp_spurious_initialize();
-
- /* Initialize shared interrupt handling, must be done after IRQ
- * controller has been found and initialized.
- */
- BSP_shared_interrupt_init();
-
-#ifdef RTEMS_DRVMGR_STARTUP
- leon2_root_register(&leon2_bus_config, &leon2_amba_res);
-#endif
-}
diff --git a/c/src/lib/libbsp/sparc/leon2/startup/bspstart.c b/c/src/lib/libbsp/sparc/leon2/startup/bspstart.c
index b3da955..f2ed8ae 100644
--- a/c/src/lib/libbsp/sparc/leon2/startup/bspstart.c
+++ b/c/src/lib/libbsp/sparc/leon2/startup/bspstart.c
@@ -7,6 +7,8 @@
/*
* LEON2 Cache Snooping Support
*
+ * COPYRIGHT (c) 2011
+ * Aeroflex Gaisler
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
@@ -25,6 +27,7 @@
#include <bsp.h>
#include <bsp/bootcard.h>
+#include <rtems/sysinit.h>
/*
* Tells us if data cache snooping is available
@@ -48,3 +51,77 @@ void bsp_start( void )
{
CPU_SPARC_HAS_SNOOPING = set_snooping();
}
+
+/* If RTEMS_DRVMGR_STARTUP is defined extra code is added that
+ * registers the LEON2 AMBA bus driver as root driver into the
+ * driver manager.
+ *
+ * The structues here are declared weak so that the user can override
+ * the configuration and add custom cores in the RTEMS project.
+ */
+#ifdef RTEMS_DRVMGR_STARTUP
+#include <drvmgr/drvmgr.h>
+#include <drvmgr/leon2_amba_bus.h>
+
+/* All drivers included by BSP, this is overridden by the user by including
+ * the devmgr_confdefs.h. No specifc drivers needed by BSP since IRQ/TIMER/UART
+ * is not drvmgr drivers.
+ */
+drvmgr_drv_reg_func drvmgr_drivers[] __attribute__((weak)) =
+{
+ NULL /* End array with NULL */
+};
+
+/* Defines what cores are avilable on the bus in addition to the standard
+ * LEON2 peripherals.
+ */
+struct leon2_core leon2_amba_custom_cores[] __attribute__((weak)) =
+{
+ EMPTY_LEON2_CORE
+};
+
+/* Configure LEON2 Root bus driver */
+struct leon2_bus leon2_bus_config __attribute__((weak)) =
+{
+ &leon2_std_cores[0], /* The standard cores, defined by driver */
+ &leon2_amba_custom_cores[0], /* custom cores, defined by us */
+ DRVMGR_TRANSLATE_ONE2ONE,
+ DRVMGR_TRANSLATE_ONE2ONE,
+};
+
+/* Driver resources on LEON2 AMBA bus. Used to set options for particular
+ * LEON2 cores, it is up to the driver to look at the configuration paramters
+ * once started.
+ */
+struct drvmgr_bus_res leon2_amba_res __attribute__((weak)) =
+{
+ .next = NULL,
+ .resource = {
+ DRVMGR_RES_EMPTY
+ },
+};
+#endif /* RTEMS_DRVMGR_STARTUP */
+
+/*
+ * Called just before drivers are initialized. Is used to initialize shared
+ * interrupt handling.
+ */
+static void leon2_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();
+
+#ifdef RTEMS_DRVMGR_STARTUP
+ leon2_root_register(&leon2_bus_config, &leon2_amba_res);
+#endif
+}
+
+RTEMS_SYSINIT_ITEM(
+ leon2_pre_driver_hook,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
diff --git a/c/src/lib/libbsp/sparc/leon3/Makefile.am b/c/src/lib/libbsp/sparc/leon3/Makefile.am
index 2f8c294..27c1a96 100644
--- a/c/src/lib/libbsp/sparc/leon3/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon3/Makefile.am
@@ -28,7 +28,6 @@ librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += startup/bspclean.c
librtemsbsp_a_SOURCES += startup/bspstart.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
-librtemsbsp_a_SOURCES += startup/bsppredriver.c
librtemsbsp_a_SOURCES += ../shared/startup/bspgetworkarea.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += startup/setvec.c
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/bsppredriver.c b/c/src/lib/libbsp/sparc/leon3/startup/bsppredriver.c
deleted file mode 100644
index ba35624..0000000
--- a/c/src/lib/libbsp/sparc/leon3/startup/bsppredriver.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * @file
- * @ingroup sparc_leon3
- * @brief 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 <drvmgr/drvmgr.h>
-
-#include <rtems/sysinit.h>
-
-static void leon3_interrupt_common_init( void )
-{
- /* Initialize shared interrupt handling, must be done after IRQ
- * controller has been found and initialized.
- */
- BSP_shared_interrupt_init();
-}
-
-/*
- * bsp_predriver_hook
- *
- * BSP predriver hook. Called just before drivers are initialized.
- * Is used to initialize shared interrupt handling.
- */
-void bsp_predriver_hook( void )
-{
- bsp_spurious_initialize();
-
-#ifndef RTEMS_DRVMGR_STARTUP
- leon3_interrupt_common_init();
-#endif
-}
-
-#ifdef RTEMS_DRVMGR_STARTUP
-/*
- * Initialize shared interrupt handling, must be done after IRQ controller has
- * been found and initialized.
- */
-RTEMS_SYSINIT_ITEM(
- leon3_interrupt_common_init,
- RTEMS_SYSINIT_DRVMGR_LEVEL_1,
- RTEMS_SYSINIT_ORDER_LAST
-);
-#endif
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
index 6353ca3..58fc7d0 100644
--- a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
+++ b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
@@ -4,6 +4,9 @@
* The generic CPU dependent initialization has been performed
* before any of these are invoked.
*
+ * COPYRIGHT (c) 2011
+ * Aeroflex Gaisler
+ *
* COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,6 +22,7 @@
#include <bsp.h>
#include <leon.h>
#include <bsp/bootcard.h>
+#include <drvmgr/drvmgr.h>
#include <rtems/sysinit.h>
#if defined(RTEMS_SMP) || defined(RTEMS_MULTIPROCESSING)
@@ -80,3 +84,42 @@ RTEMS_SYSINIT_ITEM(
RTEMS_SYSINIT_BSP_START,
RTEMS_SYSINIT_ORDER_FIRST
);
+
+static void leon3_interrupt_common_init( void )
+{
+ /* Initialize shared interrupt handling, must be done after IRQ
+ * controller has been found and initialized.
+ */
+ BSP_shared_interrupt_init();
+}
+
+/*
+ * Called just before drivers are initialized. Is used to initialize shared
+ * interrupt handling.
+ */
+static void leon3_pre_driver_hook( void )
+{
+ bsp_spurious_initialize();
+
+#ifndef RTEMS_DRVMGR_STARTUP
+ leon3_interrupt_common_init();
+#endif
+}
+
+RTEMS_SYSINIT_ITEM(
+ leon3_pre_driver_hook,
+ RTEMS_SYSINIT_BSP_PRE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
+#ifdef RTEMS_DRVMGR_STARTUP
+/*
+ * Initialize shared interrupt handling, must be done after IRQ controller has
+ * been found and initialized.
+ */
+RTEMS_SYSINIT_ITEM(
+ leon3_interrupt_common_init,
+ RTEMS_SYSINIT_DRVMGR_LEVEL_1,
+ RTEMS_SYSINIT_ORDER_LAST
+);
+#endif
diff --git a/c/src/lib/libbsp/sparc64/niagara/Makefile.am b/c/src/lib/libbsp/sparc64/niagara/Makefile.am
index ce3212d..f90c7dd 100644
--- a/c/src/lib/libbsp/sparc64/niagara/Makefile.am
+++ b/c/src/lib/libbsp/sparc64/niagara/Makefile.am
@@ -19,7 +19,6 @@ project_lib_LIBRARIES = librtemsbsp.a
librtemsbsp_a_SOURCES =
librtemsbsp_a_SOURCES += startup/bspclean.c
librtemsbsp_a_SOURCES += startup/m5op_sparc.S
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
diff --git a/c/src/lib/libbsp/sparc64/usiii/Makefile.am b/c/src/lib/libbsp/sparc64/usiii/Makefile.am
index 7324083..3369039 100644
--- a/c/src/lib/libbsp/sparc64/usiii/Makefile.am
+++ b/c/src/lib/libbsp/sparc64/usiii/Makefile.am
@@ -30,7 +30,6 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspstart-empty.c
librtemsbsp_a_SOURCES += ../../shared/sbrk.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
librtemsbsp_a_SOURCES += ../shared/startup/setvec.c
librtemsbsp_a_SOURCES += ../shared/helenos/boot/genarch/balloc.c
diff --git a/c/src/lib/libbsp/v850/gdbv850sim/Makefile.am b/c/src/lib/libbsp/v850/gdbv850sim/Makefile.am
index f50f3a3..cd487fe 100644
--- a/c/src/lib/libbsp/v850/gdbv850sim/Makefile.am
+++ b/c/src/lib/libbsp/v850/gdbv850sim/Makefile.am
@@ -18,7 +18,6 @@ project_lib_DATA = start.$(OBJEXT)
project_lib_DATA += linkcmds
librtemsbsp_a_SOURCES = ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../shared/bsppredriverhook.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspstart-empty.c
librtemsbsp_a_SOURCES += ../../shared/getentropy-cpucounter.c
More information about the vc
mailing list