source: rtems/c/src/lib/libbsp/m68k/csb360/include/bsp.h @ 3e53230

4.104.114.84.95
Last change on this file since 3e53230 was 3e53230, checked in by Joel Sherrill <joel.sherrill@…>, on Feb 12, 2005 at 1:35:38 AM

2005-02-11 Joel Sherrill <joel@…>

  • include/bsp.h: Correct type of symbols from linkcmds to compile with gcc 4.x.
  • Property mode set to 100644
File size: 5.1 KB
Line 
1/*
2 * Board Support Package for CSB360 evaluation board
3 * BSP definitions
4 *
5 * Copyright 2004 Cogent Computer Systems
6 * Author: Jay Monkman <jtm@lopingdog.com>
7 *
8 * Derived from mcf5206elite BSP:
9 * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia
10 * Author: Victor V. Vengerov <vvv@oktet.ru>
11 *
12 * The license and distribution terms for this file may be
13 * found in the file LICENSE in this distribution or at
14 *
15 * http://www.OARcorp.com/rtems/license.html.
16 *
17 *  bsp.h,v 1.1 2001/10/26 19:30:10 joel Exp
18 */
19
20#ifndef __CSB360_BSP_H__
21#define __CSB360_BSP_H__
22
23#include <mcf5272/mcf5272.h>
24
25
26/*** Board resources allocation ***/
27#define BSP_MEM_ADDR_SRAM 0x20000000
28#define BSP_MEM_SIZE_SRAM 4096
29
30/* Location and size of sdram. Note this includes space used by
31 * umon.
32 */
33#define BSP_MEM_ADDR_SDRAM 0x00000000
34#define BSP_MEM_MASK_SDRAM 0x01ffffff
35#define BSP_MEM_SIZE_SDRAM (32 * 1024 * 1024)
36
37/* Address to put SIM Modules */
38#define BSP_MBAR 0x10000000
39
40/* Address to put SRAM */
41#define BSP_RAMBAR BSP_MEM_ADDR_SRAM
42
43/* Interrupt Vectors */
44#define BSP_INTVEC_INT1   65
45#define BSP_INTVEC_INT2   66
46#define BSP_INTVEC_INT3   67
47#define BSP_INTVEC_INT4   68
48#define BSP_INTVEC_TMR0   69
49#define BSP_INTVEC_TMR1   70
50#define BSP_INTVEC_TMR2   71
51#define BSP_INTVEC_TMR3   72
52#define BSP_INTVEC_UART1  73
53#define BSP_INTVEC_UART2  74
54#define BSP_INTVEC_PLIP   75
55#define BSP_INTVEC_PLIA   76
56#define BSP_INTVEC_USB0   77
57#define BSP_INTVEC_USB1   78
58#define BSP_INTVEC_USB2   79
59#define BSP_INTVEC_USB3   80
60#define BSP_INTVEC_USB4   81
61#define BSP_INTVEC_USB5   82
62#define BSP_INTVEC_USB6   83
63#define BSP_INTVEC_USB7   84
64#define BSP_INTVEC_DMA    85
65#define BSP_INTVEC_ERX    86
66#define BSP_INTVEC_ETX    87
67#define BSP_INTVEC_ENTC   88
68#define BSP_INTVEC_QSPI   89
69#define BSP_INTVEC_INT5   90
70#define BSP_INTVEC_INT6   91
71#define BSP_INTVEC_SWTO   92
72
73#define BSP_INTLVL_INT1   1
74#define BSP_INTLVL_INT2   1
75#define BSP_INTLVL_INT3   1
76#define BSP_INTLVL_INT4   1
77#define BSP_INTLVL_TMR0   1
78#define BSP_INTLVL_TMR1   1
79#define BSP_INTLVL_TMR2   1
80#define BSP_INTLVL_TMR3   1
81#define BSP_INTLVL_UART1  1
82#define BSP_INTLVL_UART2  1
83#define BSP_INTLVL_PLIP   1
84#define BSP_INTLVL_PLIA   1
85#define BSP_INTLVL_USB0   1
86#define BSP_INTLVL_USB1   1
87#define BSP_INTLVL_USB2   1
88#define BSP_INTLVL_USB3   1
89#define BSP_INTLVL_USB4   1
90#define BSP_INTLVL_USB5   1
91#define BSP_INTLVL_USB6   1
92#define BSP_INTLVL_USB7   1
93#define BSP_INTLVL_DMA    1
94#define BSP_INTLVL_ERX    1
95#define BSP_INTLVL_ETX    1
96#define BSP_INTLVL_ENTC   1
97#define BSP_INTLVL_QSPI   1
98#define BSP_INTLVL_INT5   1
99#define BSP_INTLVL_INT6   1
100#define BSP_INTLVL_SWTO   1
101
102
103
104#ifndef ASM
105
106#ifdef __cplusplus
107extern "C" {
108#endif
109
110#include <bspopts.h>
111#include <rtems.h>
112#include <rtems/console.h>
113#include <rtems/iosupp.h>
114#include <rtems/clockdrv.h>
115
116struct rtems_bsdnet_ifconfig;
117extern int rtems_enet_driver_attach (struct rtems_bsdnet_ifconfig *config);
118#define RTEMS_BSP_NETWORK_DRIVER_NAME   "eth0"
119#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_enet_driver_attach
120
121/*
122 *  confdefs.h overrides for this BSP:
123 *   - termios serial ports (defaults to 1)
124 *   - Interrupt stack space is not minimum if defined.
125 */
126
127#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
128#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
129
130/* System frequency */
131#define BSP_SYSTEM_FREQUENCY (66 * 1000 * 1000)
132
133/*
134 *  Define the time limits for RTEMS Test Suite test durations.
135 *  Long test and short test duration limits are provided.  These
136 *  values are in seconds and need to be converted to ticks for the
137 *  application.
138 *
139 */
140
141#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
142#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
143
144/*
145 *  Simple spin delay in microsecond units for device drivers.
146 *  This is very dependent on the clock speed of the target.
147 */
148
149#define delay( microseconds ) \
150  { register uint32_t _delay=(microseconds); \
151    register uint32_t _tmp=123; \
152    asm volatile( "0: \
153                     nbcd      %0 ; \
154                     nbcd      %0 ; \
155                     dbf       %1,0b" \
156                  : "=d" (_tmp), "=d" (_delay) \
157                  : "0"  (_tmp), "1"  (_delay) ); \
158  }
159
160/* Constants */
161
162/* Structures */
163
164/*
165 *  Device Driver Table Entries
166 */
167
168/*
169 * NOTE: Use the standard Console driver entry
170 */
171 
172/*
173 * NOTE: Use the standard Clock driver entry
174 */
175
176/*
177 * Real-Time Clock Driver Table Entry
178 * NOTE: put this entry to the device driver table AFTER I2C bus driver!
179 */
180#define RTC_DRIVER_TABLE_ENTRY \
181    { rtc_initialize, NULL, NULL, NULL, NULL, NULL }
182extern rtems_device_driver rtc_initialize(
183    rtems_device_major_number major,
184    rtems_device_minor_number minor,
185    void *arg
186);
187
188/* miscellaneous stuff assumed to exist */
189
190extern rtems_configuration_table BSP_Configuration;
191
192extern m68k_isr_entry M68Kvec[];   /* vector table address */
193
194extern rtems_isr (*rtems_clock_hook)(rtems_vector_number);
195
196/* functions */
197
198void bsp_cleanup( void );
199
200m68k_isr_entry set_vector(
201  rtems_isr_entry     handler,
202  rtems_vector_number vector,
203  int                 type
204);
205
206#ifdef __cplusplus
207}
208#endif
209
210#endif /* ASM */
211
212#endif
213/* end of include file */
Note: See TracBrowser for help on using the repository browser.