1 | /*===============================================================*\ |
---|
2 | | Project: RTEMS TQM8xx BSP | |
---|
3 | +-----------------------------------------------------------------+ |
---|
4 | | This file has been adapted to MPC8xx by | |
---|
5 | | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | |
---|
6 | | Copyright (c) 2008 | |
---|
7 | | Embedded Brains GmbH | |
---|
8 | | Obere Lagerstr. 30 | |
---|
9 | | D-82178 Puchheim | |
---|
10 | | Germany | |
---|
11 | | rtems@embedded-brains.de | |
---|
12 | | | |
---|
13 | | See the other copyright notice below for the original parts. | |
---|
14 | +-----------------------------------------------------------------+ |
---|
15 | | The license and distribution terms for this file may be | |
---|
16 | | found in the file LICENSE in this distribution or at | |
---|
17 | | | |
---|
18 | | http://www.rtems.com/license/LICENSE. | |
---|
19 | | | |
---|
20 | +-----------------------------------------------------------------+ |
---|
21 | | this file contains the console driver | |
---|
22 | \*===============================================================*/ |
---|
23 | /* derived from MBX8xx BSP: */ |
---|
24 | /* bsp.h |
---|
25 | * |
---|
26 | * This include file contains all board IO definitions. |
---|
27 | * |
---|
28 | * This file includes definitions for the MBX860 and MBX821. |
---|
29 | * |
---|
30 | * COPYRIGHT (c) 1989-2008. |
---|
31 | * On-Line Applications Research Corporation (OAR). |
---|
32 | * |
---|
33 | * The license and distribution terms for this file may be |
---|
34 | * found in the file LICENSE in this distribution or at |
---|
35 | * http://www.rtems.com/license/LICENSE. |
---|
36 | */ |
---|
37 | |
---|
38 | #ifndef _BSP_H |
---|
39 | #define _BSP_H |
---|
40 | |
---|
41 | /* |
---|
42 | * indicate, that BSP is booted via TQMMon |
---|
43 | */ |
---|
44 | #define BSP_HAS_TQMMON |
---|
45 | |
---|
46 | #include <libcpu/powerpc-utility.h> |
---|
47 | |
---|
48 | LINKER_SYMBOL(TopRamReserved); |
---|
49 | |
---|
50 | LINKER_SYMBOL( bsp_ram_start); |
---|
51 | LINKER_SYMBOL( bsp_ram_end); |
---|
52 | LINKER_SYMBOL( bsp_ram_size); |
---|
53 | |
---|
54 | LINKER_SYMBOL( bsp_rom_start); |
---|
55 | LINKER_SYMBOL( bsp_rom_end); |
---|
56 | LINKER_SYMBOL( bsp_rom_size); |
---|
57 | |
---|
58 | LINKER_SYMBOL( bsp_section_text_start); |
---|
59 | LINKER_SYMBOL( bsp_section_text_end); |
---|
60 | LINKER_SYMBOL( bsp_section_text_size); |
---|
61 | |
---|
62 | LINKER_SYMBOL( bsp_section_data_start); |
---|
63 | LINKER_SYMBOL( bsp_section_data_end); |
---|
64 | LINKER_SYMBOL( bsp_section_data_size); |
---|
65 | |
---|
66 | LINKER_SYMBOL( bsp_section_bss_start); |
---|
67 | LINKER_SYMBOL( bsp_section_bss_end); |
---|
68 | LINKER_SYMBOL( bsp_section_bss_size); |
---|
69 | |
---|
70 | LINKER_SYMBOL( bsp_interrupt_stack_start); |
---|
71 | LINKER_SYMBOL( bsp_interrupt_stack_end); |
---|
72 | LINKER_SYMBOL( bsp_interrupt_stack_size); |
---|
73 | |
---|
74 | LINKER_SYMBOL( bsp_work_area_start); |
---|
75 | |
---|
76 | #ifndef ASM |
---|
77 | |
---|
78 | #include <bspopts.h> |
---|
79 | |
---|
80 | #include <rtems.h> |
---|
81 | #include <rtems/console.h> |
---|
82 | #include <rtems/clockdrv.h> |
---|
83 | #include <mpc8xx.h> |
---|
84 | #include <mpc8xx/cpm.h> |
---|
85 | #include <mpc8xx/mmu.h> |
---|
86 | #include <mpc8xx/console.h> |
---|
87 | #include <bsp/vectors.h> |
---|
88 | #include <bsp/tqm.h> |
---|
89 | #include <libcpu/powerpc-utility.h> |
---|
90 | #include <bsp/default-initial-extension.h> |
---|
91 | |
---|
92 | #ifdef __cplusplus |
---|
93 | extern "C" { |
---|
94 | #endif |
---|
95 | |
---|
96 | /* |
---|
97 | * Network driver configuration |
---|
98 | */ |
---|
99 | struct rtems_bsdnet_ifconfig; |
---|
100 | |
---|
101 | #if BSP_USE_NETWORK_FEC |
---|
102 | extern int rtems_fec_enet_driver_attach (struct rtems_bsdnet_ifconfig *config, |
---|
103 | int attaching); |
---|
104 | #define RTEMS_BSP_FEC_NETWORK_DRIVER_NAME "fec1" |
---|
105 | #define RTEMS_BSP_FEC_NETWORK_DRIVER_ATTACH rtems_fec_enet_driver_attach |
---|
106 | #endif |
---|
107 | |
---|
108 | #if BSP_USE_NETWORK_SCC |
---|
109 | extern int rtems_scc_enet_driver_attach (struct rtems_bsdnet_ifconfig *config, |
---|
110 | int attaching); |
---|
111 | #define RTEMS_BSP_SCC_NETWORK_DRIVER_NAME "scc1" |
---|
112 | #define RTEMS_BSP_SCC_NETWORK_DRIVER_ATTACH rtems_scc_enet_driver_attach |
---|
113 | #endif |
---|
114 | |
---|
115 | #if BSP_USE_NETWORK_FEC |
---|
116 | #define RTEMS_BSP_NETWORK_DRIVER_NAME RTEMS_BSP_FEC_NETWORK_DRIVER_NAME |
---|
117 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_FEC_NETWORK_DRIVER_ATTACH |
---|
118 | #elif BSP_USE_NETWORK_SCC |
---|
119 | #define RTEMS_BSP_NETWORK_DRIVER_NAME RTEMS_BSP_SCC_NETWORK_DRIVER_NAME |
---|
120 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_SCC_NETWORK_DRIVER_ATTACH |
---|
121 | #endif |
---|
122 | /* |
---|
123 | * We need to decide how much memory will be non-cacheable. This |
---|
124 | * will mainly be memory that will be used in DMA (network and serial |
---|
125 | * buffers). |
---|
126 | */ |
---|
127 | #define NOCACHE_MEM_SIZE 512*1024 |
---|
128 | |
---|
129 | /* |
---|
130 | * indicate, that BSP has IDE driver |
---|
131 | */ |
---|
132 | #undef RTEMS_BSP_HAS_IDE_DRIVER |
---|
133 | |
---|
134 | /* |
---|
135 | * SPI driver configuration |
---|
136 | */ |
---|
137 | |
---|
138 | /* select values for SPI addressing */ |
---|
139 | #define PGHPLUS_SPI_ADDR_EEPROM 0 |
---|
140 | #define PGHPLUS_SPI_ADDR_DISP4 1 |
---|
141 | /* NOTE: DISP4 occupies two consecutive addresses for data and control port */ |
---|
142 | #define PGHPLUS_SPI_ADDR_DISP4_DATA (PGHPLUS_SPI_ADDR_DISP4) |
---|
143 | #define PGHPLUS_SPI_ADDR_DISP4_CTRL (PGHPLUS_SPI_ADDR_DISP4_DATA+1) |
---|
144 | |
---|
145 | /* bit masks for Port B lines */ |
---|
146 | #define PGHPLUS_PB_SPI_EEP_CE_MSK (1<< 0) |
---|
147 | #define PGHPLUS_PB_SPI_DISP4_RS_MSK (1<<15) |
---|
148 | #define PGHPLUS_PB_SPI_DISP4_CE_MSK (1<<14) |
---|
149 | /* |
---|
150 | * our (internal) bus frequency |
---|
151 | */ |
---|
152 | extern uint32_t BSP_bus_frequency; |
---|
153 | |
---|
154 | #ifdef __cplusplus |
---|
155 | } |
---|
156 | #endif |
---|
157 | #endif |
---|
158 | #endif |
---|