forked from Imagelibrary/rtems
@@ -58,7 +58,7 @@ EXTRA_DIST += shared/start/start.S shared/start/rtems_crti.S \
|
|||||||
## shared/startup
|
## shared/startup
|
||||||
EXTRA_DIST += shared/startup/bspstart.c shared/startup/pgtbl_setup.c \
|
EXTRA_DIST += shared/startup/bspstart.c shared/startup/pgtbl_setup.c \
|
||||||
shared/startup/pgtbl_activate.c shared/startup/linkcmds \
|
shared/startup/pgtbl_activate.c shared/startup/linkcmds \
|
||||||
shared/startup/zerobss.c shared/startup/pretaskinghook.c
|
shared/startup/zerobss.c shared/startup/bsppredriverhook.c
|
||||||
|
|
||||||
## shared/tod
|
## shared/tod
|
||||||
EXTRA_DIST += shared/tod/todcfg.c
|
EXTRA_DIST += shared/tod/todcfg.c
|
||||||
|
|||||||
@@ -61,13 +61,13 @@ libbsp_a_SOURCES += startup/bspstart.c \
|
|||||||
../../powerpc/shared/startup/panic.c \
|
../../powerpc/shared/startup/panic.c \
|
||||||
../../powerpc/shared/startup/bspgetworkarea.c \
|
../../powerpc/shared/startup/bspgetworkarea.c \
|
||||||
../../powerpc/shared/startup/probeMemEnd.c \
|
../../powerpc/shared/startup/probeMemEnd.c \
|
||||||
../../powerpc/shared/startup/pretaskinghook.c \
|
../../powerpc/shared/startup/bsppredriverhook.c \
|
||||||
../../powerpc/shared/startup/zerobss.c \
|
../../powerpc/shared/startup/zerobss.c \
|
||||||
../../powerpc/shared/startup/pgtbl_setup.c \
|
../../powerpc/shared/startup/pgtbl_setup.c \
|
||||||
../../powerpc/shared/startup/pgtbl_activate.c \
|
../../powerpc/shared/startup/pgtbl_activate.c \
|
||||||
../../powerpc/shared/startup/sbrk.c ../../shared/bootcard.c \
|
../../powerpc/shared/startup/sbrk.c ../../shared/bootcard.c \
|
||||||
startup/bspclean.c ../../shared/bsplibc.c ../../shared/bsppost.c \
|
startup/bspclean.c ../../shared/bsplibc.c ../../shared/bsppost.c \
|
||||||
../../shared/bsppredriverhook.c \
|
../../shared/bsppretaskinghook.c \
|
||||||
../../shared/gnatinstallhandler.c
|
../../shared/gnatinstallhandler.c
|
||||||
|
|
||||||
include_bsp_HEADERS += ../shared/motorola/vpd.h
|
include_bsp_HEADERS += ../shared/motorola/vpd.h
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ libbsp_a_SOURCES =
|
|||||||
libbsp_a_SOURCES += ../../powerpc/shared/startup/bspstart.c \
|
libbsp_a_SOURCES += ../../powerpc/shared/startup/bspstart.c \
|
||||||
../../powerpc/shared/startup/bspgetworkarea.c \
|
../../powerpc/shared/startup/bspgetworkarea.c \
|
||||||
../../powerpc/shared/showbats.c \
|
../../powerpc/shared/showbats.c \
|
||||||
../../powerpc/shared/startup/pretaskinghook.c \
|
../../powerpc/shared/startup/bsppredriverhook.c \
|
||||||
../../shared/bsppredriverhook.c \
|
../../shared/bsppretaskinghook.c \
|
||||||
../../powerpc/shared/startup/zerobss.c \
|
../../powerpc/shared/startup/zerobss.c \
|
||||||
../../powerpc/shared/startup/pgtbl_setup.c \
|
../../powerpc/shared/startup/pgtbl_setup.c \
|
||||||
../../powerpc/shared/startup/pgtbl_activate.c \
|
../../powerpc/shared/startup/pgtbl_activate.c \
|
||||||
|
|||||||
@@ -51,10 +51,11 @@ libbsp_a_SOURCES =
|
|||||||
# startup
|
# startup
|
||||||
libbsp_a_SOURCES += startup/bspstart.c \
|
libbsp_a_SOURCES += startup/bspstart.c \
|
||||||
startup/misc.c ../../powerpc/shared/startup/bspgetworkarea.c \
|
startup/misc.c ../../powerpc/shared/startup/bspgetworkarea.c \
|
||||||
../../powerpc/shared/startup/pretaskinghook.c \
|
../../powerpc/shared/startup/bsppredriverhook.c \
|
||||||
../../powerpc/shared/startup/zerobss.c \
|
../../powerpc/shared/startup/zerobss.c \
|
||||||
../../powerpc/shared/startup/sbrk.c ../../shared/bootcard.c \
|
../../powerpc/shared/startup/sbrk.c ../../shared/bootcard.c \
|
||||||
../../shared/bspclean.c ../../shared/bsplibc.c ../../shared/bsppost.c \
|
../../shared/bspclean.c ../../shared/bsplibc.c ../../shared/bsppost.c \
|
||||||
|
../../shared/bsppretaskinghook.c \
|
||||||
../../shared/gnatinstallhandler.c
|
../../shared/gnatinstallhandler.c
|
||||||
# tod
|
# tod
|
||||||
libbsp_a_SOURCES += ../../shared/tod.c tod/todcfg.c
|
libbsp_a_SOURCES += ../../shared/tod.c tod/todcfg.c
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int BSP_i2c_initialize(void);
|
int BSP_i2c_initialize(void);
|
||||||
|
#define BSP_PREDRIVER_I2C_INIT
|
||||||
|
|
||||||
/* System Control Register */
|
/* System Control Register */
|
||||||
#define BSP_MVME3100_SYS_CR ((volatile uint8_t *)0xe2000001)
|
#define BSP_MVME3100_SYS_CR ((volatile uint8_t *)0xe2000001)
|
||||||
|
|||||||
@@ -201,13 +201,6 @@ BSP_calc_freqs( void )
|
|||||||
printk("CPU Clock Freq: %10u Hz\n", BSP_processor_frequency);
|
printk("CPU Clock Freq: %10u Hz\n", BSP_processor_frequency);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
bsp_predriver_hook(void)
|
|
||||||
{
|
|
||||||
/* Some drivers (RTC) may need i2c */
|
|
||||||
BSP_i2c_initialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bsp_start
|
* bsp_start
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ EXTRA_DIST = startup/bootpstuff.c
|
|||||||
# startup
|
# startup
|
||||||
libbsp_a_SOURCES += startup/bspstart.c \
|
libbsp_a_SOURCES += startup/bspstart.c \
|
||||||
../../powerpc/shared/startup/pgtbl_setup.c startup/pgtbl_activate.c \
|
../../powerpc/shared/startup/pgtbl_setup.c startup/pgtbl_activate.c \
|
||||||
../../powerpc/shared/startup/pretaskinghook.c \
|
../../powerpc/shared/startup/bsppredriverhook.c \
|
||||||
../../powerpc/shared/startup/zerobss.c \
|
../../powerpc/shared/startup/zerobss.c \
|
||||||
../../powerpc/shared/startup/bspgetworkarea.c \
|
../../powerpc/shared/startup/bspgetworkarea.c \
|
||||||
../../powerpc/shared/startup/sbrk.c ../../shared/bootcard.c \
|
../../powerpc/shared/startup/sbrk.c ../../shared/bootcard.c \
|
||||||
../../shared/bsppredriverhook.c startup/bspclean.c \
|
../../shared/bsppretaskinghook.c startup/bspclean.c \
|
||||||
../../shared/bsplibc.c ../../shared/bsppost.c \
|
../../shared/bsplibc.c ../../shared/bsppost.c \
|
||||||
../../shared/gnatinstallhandler.c startup/bspreset.c \
|
../../shared/gnatinstallhandler.c startup/bspreset.c \
|
||||||
../../powerpc/shared/startup/probeMemEnd.c
|
../../powerpc/shared/startup/probeMemEnd.c
|
||||||
|
|||||||
@@ -144,14 +144,14 @@ void _BSP_Fatal_error(unsigned int v)
|
|||||||
*
|
*
|
||||||
* 0..RTEMS..__rtems_end | INIT_STACK | IRQ_STACK | ...... | workspace | TOP
|
* 0..RTEMS..__rtems_end | INIT_STACK | IRQ_STACK | ...... | workspace | TOP
|
||||||
*
|
*
|
||||||
* and later calls our pretasking_hook() which ends up initializing
|
* and later calls our bsp_predriver_hook() which ends up initializing
|
||||||
* libc which in turn initializes the heap
|
* libc which in turn initializes the heap
|
||||||
*
|
*
|
||||||
* 0..RTEMS..__rtems_end | INIT_STACK | IRQ_STACK | heap | workspace | TOP
|
* 0..RTEMS..__rtems_end | INIT_STACK | IRQ_STACK | heap | workspace | TOP
|
||||||
*
|
*
|
||||||
* The idea here is to first move the commandline to the future 'heap' area
|
* The idea here is to first move the commandline to the future 'heap' area
|
||||||
* from where it will be picked up by our pretasking_hook().
|
* from where it will be picked up by our bsp_predriver_hook().
|
||||||
* pretasking_hook() then moves it either to INIT_STACK or the workspace
|
* bsp_predriver_hook() then moves it either to INIT_STACK or the workspace
|
||||||
* area using proper allocation, initializes libc and finally moves
|
* area using proper allocation, initializes libc and finally moves
|
||||||
* the data to the environment / malloced areas...
|
* the data to the environment / malloced areas...
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* bsp_pretasking_hook().
|
* bsp_predriver_hook().
|
||||||
* Initializes the heap, libc and VME.
|
* Optionally initializes I2C and VME.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -28,10 +28,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bsp_pretasking_hook
|
* bsp_predriver_hook
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* BSP pretasking hook. Called just before drivers are initialized.
|
* BSP predriver hook. Called just before drivers are initialized.
|
||||||
*
|
*
|
||||||
* NOTES:
|
* NOTES:
|
||||||
* Must not use libc (to do io) from here, since drivers are
|
* Must not use libc (to do io) from here, since drivers are
|
||||||
@@ -39,8 +39,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void bsp_pretasking_hook(void)
|
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
|
/* Note that VME support may be omitted also by
|
||||||
* providing a no-op BSP_vme_config routine
|
* providing a no-op BSP_vme_config routine
|
||||||
*/
|
*/
|
||||||
@@ -60,6 +65,6 @@ void bsp_pretasking_hook(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SHOW_MORE_INIT_SETTINGS
|
#ifdef SHOW_MORE_INIT_SETTINGS
|
||||||
printk("Leaving bsp_pretasking_hook\n");
|
printk("Leaving bsp_predriver_hook\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user