tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8800g / sc8800g_freq_cfg.h
1 /******************************************************************************
2  ** File Name:      sc8800g_freq_cfg.h                                                 *
3  ** Author:         Yuhua.Shi                                                   *
4  ** DATE:           08/17/2010                                                *
5  ** Copyright:      2010 Spreatrum, Incoporated. All Rights Reserved.         *
6  ** Description:    This file define the config of frequency.      *
7  ******************************************************************************
8
9  ******************************************************************************
10  **                        Edit History                                       *
11  ** ------------------------------------------------------------------------- *
12  ** DATE           NAME             DESCRIPTION                               *
13  ** 08/17/2010     Yuhua.Shi     Create.                                   *
14  ******************************************************************************/
15
16 #ifndef _SC8800G_FREQ_CFG_H_
17 #define _SC8800G_FREQ_CFG_H_
18 /*----------------------------------------------------------------------------*
19  **                         Dependencies                                      *
20  **------------------------------------------------------------------------- */
21
22 #include "sci_types.h"
23 #include "chng_freq.h"
24
25 /**---------------------------------------------------------------------------*
26  **                             Compiler Flag                                 *
27  **--------------------------------------------------------------------------*/
28 #ifdef   __cplusplus
29 extern   "C"
30 {
31 #endif
32 /**---------------------------------------------------------------------------*
33 **                               Macro Define                                **
34 **---------------------------------------------------------------------------*/
35
36 /**---------------------------------------------------------------------------*
37  **                         TYPE AND STRUCT                                 *
38  **---------------------------------------------------------------------------*/
39 //define the arm/ahb/emc clk
40 typedef struct freq_clk_LVL_tag
41 {
42     uint32 arm_clk;
43     uint32 ahb_clk;
44     uint32 emc_clk;
45 } FREQ_CLK_LVL_T, *FREQ_CLK_LVL_PTR;
46
47 //define the control infomation for change frequency
48 typedef struct freq_control_tag
49 {
50     uint32             min_clk_lvl;
51     uint32             max_clk_lvl;
52     BOOLEAN        is_chng_freq_enable;
53         BOOLEAN        is_ahbmaster_event_enable; 
54 } FREQ_CONTROL_T, *FREQ_CONTROL_PTR;
55
56 //define the frequency levle of application
57 typedef struct freq_app_clk_LVL_tag
58 {
59     CHNG_FREQ_INDEX_E freq_index;
60     uint32 clk_lvl;
61 } FREQ_APP_CLK_LVL_T, *FREQ_APP_CLK_LVL_PTR;
62
63 //define the config info for change frequency
64 typedef struct chng_freq_config_tag
65 {
66     FREQ_CLK_LVL_PTR                clk_lvl_table_ptr;
67     uint32                                  *clk_div_table_ptr;
68     FREQ_APP_CLK_LVL_PTR        app_clk_lvl_table_ptr;
69     FREQ_CONTROL_PTR              freq_control_info_ptr;
70 } CHNG_FREQ_CONFIG_T, *CHNG_FREQ_CONFIG_PTR;
71
72
73 /**----------------------------------------------------------------------------*
74 **                           Function Prototype                               **
75 **----------------------------------------------------------------------------*/
76 /*****************************************************************************/
77 // Description :    This function is used to get the config info about change frequency
78 // Global resource dependence :
79 // Author :
80 // Note :
81 /*****************************************************************************/
82 PUBLIC CHNG_FREQ_CONFIG_PTR FREQ_GetFreqCfg (
83     void
84 );
85
86 /**----------------------------------------------------------------------------*
87 **                         Compiler Flag                                      **
88 **----------------------------------------------------------------------------*/
89 #ifdef   __cplusplus
90 }
91 #endif
92 /**---------------------------------------------------------------------------*/
93 #endif
94 // End