source: rtems/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h @ 283e6f0

4.104.11
Last change on this file since 283e6f0 was 283e6f0, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 18, 2008 at 3:09:21 PM

2008-09-18 Joel Sherrill <joel.sherrill@…>

  • include/bsp.h: Eliminate definitions of BSP_LIBIO_MAX_FDS since this is NOT used anywhere.
  • Property mode set to 100644
File size: 5.2 KB
Line 
1/*===============================================================*\
2| Project: RTEMS generic MPC83xx BSP                              |
3+-----------------------------------------------------------------+
4|                    Copyright (c) 2007                           |
5|                    Embedded Brains GmbH                         |
6|                    Obere Lagerstr. 30                           |
7|                    D-82178 Puchheim                             |
8|                    Germany                                      |
9|                    rtems@embedded-brains.de                     |
10+-----------------------------------------------------------------+
11| The license and distribution terms for this file may be         |
12| found in the file LICENSE in this distribution or at            |
13|                                                                 |
14| http://www.rtems.com/license/LICENSE.                           |
15|                                                                 |
16+-----------------------------------------------------------------+
17| this file contains board specific definitions                   |
18\*===============================================================*/
19
20#ifndef __GEN83xx_BSP_h
21#define __GEN83xx_BSP_h
22
23/*
24 * MPC8313E Reference Design Board
25 */
26
27#ifdef MPC8313ERDB
28
29#define HAS_UBOOT
30
31/* For U-Boot */
32#define CONFIG_MPC83XX
33#define CONFIG_HAS_ETH1
34
35/* We want to prompt for a reset and then reset the board */
36#define BSP_PRESS_KEY_FOR_RESET 1
37#define BSP_RESET_BOARD_AT_EXIT 1
38
39#endif /* MPC8313ERDB */
40
41#include <libcpu/powerpc-utility.h> 
42
43#include <bsp/hwreg_vals.h>
44
45/*
46 * Some symbols defined in the linker command file.
47 */
48
49LINKER_SYMBOL(bsp_ram_start);
50LINKER_SYMBOL(bsp_ram_end);
51LINKER_SYMBOL(bsp_ram_size);
52
53LINKER_SYMBOL(bsp_rom_start);
54LINKER_SYMBOL(bsp_rom_end);
55LINKER_SYMBOL(bsp_rom_size);
56
57LINKER_SYMBOL(bsp_section_text_start);
58LINKER_SYMBOL(bsp_section_text_end);
59LINKER_SYMBOL(bsp_section_text_size);
60
61LINKER_SYMBOL(bsp_section_data_start);
62LINKER_SYMBOL(bsp_section_data_end);
63LINKER_SYMBOL(bsp_section_data_size);
64
65LINKER_SYMBOL(bsp_section_bss_start);
66LINKER_SYMBOL(bsp_section_bss_end);
67LINKER_SYMBOL(bsp_section_bss_size);
68
69LINKER_SYMBOL(bsp_interrupt_stack_start);
70LINKER_SYMBOL(bsp_interrupt_stack_end);
71LINKER_SYMBOL(bsp_interrupt_stack_size);
72
73LINKER_SYMBOL(bsp_work_area_start);
74
75LINKER_SYMBOL(IMMRBAR);
76
77#ifndef ASM
78
79#ifdef __cplusplus
80extern "C" {
81#endif
82
83#include "bspopts.h"
84
85#include <rtems.h>
86#include <rtems/console.h>
87#include <rtems/clockdrv.h>
88#include <bsp/irq.h>
89#include <bsp/vectors.h>
90#include <bsp/tictac.h>
91
92#ifdef HAS_UBOOT
93
94#include <bsp/u-boot.h>
95
96extern bd_t mpc83xx_uboot_board_info;
97
98extern const size_t mpc83xx_uboot_board_info_size;
99
100#endif /* HAS_UBOOT */
101
102/* miscellaneous stuff assumed to exist */
103
104/*
105 * We need to decide how much memory will be non-cacheable. This
106 * will mainly be memory that will be used in DMA (network and serial
107 * buffers).
108 */
109/*
110 *  Stuff for Time Test 27
111 */
112#define MUST_WAIT_FOR_INTERRUPT 0
113
114/*
115 *  Device Driver Table Entries
116 */
117
118/*
119 * NOTE: Use the standard Console driver entry
120 */
121#define BSP_UART1_MINOR 0
122#define BSP_UART2_MINOR 1
123
124/*
125 * NOTE: Use the standard Clock driver entry
126 */
127
128/*
129 * indicate, that BSP has no IDE driver
130 */
131#undef RTEMS_BSP_HAS_IDE_DRIVER
132
133/* misc macros */
134#define BSP_ARRAY_CNT(arr) (sizeof(arr)/sizeof(arr[0]))
135
136/* functions */
137
138rtems_status_code bsp_register_i2c(void);
139rtems_status_code bsp_register_spi(void);
140
141/* console modes (only termios) */
142#ifdef  PRINTK_MINOR
143#undef  PRINTK_MINOR
144#endif
145#define PRINTK_MINOR BSP_UART1_MINOR
146
147#if defined(MPC8249EAMDS)
148#define BSP_USE_UART2 TRUE
149#else
150#define BSP_USE_UART2 FALSE
151#endif
152
153#define SINGLE_CHAR_MODE
154#define UARTS_USE_TERMIOS_INT   1
155
156/*
157 * Network driver configuration
158 */
159struct rtems_bsdnet_ifconfig;
160extern int BSP_tsec_attach(struct rtems_bsdnet_ifconfig *config,int attaching);
161#define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_tsec_attach
162
163#ifdef MPC8313ERDB
164
165#define RTEMS_BSP_NETWORK_DRIVER_NAME   "tsec2"
166#define RTEMS_BSP_NETWORK_DRIVER_NAME2  "tsec1"
167
168#else /* MPC8313ERDB */
169
170#define RTEMS_BSP_NETWORK_DRIVER_NAME   "tsec1"
171#define RTEMS_BSP_NETWORK_DRIVER_NAME2  "tsec2"
172
173#endif /* MPC8313ERDB */
174
175#if defined(MPC8349EAMDS)
176/*
177 * i2c EEPROM device name
178 */
179#define RTEMS_BSP_I2C_EEPROM_DEVICE_NAME "eeprom"
180#define RTEMS_BSP_I2C_EEPROM_DEVICE_PATH "/dev/i2c1.eeprom"
181
182/*
183 * SPI Flash device name
184 */
185#define RTEMS_BSP_SPI_FLASH_DEVICE_NAME "flash"
186#define RTEMS_BSP_SPI_FLASH_DEVICE_PATH "/dev/spi.flash"
187#endif /* defined(MPC8349EAMDS) */
188
189#if defined(HSC_CM01)
190/*
191 * i2c EEPROM device name
192 */
193#define RTEMS_BSP_I2C_EEPROM_DEVICE_NAME "eeprom"
194#define RTEMS_BSP_I2C_EEPROM_DEVICE_PATH "/dev/i2c1.eeprom"
195
196/*
197 * SPI FRAM device name
198 */
199#define RTEMS_BSP_SPI_FRAM_DEVICE_NAME "fram"
200#define RTEMS_BSP_SPI_FRAM_DEVICE_PATH "/dev/spi.fram"
201#endif /* defined(HSC_CM01) */
202
203extern unsigned int BSP_bus_frequency;
204
205extern uint32_t bsp_clicks_per_usec;
206
207/*
208 *  Convert decrementer value to tenths of microseconds (used by shared timer
209 *  driver).
210 */
211#define BSP_Convert_decrementer( _value ) \
212  ((int) (((_value) * 10) / bsp_clicks_per_usec))
213
214void mpc83xx_zero_4( void *dest, size_t n);
215
216void cpu_init( void);
217
218#ifdef __cplusplus
219}
220#endif
221
222#endif /* ASM */
223
224#endif /* GEN83xx */
Note: See TracBrowser for help on using the repository browser.