tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8825 / clock_hal_internal.h
1 /******************************************************************************
2  ** File Name:      clock_hal_internal.h                                           *
3  ** Author:         Yi.Qiu                                                  *
4  ** DATE:           02/21/2010                                              *
5  ** Copyright:      2002 Spreatrum, Incoporated. All Rights Reserved.       *
6  ** Description:                                                            *
7  ******************************************************************************/
8 #ifndef _CLOCK_HAL_INTERNAL_H_
9 #define _CLOCK_HAL_INTERNAL_H_
10
11 #ifdef __cplusplus
12 extern   "C"
13 {
14 #endif
15
16 /******************************************************************************
17  * Macro definitions
18  ******************************************************************************/
19 #define CLOCK_SUCCESS     0
20 #define CLOCK_FAIL        1
21
22 struct _CLOCK_OBJECT;
23 typedef struct _CLOCK_OBJECT CLOCK_OBJECT;
24 struct _DEVICE_OBJECT;
25 typedef struct _DEVICE_OBJECT DEVICE_OBJECT;
26 typedef uint32 CLOCK_STATUS;
27
28 /*****************************************************************************/
29 //  Description:    Config all system clocks and devices
30 //  Global resource dependence:
31 //  Author:         Yi.Qiu
32 //  Note:
33 /*****************************************************************************/
34 PUBLIC CLOCK_STATUS CLOCK_Config (void);
35
36 /*****************************************************************************/
37 //  Description:    Open device
38 //  Global resource dependence:
39 //  Author:         Yi.Qiu
40 //  Note:
41 /*****************************************************************************/
42 PUBLIC CLOCK_STATUS DEVICE_OpenClock (DEVICE_OBJECT *thiz);
43
44 /*****************************************************************************/
45 //  Description:    Reset device
46 //  Global resource dependence:
47 //  Author:         Yi.Qiu
48 //  Note:
49 /*****************************************************************************/
50 PUBLIC CLOCK_STATUS DEVICE_Reset (DEVICE_OBJECT *thiz);
51
52 /*****************************************************************************/
53 //  Description:    Close device
54 //  Global resource dependence:
55 //  Author:         Yi.Qiu
56 //  Note:
57 /*****************************************************************************/
58 PUBLIC CLOCK_STATUS DEVICE_CloseClock (DEVICE_OBJECT *thiz);
59
60 /*****************************************************************************/
61 //  Description:    Set device's work clock
62 //  Global resource dependence:
63 //  Author:         Yi.Qiu
64 //  Note:
65 /*****************************************************************************/
66 PUBLIC CLOCK_STATUS DEVICE_SetClockAndDiv (DEVICE_OBJECT *thiz, int ClockValue, int Div);
67
68 /*****************************************************************************/
69 //  Description:    Set device's work clock
70 //  Global resource dependence:
71 //  Author:         Yi.Qiu
72 //  Note:
73 /*****************************************************************************/
74 PUBLIC CLOCK_STATUS DEVICE_SetClock (DEVICE_OBJECT *thiz, int ClockValue);
75
76 /*****************************************************************************/
77 //  Description:    Set device's work clock
78 //  Global resource dependence:
79 //  Author:         Yi.Qiu
80 //  Note:
81 /*****************************************************************************/
82 PUBLIC CLOCK_STATUS DEVICE_EnableClock (DEVICE_OBJECT *thiz);
83
84 /*****************************************************************************/
85 //  Description:    Set device's work clock
86 //  Global resource dependence:
87 //  Author:         Yi.Qiu
88 //  Note:
89 /*****************************************************************************/
90 PUBLIC CLOCK_STATUS DEVICE_DisableClock (DEVICE_OBJECT *thiz);
91
92 /*****************************************************************************/
93 //  Description:    Set device's work clock
94 //  Global resource dependence:
95 //  Author:         Yi.Qiu
96 //  Note:
97 /*****************************************************************************/
98 PUBLIC CLOCK_STATUS DEVICE_SetDiv (DEVICE_OBJECT *thiz, int Div);
99
100 /*****************************************************************************/
101 //  Description:    Get device's work clock
102 //  Global resource dependence:
103 //  Author:         Yi.Qiu
104 //  Note:
105 /*****************************************************************************/
106 PUBLIC uint32 DEVICE_GetClock (DEVICE_OBJECT *thiz);
107
108 #ifdef __cplusplus
109 }
110 #endif
111
112 #endif //_CLOCK_HAL_INTERNAL_H_
113