source: rtems/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h @ 4909a30

4.104.115
Last change on this file since 4909a30 was 4909a30, checked in by Joel Sherrill <joel.sherrill@…>, on 09/10/08 at 21:35:37

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

  • include/bsp.h: Review of all bsp_cleanup() implementations. In this phase, all prototypes were removed from bsp.h and empty implementations were removed and made to use the shared stub.
  • Property mode set to 100644
File size: 5.3 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/*
134 * How many libio files we want
135 */
136#define BSP_LIBIO_MAX_FDS       20
137
138/* misc macros */
139#define BSP_ARRAY_CNT(arr) (sizeof(arr)/sizeof(arr[0]))
140
141/* functions */
142
143rtems_status_code bsp_register_i2c(void);
144rtems_status_code bsp_register_spi(void);
145
146/* console modes (only termios) */
147#ifdef  PRINTK_MINOR
148#undef  PRINTK_MINOR
149#endif
150#define PRINTK_MINOR BSP_UART1_MINOR
151
152#if defined(MPC8249EAMDS)
153#define BSP_USE_UART2 TRUE
154#else
155#define BSP_USE_UART2 FALSE
156#endif
157
158#define SINGLE_CHAR_MODE
159#define UARTS_USE_TERMIOS_INT   1
160
161/*
162 * Network driver configuration
163 */
164struct rtems_bsdnet_ifconfig;
165extern int BSP_tsec_attach(struct rtems_bsdnet_ifconfig *config,int attaching);
166#define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_tsec_attach
167
168#ifdef MPC8313ERDB
169
170#define RTEMS_BSP_NETWORK_DRIVER_NAME   "tsec2"
171#define RTEMS_BSP_NETWORK_DRIVER_NAME2  "tsec1"
172
173#else /* MPC8313ERDB */
174
175#define RTEMS_BSP_NETWORK_DRIVER_NAME   "tsec1"
176#define RTEMS_BSP_NETWORK_DRIVER_NAME2  "tsec2"
177
178#endif /* MPC8313ERDB */
179
180#if defined(MPC8349EAMDS)
181/*
182 * i2c EEPROM device name
183 */
184#define RTEMS_BSP_I2C_EEPROM_DEVICE_NAME "eeprom"
185#define RTEMS_BSP_I2C_EEPROM_DEVICE_PATH "/dev/i2c1.eeprom"
186
187/*
188 * SPI Flash device name
189 */
190#define RTEMS_BSP_SPI_FLASH_DEVICE_NAME "flash"
191#define RTEMS_BSP_SPI_FLASH_DEVICE_PATH "/dev/spi.flash"
192#endif /* defined(MPC8349EAMDS) */
193
194#if defined(HSC_CM01)
195/*
196 * i2c EEPROM device name
197 */
198#define RTEMS_BSP_I2C_EEPROM_DEVICE_NAME "eeprom"
199#define RTEMS_BSP_I2C_EEPROM_DEVICE_PATH "/dev/i2c1.eeprom"
200
201/*
202 * SPI FRAM device name
203 */
204#define RTEMS_BSP_SPI_FRAM_DEVICE_NAME "fram"
205#define RTEMS_BSP_SPI_FRAM_DEVICE_PATH "/dev/spi.fram"
206#endif /* defined(HSC_CM01) */
207
208extern unsigned int BSP_bus_frequency;
209
210extern uint32_t bsp_clicks_per_usec;
211
212/*
213 *  Convert decrementer value to tenths of microseconds (used by shared timer
214 *  driver).
215 */
216#define BSP_Convert_decrementer( _value ) \
217  ((int) (((_value) * 10) / bsp_clicks_per_usec))
218
219void mpc83xx_zero_4( void *dest, size_t n);
220
221void cpu_init( void);
222
223#ifdef __cplusplus
224}
225#endif
226
227#endif /* ASM */
228
229#endif /* GEN83xx */
Note: See TracBrowser for help on using the repository browser.