1 | /* |
---|
2 | * Board Support Package for `Generic' Motorola MC68360 |
---|
3 | * |
---|
4 | * Based on the `gen68302' board support package, and covered by the |
---|
5 | * original distribution terms. |
---|
6 | * |
---|
7 | * W. Eric Norum |
---|
8 | * Saskatchewan Accelerator Laboratory |
---|
9 | * University of Saskatchewan |
---|
10 | * Saskatoon, Saskatchewan, CANADA |
---|
11 | * eric@skatter.usask.ca |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | /* bsp.h |
---|
17 | * |
---|
18 | * COPYRIGHT (c) 1989-1999. |
---|
19 | * On-Line Applications Research Corporation (OAR). |
---|
20 | * |
---|
21 | * The license and distribution terms for this file may be |
---|
22 | * found in the file LICENSE in this distribution or at |
---|
23 | * http://www.rtems.com/license/LICENSE. |
---|
24 | */ |
---|
25 | |
---|
26 | #ifndef _BSP_H |
---|
27 | #define _BSP_H |
---|
28 | |
---|
29 | #ifdef __cplusplus |
---|
30 | extern "C" { |
---|
31 | #endif |
---|
32 | |
---|
33 | #include <bspopts.h> |
---|
34 | |
---|
35 | #include <rtems.h> |
---|
36 | #include <rtems/console.h> |
---|
37 | #include <rtems/iosupp.h> |
---|
38 | #include <rtems/clockdrv.h> |
---|
39 | |
---|
40 | /* |
---|
41 | * Network driver configuration |
---|
42 | */ |
---|
43 | struct rtems_bsdnet_ifconfig; |
---|
44 | extern int rtems_scc1_driver_attach (struct rtems_bsdnet_ifconfig *config, int attaching); |
---|
45 | #define RTEMS_BSP_NETWORK_DRIVER_NAME "scc1" |
---|
46 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_scc1_driver_attach |
---|
47 | |
---|
48 | /* |
---|
49 | * Simple spin delay in microsecond units for device drivers. |
---|
50 | * This is very dependent on the clock speed of the target. |
---|
51 | */ |
---|
52 | |
---|
53 | #define rtems_bsp_delay( microseconds ) \ |
---|
54 | { register uint32_t _delay=(microseconds); \ |
---|
55 | register uint32_t _tmp=123; \ |
---|
56 | asm volatile( "0: \ |
---|
57 | nbcd %0 ; \ |
---|
58 | nbcd %0 ; \ |
---|
59 | dbf %1,0b" \ |
---|
60 | : "=d" (_tmp), "=d" (_delay) \ |
---|
61 | : "0" (_tmp), "1" (_delay) ); \ |
---|
62 | } |
---|
63 | |
---|
64 | /* Constants */ |
---|
65 | |
---|
66 | /* Structures */ |
---|
67 | |
---|
68 | /* |
---|
69 | * Device Driver Table Entries |
---|
70 | */ |
---|
71 | |
---|
72 | /* |
---|
73 | * NOTE: Use the standard Console driver entry |
---|
74 | */ |
---|
75 | |
---|
76 | /* |
---|
77 | * NOTE: Use the standard Clock driver entry |
---|
78 | */ |
---|
79 | |
---|
80 | /* miscellaneous stuff assumed to exist */ |
---|
81 | |
---|
82 | extern m68k_isr_entry M68Kvec[]; /* vector table address */ |
---|
83 | |
---|
84 | /* functions */ |
---|
85 | |
---|
86 | void bsp_cleanup( void ); |
---|
87 | |
---|
88 | void M360ExecuteRISC( uint16_t command ); |
---|
89 | void *M360AllocateBufferDescriptors( int count ); |
---|
90 | void *M360AllocateRiscTimers( int count ); |
---|
91 | extern char M360DefaultWatchdogFeeder; |
---|
92 | |
---|
93 | extern int m360_clock_rate; /* BRG clock rate, defined in console.c */ |
---|
94 | |
---|
95 | m68k_isr_entry set_vector( |
---|
96 | rtems_isr_entry handler, |
---|
97 | rtems_vector_number vector, |
---|
98 | int type |
---|
99 | ); |
---|
100 | |
---|
101 | /* |
---|
102 | * Values assigned by link editor |
---|
103 | */ |
---|
104 | extern char _RamBase[]; |
---|
105 | extern char _HeapSize[]; |
---|
106 | |
---|
107 | |
---|
108 | /* |
---|
109 | * Definitions for Atlas Computer Equipment Inc. High Speed Bridge (HSB) |
---|
110 | */ |
---|
111 | #define ATLASHSB_ESR 0x20010000L |
---|
112 | #define ATLASHSB_USICR 0x20010001L |
---|
113 | #define ATLASHSB_DSRR 0x20010002L |
---|
114 | #define ATLASHSB_LED4 0x20010004L |
---|
115 | #define ATLASHSB_ROM_U6 0xFF080000L /* U6 flash ROM socket */ |
---|
116 | |
---|
117 | |
---|
118 | /* |
---|
119 | * definitions for PGH360 board |
---|
120 | */ |
---|
121 | #if defined(PGH360) |
---|
122 | /* |
---|
123 | * logical SPI addresses of SPI slaves available |
---|
124 | */ |
---|
125 | #define PGH360_SPI_ADDR_EEPROM 0 |
---|
126 | #define PGH360_SPI_ADDR_DISP4_DATA 1 |
---|
127 | #define PGH360_SPI_ADDR_DISP4_CTRL 2 |
---|
128 | |
---|
129 | /* |
---|
130 | * Port B bit locations of SPI slave selects |
---|
131 | */ |
---|
132 | #define PGH360_PB_SPI_DISP4_RS_MSK (1<<15) |
---|
133 | #define PGH360_PB_SPI_DISP4_CE_MSK (1<<14) |
---|
134 | #define PGH360_PB_SPI_EEP_CE_MSK (1<< 0) |
---|
135 | #endif /* defined(PGH360) */ |
---|
136 | |
---|
137 | #ifdef __cplusplus |
---|
138 | } |
---|
139 | #endif |
---|
140 | |
---|
141 | #endif |
---|