mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
leon3: avoid dependency on apbuart/timer driver
Moves drvmgr_drivers[] from amba.c to a separate file in order to avoid the dependecy on APBUART/GPTIMER drivers. This has an effect when user configured not to use timer or uart in their project. Update #4309.
This commit is contained in:
@@ -34,18 +34,6 @@ struct ambapp_bus ambapp_plb;
|
||||
#include <drvmgr/drvmgr.h>
|
||||
#include <grlib/ambapp_bus_grlib.h>
|
||||
|
||||
extern void gptimer_register_drv (void);
|
||||
extern void apbuart_cons_register_drv(void);
|
||||
/* All drivers included by BSP, this is overridden by the user by including
|
||||
* the drvmgr_confdefs.h. By default the Timer and UART driver are included.
|
||||
*/
|
||||
drvmgr_drv_reg_func drvmgr_drivers[] __attribute__((weak)) =
|
||||
{
|
||||
gptimer_register_drv,
|
||||
apbuart_cons_register_drv,
|
||||
NULL /* End array with NULL */
|
||||
};
|
||||
|
||||
/* Driver resources configuration for AMBA root bus. It is declared weak
|
||||
* so that the user may override it, if the defualt settings are not
|
||||
* enough.
|
||||
|
||||
28
bsps/sparc/leon3/start/drvmgr_def_drivers.c
Normal file
28
bsps/sparc/leon3/start/drvmgr_def_drivers.c
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Default BSP drivers when Driver Manager enabled
|
||||
*
|
||||
* COPYRIGHT (c) 2019.
|
||||
* Cobham 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>
|
||||
|
||||
#ifdef RTEMS_DRVMGR_STARTUP
|
||||
#include <drvmgr/drvmgr.h>
|
||||
|
||||
extern void gptimer_register_drv (void);
|
||||
extern void apbuart_cons_register_drv(void);
|
||||
/* All drivers included by BSP, this is overridden by the user by including
|
||||
* the drvmgr_confdefs.h. By default the Timer and UART driver are included.
|
||||
*/
|
||||
drvmgr_drv_reg_func drvmgr_drivers[] __attribute__((weak)) =
|
||||
{
|
||||
gptimer_register_drv,
|
||||
apbuart_cons_register_drv,
|
||||
NULL /* End array with NULL */
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -38,6 +38,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/leon3/start/cpucounter.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/shared/start/bsp_fatal_exit.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/leon3/start/bsp_fatal_halt.c
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/leon3/start/drvmgr_def_drivers.c
|
||||
|
||||
# gnatsupp
|
||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/leon3/gnatsupp/gnatsupp.c
|
||||
|
||||
Reference in New Issue
Block a user