summaryrefslogtreecommitdiffstats
path: root/bsps
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-12-12 16:02:19 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-04 05:52:28 +0100
commit34a7a12f48b62f959029172d5e8ffbd2a73739d2 (patch)
tree30bb26f20840f33de6246aabd0513e4c212ded3e /bsps
parentbsps: Add RamEnd to linker command files (diff)
downloadrtems-34a7a12f48b62f959029172d5e8ffbd2a73739d2.tar.bz2
bsps: Add RTEMS_SYSINIT_BSP_EARLY
Add new BSP system initialization step for work to be performed before the work areas are initialized. Update #3838.
Diffstat (limited to 'bsps')
-rw-r--r--bsps/powerpc/beatnik/start/bspstart.c19
-rw-r--r--bsps/powerpc/motorola_powerpc/start/bspstart.c19
-rw-r--r--bsps/powerpc/mvme3100/start/bspstart.c19
-rw-r--r--bsps/powerpc/mvme5500/start/bspstart.c13
-rw-r--r--bsps/powerpc/shared/start/bspgetworkarea.c16
5 files changed, 48 insertions, 38 deletions
diff --git a/bsps/powerpc/beatnik/start/bspstart.c b/bsps/powerpc/beatnik/start/bspstart.c
index 1ddb457e05..4e0f007d41 100644
--- a/bsps/powerpc/beatnik/start/bspstart.c
+++ b/bsps/powerpc/beatnik/start/bspstart.c
@@ -166,13 +166,7 @@ uint32_t _CPU_Counter_frequency(void)
return BSP_bus_frequency / (BSP_time_base_divisor / 1000);
}
-/*
- * bsp_start
- *
- * This routine does the bulk of the system initialization.
- */
-
-void bsp_start( void )
+static void bsp_early( void )
{
unsigned char *stack;
char *chpt;
@@ -366,6 +360,17 @@ void bsp_start( void )
}
RTEMS_SYSINIT_ITEM(
+ bsp_early,
+ RTEMS_SYSINIT_BSP_EARLY,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
+void bsp_start( void )
+{
+ /* Initialization was done by bsp_early() */
+}
+
+RTEMS_SYSINIT_ITEM(
BSP_vme_config,
RTEMS_SYSINIT_BSP_PRE_DRIVERS,
RTEMS_SYSINIT_ORDER_MIDDLE
diff --git a/bsps/powerpc/motorola_powerpc/start/bspstart.c b/bsps/powerpc/motorola_powerpc/start/bspstart.c
index 810db21dce..c28d5d21b5 100644
--- a/bsps/powerpc/motorola_powerpc/start/bspstart.c
+++ b/bsps/powerpc/motorola_powerpc/start/bspstart.c
@@ -124,13 +124,7 @@ uint32_t _CPU_Counter_frequency(void)
return BSP_bus_frequency / (BSP_time_base_divisor / 1000);
}
-/*
- * bsp_start
- *
- * This routine does the bulk of the system initialization.
- */
-
-void bsp_start( void )
+static void bsp_early( void )
{
#if !defined(mvme2100)
unsigned l2cr;
@@ -368,6 +362,17 @@ void bsp_start( void )
}
RTEMS_SYSINIT_ITEM(
+ bsp_early,
+ RTEMS_SYSINIT_BSP_EARLY,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
+void bsp_start( void )
+{
+ /* Initialization was done by bsp_early() */
+}
+
+RTEMS_SYSINIT_ITEM(
BSP_vme_config,
RTEMS_SYSINIT_BSP_PRE_DRIVERS,
RTEMS_SYSINIT_ORDER_MIDDLE
diff --git a/bsps/powerpc/mvme3100/start/bspstart.c b/bsps/powerpc/mvme3100/start/bspstart.c
index 527247af1b..f20a40fed1 100644
--- a/bsps/powerpc/mvme3100/start/bspstart.c
+++ b/bsps/powerpc/mvme3100/start/bspstart.c
@@ -197,17 +197,11 @@ uint32_t _CPU_Counter_frequency(void)
return BSP_bus_frequency / (BSP_time_base_divisor / 1000);
}
-/*
- * bsp_start
- *
- * This routine does the bulk of the system initialization.
- */
-
#include <libcpu/spr.h>
SPR_RW(HID1)
-void bsp_start( void )
+static void bsp_early( void )
{
unsigned char *stack;
char *chpt;
@@ -412,6 +406,17 @@ VpdBufRec vpdData [] = {
#endif
}
+RTEMS_SYSINIT_ITEM(
+ bsp_early,
+ RTEMS_SYSINIT_BSP_EARLY,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
+void bsp_start( void )
+{
+ /* Initialization was done by bsp_early() */
+}
+
static void mvme3100_i2c_initialize(void)
{
BSP_i2c_initialize();
diff --git a/bsps/powerpc/mvme5500/start/bspstart.c b/bsps/powerpc/mvme5500/start/bspstart.c
index 06a12d815f..90fc8cf961 100644
--- a/bsps/powerpc/mvme5500/start/bspstart.c
+++ b/bsps/powerpc/mvme5500/start/bspstart.c
@@ -173,7 +173,7 @@ uint32_t _CPU_Counter_frequency(void)
return BSP_bus_frequency / (BSP_time_base_divisor / 1000);
}
-void bsp_start( void )
+static void bsp_early( void )
{
#ifdef CONF_VPD
int i;
@@ -329,6 +329,17 @@ void bsp_start( void )
}
+RTEMS_SYSINIT_ITEM(
+ bsp_early,
+ RTEMS_SYSINIT_BSP_EARLY,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+
+void bsp_start( void )
+{
+ /* Initialization was done by bsp_early() */
+}
+
unsigned char ReadConfVPD_buff(int offset)
{
return(ConfVPD_buff[offset]);
diff --git a/bsps/powerpc/shared/start/bspgetworkarea.c b/bsps/powerpc/shared/start/bspgetworkarea.c
index 2ee7a54410..8873ffe574 100644
--- a/bsps/powerpc/shared/start/bspgetworkarea.c
+++ b/bsps/powerpc/shared/start/bspgetworkarea.c
@@ -9,20 +9,10 @@
#include <libcpu/powerpc-utility.h>
-#include <rtems/sysinit.h>
-
LINKER_SYMBOL(__rtems_end)
void bsp_work_area_initialize(void)
{
- /*
- * Cannot do work area initialization before bsp_start(), since BSP_mem_size
- * and MMU is not set up.
- */
-}
-
-static void bsp_work_area_initialize_later(void)
-{
uintptr_t work_size;
uintptr_t work_area;
@@ -31,9 +21,3 @@ static void bsp_work_area_initialize_later(void)
bsp_work_area_initialize_default((void *) work_area, work_size);
}
-
-RTEMS_SYSINIT_ITEM(
- bsp_work_area_initialize_later,
- RTEMS_SYSINIT_BSP_START,
- RTEMS_SYSINIT_ORDER_LAST
-);