db5500-prcmu.h 2.7 KB
Newer Older
L
Linus Walleij 已提交
1 2 3 4 5 6 7
/*
 * Copyright (C) ST-Ericsson SA 2010
 *
 * License Terms: GNU General Public License v2
 *
 * U5500 PRCMU API.
 */
8 9
#ifndef __MFD_DB5500_PRCMU_H
#define __MFD_DB5500_PRCMU_H
L
Linus Walleij 已提交
10

11
#ifdef CONFIG_MFD_DB5500_PRCMU
L
Linus Walleij 已提交
12 13

void db5500_prcmu_early_init(void);
14 15 16 17
int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state);
int db5500_prcmu_set_display_clocks(void);
int db5500_prcmu_disable_dsipll(void);
int db5500_prcmu_enable_dsipll(void);
L
Linus Walleij 已提交
18 19
int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
20 21 22 23 24 25 26 27 28 29 30 31 32
void db5500_prcmu_enable_wakeups(u32 wakeups);
int db5500_prcmu_request_clock(u8 clock, bool enable);
void db5500_prcmu_config_abb_event_readout(u32 abb_events);
void db5500_prcmu_get_abb_event_buffer(void __iomem **buf);
int prcmu_resetout(u8 resoutn, u8 state);
int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk,
	bool keep_ap_pll);
int db5500_prcmu_config_esram0_deep_sleep(u8 state);
void db5500_prcmu_system_reset(u16 reset_code);
u16 db5500_prcmu_get_reset_code(void);
bool db5500_prcmu_is_ac_wake_requested(void);
int db5500_prcmu_set_arm_opp(u8 opp);
int db5500_prcmu_get_arm_opp(void);
L
Linus Walleij 已提交
33 34 35

#else /* !CONFIG_UX500_SOC_DB5500 */

36
static inline void db5500_prcmu_early_init(void) {}
L
Linus Walleij 已提交
37 38 39 40 41 42 43 44 45 46 47

static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
{
	return -ENOSYS;
}

static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
{
	return -ENOSYS;
}

48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
static inline int db5500_prcmu_request_clock(u8 clock, bool enable)
{
	return 0;
}

static inline int db5500_prcmu_set_display_clocks(void)
{
	return 0;
}

static inline int db5500_prcmu_disable_dsipll(void)
{
	return 0;
}

static inline int db5500_prcmu_enable_dsipll(void)
{
	return 0;
}
L
Linus Walleij 已提交
67

68
static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state)
L
Linus Walleij 已提交
69 70 71 72
{
	return 0;
}

73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
static inline void db5500_prcmu_enable_wakeups(u32 wakeups) {}

static inline int prcmu_resetout(u8 resoutn, u8 state)
{
	return 0;
}

static inline int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state)
{
	return 0;
}

static inline void db5500_prcmu_get_abb_event_buffer(void __iomem **buf) {}
static inline void db5500_prcmu_config_abb_event_readout(u32 abb_events) {}

static inline int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk,
	bool keep_ap_pll)
{
	return 0;
}

static inline void db5500_prcmu_system_reset(u16 reset_code) {}

static inline u16 db5500_prcmu_get_reset_code(void)
{
	return 0;
}

static inline bool db5500_prcmu_is_ac_wake_requested(void)
{
	return 0;
}

static inline int db5500_prcmu_set_arm_opp(u8 opp)
{
	return 0;
}

static inline int db5500_prcmu_get_arm_opp(void)
{
	return 0;
}


#endif /* CONFIG_MFD_DB5500_PRCMU */

#endif /* __MFD_DB5500_PRCMU_H */