OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [sh/] [gensh2/] [include/] [bsp.h] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  This include file contains all board IO definitions.
3
 *
4
 *  generic sh2
5
 *
6
 *  Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de)
7
 *
8
 *  COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
 *
14
 *
15
 *  COPYRIGHT (c) 1998.
16
 *  On-Line Applications Research Corporation (OAR).
17
 *  Copyright assigned to U.S. Government, 1994.
18
 *
19
 *  The license and distribution terms for this file may be
20
 *  found in the file LICENSE in this distribution or at
21
 *  http://www.OARcorp.com/rtems/license.html.
22
 *
23
 *  Minor adaptations for sh2 by:
24
 *  John M. Mills (jmills@tga.com)
25
 *  TGA Technologies, Inc.
26
 *  100 Pinnacle Way, Suite 140
27
 *  Norcross, GA 30071 U.S.A.
28
 *
29
 *  This modified file may be copied and distributed in accordance
30
 *  the above-referenced license. It is provided for critique and
31
 *  developmental purposes without any warranty nor representation
32
 *  by the authors or by TGA Technologies.
33
 *
34
 *  $Id: bsp.h,v 1.2 2001-09-27 12:01:12 chris Exp $
35
 */
36
 
37
#ifndef __gensh2_h
38
#define __gensh2_h
39
 
40
#ifdef __cplusplus
41
extern "C" {
42
#endif
43
 
44
#include <rtems.h>
45
#include <clockdrv.h>
46
#include <console.h>
47
 
48
/*
49
 *  confdefs.h overrides for this BSP:
50
 *   - number of termios serial ports (defaults to 1)
51
 *   - Interrupt stack space is not minimum if defined.
52
 */
53
 
54
/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
55
#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
56
 
57
#if 0
58
#include <sh/null.h>
59
#define BSP_CONSOLE_DEVNAME "/dev/null"
60
#define BSP_CONSOLE_DRIVER_TABLE_ENTRY DEVNULL_DRIVER_TABLE_ENTRY
61
#else
62
#include <sh/sci.h>
63
#define BSP_CONSOLE_DEVNAME "/dev/sci1"
64
#define BSP_CONSOLE_DRIVER_TABLE_ENTRY DEVSCI_DRIVER_TABLE_ENTRY
65
#endif
66
 
67
/*
68
 *  Define the time limits for RTEMS Test Suite test durations.
69
 *  Long test and short test duration limits are provided.  These
70
 *  values are in seconds and need to be converted to ticks for the
71
 *  application.
72
 *
73
 */
74
 
75
#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
76
#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
77
 
78
/*
79
 *  Stuff for Time Test 27
80
 */
81
 
82
#define MUST_WAIT_FOR_INTERRUPT 0
83
 
84
#define Install_tm27_vector( handler ) \
85
{ \
86
  rtems_isr_entry ignored ; \
87
  rtems_interrupt_catch( (handler), 0, &ignored ) ; \
88
}
89
 
90
#define Cause_tm27_intr()
91
 
92
#define Clear_tm27_intr()
93
 
94
#define Lower_tm27_intr()
95
 
96
/* Constants */
97
 
98
/*
99
 *  Simple spin delay in microsecond units for device drivers.
100
 *  This is very dependent on the clock speed of the target.
101
 */
102
 
103
#define delay( microseconds ) CPU_delay(microseconds)
104
#define sh_delay( microseconds ) CPU_delay( microseconds )
105
 
106
 
107
/*
108
 * Defined in the linker script 'linkcmds'
109
 */
110
 
111
extern unsigned32       HeapStart ;
112
extern unsigned32       HeapEnd ;
113
extern unsigned32       WorkSpaceStart ;
114
extern unsigned32       WorkSpaceEnd ;
115
 
116
extern void *CPU_Interrupt_stack_low ;
117
extern void *CPU_Interrupt_stack_high ;
118
 
119
 
120
/* miscellaneous stuff assumed to exist */
121
 
122
extern rtems_configuration_table BSP_Configuration;
123
 
124
extern void bsp_cleanup( void );
125
 
126
/*
127
 *  Device Driver Table Entries
128
 */
129
 
130
/*
131
 * We redefine CONSOLE_DRIVER_TABLE_ENTRY to redirect /dev/console
132
 */
133
#undef CONSOLE_DRIVER_TABLE_ENTRY
134
#define CONSOLE_DRIVER_TABLE_ENTRY \
135
  BSP_CONSOLE_DRIVER_TABLE_ENTRY, \
136
  { console_initialize, console_open, console_close, \
137
      console_read, console_write, console_control }
138
 
139
/*
140
 * NOTE: Use the standard Clock driver entry
141
 */
142
 
143
#ifdef __cplusplus
144
}
145
#endif
146
 
147
#endif
148
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.