source: rtems/c/src/lib/libbsp/powerpc/tqm8xx/include/bsp.h @ a052181

4.115
Last change on this file since a052181 was a052181, checked in by Sebastian Huber <sebastian.huber@…>, on 11/14/12 at 08:59:10

score: Add RTEMS_FATAL_SOURCE_EXIT

Include <bsp/default-initial-extension.h> in all BSPs. Call
rtems_fatal() with RTEMS_FATAL_SOURCE_EXIT as source and the exit()
status code as fatal code in every bsp_cleanup(). Move previous
bsp_cleanup() code into bsp_fatal_extension().

  • Property mode set to 100644
File size: 4.9 KB
Line 
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
48LINKER_SYMBOL(TopRamReserved);
49
50LINKER_SYMBOL( bsp_ram_start);
51LINKER_SYMBOL( bsp_ram_end);
52LINKER_SYMBOL( bsp_ram_size);
53
54LINKER_SYMBOL( bsp_rom_start);
55LINKER_SYMBOL( bsp_rom_end);
56LINKER_SYMBOL( bsp_rom_size);
57
58LINKER_SYMBOL( bsp_section_text_start);
59LINKER_SYMBOL( bsp_section_text_end);
60LINKER_SYMBOL( bsp_section_text_size);
61
62LINKER_SYMBOL( bsp_section_data_start);
63LINKER_SYMBOL( bsp_section_data_end);
64LINKER_SYMBOL( bsp_section_data_size);
65
66LINKER_SYMBOL( bsp_section_bss_start);
67LINKER_SYMBOL( bsp_section_bss_end);
68LINKER_SYMBOL( bsp_section_bss_size);
69
70LINKER_SYMBOL( bsp_interrupt_stack_start);
71LINKER_SYMBOL( bsp_interrupt_stack_end);
72LINKER_SYMBOL( bsp_interrupt_stack_size);
73
74LINKER_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
93extern "C" {
94#endif
95
96/*
97 * Network driver configuration
98 */
99struct rtems_bsdnet_ifconfig;
100
101#if BSP_USE_NETWORK_FEC
102extern 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
109extern 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 */
152extern uint32_t BSP_bus_frequency;
153
154#ifdef __cplusplus
155}
156#endif
157#endif
158#endif
Note: See TracBrowser for help on using the repository browser.