source: rtems/c/src/lib/libbsp/sh/gensh2/include/bsp.h @ 4a238002

4.104.114.84.95
Last change on this file since 4a238002 was 4a238002, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 18, 1999 at 9:22:58 PM

Patch from "John M. Mills" <jmills@…> with subsequent cleanup from
Ralf Corsepius <corsepiu@…> that adds initial Hitachi SH-2
support to RTEMS. Ralf's comments are:

Changes:
------

  1. SH-Port:
  • Many files renamed.
  • CONSOLE_DEVNAME and MHZ defines removed from libcpu.
  • console.c moved to libbsp/sh/shared, build in libbsp/sh/<BSP>/console applying VPATH.
  • CONSOLE_DEVNAME made BSP-specific, replacement is defined in bsp.h
  • MHZ define replaced with HZ (extendent resolution) in custom/*.cfg
  • -DHZ=HZ used in bspstart.c, only
  • Makefile variable HZ used in bsp-dependent directories only.
  1. SH1-Port
  • clock-driver rewritten to provide better resolution for odd CPU frequencies. This driver is only partially tested on hardware, ie. sightly experimental, but I don't expect severe problems with it.
  • Polling SCI-driver added. This driver is experimental and completly untested yet. Therefore it is not yet used for the console (/dev/console is still pointing to /dev/null, cf. gensh1/bsp.h).
  • minor changes to the timer driver
  • SH1 specific delay()/CPU_delay() now is implemented as a function
  1. SH2-Port
  • Merged
  • IMO, the code is still in its infancy. Therefore I have interspersed comments (FIXME) it for items which I think John should look after.
  • sci and console drivers partially rewritten and extended (John, I hope you don't mind).
  • Copyright notices are not yet adapted
  • Property mode set to 100644
File size: 3.2 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 *  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$
35 */
36
37#ifndef __gensh2_h
38#define __gensh2_h
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44#include <rtems.h>
45#include <clockdrv.h>
46#include <console.h>
47
48#if 0
49#include <sh/null.h>
50#define BSP_CONSOLE_DEVNAME "/dev/null"
51#define BSP_CONSOLE_DRIVER_TABLE_ENTRY DEVNULL_DRIVER_TABLE_ENTRY
52#else
53#include <sh/sci.h>
54#define BSP_CONSOLE_DEVNAME "/dev/sci1"
55#define BSP_CONSOLE_DRIVER_TABLE_ENTRY DEVSCI_DRIVER_TABLE_ENTRY
56#endif
57
58/*
59 *  Define the time limits for RTEMS Test Suite test durations.
60 *  Long test and short test duration limits are provided.  These
61 *  values are in seconds and need to be converted to ticks for the
62 *  application.
63 *
64 */
65
66#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
67#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
68
69/*
70 *  Stuff for Time Test 27
71 */
72
73#define MUST_WAIT_FOR_INTERRUPT 0
74
75#define Install_tm27_vector( handler ) \
76{ \
77  rtems_isr_entry ignored ; \
78  rtems_interrupt_catch( (handler), 0, &ignored ) ; \
79}
80
81#define Cause_tm27_intr()
82
83#define Clear_tm27_intr()
84
85#define Lower_tm27_intr()
86
87/* Constants */
88
89/*
90 *  Simple spin delay in microsecond units for device drivers.
91 *  This is very dependent on the clock speed of the target.
92 */
93
94#define delay( microseconds ) CPU_delay(microseconds)
95#define sh_delay( microseconds ) CPU_delay( microseconds )
96
97
98/*
99 * Defined in the linker script 'linkcmds'
100 */
101
102extern unsigned32       HeapStart ;
103extern unsigned32       HeapEnd ;
104extern unsigned32       WorkSpaceStart ;
105extern unsigned32       WorkSpaceEnd ;
106
107extern void *CPU_Interrupt_stack_low ;
108extern void *CPU_Interrupt_stack_high ;
109
110 
111/* miscellaneous stuff assumed to exist */
112
113extern rtems_configuration_table BSP_Configuration;
114
115extern void bsp_cleanup( void );
116
117/*
118 *  Device Driver Table Entries
119 */
120
121/*
122 * We redefine CONSOLE_DRIVER_TABLE_ENTRY to redirect /dev/console
123 */
124#undef CONSOLE_DRIVER_TABLE_ENTRY
125#define CONSOLE_DRIVER_TABLE_ENTRY \
126  BSP_CONSOLE_DRIVER_TABLE_ENTRY, \
127  { console_initialize, console_open, console_close, \
128      console_read, console_write, console_control }
129 
130/*
131 * NOTE: Use the standard Clock driver entry
132 */
133
134#ifdef __cplusplus
135}
136#endif
137
138#endif
139/* end of include file */
Note: See TracBrowser for help on using the repository browser.