1 | /** |
---|
2 | * @file |
---|
3 | * @ingroup arm_gumstix |
---|
4 | * @brief Global BSP definitions. |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * By Yang Xi <hiyangxi@gmail.com>. |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.org/license/LICENSE. |
---|
13 | */ |
---|
14 | |
---|
15 | #ifndef _BSP_H |
---|
16 | #define _BSP_H |
---|
17 | |
---|
18 | #include <bspopts.h> |
---|
19 | #include <bsp/default-initial-extension.h> |
---|
20 | |
---|
21 | #include <rtems.h> |
---|
22 | #include <rtems/console.h> |
---|
23 | #include <rtems/clockdrv.h> |
---|
24 | |
---|
25 | #ifdef __cplusplus |
---|
26 | extern "C" { |
---|
27 | #endif |
---|
28 | |
---|
29 | /** |
---|
30 | * @defgroup arm_gumstix Gumstix Support |
---|
31 | * @ingroup bsp_arm |
---|
32 | * @brief Gumstix support package |
---|
33 | * @{ |
---|
34 | */ |
---|
35 | |
---|
36 | #define BSP_FEATURE_IRQ_EXTENSION |
---|
37 | |
---|
38 | #define BSP_HAS_FRAME_BUFFER 1 |
---|
39 | |
---|
40 | /** @brief What is the input clock freq in hertz */ |
---|
41 | #define BSP_MAIN_FREQ 3686400 /* 3.6864 MHz */ |
---|
42 | #define BSP_SLCK_FREQ 32768 /* 32.768 KHz */ |
---|
43 | |
---|
44 | /** @brief What is the last interrupt */ |
---|
45 | #define BSP_MAX_INT AT91RM9200_MAX_INT |
---|
46 | |
---|
47 | /* |
---|
48 | * forward reference the type to avoid conflicts between libchip serial |
---|
49 | * and libchip rtc get and set register types. |
---|
50 | */ |
---|
51 | typedef struct _console_tbl console_tbl; |
---|
52 | console_tbl *BSP_get_uart_from_minor(int minor); |
---|
53 | |
---|
54 | static inline int32_t BSP_get_baud(void) {return 115200;} |
---|
55 | |
---|
56 | /** @brief How big should the interrupt stack be? */ |
---|
57 | #define CONFIGURE_INTERRUPT_STACK_MEMORY (16 * 1024) |
---|
58 | |
---|
59 | #define ST_PIMR_PIV 33 /* 33 ticks of the 32.768Khz clock ~= 1msec */ |
---|
60 | |
---|
61 | #define outport_byte(port,val) *((unsigned char volatile*)(port)) = (val) |
---|
62 | #define inport_byte(port,val) (val) = *((unsigned char volatile*)(port)) |
---|
63 | #define outport_word(port,val) *((unsigned short volatile*)(port)) = (val) |
---|
64 | #define inport_word(port,val) (val) = *((unsigned short volatile*)(port)) |
---|
65 | |
---|
66 | struct rtems_bsdnet_ifconfig; |
---|
67 | extern int rtems_ne_driver_attach(struct rtems_bsdnet_ifconfig *, int); |
---|
68 | #define BSP_NE2000_NETWORK_DRIVER_NAME "ne1" |
---|
69 | #define BSP_NE2000_NETWORK_DRIVER_ATTACH rtems_ne_driver_attach |
---|
70 | |
---|
71 | #ifndef RTEMS_BSP_NETWORK_DRIVER_NAME |
---|
72 | #define RTEMS_BSP_NETWORK_DRIVER_NAME BSP_NE2000_NETWORK_DRIVER_NAME |
---|
73 | #endif |
---|
74 | |
---|
75 | #ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH |
---|
76 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_NE2000_NETWORK_DRIVER_ATTACH |
---|
77 | #endif |
---|
78 | |
---|
79 | /** @} */ |
---|
80 | |
---|
81 | #ifdef __cplusplus |
---|
82 | } |
---|
83 | #endif |
---|
84 | |
---|
85 | #endif /* _BSP_H */ |
---|
86 | |
---|