source: rtems/c/src/lib/libbsp/sparc/leon2/include/bsp.h @ 2aaff51

4.104.114.84.95
Last change on this file since 2aaff51 was 2aaff51, checked in by Joel Sherrill <joel.sherrill@…>, on 09/05/07 at 23:58:06

2007-09-05 Daniel Hellstrom <daniel@…>

  • include/bsp.h: This patch prepares bsp.h so that shared code (new drivers) can easily have small small sections of BSP specific code.
  • Property mode set to 100644
File size: 2.7 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all SPARC simulator definitions.
4 *
5 *  COPYRIGHT (c) 1989-1998.
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 *  Ported to ERC32 implementation of the SPARC by On-Line Applications
13 *  Research Corporation (OAR) under contract to the European Space
14 *  Agency (ESA).
15 *
16 *  ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
17 *  European Space Agency.
18 *
19 *  $Id$
20 */
21
22#ifndef _BSP_H
23#define _BSP_H
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#include <bspopts.h>
30
31#include <rtems.h>
32#include <leon.h>
33#include <rtems/clockdrv.h>
34#include <rtems/console.h>
35
36/* SPARC CPU variant: LEON2 */
37#define LEON2 1
38 
39/*
40 *  confdefs.h overrides for this BSP:
41 *   - two termios serial ports
42 *   - Interrupt stack space is not minimum if defined.
43 */
44
45#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
46#define CONFIGURE_INTERRUPT_STACK_MEMORY  (16 * 1024)
47
48/*
49 * Network driver configuration
50 */
51
52struct rtems_bsdnet_ifconfig;
53extern int rtems_leon_open_eth_driver_attach (struct rtems_bsdnet_ifconfig *config);
54extern int rtems_smc91111_driver_attach_leon2(struct rtems_bsdnet_ifconfig *config);
55#define RTEMS_BSP_NETWORK_DRIVER_NAME   "open_eth1"
56#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_OPENETH  rtems_leon_open_eth_driver_attach
57#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_SMC91111 rtems_smc91111_driver_attach_leon2
58
59/*
60 *  The synchronous trap is an arbitrarily chosen software trap.
61 */
62
63/*
64 *  Simple spin delay in microsecond units for device drivers.
65 *  This is very dependent on the clock speed of the target.
66 */
67
68extern void Clock_delay(uint32_t microseconds);
69
70#define delay( microseconds ) Clock_delay(microseconds)
71
72/* Constants */
73
74/*
75 *  Information placed in the linkcmds file.
76 */
77
78extern int   RAM_START;
79extern int   RAM_END;
80extern int   RAM_SIZE;
81 
82extern int   PROM_START;
83extern int   PROM_END;
84extern int   PROM_SIZE;
85
86extern int   CLOCK_SPEED;
87 
88extern int   end;        /* last address in the program */
89
90/* miscellaneous stuff assumed to exist */
91
92void bsp_cleanup( void );
93
94void bsp_start( void );
95
96rtems_isr_entry set_vector(                     /* returns old vector */
97    rtems_isr_entry     handler,                /* isr routine        */
98    rtems_vector_number vector,                 /* vector number      */
99    int                 type                    /* RTEMS or RAW intr  */
100);
101
102void BSP_fatal_return( void );
103
104void bsp_spurious_initialize( void );
105
106extern rtems_configuration_table BSP_Configuration;     /* owned by BSP */
107
108extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
109
110#ifdef __cplusplus
111}
112#endif
113
114#endif
Note: See TracBrowser for help on using the repository browser.