source: rtems/c/src/lib/libbsp/m68k/uC5282/include/bsp.h @ 5d3d6d1a

4.104.114.84.95
Last change on this file since 5d3d6d1a was 5d3d6d1a, checked in by Joel Sherrill <joel.sherrill@…>, on 03/10/07 at 15:53:53

2007-03-10 Joel Sherrill <joel@…>

PR 1227/bsps

  • include/bsp.h: Remove MAX_LONG_TEST_DURATION and MAX_SHORT_TEST_DURATION. They are obsolete and unused.
  • Property mode set to 100644
File size: 4.4 KB
Line 
1/*
2 *  uC5282 BSP header file
3 *
4 *  Author: W. Eric Norum <norume@aps.anl.gov>
5 *
6 *  COPYRIGHT (c) 2005.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 */
13 
14#ifndef _BSP_H
15#define _BSP_H
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#include <rtems.h>
22#include <rtems/iosupp.h>
23#include <rtems/console.h>
24#include <rtems/clockdrv.h>
25#include <rtems/iosupp.h>
26#include <rtems/bspIo.h>
27
28/***************************************************************************/
29/**  BSP Configuration                                                    **/
30/*
31 * Uncomment to use instruction/data cache
32 * Leave commented to use instruction-only cache
33 */
34/* #define RTEMS_MCF5282_BSP_ENABLE_DATA_CACHE */
35
36/***************************************************************************/
37/**  Hardware data structure headers                                      **/
38#include <mcf5282/mcf5282.h>   /* internal MCF5282 modules */
39
40/***************************************************************************/
41/**  Network driver configuration                                         **/
42struct rtems_bsdnet_ifconfig;
43extern int rtems_fec_driver_attach (struct rtems_bsdnet_ifconfig *config, int attaching );
44#define RTEMS_BSP_NETWORK_DRIVER_NAME     "fs1"
45#define RTEMS_BSP_NETWORK_DRIVER_ATTACH   rtems_fec_driver_attach
46
47/***************************************************************************/
48/**  User Definable configuration                                         **/
49
50/* define which port the console should use - all other ports are then defined as general purpose */
51#define CONSOLE_PORT        0
52
53/* externals */
54
55/* constants */
56
57/* miscellaneous stuff assumed to exist */
58
59extern rtems_configuration_table BSP_Configuration;
60
61/*
62 *  Device Driver Table Entries
63 */
64 
65/*
66 * NOTE: Use the standard Console driver entry
67 */
68 
69/*
70 * NOTE: Use the standard Clock driver entry
71 */
72
73
74/* functions */
75
76typedef struct {
77    unsigned int l;
78    void        *v;
79} bsp_mnode_t;
80
81#define RTEMS_BSP_PGM_ERASE_FIRST   0x1
82#define RTEMS_BSP_PGM_RESET_AFTER   0x2
83#define RTEMS_BSP_PGM_EXEC_AFTER    0x4
84#define RTEMS_BSP_PGM_HALT_AFTER    0x8
85
86uint32_t bsp_get_CPU_clock_speed(void);
87rtems_status_code bsp_allocate_interrupt(int level, int priority);
88int bsp_reset(int flags);
89int bsp_program(bsp_mnode_t *chain, int flags);
90unsigned const char *bsp_gethwaddr(int a);
91const char *bsp_getbenv(const char *a);
92int bsp_flash_erase_range(volatile unsigned short *flashptr, int start, int end);
93int bsp_flash_write_range(volatile unsigned short *flashptr, bsp_mnode_t *chain, int offset);
94
95void bsp_cleanup(void);
96
97m68k_isr_entry set_vector(
98  rtems_isr_entry     handler,
99  rtems_vector_number vector,
100  int                 type
101);
102
103/*
104 * Interrupt assignments
105 *  Highest-priority listed first
106 */
107#define FEC_IRQ_LEVEL       4
108#define FEC_IRQ_RX_PRIORITY 7
109#define FEC_IRQ_TX_PRIORITY 6
110
111#define PIT3_IRQ_LEVEL      4
112#define PIT3_IRQ_PRIORITY   0
113
114#define UART0_IRQ_LEVEL     3
115#define UART0_IRQ_PRIORITY  7
116#define UART1_IRQ_LEVEL     3
117#define UART1_IRQ_PRIORITY  6
118#define UART2_IRQ_LEVEL     3
119#define UART2_IRQ_PRIORITY  5
120
121/*
122 * Fake VME support
123 * This makes it easier to use EPICS driver support on this BSP.
124 */
125#define VME_AM_STD_SUP_ASCENDING   0x3f
126#define VME_AM_STD_SUP_PGM         0x3e
127#define VME_AM_STD_USR_ASCENDING   0x3b
128#define VME_AM_STD_USR_PGM         0x3a
129#define VME_AM_STD_SUP_DATA        0x3d
130#define VME_AM_STD_USR_DATA        0x39
131#define VME_AM_EXT_SUP_ASCENDING   0x0f
132#define VME_AM_EXT_SUP_PGM         0x0e
133#define VME_AM_EXT_USR_ASCENDING   0x0b
134#define VME_AM_EXT_USR_PGM         0x0a
135#define VME_AM_EXT_SUP_DATA        0x0d
136#define VME_AM_EXT_USR_DATA        0x09
137#define VME_AM_SUP_SHORT_IO        0x2d
138#define VME_AM_USR_SHORT_IO        0x29
139
140/*
141 * 'Extended' BSP support
142 */
143rtems_status_code bspExtInit(void);
144typedef void (*BSP_VME_ISR_t)(void *usrArg, unsigned long vector);
145BSP_VME_ISR_t BSP_getVME_isr(unsigned long vector, void **parg);
146int BSP_installVME_isr(unsigned long vector, BSP_VME_ISR_t handler, void *usrArg);
147int BSP_removeVME_isr(unsigned long vector, BSP_VME_ISR_t handler, void *usrArg);
148int BSP_enableVME_int_lvl(unsigned int level);
149int BSP_disableVME_int_lvl(unsigned int level);
150int BSP_vme2local_adrs(unsigned am, unsigned long vmeaddr, unsigned long *plocaladdr);
151
152
153#ifdef __cplusplus
154}
155#endif
156
157#endif
Note: See TracBrowser for help on using the repository browser.