source: rtems/c/src/lib/libbsp/sparc/leon3/startup/bsppredriver.c @ e428dc4a

4.115
Last change on this file since e428dc4a was e428dc4a, checked in by Daniel Hellstrom <daniel@…>, on 12/12/11 at 14:50:57

LEON3: implemented BSP DRVMGR startup initialization

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/**
2 * @file
3 * @ingroup sparc_leon3
4 * @brief Installs the BSP pre-driver hook
5 */
6
7/*
8 *  COPYRIGHT (c) 2011
9 *  Aeroflex Gaisler
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.org/license/LICENSE.
14 */
15
16#include <bsp.h>
17#include <bsp/bootcard.h>
18
19static void leon3_interrupt_common_init( void )
20{
21  /* Initialize shared interrupt handling, must be done after IRQ
22   * controller has been found and initialized.
23   */
24  BSP_shared_interrupt_init();
25}
26
27/*
28 *  bsp_predriver_hook
29 *
30 *  BSP predriver hook. Called just before drivers are initialized.
31 *  Is used to initialize shared interrupt handling.
32 */
33void bsp_predriver_hook( void )
34{
35#ifndef RTEMS_DRVMGR_STARTUP
36  leon3_interrupt_common_init();
37#endif
38}
39
40#ifdef RTEMS_DRVMGR_STARTUP
41/*
42 *  bsp_driver_level_hook
43 *
44 *  BSP driver level hook. Called just after drivers have reached initialization
45 *  level 'level' (1,2,3,4). See exinit.c for meaning of the every level.
46 *
47 *  Initializes the BSP Interrupt layer
48 *  After Level 1 we can trust that interrupt controller and system
49 *  clock timer drivers now have been initialized.
50 */
51void bsp_driver_level_hook( int level )
52{
53  /* Initialize shared interrupt handling, must be done after IRQ
54   * controller has been found and initialized.
55   */
56  if (level != 1)
57        return;
58
59  leon3_interrupt_common_init();
60}
61#endif
Note: See TracBrowser for help on using the repository browser.