RTEMS 7.0-rc1
Loading...
Searching...
No Matches
bsp.h
Go to the documentation of this file.
1
9/*
10 * Copyright (C) 1989, 2008 On-Line Applications Research Corporation (OAR)
11 * Copyright (c) 2008 Thomas Doerfler, embedded brains GmbH & Co. KG
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 */
34
35/*
36 * RTEMS TQM8xx BSP
37 */
38
39#ifndef LIBBSP_POWERPC_TQM8XX_BSP_H
40#define LIBBSP_POWERPC_TQM8XX_BSP_H
41
52/*
53 * indicate, that BSP is booted via TQMMon
54 */
55#define BSP_HAS_TQMMON
56
58
59LINKER_SYMBOL(TopRamReserved)
60
61LINKER_SYMBOL( bsp_ram_start)
62LINKER_SYMBOL( bsp_ram_end)
63LINKER_SYMBOL( bsp_ram_size)
64
65LINKER_SYMBOL( bsp_rom_start)
66LINKER_SYMBOL( bsp_rom_end)
67LINKER_SYMBOL( bsp_rom_size)
68
69LINKER_SYMBOL( bsp_section_text_start)
70LINKER_SYMBOL( bsp_section_text_end)
71LINKER_SYMBOL( bsp_section_text_size)
72
73LINKER_SYMBOL( bsp_section_data_start)
74LINKER_SYMBOL( bsp_section_data_end)
75LINKER_SYMBOL( bsp_section_data_size)
76
77LINKER_SYMBOL( bsp_section_bss_start)
78LINKER_SYMBOL( bsp_section_bss_end)
79LINKER_SYMBOL( bsp_section_bss_size)
80
81LINKER_SYMBOL( bsp_work_area_start)
82
83#ifndef ASM
84
85#include <bspopts.h>
86
87#include <rtems.h>
88#include <rtems/irq.h>
89#include <mpc8xx.h>
90#include <mpc8xx/cpm.h>
91#include <mpc8xx/mmu.h>
92#include <mpc8xx/console.h>
93#include <bsp/vectors.h>
94#include <bsp/tqm.h>
97
98#ifdef __cplusplus
99extern "C" {
100#endif
101
102/*
103 * Network driver configuration
104 */
105struct rtems_bsdnet_ifconfig;
106
107#if BSP_USE_NETWORK_FEC
108extern int rtems_fec_enet_driver_attach (struct rtems_bsdnet_ifconfig *config,
109 int attaching);
110#define RTEMS_BSP_FEC_NETWORK_DRIVER_NAME "fec1"
111#define RTEMS_BSP_FEC_NETWORK_DRIVER_ATTACH rtems_fec_enet_driver_attach
112#endif
113
114#if BSP_USE_NETWORK_SCC
115extern int rtems_scc_enet_driver_attach (struct rtems_bsdnet_ifconfig *config,
116 int attaching);
117#define RTEMS_BSP_SCC_NETWORK_DRIVER_NAME "scc1"
118#define RTEMS_BSP_SCC_NETWORK_DRIVER_ATTACH rtems_scc_enet_driver_attach
119#endif
120
121#if BSP_USE_NETWORK_FEC
122#define RTEMS_BSP_NETWORK_DRIVER_NAME RTEMS_BSP_FEC_NETWORK_DRIVER_NAME
123#define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_FEC_NETWORK_DRIVER_ATTACH
124#elif BSP_USE_NETWORK_SCC
125#define RTEMS_BSP_NETWORK_DRIVER_NAME RTEMS_BSP_SCC_NETWORK_DRIVER_NAME
126#define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_SCC_NETWORK_DRIVER_ATTACH
127#endif
128/*
129 * We need to decide how much memory will be non-cacheable. This
130 * will mainly be memory that will be used in DMA (network and serial
131 * buffers).
132 */
133#define NOCACHE_MEM_SIZE 512*1024
134
135/*
136 * indicate, that BSP has IDE driver
137 */
138#undef RTEMS_BSP_HAS_IDE_DRIVER
139
140/*
141 * SPI driver configuration
142 */
143
144 /* select values for SPI addressing */
145#define PGHPLUS_SPI_ADDR_EEPROM 0
146#define PGHPLUS_SPI_ADDR_DISP4 1
147 /* NOTE: DISP4 occupies two consecutive addresses for data and control port */
148#define PGHPLUS_SPI_ADDR_DISP4_DATA (PGHPLUS_SPI_ADDR_DISP4)
149#define PGHPLUS_SPI_ADDR_DISP4_CTRL (PGHPLUS_SPI_ADDR_DISP4_DATA+1)
150
151 /* bit masks for Port B lines */
152#define PGHPLUS_PB_SPI_EEP_CE_MSK (1<< 0)
153#define PGHPLUS_PB_SPI_DISP4_RS_MSK (1<<15)
154#define PGHPLUS_PB_SPI_DISP4_CE_MSK (1<<14)
155
156/*
157 * our (internal) bus frequency
158 */
159extern uint32_t BSP_bus_frequency;
160
161/*
162 * Interfaces to required Clock Driver support methods
163 */
164int BSP_disconnect_clock_handler(void);
165int BSP_connect_clock_handler (rtems_irq_hdl);
166
167extern uint32_t bsp_clock_speed;
168
169char serial_getc(void);
170
171int serial_tstc(void);
172
173void serial_init(void);
174
175int mbx8xx_console_get_configuration(void);
176
177void _InitTQM8xx (void);
178
179rtems_status_code bsp_register_spi(void);
180
181void *bsp_idle_thread( uintptr_t ignored );
182
183void cpu_init(void);
184
185#ifdef __cplusplus
186}
187#endif
188
189#endif
190
193#endif
PowerPC Exceptions API.
Interrupt Handler Support.
This header file provides the default definition of BSP_INITIAL_EXTENSION.
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
void * bsp_idle_thread(uintptr_t ignored)
Optimized idle task.
Definition: bspidle.c:39
unsigned int bsp_clock_speed
System clock frequency.
Definition: bspstart.c:61
General purpose assembler macros, linker command file support and some inline functions for direct re...
This header file defines the RTEMS Classic API.