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

4.104.114.84.95
Last change on this file since ac9bbe7 was ac9bbe7, checked in by Eric Norum <WENorum@…>, on Apr 21, 2005 at 12:25:53 AM

Try insructioin-only cache.

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