1 | /* bsp.h |
---|
2 | * |
---|
3 | * This include file contains all board IO definitions. |
---|
4 | * |
---|
5 | * XXX : put yours in here |
---|
6 | * |
---|
7 | * COPYRIGHT (c) 1989-1999. |
---|
8 | * On-Line Applications Research Corporation (OAR). |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.com/license/LICENSE. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef _BSP_H |
---|
18 | #define _BSP_H |
---|
19 | |
---|
20 | #ifdef __cplusplus |
---|
21 | extern "C" { |
---|
22 | #endif |
---|
23 | |
---|
24 | #include <bspopts.h> |
---|
25 | |
---|
26 | #include <rtems.h> |
---|
27 | #include <rtems/console.h> |
---|
28 | #include <rtems/clockdrv.h> |
---|
29 | #include <mpc8260.h> |
---|
30 | #include <mpc8260/cpm.h> |
---|
31 | #include <mpc8260/mmu.h> |
---|
32 | #include <mpc8260/console.h> |
---|
33 | #include <bsp/irq.h> |
---|
34 | #include <bsp/vectors.h> |
---|
35 | |
---|
36 | /* |
---|
37 | * Board configuration registers |
---|
38 | */ |
---|
39 | |
---|
40 | typedef struct bcsr |
---|
41 | |
---|
42 | { |
---|
43 | uint32_t bcsr0; /* Board Control and Status Register */ |
---|
44 | uint32_t bcsr1; |
---|
45 | uint32_t bcsr2; |
---|
46 | uint32_t bcsr3; |
---|
47 | |
---|
48 | } BCSR; |
---|
49 | |
---|
50 | #define UART1_E 0x02000002 /* bit 6 of BCSR1 */ |
---|
51 | #define UART2_E 0x01000001 /* bit 7 of BCSR1 */ |
---|
52 | |
---|
53 | #define GP0_LED 0x02000002 /* bit 6 of BCSR0 */ |
---|
54 | #define GP1_LED 0x01000001 /* bit 7 of BCSR0 */ |
---|
55 | |
---|
56 | /* |
---|
57 | * Network driver configuration |
---|
58 | */ |
---|
59 | struct rtems_bsdnet_ifconfig; |
---|
60 | extern int rtems_enet_driver_attach (struct rtems_bsdnet_ifconfig *config, int attaching); |
---|
61 | #define RTEMS_BSP_NETWORK_DRIVER_NAME "eth1" |
---|
62 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_enet_driver_attach |
---|
63 | |
---|
64 | /* miscellaneous stuff assumed to exist */ |
---|
65 | |
---|
66 | extern rtems_configuration_table BSP_Configuration; |
---|
67 | /* |
---|
68 | * We need to decide how much memory will be non-cacheable. This |
---|
69 | * will mainly be memory that will be used in DMA (network and serial |
---|
70 | * buffers). |
---|
71 | */ |
---|
72 | /* |
---|
73 | #define NOCACHE_MEM_SIZE 512*1024 |
---|
74 | */ |
---|
75 | |
---|
76 | /* Constants */ |
---|
77 | /* |
---|
78 | #define RAM_START 0 |
---|
79 | #define RAM_END 0x1000000 |
---|
80 | */ |
---|
81 | |
---|
82 | /* |
---|
83 | * Device Driver Table Entries |
---|
84 | */ |
---|
85 | |
---|
86 | /* |
---|
87 | * NOTE: Use the standard Console driver entry |
---|
88 | */ |
---|
89 | |
---|
90 | /* |
---|
91 | * NOTE: Use the standard Clock driver entry |
---|
92 | */ |
---|
93 | |
---|
94 | /* |
---|
95 | * How many libio files we want |
---|
96 | */ |
---|
97 | |
---|
98 | #define BSP_LIBIO_MAX_FDS 20 |
---|
99 | |
---|
100 | /* functions */ |
---|
101 | |
---|
102 | void bsp_cleanup( void ); |
---|
103 | |
---|
104 | #if 0 |
---|
105 | void M8260ExecuteRISC( uint32_t command ); |
---|
106 | void *M8260AllocateBufferDescriptors( int count ); |
---|
107 | void *M8260AllocateRiscTimers( int count ); |
---|
108 | extern char M8260DefaultWatchdogFeeder; |
---|
109 | #endif |
---|
110 | |
---|
111 | rtems_isr_entry set_vector( /* returns old vector */ |
---|
112 | rtems_isr_entry handler, /* isr routine */ |
---|
113 | rtems_vector_number vector, /* vector number */ |
---|
114 | int type /* RTEMS or RAW intr */ |
---|
115 | ); |
---|
116 | |
---|
117 | #ifdef __cplusplus |
---|
118 | } |
---|
119 | #endif |
---|
120 | |
---|
121 | #endif |
---|
122 | /* end of include file */ |
---|