forked from Imagelibrary/rtems
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-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* configure.ac: Rename BSP_BOOTCARD_OPTIONS to
|
||||
|
||||
@@ -38,7 +38,8 @@ libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
|
||||
../../shared/bsppredriverhook.c ../../sparc/shared/bspgetworkarea.c \
|
||||
../../shared/bsppost.c ../../sparc/shared/bspstart.c \
|
||||
../../shared/bootcard.c ../../shared/sbrk.c startup/setvec.c \
|
||||
startup/spurious.c startup/erc32mec.c startup/boardinit.S
|
||||
startup/spurious.c startup/erc32mec.c startup/boardinit.S \
|
||||
startup/bspidle.c
|
||||
# gnatsupp
|
||||
libbsp_a_SOURCES += gnatsupp/gnatsupp.c ../../sparc/shared/gnatcommon.c
|
||||
# console
|
||||
|
||||
@@ -36,19 +36,18 @@ extern "C" {
|
||||
#include <rtems/console.h>
|
||||
|
||||
/*
|
||||
* confdefs.h overrides for this BSP:
|
||||
* - two termios serial ports
|
||||
* - Interrupt stack space is not minimum if defined.
|
||||
* BSP provides its own Idle thread body
|
||||
*/
|
||||
|
||||
#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
|
||||
void *bsp_idle_thread( uintptr_t ignored );
|
||||
#define BSP_IDLE_TASK_BODY bsp_idle_thread
|
||||
|
||||
/*
|
||||
* Network driver configuration
|
||||
*/
|
||||
|
||||
struct rtems_bsdnet_ifconfig;
|
||||
extern int rtems_erc32_sonic_driver_attach (struct rtems_bsdnet_ifconfig *config);
|
||||
extern int rtems_erc32_sonic_driver_attach(
|
||||
struct rtems_bsdnet_ifconfig *config
|
||||
);
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME "sonic1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_erc32_sonic_driver_attach
|
||||
|
||||
@@ -56,8 +55,7 @@ extern int rtems_erc32_sonic_driver_attach (struct rtems_bsdnet_ifconfig *config
|
||||
* Simple spin delay in microsecond units for device drivers.
|
||||
* 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)
|
||||
|
||||
|
||||
29
c/src/lib/libbsp/sparc/erc32/startup/bspidle.c
Normal file
29
c/src/lib/libbsp/sparc/erc32/startup/bspidle.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* ERC32 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 ERC32 implementation of the SPARC by On-Line Applications
|
||||
* Research Corporation (OAR) under contract to the European Space
|
||||
* Agency (ESA).
|
||||
*
|
||||
* ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
|
||||
* European Space Agency.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
void *bsp_idle_thread( uintptr_t ignored )
|
||||
{
|
||||
while (1) {
|
||||
ERC32_MEC.Power_Down = 0; /* value is irrelevant */
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -59,12 +59,3 @@ rtems_isr_entry set_vector( /* returns old vector */
|
||||
|
||||
return previous_isr;
|
||||
}
|
||||
|
||||
/* ERC32 power-down function */
|
||||
|
||||
void *_CPU_Thread_Idle_body( uintptr_t ignored )
|
||||
{
|
||||
while (1) {
|
||||
ERC32_MEC.Power_Down = 0; /* value is irrelevant */
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user