source: rtems/c/src/lib/libbsp/m68k/genmcf548x/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: 5.5 KB
Line 
1/*===============================================================*\
2| Project: RTEMS generic mcf548x BSP                              |
3+-----------------------------------------------------------------+
4| File: bsp.h                                                     |
5+-----------------------------------------------------------------+
6| The file contains the BSP header of generic MCF548x BSP.        |
7+-----------------------------------------------------------------+
8|                    Copyright (c) 2007                           |
9|                    Embedded Brains GmbH                         |
10|                    Obere Lagerstr. 30                           |
11|                    D-82178 Puchheim                             |
12|                    Germany                                      |
13|                    rtems@embedded-brains.de                     |
14+-----------------------------------------------------------------+
15|                                                                 |
16| Parts of the code has been derived from the "dBUG source code"  |
17| package Freescale is providing for M548X EVBs. The usage of     |
18| the modified or unmodified code and it's integration into the   |
19| generic mcf548x BSP has been done according to the Freescale    |
20| license terms.                                                  |
21|                                                                 |
22| The Freescale license terms can be reviewed in the file         |
23|                                                                 |
24|    Freescale_license.txt                                        |
25|                                                                 |
26+-----------------------------------------------------------------+
27|                                                                 |
28| The generic mcf548x BSP has been developed on the basic         |
29| structures and modules of the av5282 BSP.                       |
30|                                                                 |
31+-----------------------------------------------------------------+
32|                                                                 |
33| The license and distribution terms for this file may be         |
34| found in the file LICENSE in this distribution or at            |
35|                                                                 |
36| http://www.rtems.com/license/LICENSE.                           |
37|                                                                 |
38+-----------------------------------------------------------------+
39|                                                                 |
40|   date                      history                        ID   |
41| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
42| 12.11.07                    1.0                            ras  |
43|                                                                 |
44\*===============================================================*/
45
46#ifndef __GENMCF548X_BSP_H
47#define __GENMCF548X_BSP_H
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52#include <bspopts.h>
53#include <bsp/default-initial-extension.h>
54
55#include <rtems.h>
56#include <rtems/iosupp.h>
57#include <rtems/console.h>
58#include <rtems/clockdrv.h>
59#include <rtems/iosupp.h>
60#include <rtems/bspIo.h>
61
62/***************************************************************************/
63/**  Hardware data structure headers                                      **/
64#include <mcf548x/mcf548x.h>
65
66/***************************************************************************/
67/**  Network driver configuration                                         **/
68struct rtems_bsdnet_ifconfig;
69extern int rtems_fec_driver_attach (struct rtems_bsdnet_ifconfig *config, int attaching );
70#define RTEMS_BSP_NETWORK_DRIVER_NAME     "fs1"
71#define RTEMS_BSP_NETWORK_DRIVER_ATTACH   rtems_fec_driver_attach
72
73/***************************************************************************/
74/**  User Definable configuration                                         **/
75
76/* define which port the console should use - all other ports are then defined as general purpose */
77#define CONSOLE_PORT        0
78
79#define RAM_END 0x4000000 /* 64 MB */
80
81/* functions */
82
83uint32_t get_CPU_clock_speed(void);
84
85rtems_isr_entry set_vector(
86  rtems_isr_entry     handler,
87  rtems_vector_number vector,
88  int                 type
89);
90
91/*
92 * Interrupt assignments
93 *  Highest-priority listed first
94 */
95#define SLT0_IRQ_LEVEL      4
96#define SLT0_IRQ_PRIORITY   0
97
98#define PSC0_IRQ_LEVEL      3
99#define PSC0_IRQ_PRIORITY   7
100#define PSC1_IRQ_LEVEL      3
101#define PSC1_IRQ_PRIORITY   6
102#define PSC2_IRQ_LEVEL      3
103#define PSC2_IRQ_PRIORITY   5
104#define PSC3_IRQ_LEVEL      3
105#define PSC3_IRQ_PRIORITY   4
106
107#define FEC_IRQ_LEVEL       2
108#define FEC_IRQ_PRIORITY    3
109
110/*
111 * Network driver configuration
112 */
113struct rtems_bsdnet_ifconfig;
114extern int rtems_mcf548x_fec_driver_attach_detach(struct rtems_bsdnet_ifconfig *config,int attaching);
115#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_mcf548x_fec_driver_attach_detach
116
117#define RTEMS_BSP_NETWORK_DRIVER_NAME   "fec1"
118#define RTEMS_BSP_NETWORK_DRIVER_NAME2  "fec2"
119
120#ifdef HAS_DBUG
121  typedef struct {
122    uint32_t console_baudrate;
123    uint8_t  server_ip [4];
124    uint8_t  client_ip [4];
125    uint8_t  gateway_ip[4];
126    uint8_t  netmask   [4];
127    uint8_t  spare[4];
128    uint8_t  macaddr   [6];
129    uint32_t ethport;   /* default fec port: 1 = fec1, 2 = fec2 */
130    uint32_t uartport;  /* default fec port: 1 = psc0, 2 = psc1... */   
131  } dbug_settings_t;
132 
133#define DBUG_SETTINGS (*(const dbug_settings_t *)0xFC020000)
134#endif /* HAS_DBUG */
135#ifdef __cplusplus
136}
137#endif
138
139#endif
Note: See TracBrowser for help on using the repository browser.