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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [m68k/] [efi68k/] [include/] [bsp.h] - Blame information for rev 594

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  bsp.h
2
 *
3
 *  This include file contains all efi68k board IO definitions.
4
 *
5
 *  COPYRIGHT (c) 1989-1999.
6
 *  On-Line Applications Research Corporation (OAR).
7
 *
8
 *  The license and distribution terms for this file may be
9
 *  found in the file LICENSE in this distribution or at
10
 *  http://www.OARcorp.com/rtems/license.html.
11
 *
12
 *  $Id: bsp.h,v 1.2 2001-09-27 12:00:03 chris Exp $
13
 */
14
 
15
#ifndef __EFI68K_BSP_h
16
#define __EFI68K_BSP_h
17
 
18
#ifdef __cplusplus
19
extern "C" {
20
#endif
21
 
22
#include <rtems.h>
23
#include <clockdrv.h>
24
#include <console.h>
25
#include <iosupp.h>
26
#include <efi68k.h>
27
#include <DP8570A.h>
28
#include <16550.h>
29
 
30
/*
31
 *  confdefs.h overrides for this BSP:
32
 *   - number of termios serial ports (defaults to 1)
33
 *   - Interrupt stack space is not minimum if defined.
34
 */
35
 
36
/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
37
/* #define CONFIGURE_INTERRUPT_STACK_MEMORY  (TBD * 1024) */
38
 
39
/*
40
 *  Define the time limits for RTEMS Test Suite test durations.
41
 *  Long test and short test duration limits are provided.  These
42
 *  values are in seconds and need to be converted to ticks for the
43
 *  application.
44
 *
45
 */
46
 
47
#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
48
#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
49
 
50
/*
51
 *  Define the interrupt mechanism for Time Test 27
52
 */
53
 
54
/* XXX - JRS - I want to compile the tmtests */
55
 
56
#define MUST_WAIT_FOR_INTERRUPT 1 
57
 
58
#define Install_tm27_vector( handler )
59
 
60
#define Cause_tm27_intr()
61
 
62
#define Clear_tm27_intr()
63
 
64
#define Lower_tm27_intr() 
65
 
66
/*
67
 *  Simple spin delay in microsecond units for device drivers.
68
 *  This is very dependent on the clock speed of the target.
69
 */
70
 
71
#define delay( microseconds ) \
72
  { register rtems_unsigned32 _delay=(microseconds); \
73
    register rtems_unsigned32 _tmp=123; \
74
    asm volatile( "0: \
75
                     nbcd      %0 ; \
76
                     nbcd      %0 ; \
77
                     dbf       %1,0b" \
78
                  : "=d" (_tmp), "=d" (_delay) \
79
                  : "0"  (_tmp), "1"  (_delay) ); \
80
  }
81
 
82
/* externals */
83
 
84
extern char _etext[];
85
extern char _copy_start[];
86
extern char _edata[];
87
extern char _clear_start[];
88
extern char end[];
89
extern char _copy_data_from_rom[];
90
extern char __end_of_ram[];
91
 
92
/* constants */
93
 
94
#define RAM_END ((int)__end_of_ram)
95
 
96
#ifdef __START_C__
97
#define STACK_SIZE "#0x800"
98
#else
99
#define STACK_SIZE 0x800
100
#endif
101
 
102
/* macros */
103
 
104
#define RAW_PUTS(str) \
105
  { register char *ptr = str; \
106
    while (*ptr) outbyte(*ptr++); \
107
  }
108
 
109
#define RAW_PUTI(n) { \
110
    register int i, j; \
111
    \
112
    RAW_PUTS("0x"); \
113
    for (i=28;i>=0;i -= 4) { \
114
      j = (n>>i) & 0xf; \
115
      outbyte( (j>9 ? j-10+'a' : j+'0') ); \
116
    } \
117
  }
118
 
119
/* miscellaneous stuff assumed to exist */
120
 
121
extern rtems_configuration_table BSP_Configuration;
122
 
123
extern m68k_isr_entry M68Kvec[];   /* vector table address */
124
 
125
extern int stack_size;
126
 
127
extern int stack_start;
128
 
129
extern rtems_unsigned32 Timer_interrupts;
130
 
131
/*
132
 *  Device Driver Table Entries
133
 */
134
 
135
/*
136
 * NOTE: Use the standard Console driver entry
137
 */
138
 
139
/*
140
 * NOTE: Use the standard Clock driver entry
141
 */
142
 
143
/* functions */
144
 
145
void bsp_cleanup( void );
146
 
147
m68k_isr_entry set_vector(
148
  rtems_isr_entry     handler,
149
  rtems_vector_number vector,
150
  int                 type
151
);
152
 
153
void console_init(void);
154
 
155
void watch_dog_init(void);
156
 
157
void tcp_init(void);
158
 
159
void Spurious_Initialize(void);
160
 
161
void _UART_flush(void);
162
 
163
void Clock_exit(void);
164
 
165
void outbyte(char);
166
 
167
#ifdef __cplusplus
168
}
169
#endif
170
 
171
#endif
172
/* end of include file */

powered by: WebSVN 2.1.0

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