RTEMS 6.1-rc7
Loading...
Searching...
No Matches
bsp.h
Go to the documentation of this file.
1
9/*
10 * RTEMS TQM8xx BSP
11 * This include file contains all board IO definitions.
12 */
13
14/*
15 * COPYRIGHT (c) 1989-2008.
16 * On-Line Applications Research Corporation (OAR).
17 *
18 * Copyright (c) 2008 Thomas Doerfler, embedded brains GmbH & Co. KG
19 * All rights reserved.
20 *
21 * The license and distribution terms for this file may be
22 * found in the file LICENSE in this distribution or at
23 * http://www.rtems.org/license/LICENSE.
24 */
25
26#ifndef LIBBSP_POWERPC_TQM8XX_BSP_H
27#define LIBBSP_POWERPC_TQM8XX_BSP_H
28
39/*
40 * indicate, that BSP is booted via TQMMon
41 */
42#define BSP_HAS_TQMMON
43
45
46LINKER_SYMBOL(TopRamReserved);
47
48LINKER_SYMBOL( bsp_ram_start);
49LINKER_SYMBOL( bsp_ram_end);
50LINKER_SYMBOL( bsp_ram_size);
51
52LINKER_SYMBOL( bsp_rom_start);
53LINKER_SYMBOL( bsp_rom_end);
54LINKER_SYMBOL( bsp_rom_size);
55
56LINKER_SYMBOL( bsp_section_text_start);
57LINKER_SYMBOL( bsp_section_text_end);
58LINKER_SYMBOL( bsp_section_text_size);
59
60LINKER_SYMBOL( bsp_section_data_start);
61LINKER_SYMBOL( bsp_section_data_end);
62LINKER_SYMBOL( bsp_section_data_size);
63
64LINKER_SYMBOL( bsp_section_bss_start);
65LINKER_SYMBOL( bsp_section_bss_end);
66LINKER_SYMBOL( bsp_section_bss_size);
67
68LINKER_SYMBOL( bsp_work_area_start);
69
70#ifndef ASM
71
72#include <bspopts.h>
73
74#include <rtems.h>
75#include <rtems/irq.h>
76#include <mpc8xx.h>
77#include <mpc8xx/cpm.h>
78#include <mpc8xx/mmu.h>
79#include <mpc8xx/console.h>
80#include <bsp/vectors.h>
81#include <bsp/tqm.h>
84
85#ifdef __cplusplus
86extern "C" {
87#endif
88
89/*
90 * Network driver configuration
91 */
92struct rtems_bsdnet_ifconfig;
93
94#if BSP_USE_NETWORK_FEC
95extern int rtems_fec_enet_driver_attach (struct rtems_bsdnet_ifconfig *config,
96 int attaching);
97#define RTEMS_BSP_FEC_NETWORK_DRIVER_NAME "fec1"
98#define RTEMS_BSP_FEC_NETWORK_DRIVER_ATTACH rtems_fec_enet_driver_attach
99#endif
100
101#if BSP_USE_NETWORK_SCC
102extern int rtems_scc_enet_driver_attach (struct rtems_bsdnet_ifconfig *config,
103 int attaching);
104#define RTEMS_BSP_SCC_NETWORK_DRIVER_NAME "scc1"
105#define RTEMS_BSP_SCC_NETWORK_DRIVER_ATTACH rtems_scc_enet_driver_attach
106#endif
107
108#if BSP_USE_NETWORK_FEC
109#define RTEMS_BSP_NETWORK_DRIVER_NAME RTEMS_BSP_FEC_NETWORK_DRIVER_NAME
110#define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_FEC_NETWORK_DRIVER_ATTACH
111#elif BSP_USE_NETWORK_SCC
112#define RTEMS_BSP_NETWORK_DRIVER_NAME RTEMS_BSP_SCC_NETWORK_DRIVER_NAME
113#define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_SCC_NETWORK_DRIVER_ATTACH
114#endif
115/*
116 * We need to decide how much memory will be non-cacheable. This
117 * will mainly be memory that will be used in DMA (network and serial
118 * buffers).
119 */
120#define NOCACHE_MEM_SIZE 512*1024
121
122/*
123 * indicate, that BSP has IDE driver
124 */
125#undef RTEMS_BSP_HAS_IDE_DRIVER
126
127/*
128 * SPI driver configuration
129 */
130
131 /* select values for SPI addressing */
132#define PGHPLUS_SPI_ADDR_EEPROM 0
133#define PGHPLUS_SPI_ADDR_DISP4 1
134 /* NOTE: DISP4 occupies two consecutive addresses for data and control port */
135#define PGHPLUS_SPI_ADDR_DISP4_DATA (PGHPLUS_SPI_ADDR_DISP4)
136#define PGHPLUS_SPI_ADDR_DISP4_CTRL (PGHPLUS_SPI_ADDR_DISP4_DATA+1)
137
138 /* bit masks for Port B lines */
139#define PGHPLUS_PB_SPI_EEP_CE_MSK (1<< 0)
140#define PGHPLUS_PB_SPI_DISP4_RS_MSK (1<<15)
141#define PGHPLUS_PB_SPI_DISP4_CE_MSK (1<<14)
142
143/*
144 * our (internal) bus frequency
145 */
146extern uint32_t BSP_bus_frequency;
147
148/*
149 * Interfaces to required Clock Driver support methods
150 */
151int BSP_disconnect_clock_handler(void);
152int BSP_connect_clock_handler (rtems_irq_hdl);
153
154extern uint32_t bsp_clock_speed;
155
156char serial_getc(void);
157
158int serial_tstc(void);
159
160void serial_init(void);
161
162int mbx8xx_console_get_configuration(void);
163
164void _InitTQM8xx (void);
165
166rtems_status_code bsp_register_spi(void);
167
168void *bsp_idle_thread( uintptr_t ignored );
169
170void cpu_init(void);
171
172#ifdef __cplusplus
173}
174#endif
175
176#endif
177
180#endif
PowerPC Exceptions API.
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.
Definition: deflate.c:114