1 /*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License Terms: GNU General Public License v2
5 *
6 * U5500 PRCMU API.
7 */
8 #ifndef __MFD_DB5500_PRCMU_H
9 #define __MFD_DB5500_PRCMU_H
10
prcmu_resetout(u8 resoutn,u8 state)11 static inline int prcmu_resetout(u8 resoutn, u8 state)
12 {
13 return 0;
14 }
15
db5500_prcmu_set_epod(u16 epod_id,u8 epod_state)16 static inline int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state)
17 {
18 return 0;
19 }
20
db5500_prcmu_request_clock(u8 clock,bool enable)21 static inline int db5500_prcmu_request_clock(u8 clock, bool enable)
22 {
23 return 0;
24 }
25
db5500_prcmu_set_power_state(u8 state,bool keep_ulp_clk,bool keep_ap_pll)26 static inline int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk,
27 bool keep_ap_pll)
28 {
29 return 0;
30 }
31
db5500_prcmu_config_esram0_deep_sleep(u8 state)32 static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state)
33 {
34 return 0;
35 }
36
db5500_prcmu_get_reset_code(void)37 static inline u16 db5500_prcmu_get_reset_code(void)
38 {
39 return 0;
40 }
41
db5500_prcmu_is_ac_wake_requested(void)42 static inline bool db5500_prcmu_is_ac_wake_requested(void)
43 {
44 return 0;
45 }
46
db5500_prcmu_set_arm_opp(u8 opp)47 static inline int db5500_prcmu_set_arm_opp(u8 opp)
48 {
49 return 0;
50 }
51
db5500_prcmu_get_arm_opp(void)52 static inline int db5500_prcmu_get_arm_opp(void)
53 {
54 return 0;
55 }
56
db5500_prcmu_config_abb_event_readout(u32 abb_events)57 static inline void db5500_prcmu_config_abb_event_readout(u32 abb_events) {}
58
db5500_prcmu_get_abb_event_buffer(void __iomem ** buf)59 static inline void db5500_prcmu_get_abb_event_buffer(void __iomem **buf) {}
60
db5500_prcmu_system_reset(u16 reset_code)61 static inline void db5500_prcmu_system_reset(u16 reset_code) {}
62
db5500_prcmu_enable_wakeups(u32 wakeups)63 static inline void db5500_prcmu_enable_wakeups(u32 wakeups) {}
64
65 #ifdef CONFIG_MFD_DB5500_PRCMU
66
67 void db5500_prcmu_early_init(void);
68 int db5500_prcmu_set_display_clocks(void);
69 int db5500_prcmu_disable_dsipll(void);
70 int db5500_prcmu_enable_dsipll(void);
71 int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
72 int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
73
74 #else /* !CONFIG_UX500_SOC_DB5500 */
75
db5500_prcmu_early_init(void)76 static inline void db5500_prcmu_early_init(void) {}
77
db5500_prcmu_abb_read(u8 slave,u8 reg,u8 * value,u8 size)78 static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
79 {
80 return -ENOSYS;
81 }
82
db5500_prcmu_abb_write(u8 slave,u8 reg,u8 * value,u8 size)83 static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
84 {
85 return -ENOSYS;
86 }
87
db5500_prcmu_set_display_clocks(void)88 static inline int db5500_prcmu_set_display_clocks(void)
89 {
90 return 0;
91 }
92
db5500_prcmu_disable_dsipll(void)93 static inline int db5500_prcmu_disable_dsipll(void)
94 {
95 return 0;
96 }
97
db5500_prcmu_enable_dsipll(void)98 static inline int db5500_prcmu_enable_dsipll(void)
99 {
100 return 0;
101 }
102
103 #endif /* CONFIG_MFD_DB5500_PRCMU */
104
105 #endif /* __MFD_DB5500_PRCMU_H */
106