source: rtems/c/src/lib/libbsp/powerpc/score603e/include/bsp.h @ 1be15db1

4.115
Last change on this file since 1be15db1 was 1be15db1, checked in by Sebastian Huber <sebastian.huber@…>, on 02/19/14 at 14:15:18

bsp/score603e: Remove unused BSP_fatal_return()

  • Property mode set to 100644
File size: 4.2 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all board IO definitions.
4 *
5 *  COPYRIGHT (c) 1989-2009.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 */
12
13#ifndef _BSP_H
14#define _BSP_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#define BSP_ZERO_WORKSPACE_AUTOMATICALLY TRUE
21
22#include <bspopts.h>
23#include <bsp/default-initial-extension.h>
24#include <rtems.h>
25#include <rtems/console.h>
26#include <libcpu/io.h>
27#include <rtems/clockdrv.h>
28#include <bsp/vectors.h>
29
30#ifdef ASM
31/* Definition of where to store registers in alignment handler */
32#define ALIGN_REGS 0x0140
33
34#else
35#include <rtems.h>
36#include <rtems/console.h>
37#include <rtems/clockdrv.h>
38#include <rtems/iosupp.h>
39
40/*
41 *  We no longer support the first generation board.
42 */
43
44#include <gen2.h>
45#include <bsp/irq.h>
46
47/*
48 * The following macro calculates the Baud constant. For the Z8530 chip.
49 *
50 * Note: baud constant = ((clock frequency / Clock_X) / (2 * Baud Rate)) - 2
51 *       for the Score603e ((10,000,000 / 16) / (2 * Baud Rate)) - 2
52 */
53#define _Score603e_Z8530_Baud( _frequency, _clock_by, _baud_rate  )   \
54  ( (_frequency /( _clock_by * 2 * _baud_rate))  - 2)
55
56#define Score603e_Z8530_Chip1_Baud( _value ) \
57  _Score603e_Z8530_Baud( SCORE603E_85C30_1_CLOCK, \
58     SCORE603E_85C30_1_CLOCK_X, _value )
59
60#define Score603e_Z8530_Chip0_Baud( _value ) \
61  _Score603e_Z8530_Baud( SCORE603E_85C30_0_CLOCK, \
62     SCORE603E_85C30_0_CLOCK_X, _value )
63
64#define Initialize_Board_ctrl_register()                         \
65  *SCORE603E_BOARD_CTRL_REG = (*SCORE603E_BOARD_CTRL_REG |       \
66                               SCORE603E_BRD_FLASH_DISABLE_MASK)
67
68#define Processor_Synchronize() \
69  __asm__ volatile(" eieio ")
70
71
72/* Constants */
73
74/*
75 *  Device Driver Table Entries
76 */
77
78/*
79 * NOTE: Use the standard Console driver entry
80 */
81
82/*
83 * NOTE: Use the standard Clock driver entry
84 */
85
86/*
87 *  Information placed in the linkcmds file.
88 */
89
90extern int   RAM_START;
91extern int   RAM_END;
92extern int   RAM_SIZE;
93
94extern int   PROM_START;
95extern int   PROM_END;
96extern int   PROM_SIZE;
97
98extern int   CLOCK_SPEED;
99extern int   CPU_PPC_CLICKS_PER_MS;
100
101extern int   end;        /* last address in the program */
102
103/*
104 * Total RAM available
105 */
106extern int        end;        /* last address in the program */
107extern int        RAM_END;
108extern uint32_t   BSP_mem_size;
109
110
111/*
112 * How many libio files we want
113 */
114
115#define BSP_LIBIO_MAX_FDS       20
116
117/* functions */
118
119/*
120 *
121 */
122rtems_isr_entry  set_EE_vector(
123  rtems_isr_entry     handler,                  /* isr routine        */
124  rtems_vector_number vector                    /* vector number      */
125);
126void initialize_external_exception_vector ();
127
128/*
129 * Hwr_init.c
130 */
131void init_PCI();
132void instruction_cache_enable ();
133void data_cache_enable ();
134
135void initialize_PCI_bridge ();
136uint16_t         read_and_clear_irq ();
137void set_irq_mask(
138  uint16_t         value
139);
140uint16_t         get_irq_mask();
141
142/*
143 * universe.c
144 */
145void initialize_universe();
146
147void set_irq_mask(
148  uint16_t         value
149);
150
151uint16_t         get_irq_mask();
152
153void unmask_irq(
154  uint16_t         irq_idx
155);
156
157void mask_irq(
158  uint16_t         irq_idx
159);
160
161void init_irq_data_register();
162
163uint16_t         read_and_clear_PMC_irq(
164  uint16_t            irq
165);
166
167bool Is_PMC_IRQ(
168  uint32_t           pmc_irq,
169  uint16_t           status_word
170);
171
172uint16_t         read_and_clear_irq();
173
174/*
175 * FPGA.c
176 */
177void initialize_PCI_bridge ();
178
179/* flash.c */
180
181unsigned int SCORE603e_FLASH_Disable(
182  uint32_t                       unused
183);
184unsigned int SCORE603e_FLASH_verify_enable();
185unsigned int SCORE603e_FLASH_Enable_writes(
186  uint32_t                       area        /* Unused  */
187);
188
189#define BSP_FLASH_ENABLE_WRITES( _area) SCORE603e_FLASH_Enable_writes( _area )
190#define BSP_FLASH_DISABLE_WRITES(_area) SCORE603e_FLASH_Disable( _area )
191
192#define Convert_Endian_32( _data ) \
193  ( ((_data&0x000000ff)<<24) | ((_data&0x0000ff00)<<8) |  \
194    ((_data&0x00ff0000)>>8)  | ((_data&0xff000000)>>24) )
195
196#define Convert_Endian_16( _data ) \
197  ( ((_data&0x00ff)<<8) | ((_data&0xff00)>>8) )
198
199#endif /* ASM */
200
201#ifdef __cplusplus
202}
203#endif
204
205#endif
Note: See TracBrowser for help on using the repository browser.