source: rtems/c/src/lib/libbsp/sparc64/niagara/include/bsp.h @ 33373ad7

4.115
Last change on this file since 33373ad7 was 33373ad7, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/11/11 at 10:08:47

2011-02-11 Ralf Corsépius <ralf.corsepius@…>

  • include/bsp.h: Use "asm" instead of "asm" for improved c99-compliance.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all SPARC64 simulator definitions.
4 *
5 *  COPYRIGHT (c) 1989-1998.
6 *  On-Line Applications Research Corporation (OAR).
7 *  COPYRIGHT (c) 1995.
8 *  European Space Agency.
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.com/license/LICENSE.
13 *
14 *  Ported to Simics Niagara version of SPARC64
15 *  Niagara modifications of respective RTEMS file: COPYRIGHT (c) 2010.
16 *  Eugen Leontie.
17 *
18 *  $Id$
19 */
20
21#ifndef _BSP_H
22#define _BSP_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#include <bspopts.h>
29
30#include <rtems.h>
31#include <rtems/iosupp.h>
32#include <rtems/console.h>
33#include <rtems/clockdrv.h>
34
35/* support for simulated clock tick */
36/*
37Thread clock_driver_sim_idle_body(uintptr_t);
38#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
39*/
40
41/* this should be defined somewhere */
42rtems_isr_entry set_vector(                     /* returns old vector */
43    rtems_isr_entry     handler,                /* isr routine        */
44    rtems_vector_number vector,                 /* vector number      */
45    int                 type                    /* RTEMS or RAW intr  */
46);
47
48/*
49 *  Simple spin delay in microsecond units for device drivers.
50 *  This is very dependent on the clock speed of the target.
51 */
52
53#define rtems_bsp_delay( microseconds ) \
54  { register uint32_t         _delay=(microseconds); \
55    register uint32_t         _tmp = 0; /* initialized to avoid warning */ \
56    __asm__ volatile( "0: \
57                     remo      3,31,%0 ; \
58                     cmpo      0,%0 ; \
59                     subo      1,%1,%1 ; \
60                     cmpobne.t 0,%1,0b " \
61                  : "=d" (_tmp), "=d" (_delay) \
62                  : "0"  (_tmp), "1"  (_delay) ); \
63  }
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif
Note: See TracBrowser for help on using the repository browser.