mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, include/bsp.h, startup/setvec.c: Split idle method into its own file. Properly note to confdefs.h that this BSP has its own idle thread. * startup/bspidle.c: New file.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
* Makefile.am, include/bsp.h, startup/setvec.c: Split idle method into
|
||||||
|
its own file. Properly note to confdefs.h that this BSP has its own
|
||||||
|
idle thread.
|
||||||
|
* startup/bspidle.c: New file.
|
||||||
|
|
||||||
2009-07-20 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2009-07-20 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* cchip/cchip.c, include/cchip.h, include/rasta.h, pci/pci.c: Add CVS
|
* cchip/cchip.c, include/cchip.h, include/rasta.h, pci/pci.c: Add CVS
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
|
|||||||
../../shared/bsppost.c ../../shared/bsppredriverhook.c \
|
../../shared/bsppost.c ../../shared/bsppredriverhook.c \
|
||||||
../../sparc/shared/bspgetworkarea.c ../../sparc/shared/bspstart.c \
|
../../sparc/shared/bspgetworkarea.c ../../sparc/shared/bspstart.c \
|
||||||
../../shared/bootcard.c ../../shared/sbrk.c startup/setvec.c \
|
../../shared/bootcard.c ../../shared/sbrk.c startup/setvec.c \
|
||||||
startup/spurious.c
|
startup/spurious.c startup/bspidle.c
|
||||||
# gnatsupp
|
# gnatsupp
|
||||||
libbsp_a_SOURCES += gnatsupp/gnatsupp.c ../../sparc/shared/gnatcommon.c
|
libbsp_a_SOURCES += gnatsupp/gnatsupp.c ../../sparc/shared/gnatcommon.c
|
||||||
# console
|
# console
|
||||||
|
|||||||
@@ -37,23 +37,26 @@ extern "C" {
|
|||||||
#define LEON2 1
|
#define LEON2 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* confdefs.h overrides for this BSP:
|
* BSP provides its own Idle thread body
|
||||||
* - two termios serial ports
|
|
||||||
* - Interrupt stack space is not minimum if defined.
|
|
||||||
*/
|
*/
|
||||||
|
void *bsp_idle_thread( uintptr_t ignored );
|
||||||
#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
|
#define BSP_IDLE_TASK_BODY bsp_idle_thread
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Network driver configuration
|
* Network driver configuration
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct rtems_bsdnet_ifconfig;
|
struct rtems_bsdnet_ifconfig;
|
||||||
extern int rtems_leon_open_eth_driver_attach (struct rtems_bsdnet_ifconfig *config);
|
extern int rtems_leon_open_eth_driver_attach(
|
||||||
extern int rtems_smc91111_driver_attach_leon2(struct rtems_bsdnet_ifconfig *config);
|
struct rtems_bsdnet_ifconfig *config
|
||||||
|
);
|
||||||
|
extern int rtems_smc91111_driver_attach_leon2(
|
||||||
|
struct rtems_bsdnet_ifconfig *config
|
||||||
|
);
|
||||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME "open_eth1"
|
#define RTEMS_BSP_NETWORK_DRIVER_NAME "open_eth1"
|
||||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_OPENETH rtems_leon_open_eth_driver_attach
|
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_OPENETH \
|
||||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_SMC91111 rtems_smc91111_driver_attach_leon2
|
rtems_leon_open_eth_driver_attach
|
||||||
|
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_SMC91111 \
|
||||||
|
rtems_smc91111_driver_attach_leon2
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The synchronous trap is an arbitrarily chosen software trap.
|
* The synchronous trap is an arbitrarily chosen software trap.
|
||||||
@@ -63,12 +66,11 @@ extern int rtems_smc91111_driver_attach_leon2(struct rtems_bsdnet_ifconfig *conf
|
|||||||
* Simple spin delay in microsecond units for device drivers.
|
* Simple spin delay in microsecond units for device drivers.
|
||||||
* This is very dependent on the clock speed of the target.
|
* This is very dependent on the clock speed of the target.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern void Clock_delay(uint32_t microseconds);
|
extern void Clock_delay(uint32_t microseconds);
|
||||||
|
|
||||||
#define delay( microseconds ) Clock_delay(microseconds)
|
#define delay( microseconds ) Clock_delay(microseconds)
|
||||||
extern int CPU_SPARC_HAS_SNOOPING;
|
|
||||||
|
|
||||||
|
extern int CPU_SPARC_HAS_SNOOPING;
|
||||||
|
|
||||||
/* Constants */
|
/* Constants */
|
||||||
|
|
||||||
|
|||||||
31
c/src/lib/libbsp/sparc/leon2/startup/bspidle.c
Normal file
31
c/src/lib/libbsp/sparc/leon2/startup/bspidle.c
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* LEON2 Idle Thread with power-down function
|
||||||
|
*
|
||||||
|
* COPYRIGHT (c) 1989-2009.
|
||||||
|
* On-Line Applications Research Corporation (OAR).
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.com/license/LICENSE.
|
||||||
|
*
|
||||||
|
* Ported to LEON implementation of the SPARC by On-Line Applications
|
||||||
|
* Research Corporation (OAR) under contract to the European Space
|
||||||
|
* Agency (ESA).
|
||||||
|
*
|
||||||
|
* LEON modifications of respective RTEMS file: COPYRIGHT (c) 1995.
|
||||||
|
* European Space Agency.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <bsp.h>
|
||||||
|
|
||||||
|
void *bsp_idle_thread( uintptr_t ignored )
|
||||||
|
{
|
||||||
|
while (1) {
|
||||||
|
/* make sure on load follows store to power-down reg */
|
||||||
|
LEON_REG.Power_Down = LEON_REG.Power_Down;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -59,13 +59,3 @@ rtems_isr_entry set_vector( /* returns old vector */
|
|||||||
|
|
||||||
return previous_isr;
|
return previous_isr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LEON specific power-down function */
|
|
||||||
|
|
||||||
void _CPU_Thread_Idle_body( void )
|
|
||||||
{
|
|
||||||
while (1) {
|
|
||||||
LEON_REG.Power_Down = LEON_REG.Power_Down; /* make sure on load follows store to power-down reg */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user