2 * Copyright (C) ST-Ericsson SA 2010
4 * License Terms: GNU General Public License v2
8 #ifndef __MFD_DB5500_PRCMU_H
9 #define __MFD_DB5500_PRCMU_H
11 #ifdef CONFIG_MFD_DB5500_PRCMU
13 void db5500_prcmu_early_init(void);
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);
18 int db5500_prcmu_abb_read(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
,
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);
34 #else /* !CONFIG_UX500_SOC_DB5500 */
36 static inline void db5500_prcmu_early_init(void) {}
38 static inline int db5500_prcmu_abb_read(u8 slave
, u8 reg
, u8
*value
, u8 size
)
43 static inline int db5500_prcmu_abb_write(u8 slave
, u8 reg
, u8
*value
, u8 size
)
48 static inline int db5500_prcmu_request_clock(u8 clock
, bool enable
)
53 static inline int db5500_prcmu_set_display_clocks(void)
58 static inline int db5500_prcmu_disable_dsipll(void)
63 static inline int db5500_prcmu_enable_dsipll(void)
68 static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state
)
73 static inline void db5500_prcmu_enable_wakeups(u32 wakeups
) {}
75 static inline int prcmu_resetout(u8 resoutn
, u8 state
)
80 static inline int db5500_prcmu_set_epod(u16 epod_id
, u8 epod_state
)
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
) {}
88 static inline int db5500_prcmu_set_power_state(u8 state
, bool keep_ulp_clk
,
94 static inline void db5500_prcmu_system_reset(u16 reset_code
) {}
96 static inline u16
db5500_prcmu_get_reset_code(void)
101 static inline bool db5500_prcmu_is_ac_wake_requested(void)
106 static inline int db5500_prcmu_set_arm_opp(u8 opp
)
111 static inline int db5500_prcmu_get_arm_opp(void)
117 #endif /* CONFIG_MFD_DB5500_PRCMU */
119 #endif /* __MFD_DB5500_PRCMU_H */