Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:22:49

0001 /**
0002  * @file
0003  * @ingroup RTEMSBSPsARMGumstix
0004  * @brief Global BSP definitions.
0005  */
0006 
0007 /*
0008  *  By Yang Xi <hiyangxi@gmail.com>.
0009  *
0010  *  The license and distribution terms for this file may be
0011  *  found in the file LICENSE in this distribution or at
0012  *  http://www.rtems.org/license/LICENSE.
0013  */
0014 
0015 #ifndef LIBBSP_ARM_GUMSTIX_BSP_H
0016 #define LIBBSP_ARM_GUMSTIX_BSP_H
0017 
0018 /**
0019  * @defgroup RTEMSBSPsARMGumstix Gumstix
0020  *
0021  * @ingroup RTEMSBSPsARM
0022  *
0023  * @brief Gumstix Board Support Package.
0024  *
0025  * @{
0026  */
0027 
0028 #include <bspopts.h>
0029 #include <bsp/default-initial-extension.h>
0030 
0031 #include <rtems.h>
0032 
0033 #ifdef __cplusplus
0034 extern "C" {
0035 #endif
0036 
0037 #define BSP_FEATURE_IRQ_EXTENSION
0038 
0039 #define BSP_HAS_FRAME_BUFFER 1
0040 
0041 /** @brief What is the input clock freq in hertz */
0042 #define BSP_MAIN_FREQ 3686400      /* 3.6864 MHz */
0043 #define BSP_SLCK_FREQ   32768      /* 32.768 KHz */
0044 
0045 /** @brief What is the last interrupt */
0046 #define BSP_MAX_INT AT91RM9200_MAX_INT
0047 
0048 /*
0049  * forward reference the type to avoid conflicts between libchip serial
0050  * and libchip rtc get and set register types.
0051  */
0052 typedef struct _console_tbl console_tbl;
0053 console_tbl *BSP_get_uart_from_minor(int minor);
0054 
0055 static inline int32_t BSP_get_baud(void) {return 115200;}
0056 
0057 #define ST_PIMR_PIV 33  /* 33 ticks of the 32.768Khz clock ~= 1msec */
0058 
0059 #define outport_byte(port,val) *((unsigned char volatile*)(port)) = (val)
0060 #define inport_byte(port,val) (val) = *((unsigned char volatile*)(port))
0061 #define outport_word(port,val) *((unsigned short volatile*)(port)) = (val)
0062 #define inport_word(port,val) (val) = *((unsigned short volatile*)(port))
0063 
0064 struct rtems_bsdnet_ifconfig;
0065 extern int rtems_ne_driver_attach(struct rtems_bsdnet_ifconfig *, int);
0066 #define BSP_NE2000_NETWORK_DRIVER_NAME      "ne1"
0067 #define BSP_NE2000_NETWORK_DRIVER_ATTACH    rtems_ne_driver_attach
0068 
0069 #ifndef RTEMS_BSP_NETWORK_DRIVER_NAME
0070 #define RTEMS_BSP_NETWORK_DRIVER_NAME   BSP_NE2000_NETWORK_DRIVER_NAME
0071 #endif
0072 
0073 #ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH
0074 #define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_NE2000_NETWORK_DRIVER_ATTACH
0075 #endif
0076 
0077 #ifdef __cplusplus
0078 }
0079 #endif
0080 
0081 /** @} */
0082 
0083 #endif /* _BSP_H */
0084