1 | /* bsp.h |
---|
2 | * |
---|
3 | * This include file contains all DY-4 DMV170 board IO definitions. |
---|
4 | * |
---|
5 | * COPYRIGHT (c) 1989-1997. |
---|
6 | * On-Line Applications Research Corporation (OAR). |
---|
7 | * |
---|
8 | * $Id$ |
---|
9 | */ |
---|
10 | |
---|
11 | #ifndef __DMV170_BSP_h |
---|
12 | #define __DMV170_BSP_h |
---|
13 | |
---|
14 | #ifdef __cplusplus |
---|
15 | extern "C" { |
---|
16 | #endif |
---|
17 | |
---|
18 | #include <bspopts.h> |
---|
19 | |
---|
20 | /* |
---|
21 | * confdefs.h overrides for this BSP: |
---|
22 | * - termios serial ports (defaults to 1) |
---|
23 | * - Interrupt stack space is not minimum if defined. |
---|
24 | */ |
---|
25 | |
---|
26 | #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 4 |
---|
27 | #define CONFIGURE_INTERRUPT_STACK_MEMORY (12 * 1024) |
---|
28 | |
---|
29 | #ifdef ASM |
---|
30 | /* Definition of where to store registers in alignment handler */ |
---|
31 | #define ALIGN_REGS 0x0140 |
---|
32 | |
---|
33 | #else |
---|
34 | #include <rtems.h> |
---|
35 | #include <rtems/console.h> |
---|
36 | #include <rtems/clockdrv.h> |
---|
37 | #include <rtems/console.h> |
---|
38 | #include <rtems/iosupp.h> |
---|
39 | |
---|
40 | #include <dmv170.h> |
---|
41 | |
---|
42 | #if 0 |
---|
43 | #define Enable_Debug() \ |
---|
44 | DMV170_WRITE( 0xffffbd0c, 0 ) |
---|
45 | |
---|
46 | #define Debug_Entry( num ) \ |
---|
47 | DMV170_WRITE( 0xffffbd06, num ) |
---|
48 | #else |
---|
49 | #define Enable_Debug() |
---|
50 | #define Debug_Entry( num ) |
---|
51 | #endif |
---|
52 | |
---|
53 | /* |
---|
54 | * Network driver configuration |
---|
55 | */ |
---|
56 | struct rtems_bsdnet_ifconfig; |
---|
57 | int rtems_dmv177_sonic_driver_attach(struct rtems_bsdnet_ifconfig *config); |
---|
58 | #define RTEMS_BSP_NETWORK_DRIVER_NAME "sonic1" |
---|
59 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_dmv177_sonic_driver_attach |
---|
60 | |
---|
61 | /* |
---|
62 | * The following macro calculates the Baud constant. For the Z8530 chip. |
---|
63 | */ |
---|
64 | #define Z8530_Baud( _frequency, _clock_by, _baud_rate ) \ |
---|
65 | ( (_frequency /( _clock_by * 2 * _baud_rate)) - 2) |
---|
66 | |
---|
67 | /* Constants */ |
---|
68 | |
---|
69 | /* |
---|
70 | * Device Driver Table Entries |
---|
71 | */ |
---|
72 | |
---|
73 | /* |
---|
74 | * NOTE: Use the standard Console driver entry |
---|
75 | */ |
---|
76 | |
---|
77 | /* |
---|
78 | * NOTE: Use the standard Clock driver entry |
---|
79 | */ |
---|
80 | |
---|
81 | /* |
---|
82 | * Information placed in the linkcmds file. |
---|
83 | */ |
---|
84 | |
---|
85 | extern int RAM_START; |
---|
86 | extern int RAM_END; |
---|
87 | extern int RAM_SIZE; |
---|
88 | |
---|
89 | extern int PROM_START; |
---|
90 | extern int PROM_END; |
---|
91 | extern int PROM_SIZE; |
---|
92 | |
---|
93 | extern int CLOCK_SPEED; |
---|
94 | |
---|
95 | extern int end; /* last address in the program */ |
---|
96 | |
---|
97 | /* |
---|
98 | * How many libio files we want |
---|
99 | */ |
---|
100 | |
---|
101 | #define BSP_LIBIO_MAX_FDS 20 |
---|
102 | |
---|
103 | /* functions */ |
---|
104 | |
---|
105 | /* |
---|
106 | * genvec.c |
---|
107 | */ |
---|
108 | rtems_isr_entry set_EE_vector( |
---|
109 | rtems_isr_entry handler, /* isr routine */ |
---|
110 | rtems_vector_number vector /* vector number */ |
---|
111 | ); |
---|
112 | void initialize_external_exception_vector (); |
---|
113 | |
---|
114 | /* |
---|
115 | * console.c |
---|
116 | */ |
---|
117 | void DEBUG_puts( char *string ); |
---|
118 | |
---|
119 | void BSP_fatal_return( void ); |
---|
120 | |
---|
121 | void bsp_start( void ); |
---|
122 | |
---|
123 | void bsp_cleanup( void ); |
---|
124 | |
---|
125 | rtems_isr_entry set_vector( /* returns old vector */ |
---|
126 | rtems_isr_entry handler, /* isr routine */ |
---|
127 | rtems_vector_number vector, /* vector number */ |
---|
128 | int type /* RTEMS or RAW intr */ |
---|
129 | ); |
---|
130 | |
---|
131 | void BSP_fatal_return( void ); |
---|
132 | |
---|
133 | void bsp_spurious_initialize( void ); |
---|
134 | |
---|
135 | extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ |
---|
136 | |
---|
137 | extern rtems_cpu_table Cpu_table; /* owned by BSP */ |
---|
138 | |
---|
139 | extern uint32_t bsp_isr_level; |
---|
140 | |
---|
141 | extern int CPU_PPC_CLICKS_PER_MS; |
---|
142 | |
---|
143 | #endif /* ASM */ |
---|
144 | |
---|
145 | #ifdef __cplusplus |
---|
146 | } |
---|
147 | #endif |
---|
148 | |
---|
149 | #endif |
---|
150 | /* end of include file */ |
---|