Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:05

0001 /**
0002  * @file
0003  * @ingroup RTEMSBSPsARMSMDK2410
0004  * @brief Global BSP definitons.
0005  */
0006 
0007 /*
0008  *  Copyright (c) Canon Research France SA.]
0009  *  Emmanuel Raguet, mailto:raguet@crf.canon.fr
0010  *
0011  *  The license and distribution terms for this file may be
0012  *  found in the file LICENSE in this distribution or at
0013  *  http://www.rtems.org/license/LICENSE.
0014  */
0015 
0016 #ifndef LIBBSP_ARM_SMDK2410_BSP_H
0017 #define LIBBSP_ARM_SMDK2410_BSP_H
0018 
0019 /**
0020  * @defgroup RTEMSBSPsARMSMDK2410 SMDK2410
0021  *
0022  * @ingroup RTEMSBSPsARM
0023  *
0024  * @brief SMDK2410 Board Support Package.
0025  *
0026  * @{
0027  */
0028 
0029 #include <bspopts.h>
0030 #include <bsp/default-initial-extension.h>
0031 
0032 #include <rtems.h>
0033 #include <s3c24xx.h>
0034 
0035 #ifdef __cplusplus
0036 extern "C" {
0037 #endif
0038 
0039 #define BSP_FEATURE_IRQ_EXTENSION
0040 
0041 /**
0042  * @brief functions to get the differents s3c2400 clks
0043  * @{
0044  */
0045 
0046 uint32_t get_FCLK(void);
0047 uint32_t get_HCLK(void);
0048 uint32_t get_PCLK(void);
0049 uint32_t get_UCLK(void);
0050 
0051 /** @} */
0052 
0053 /* What is the input clock freq in hertz? */
0054 /** @brief 12 MHz oscillator */
0055 #define BSP_OSC_FREQ  12000000
0056 /** @brief FCLK=133Mhz */
0057 #define M_MDIV 81
0058 #define M_PDIV 2
0059 #define M_SDIV 1
0060 /** @brief HCLK=FCLK/2, PCLK=FCLK/2 */
0061 #define M_CLKDIVN 2
0062 /** @brief enable refresh */
0063 #define REFEN   0x1
0064 /** @brief CBR(CAS before RAS)/auto refresh */
0065 #define TREFMD  0x0
0066 /** @brief 2 clk */
0067 #define Trp 0x0
0068 /** @brief 7 clk */
0069 #define Trc 0x3
0070 /** @brief 3 clk */
0071 #define Tchr    0x2
0072 
0073 /**
0074  * @brief This BSP provides its own IDLE thread to override the RTEMS one.
0075  *
0076  *  So we prototype it and define the constant confdefs.h expects
0077  *  to configure a BSP specific one.
0078  */
0079 void *bsp_idle_thread(uintptr_t ignored);
0080 
0081 /** @} */
0082 
0083 #define BSP_IDLE_TASK_BODY bsp_idle_thread
0084 
0085 #ifdef __cplusplus
0086 }
0087 #endif
0088 
0089 /** @} */
0090 
0091 #endif /* _BSP_H */
0092