diff options
Diffstat (limited to 'include/linux/mfd/db5500-prcmu.h')
-rw-r--r-- | include/linux/mfd/db5500-prcmu.h | 102 |
1 files changed, 88 insertions, 14 deletions
diff --git a/include/linux/mfd/db5500-prcmu.h b/include/linux/mfd/db5500-prcmu.h index f0977986402c..9890687f582d 100644 --- a/include/linux/mfd/db5500-prcmu.h +++ b/include/linux/mfd/db5500-prcmu.h | |||
@@ -5,21 +5,35 @@ | |||
5 | * | 5 | * |
6 | * U5500 PRCMU API. | 6 | * U5500 PRCMU API. |
7 | */ | 7 | */ |
8 | #ifndef __MACH_PRCMU_U5500_H | 8 | #ifndef __MFD_DB5500_PRCMU_H |
9 | #define __MACH_PRCMU_U5500_H | 9 | #define __MFD_DB5500_PRCMU_H |
10 | 10 | ||
11 | #ifdef CONFIG_UX500_SOC_DB5500 | 11 | #ifdef CONFIG_MFD_DB5500_PRCMU |
12 | 12 | ||
13 | void db5500_prcmu_early_init(void); | 13 | void db5500_prcmu_early_init(void); |
14 | 14 | int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state); | |
15 | int db5500_prcmu_set_display_clocks(void); | ||
16 | int db5500_prcmu_disable_dsipll(void); | ||
17 | int db5500_prcmu_enable_dsipll(void); | ||
15 | int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size); | 18 | int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size); |
16 | int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size); | 19 | int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size); |
20 | void db5500_prcmu_enable_wakeups(u32 wakeups); | ||
21 | int db5500_prcmu_request_clock(u8 clock, bool enable); | ||
22 | void db5500_prcmu_config_abb_event_readout(u32 abb_events); | ||
23 | void db5500_prcmu_get_abb_event_buffer(void __iomem **buf); | ||
24 | int prcmu_resetout(u8 resoutn, u8 state); | ||
25 | int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, | ||
26 | bool keep_ap_pll); | ||
27 | int db5500_prcmu_config_esram0_deep_sleep(u8 state); | ||
28 | void db5500_prcmu_system_reset(u16 reset_code); | ||
29 | u16 db5500_prcmu_get_reset_code(void); | ||
30 | bool db5500_prcmu_is_ac_wake_requested(void); | ||
31 | int db5500_prcmu_set_arm_opp(u8 opp); | ||
32 | int db5500_prcmu_get_arm_opp(void); | ||
17 | 33 | ||
18 | #else /* !CONFIG_UX500_SOC_DB5500 */ | 34 | #else /* !CONFIG_UX500_SOC_DB5500 */ |
19 | 35 | ||
20 | static inline void db5500_prcmu_early_init(void) | 36 | static inline void db5500_prcmu_early_init(void) {} |
21 | { | ||
22 | } | ||
23 | 37 | ||
24 | static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size) | 38 | static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size) |
25 | { | 39 | { |
@@ -31,15 +45,75 @@ static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size) | |||
31 | return -ENOSYS; | 45 | return -ENOSYS; |
32 | } | 46 | } |
33 | 47 | ||
34 | #endif /* CONFIG_UX500_SOC_DB5500 */ | 48 | static inline int db5500_prcmu_request_clock(u8 clock, bool enable) |
49 | { | ||
50 | return 0; | ||
51 | } | ||
52 | |||
53 | static inline int db5500_prcmu_set_display_clocks(void) | ||
54 | { | ||
55 | return 0; | ||
56 | } | ||
57 | |||
58 | static inline int db5500_prcmu_disable_dsipll(void) | ||
59 | { | ||
60 | return 0; | ||
61 | } | ||
62 | |||
63 | static inline int db5500_prcmu_enable_dsipll(void) | ||
64 | { | ||
65 | return 0; | ||
66 | } | ||
35 | 67 | ||
36 | static inline int db5500_prcmu_config_abb_event_readout(u32 abb_events) | 68 | static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state) |
37 | { | 69 | { |
38 | #ifdef CONFIG_MACH_U5500_SIMULATOR | ||
39 | return 0; | 70 | return 0; |
40 | #else | ||
41 | return -1; | ||
42 | #endif | ||
43 | } | 71 | } |
44 | 72 | ||
45 | #endif /* __MACH_PRCMU_U5500_H */ | 73 | static inline void db5500_prcmu_enable_wakeups(u32 wakeups) {} |
74 | |||
75 | static inline int prcmu_resetout(u8 resoutn, u8 state) | ||
76 | { | ||
77 | return 0; | ||
78 | } | ||
79 | |||
80 | static inline int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state) | ||
81 | { | ||
82 | return 0; | ||
83 | } | ||
84 | |||
85 | static inline void db5500_prcmu_get_abb_event_buffer(void __iomem **buf) {} | ||
86 | static inline void db5500_prcmu_config_abb_event_readout(u32 abb_events) {} | ||
87 | |||
88 | static inline int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, | ||
89 | bool keep_ap_pll) | ||
90 | { | ||
91 | return 0; | ||
92 | } | ||
93 | |||
94 | static inline void db5500_prcmu_system_reset(u16 reset_code) {} | ||
95 | |||
96 | static inline u16 db5500_prcmu_get_reset_code(void) | ||
97 | { | ||
98 | return 0; | ||
99 | } | ||
100 | |||
101 | static inline bool db5500_prcmu_is_ac_wake_requested(void) | ||
102 | { | ||
103 | return 0; | ||
104 | } | ||
105 | |||
106 | static inline int db5500_prcmu_set_arm_opp(u8 opp) | ||
107 | { | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static inline int db5500_prcmu_get_arm_opp(void) | ||
112 | { | ||
113 | return 0; | ||
114 | } | ||
115 | |||
116 | |||
117 | #endif /* CONFIG_MFD_DB5500_PRCMU */ | ||
118 | |||
119 | #endif /* __MFD_DB5500_PRCMU_H */ | ||