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

5
Last change on this file since 61bbf919 was 47190194, checked in by Sebastian Huber <sebastian.huber@…>, on 01/26/16 at 06:16:52

drvmgr: Remove dupl bsp_driver_level_hook() decl

  • 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
19#include <drvmgr/drvmgr.h>
20
21static void leon3_interrupt_common_init( void )
22{
23  /* Initialize shared interrupt handling, must be done after IRQ
24   * controller has been found and initialized.
25   */
26  BSP_shared_interrupt_init();
27}
28
29/*
30 *  bsp_predriver_hook
31 *
32 *  BSP predriver hook. Called just before drivers are initialized.
33 *  Is used to initialize shared interrupt handling.
34 */
35void bsp_predriver_hook( void )
36{
37  bsp_spurious_initialize();
38
39#ifndef RTEMS_DRVMGR_STARTUP
40  leon3_interrupt_common_init();
41#endif
42}
43
44#ifdef RTEMS_DRVMGR_STARTUP
45/*
46 *  bsp_driver_level_hook
47 *
48 *  BSP driver level hook. Called just after drivers have reached initialization
49 *  level 'level' (1,2,3,4). See exinit.c for meaning of the every level.
50 *
51 *  Initializes the BSP Interrupt layer
52 *  After Level 1 we can trust that interrupt controller and system
53 *  clock timer drivers now have been initialized.
54 */
55void bsp_driver_level_hook( int level )
56{
57  /* Initialize shared interrupt handling, must be done after IRQ
58   * controller has been found and initialized.
59   */
60  if (level != 1)
61        return;
62
63  leon3_interrupt_common_init();
64}
65#endif
Note: See TracBrowser for help on using the repository browser.