Skip to content

Commit 4accdff

Browse files
Daniel LezcanoSamuel Ortiz
authored andcommitted
mfd : Fix dbx500 compilation error
The ux500 default config enables the db5500 and the db8500. The incoming cpuidle driver uses the 'prcmu_enable_wakeups' and the 'prcmu_set_power_state' functions but these ones are defined but not implemented for the db5500, leading to an unresolved symbol error at link time. In order to compile, we have to disable the db5500 support which is not acceptable for the default config. I noticed there are also some other functions which are defined but not implemented. This patch fix this by removing the functions definitions and move out of the config section the empty functions which are normally used when the DB550 config is disabled. Only the functions which are not implemented are concerned by this modification. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
1 parent e816b57 commit 4accdff

1 file changed

Lines changed: 37 additions & 51 deletions

File tree

‎include/linux/mfd/db5500-prcmu.h‎

Lines changed: 37 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,111 +8,97 @@
88
#ifndef __MFD_DB5500_PRCMU_H
99
#define __MFD_DB5500_PRCMU_H
1010

11-
#ifdef CONFIG_MFD_DB5500_PRCMU
12-
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,
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);
33-
34-
#else /* !CONFIG_UX500_SOC_DB5500 */
35-
36-
static inline void db5500_prcmu_early_init(void) {}
37-
38-
static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
11+
static inline int prcmu_resetout(u8 resoutn, u8 state)
3912
{
40-
return -ENOSYS;
13+
return 0;
4114
}
4215

43-
static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
16+
static inline int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state)
4417
{
45-
return -ENOSYS;
18+
return 0;
4619
}
4720

4821
static inline int db5500_prcmu_request_clock(u8 clock, bool enable)
4922
{
5023
return 0;
5124
}
5225

53-
static inline int db5500_prcmu_set_display_clocks(void)
26+
static inline int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk,
27+
bool keep_ap_pll)
5428
{
5529
return 0;
5630
}
5731

58-
static inline int db5500_prcmu_disable_dsipll(void)
32+
static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state)
5933
{
6034
return 0;
6135
}
6236

63-
static inline int db5500_prcmu_enable_dsipll(void)
37+
static inline u16 db5500_prcmu_get_reset_code(void)
6438
{
6539
return 0;
6640
}
6741

68-
static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state)
42+
static inline bool db5500_prcmu_is_ac_wake_requested(void)
6943
{
7044
return 0;
7145
}
7246

73-
static inline void db5500_prcmu_enable_wakeups(u32 wakeups) {}
74-
75-
static inline int prcmu_resetout(u8 resoutn, u8 state)
47+
static inline int db5500_prcmu_set_arm_opp(u8 opp)
7648
{
7749
return 0;
7850
}
7951

80-
static inline int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state)
52+
static inline int db5500_prcmu_get_arm_opp(void)
8153
{
8254
return 0;
8355
}
8456

85-
static inline void db5500_prcmu_get_abb_event_buffer(void __iomem **buf) {}
8657
static inline void db5500_prcmu_config_abb_event_readout(u32 abb_events) {}
8758

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-
}
59+
static inline void db5500_prcmu_get_abb_event_buffer(void __iomem **buf) {}
9360

9461
static inline void db5500_prcmu_system_reset(u16 reset_code) {}
9562

96-
static inline u16 db5500_prcmu_get_reset_code(void)
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+
76+
static inline void db5500_prcmu_early_init(void) {}
77+
78+
static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
9779
{
98-
return 0;
80+
return -ENOSYS;
9981
}
10082

101-
static inline bool db5500_prcmu_is_ac_wake_requested(void)
83+
static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
10284
{
103-
return 0;
85+
return -ENOSYS;
10486
}
10587

106-
static inline int db5500_prcmu_set_arm_opp(u8 opp)
88+
static inline int db5500_prcmu_set_display_clocks(void)
10789
{
10890
return 0;
10991
}
11092

111-
static inline int db5500_prcmu_get_arm_opp(void)
93+
static inline int db5500_prcmu_disable_dsipll(void)
11294
{
11395
return 0;
11496
}
11597

98+
static inline int db5500_prcmu_enable_dsipll(void)
99+
{
100+
return 0;
101+
}
116102

117103
#endif /* CONFIG_MFD_DB5500_PRCMU */
118104

0 commit comments

Comments
 (0)