source: rtems/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h @ 674be421

4.104.114.84.95
Last change on this file since 674be421 was 674be421, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/17/06 at 10:11:37

Remove eof include file

  • Property mode set to 100644
File size: 5.6 KB
Line 
1/*===============================================================*\
2| Project: RTEMS generic MPC5200 BSP                              |
3+-----------------------------------------------------------------+
4| Partially based on the code references which are named below.   |
5| Adaptions, modifications, enhancements and any recent parts of  |
6| the code are:                                                   |
7|                    Copyright (c) 2005                           |
8|                    Embedded Brains GmbH                         |
9|                    Obere Lagerstr. 30                           |
10|                    D-82178 Puchheim                             |
11|                    Germany                                      |
12|                    rtems@embedded-brains.de                     |
13+-----------------------------------------------------------------+
14| The license and distribution terms for this file may be         |
15| found in the file LICENSE in this distribution or at            |
16|                                                                 |
17| http://www.rtems.com/license/LICENSE.                           |
18|                                                                 |
19+-----------------------------------------------------------------+
20| this file contains board specific definitions                   |
21\*===============================================================*/
22
23#ifndef __GEN5200_BSP_h
24#define __GEN5200_BSP_h
25
26/*
27 * distinguish board characteristics
28 */
29/*
30 * for PM520 mdule on a ZE30 carrier
31 */
32#if defined(PM520_ZE30)
33#define PM520
34#define GPIOPCR_INITMASK 0x337F3F77
35#define GPIOPCR_INITVAL  0x01552114
36/* we have PSC1/4/5/6 */
37/* #define GEN5200_UART_AVAIL_MASK 0x39 */
38#define GEN5200_UART_AVAIL_MASK 0x39
39#endif
40/*
41 * for PM520 mdule on a CR825 carrier
42 */
43#if defined(PM520_CR825)
44#define PM520
45#define GPIOPCR_INITMASK 0x330F0F77
46#define GPIOPCR_INITVAL  0x01050444
47/* we have PSC1/2/3*/
48#define GEN5200_UART_AVAIL_MASK 0x07
49#endif
50
51#if defined(BRS5L)
52/*
53 * IMD Custom Board BRS5L
54 */
55#define GPIOPCR_INITMASK 0xb30F0F77
56#define GPIOPCR_INITVAL  0x91050444
57/* we have PSC1/2/3 */
58#define GEN5200_UART_AVAIL_MASK 0x07
59/*
60 * address range definitions
61 */
62/* ROM definitions (2 MB) */
63#define ROM_START       0xFFE00000
64#define ROM_END         0xFFFFFFFF
65#define BOOT_START      ROM_START
66#define BOOT_END        ROM_END
67
68/* SDRAM definitions (256 MB) */
69#define RAM_START    0x00000000
70#define RAM_END      0x0FFFFFFF
71
72/* DPRAM definitions (64 KB) */
73#define DPRAM_START  0xFF000000
74#define DPRAM_END    0xFF0003FF
75
76/* internal memory map definitions (64 KB) */
77#define MBAR         0xF0000000
78
79/* we need the low level initialization in start.S*/
80#define NEED_LOW_LEVEL_INIT
81
82#define HAS_NVRAM_93CXX
83#elif defined (PM520)
84
85/*
86 * MicroSys PM520 internal memory map definitions
87 */
88#define MBAR         0xF0000000
89#define HAS_UBOOT
90
91#else
92#error "board type not defined"
93#endif
94
95#ifndef ASM
96
97#ifdef __cplusplus
98extern "C" {
99#endif
100
101#include "bspopts.h"
102
103#include <rtems.h>
104#include <rtems/console.h>
105#include <rtems/clockdrv.h>
106#include <i2cdrv.h>
107
108#if defined(HAS_UBOOT)
109#define CONFIG_MPC5xxx
110#include <u-boot.h>
111extern bd_t *uboot_bdinfo_ptr;
112extern bd_t uboot_bdinfo_copy;
113#endif
114
115/*
116 * Network driver configuration
117 */
118struct rtems_bsdnet_ifconfig;
119extern int rtems_mpc5200_fec_driver_attach_detach (struct rtems_bsdnet_ifconfig *config, int attaching);
120#define RTEMS_BSP_NETWORK_DRIVER_NAME   "eth1"
121#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_mpc5200_fec_driver_attach_detach
122
123/* miscellaneous stuff assumed to exist */
124
125extern rtems_configuration_table BSP_Configuration;
126/*
127 * We need to decide how much memory will be non-cacheable. This
128 * will mainly be memory that will be used in DMA (network and serial
129 * buffers).
130 */
131/*
132#define NOCACHE_MEM_SIZE 512*1024
133*/
134
135/*
136 *  Define the time limits for RTEMS Test Suite test durations.
137 *  Long test and short test duration limits are provided.  These
138 *  values are in seconds and need to be converted to ticks for the
139 *  application.
140 *
141 */
142
143#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
144#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
145
146/*
147 *  Stuff for Time Test 27
148 */
149#define MUST_WAIT_FOR_INTERRUPT 0
150
151/*
152 *  Device Driver Table Entries
153 */
154
155/*
156 * NOTE: Use the standard Console driver entry
157 */
158
159/*
160 * NOTE: Use the standard Clock driver entry
161 */
162
163#ifdef HAS_NVRAM_93CXX
164#define NVRAM_DRIVER_TABLE_ENTRY \
165  { nvram_driver_initialize, nvram_driver_open, nvram_driver_close, \
166    nvram_driver_read, nvram_driver_write, NULL }
167#endif
168
169#define RTC_DRIVER_TABLE_ENTRY \
170    { rtc_initialize, NULL, NULL, NULL, NULL, NULL }
171extern rtems_device_driver rtc_initialize(
172    rtems_device_major_number major,
173    rtems_device_minor_number minor,
174    void *arg
175);
176
177/*
178 * indicate, that BSP has IDE driver
179 */
180#define RTEMS_BSP_HAS_IDE_DRIVER
181
182/*
183 * How many libio files we want
184 */
185#define BSP_LIBIO_MAX_FDS       20
186
187/* functions */
188
189void bsp_cleanup(void);
190
191/* console modes (only termios) */
192#ifdef  PRINTK_MINOR
193#undef  PRINTK_MINOR
194#endif
195#define PRINTK_MINOR PSC1_MINOR
196
197#define SINGLE_CHAR_MODE
198#define UARTS_USE_TERMIOS_INT   1
199
200/* ata modes */
201#undef ATA_USE_INT
202
203/* clock settings */
204#if defined(HAS_UBOOT)
205#define IPB_CLOCK (uboot_bdinfo_ptr->bi_ipbfreq)
206#define XLB_CLOCK (uboot_bdinfo_ptr->bi_busfreq)
207#define G2_CLOCK  (uboot_bdinfo_ptr->bi_intfreq)
208#else
209#define IPB_CLOCK 33000000   /* 33 MHz */
210#define XLB_CLOCK 66000000   /* 66 MHz */
211#define G2_CLOCK  231000000  /* 231 MHz */
212#endif
213
214/* slicetimer settings */
215#define USE_SLICETIMER_0     TRUE
216#define USE_SLICETIMER_1     FALSE
217
218#ifdef __cplusplus
219}
220#endif
221
222#endif /* ASM */
223
224#endif /* GEN5200 */
Note: See TracBrowser for help on using the repository browser.