mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-22 04:11:46 +08:00
2011-05-23 Jennifer Averett <Jennifer.Averett@OARcorp.com>
PR 1795/bsps * erc32/Makefile.am, leon2/Makefile.am, leon3/Makefile.am: Add rtems_bsp_delay to sparc bsps. * erc32/startup/bspdelay.c, leon2/startup/bspdelay.c, leon3/startup/bspdelay.c: New files.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2011-05-23 Jennifer Averett <Jennifer.Averett@OARcorp.com>
|
||||
|
||||
PR 1795/bsps
|
||||
* erc32/Makefile.am, leon2/Makefile.am, leon3/Makefile.am: Add
|
||||
rtems_bsp_delay to sparc bsps.
|
||||
* erc32/startup/bspdelay.c, leon2/startup/bspdelay.c,
|
||||
leon3/startup/bspdelay.c: New files.
|
||||
|
||||
2011-03-16 Jennifer Averett <jennifer.averett@OARcorp.com>
|
||||
|
||||
PR 1729/cpukit
|
||||
|
||||
@@ -39,7 +39,8 @@ libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
|
||||
../../sparc/shared/bsppretaskinghook.c ../../shared/bsppost.c \
|
||||
../../shared/bspstart.c ../../shared/bootcard.c ../../shared/bspinit.c \
|
||||
../../shared/sbrk.c startup/setvec.c startup/spurious.c \
|
||||
startup/erc32mec.c startup/boardinit.S startup/bspidle.c
|
||||
startup/erc32mec.c startup/boardinit.S startup/bspidle.c \
|
||||
startup/bspdelay.c
|
||||
# ISR Handler
|
||||
libbsp_a_SOURCES += ../../sparc/shared/irq_asm.S
|
||||
# gnatsupp
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* ERC32 BSP Delay Method
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2011.
|
||||
* 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.
|
||||
*
|
||||
* $Id
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
void rtems_bsp_delay(int usecs)
|
||||
{
|
||||
uint32_t then;
|
||||
|
||||
then = ERC32_MEC.Real_Time_Clock_Counter;
|
||||
then += usecs;
|
||||
|
||||
while (ERC32_MEC.Real_Time_Clock_Counter >= then)
|
||||
;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
##
|
||||
## $Id$
|
||||
## $Id: Makefile.am,v 1.26 2011/03/16 20:05:24 joel Exp
|
||||
##
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../../../aclocal
|
||||
@@ -59,7 +59,7 @@ libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
|
||||
startup/bspstart.c ../../sparc/shared/bsppretaskinghook.c \
|
||||
../../sparc/shared/bspgetworkarea.c ../../shared/bootcard.c \
|
||||
../../shared/sbrk.c startup/setvec.c startup/spurious.c startup/bspidle.c \
|
||||
../../shared/bspinit.c
|
||||
../../shared/bspinit.c startup/bspdelay.c
|
||||
# ISR Handler
|
||||
libbsp_a_SOURCES += ../../sparc/shared/irq_asm.S
|
||||
# gnatsupp
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* LEON2 BSP Delay Method
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2011.
|
||||
* 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.
|
||||
*
|
||||
* $Id
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
void rtems_bsp_delay(int usecs)
|
||||
{
|
||||
uint32_t then;
|
||||
|
||||
then = LEON_REG.Timer_Counter_1;
|
||||
then += usecs;
|
||||
|
||||
while (LEON_REG.Timer_Counter_1 >= then)
|
||||
;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
##
|
||||
## $Id$
|
||||
## $Id: Makefile.am,v 1.30 2011/03/16 20:05:26 joel Exp
|
||||
##
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../../../aclocal
|
||||
@@ -41,8 +41,9 @@ libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
|
||||
../../shared/bsppost.c ../../shared/bootcard.c startup/bspstart.c \
|
||||
../../sparc/shared/bsppretaskinghook.c ../../shared/bsppredriverhook.c \
|
||||
../../sparc/shared/bspgetworkarea.c ../../shared/sbrk.c startup/setvec.c \
|
||||
startup/spurious.c startup/bspidle.S \
|
||||
startup/spurious.c startup/bspidle.S startup/bspdelay.c \
|
||||
../../shared/bspinit.c
|
||||
|
||||
# ISR Handler
|
||||
libbsp_a_SOURCES += ../../sparc/shared/irq_asm.S
|
||||
# gnatsupp
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* LEON3 BSP Delay Method
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2011.
|
||||
* 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.
|
||||
*
|
||||
* $Id
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
void rtems_bsp_delay(int usecs)
|
||||
{
|
||||
uint32_t then;
|
||||
|
||||
then =LEON3_Timer_Regs->timer[0].value;
|
||||
then += usecs;
|
||||
|
||||
while (LEON3_Timer_Regs->timer[0].value >= then)
|
||||
;
|
||||
}
|
||||
Reference in New Issue
Block a user