source: rtems/bsps/powerpc/tqm8xx/include/bsp.h @ 828276b

5
Last change on this file since 828276b was c991eeec, checked in by Sebastian Huber <sebastian.huber@…>, on 03/04/19 at 14:32:15

bsps: Adjust bsp.h Doxygen groups

Update #3706.

  • Property mode set to 100644
File size: 4.1 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup RTEMSBSPsPowerPCTQM8XX
5 *
6 * @brief Global BSP definitions.
7 */
8
9/*
10 *  RTEMS TQM8xx BSP
11 *  This include file contains all board IO definitions.
12 */
13
14/*
15 * This file has been adapted to MPC8xx by:
16 *    Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
17 *    Copyright (c) 2008
18 *    Embedded Brains GmbH
19 *    Obere Lagerstr. 30
20 *    D-82178 Puchheim
21 *    Germany
22 *    rtems@embedded-brains.de
23 *
24 *  COPYRIGHT (c) 1989-2008.
25 *  On-Line Applications Research Corporation (OAR).
26 *
27 *  The license and distribution terms for this file may be
28 *  found in the file LICENSE in this distribution or at
29 *  http://www.rtems.org/license/LICENSE.
30 */
31
32#ifndef LIBBSP_POWERPC_TQM8XX_BSP_H
33#define LIBBSP_POWERPC_TQM8XX_BSP_H
34
35/**
36 * @defgroup RTEMSBSPsPowerPCTQM8XX TQM8XX
37 *
38 * @ingroup RTEMSBSPsPowerPC
39 *
40 * @brief TQM8XX Board Support Package.
41 *
42 * @{
43 */
44
45/*
46 * indicate, that BSP is booted via TQMMon
47 */
48#define BSP_HAS_TQMMON
49
50#include <libcpu/powerpc-utility.h>
51
52LINKER_SYMBOL(TopRamReserved);
53
54LINKER_SYMBOL( bsp_ram_start);
55LINKER_SYMBOL( bsp_ram_end);
56LINKER_SYMBOL( bsp_ram_size);
57
58LINKER_SYMBOL( bsp_rom_start);
59LINKER_SYMBOL( bsp_rom_end);
60LINKER_SYMBOL( bsp_rom_size);
61
62LINKER_SYMBOL( bsp_section_text_start);
63LINKER_SYMBOL( bsp_section_text_end);
64LINKER_SYMBOL( bsp_section_text_size);
65
66LINKER_SYMBOL( bsp_section_data_start);
67LINKER_SYMBOL( bsp_section_data_end);
68LINKER_SYMBOL( bsp_section_data_size);
69
70LINKER_SYMBOL( bsp_section_bss_start);
71LINKER_SYMBOL( bsp_section_bss_end);
72LINKER_SYMBOL( bsp_section_bss_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/irq.h>
82#include <mpc8xx.h>
83#include <mpc8xx/cpm.h>
84#include <mpc8xx/mmu.h>
85#include <mpc8xx/console.h>
86#include <bsp/vectors.h>
87#include <bsp/tqm.h>
88#include <libcpu/powerpc-utility.h>
89#include <bsp/default-initial-extension.h>
90
91#ifdef __cplusplus
92extern "C" {
93#endif
94
95/*
96 * Network driver configuration
97 */
98struct rtems_bsdnet_ifconfig;
99
100#if BSP_USE_NETWORK_FEC
101extern int rtems_fec_enet_driver_attach (struct rtems_bsdnet_ifconfig *config,
102                                         int attaching);
103#define RTEMS_BSP_FEC_NETWORK_DRIVER_NAME       "fec1"
104#define RTEMS_BSP_FEC_NETWORK_DRIVER_ATTACH     rtems_fec_enet_driver_attach
105#endif
106
107#if BSP_USE_NETWORK_SCC
108extern int rtems_scc_enet_driver_attach (struct rtems_bsdnet_ifconfig *config,
109                                         int attaching);
110#define RTEMS_BSP_SCC_NETWORK_DRIVER_NAME       "scc1"
111#define RTEMS_BSP_SCC_NETWORK_DRIVER_ATTACH     rtems_scc_enet_driver_attach
112#endif
113
114#if BSP_USE_NETWORK_FEC
115#define RTEMS_BSP_NETWORK_DRIVER_NAME   RTEMS_BSP_FEC_NETWORK_DRIVER_NAME
116#define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_FEC_NETWORK_DRIVER_ATTACH
117#elif BSP_USE_NETWORK_SCC
118#define RTEMS_BSP_NETWORK_DRIVER_NAME   RTEMS_BSP_SCC_NETWORK_DRIVER_NAME
119#define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_SCC_NETWORK_DRIVER_ATTACH
120#endif
121/*
122 * We need to decide how much memory will be non-cacheable. This
123 * will mainly be memory that will be used in DMA (network and serial
124 * buffers).
125 */
126#define NOCACHE_MEM_SIZE 512*1024
127
128/*
129 * indicate, that BSP has IDE driver
130 */
131#undef RTEMS_BSP_HAS_IDE_DRIVER
132
133/*
134 * SPI driver configuration
135 */
136
137  /* select values for SPI addressing */
138#define PGHPLUS_SPI_ADDR_EEPROM 0
139#define PGHPLUS_SPI_ADDR_DISP4  1
140  /* NOTE: DISP4 occupies two consecutive addresses for data and control port */
141#define PGHPLUS_SPI_ADDR_DISP4_DATA  (PGHPLUS_SPI_ADDR_DISP4)
142#define PGHPLUS_SPI_ADDR_DISP4_CTRL  (PGHPLUS_SPI_ADDR_DISP4_DATA+1)
143
144  /* bit masks for Port B lines */
145#define PGHPLUS_PB_SPI_EEP_CE_MSK     (1<< 0)
146#define PGHPLUS_PB_SPI_DISP4_RS_MSK   (1<<15)
147#define PGHPLUS_PB_SPI_DISP4_CE_MSK   (1<<14)
148
149/*
150 * our (internal) bus frequency
151 */
152extern uint32_t BSP_bus_frequency;
153
154/*
155 *  Interfaces to required Clock Driver support methods
156 */
157int BSP_disconnect_clock_handler(void);
158int BSP_connect_clock_handler (rtems_irq_hdl);
159
160extern uint32_t bsp_clock_speed;
161
162char serial_getc(void);
163
164int serial_tstc(void);
165
166void serial_init(void);
167
168int mbx8xx_console_get_configuration(void);
169
170void _InitTQM8xx (void);
171
172rtems_status_code bsp_register_spi(void);
173
174void *bsp_idle_thread( uintptr_t ignored );
175
176void cpu_init(void);
177
178#ifdef __cplusplus
179}
180#endif
181
182#endif
183
184/** @} */
185
186#endif
Note: See TracBrowser for help on using the repository browser.