source: rtems/c/src/lib/libbsp/sh/gensh2/include/bsp.h @ 5e1b695

4.104.114.84.95
Last change on this file since 5e1b695 was 5e1b695, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 4, 2003 at 6:52:44 PM

2003-09-04 Joel Sherrill <joel@…>

  • console/config.c, include/bsp.h, include/coverhd.h, start/start.S, start/start.ram, start/start.rom, startup/bspclean.c, startup/bspstart.c, startup/hw_init.c, startup/linkcmds, startup/linkcmds.ram, startup/linkcmds.rom: URL for license changed.
  • Property mode set to 100644
File size: 3.8 KB
Line 
1/*
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 *
18 *  The license and distribution terms for this file may be
19 *  found in the file LICENSE in this distribution or at
20 *  http://www.rtems.com/license/LICENSE.
21 *
22 *  Minor adaptations for sh2 by:
23 *  John M. Mills (jmills@tga.com)
24 *  TGA Technologies, Inc.
25 *  100 Pinnacle Way, Suite 140
26 *  Norcross, GA 30071 U.S.A.
27 *
28 *  This modified file may be copied and distributed in accordance
29 *  the above-referenced license. It is provided for critique and
30 *  developmental purposes without any warranty nor representation
31 *  by the authors or by TGA Technologies.
32 *
33 *  $Id$
34 */
35
36#ifndef __gensh2_h
37#define __gensh2_h
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43#include <rtems.h>
44#include <clockdrv.h>
45#include <console.h>
46
47#include <bspopts.h>
48
49/*
50 *  confdefs.h overrides for this BSP:
51 *   - number of termios serial ports (defaults to 1)
52 *   - Interrupt stack space is not minimum if defined.
53 */
54
55/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
56#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
57
58#if 0
59#include <rtems/devnull.h>
60#define BSP_CONSOLE_DEVNAME "/dev/null"
61#define BSP_CONSOLE_DRIVER_TABLE_ENTRY DEVNULL_DRIVER_TABLE_ENTRY
62#else
63#include <sh/sci.h>
64/* FIXME:
65 *   These definitions will be no longer necessary if the old
66 *   implementation of SCI driver will be droped
67 */
68#define BSP_CONSOLE_DEVNAME "/dev/sci0"
69#define BSP_CONSOLE_MINOR_NUMBER ((rtems_device_minor_number) 0)
70#define BSP_CONSOLE_DRIVER_TABLE_ENTRY DEVSCI_DRIVER_TABLE_ENTRY
71#define BSP_CONSOLE_DEVICE_TERMIOS_HANDLERS (sh_sci_get_termios_handlers(TRUE))
72#endif
73
74/*
75 *  Define the time limits for RTEMS Test Suite test durations.
76 *  Long test and short test duration limits are provided.  These
77 *  values are in seconds and need to be converted to ticks for the
78 *  application.
79 *
80 */
81
82#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
83#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
84
85/*
86 *  Stuff for Time Test 27
87 */
88
89#define MUST_WAIT_FOR_INTERRUPT 0
90
91#define Install_tm27_vector( handler ) \
92{ \
93  rtems_isr_entry ignored ; \
94  rtems_interrupt_catch( (handler), 0, &ignored ) ; \
95}
96
97#define Cause_tm27_intr()
98
99#define Clear_tm27_intr()
100
101#define Lower_tm27_intr()
102
103/* Constants */
104
105/*
106 *  Simple spin delay in microsecond units for device drivers.
107 *  This is very dependent on the clock speed of the target.
108 */
109
110#define rtems_bsp_delay( microseconds ) CPU_delay(microseconds)
111#define sh_delay( microseconds ) CPU_delay( microseconds )
112
113
114/*
115 * Defined in the linker script 'linkcmds'
116 */
117
118extern unsigned32       HeapStart ;
119extern unsigned32       HeapEnd ;
120extern unsigned32       WorkSpaceStart ;
121extern unsigned32       WorkSpaceEnd ;
122
123extern void *CPU_Interrupt_stack_low ;
124extern void *CPU_Interrupt_stack_high ;
125
126 
127/* miscellaneous stuff assumed to exist */
128
129extern rtems_configuration_table BSP_Configuration;
130
131extern void bsp_cleanup( void );
132
133/*
134 *  Device Driver Table Entries
135 */
136
137/*
138 * We redefine CONSOLE_DRIVER_TABLE_ENTRY to redirect /dev/console
139 *
140 * FIXME: Since console driver works properly this is not
141 * necessary. When enabled - causes error in console_initialize.
142 */
143#if 0
144#undef CONSOLE_DRIVER_TABLE_ENTRY
145#define CONSOLE_DRIVER_TABLE_ENTRY \
146  BSP_CONSOLE_DRIVER_TABLE_ENTRY, \
147  { console_initialize, console_open, console_close, \
148      console_read, console_write, console_control }
149#endif
150
151/*
152 * NOTE: Use the standard Clock driver entry
153 */
154
155#ifdef __cplusplus
156}
157#endif
158
159#endif
160/* end of include file */
Note: See TracBrowser for help on using the repository browser.