linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd : dbx500 : fix compilation error
@ 2012-04-02 15:55 Daniel Lezcano
  2012-04-03 21:29 ` Linus Walleij
  2012-04-16 14:42 ` Samuel Ortiz
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Lezcano @ 2012-04-02 15:55 UTC (permalink / raw)
  To: sameo; +Cc: srinidhi.kasagar, linus.walleij, linux-kernel

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>
---
 include/linux/mfd/db5500-prcmu.h |   88 ++++++++++++++++----------------------
 1 files changed, 37 insertions(+), 51 deletions(-)

diff --git a/include/linux/mfd/db5500-prcmu.h b/include/linux/mfd/db5500-prcmu.h
index 9890687..5a049df 100644
--- a/include/linux/mfd/db5500-prcmu.h
+++ b/include/linux/mfd/db5500-prcmu.h
@@ -8,41 +8,14 @@
 #ifndef __MFD_DB5500_PRCMU_H
 #define __MFD_DB5500_PRCMU_H
 
-#ifdef CONFIG_MFD_DB5500_PRCMU
-
-void db5500_prcmu_early_init(void);
-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);
-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);
-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);
-
-#else /* !CONFIG_UX500_SOC_DB5500 */
-
-static inline void db5500_prcmu_early_init(void) {}
-
-static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
+static inline int prcmu_resetout(u8 resoutn, u8 state)
 {
-	return -ENOSYS;
+	return 0;
 }
 
-static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
+static inline int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state)
 {
-	return -ENOSYS;
+	return 0;
 }
 
 static inline int db5500_prcmu_request_clock(u8 clock, bool enable)
@@ -50,69 +23,82 @@ static inline int db5500_prcmu_request_clock(u8 clock, bool enable)
 	return 0;
 }
 
-static inline int db5500_prcmu_set_display_clocks(void)
+static inline int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk,
+	bool keep_ap_pll)
 {
 	return 0;
 }
 
-static inline int db5500_prcmu_disable_dsipll(void)
+static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state)
 {
 	return 0;
 }
 
-static inline int db5500_prcmu_enable_dsipll(void)
+static inline u16 db5500_prcmu_get_reset_code(void)
 {
 	return 0;
 }
 
-static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state)
+static inline bool db5500_prcmu_is_ac_wake_requested(void)
 {
 	return 0;
 }
 
-static inline void db5500_prcmu_enable_wakeups(u32 wakeups) {}
-
-static inline int prcmu_resetout(u8 resoutn, u8 state)
+static inline int db5500_prcmu_set_arm_opp(u8 opp)
 {
 	return 0;
 }
 
-static inline int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state)
+static inline int db5500_prcmu_get_arm_opp(void)
 {
 	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_get_abb_event_buffer(void __iomem **buf) {}
 
 static inline void db5500_prcmu_system_reset(u16 reset_code) {}
 
-static inline u16 db5500_prcmu_get_reset_code(void)
+static inline void db5500_prcmu_enable_wakeups(u32 wakeups) {}
+
+#ifdef CONFIG_MFD_DB5500_PRCMU
+
+void db5500_prcmu_early_init(void);
+int db5500_prcmu_set_display_clocks(void);
+int db5500_prcmu_disable_dsipll(void);
+int db5500_prcmu_enable_dsipll(void);
+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);
+
+#else /* !CONFIG_UX500_SOC_DB5500 */
+
+static inline void db5500_prcmu_early_init(void) {}
+
+static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
 {
-	return 0;
+	return -ENOSYS;
 }
 
-static inline bool db5500_prcmu_is_ac_wake_requested(void)
+static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
 {
-	return 0;
+	return -ENOSYS;
 }
 
-static inline int db5500_prcmu_set_arm_opp(u8 opp)
+static inline int db5500_prcmu_set_display_clocks(void)
 {
 	return 0;
 }
 
-static inline int db5500_prcmu_get_arm_opp(void)
+static inline int db5500_prcmu_disable_dsipll(void)
 {
 	return 0;
 }
 
+static inline int db5500_prcmu_enable_dsipll(void)
+{
+	return 0;
+}
 
 #endif /* CONFIG_MFD_DB5500_PRCMU */
 
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mfd : dbx500 : fix compilation error
  2012-04-02 15:55 [PATCH] mfd : dbx500 : fix compilation error Daniel Lezcano
@ 2012-04-03 21:29 ` Linus Walleij
  2012-04-16 14:42 ` Samuel Ortiz
  1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2012-04-03 21:29 UTC (permalink / raw)
  To: Daniel Lezcano, sameo; +Cc: srinidhi.kasagar, linus.walleij, linux-kernel

On Mon, Apr 2, 2012 at 5:55 PM, Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:

> 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>
Sam, please push this to the -rc series if you can.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mfd : dbx500 : fix compilation error
  2012-04-02 15:55 [PATCH] mfd : dbx500 : fix compilation error Daniel Lezcano
  2012-04-03 21:29 ` Linus Walleij
@ 2012-04-16 14:42 ` Samuel Ortiz
  2012-04-16 20:13   ` Linus Walleij
  1 sibling, 1 reply; 4+ messages in thread
From: Samuel Ortiz @ 2012-04-16 14:42 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: srinidhi.kasagar, linus.walleij, linux-kernel

Hi Daniel,

On Mon, Apr 02, 2012 at 05:55:48PM +0200, Daniel Lezcano wrote:
> 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>
Applied to my for-linus branch, thanks.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mfd : dbx500 : fix compilation error
  2012-04-16 14:42 ` Samuel Ortiz
@ 2012-04-16 20:13   ` Linus Walleij
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2012-04-16 20:13 UTC (permalink / raw)
  To: Samuel Ortiz
  Cc: Daniel Lezcano, srinidhi.kasagar, linus.walleij, linux-kernel

On Mon, Apr 16, 2012 at 4:42 PM, Samuel Ortiz <sameo@linux.intel.com> wrote:

> Applied to my for-linus branch, thanks.

I'll rebase the recent 5500 deletion patches on top of that as soon as it's
available.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-16 20:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-02 15:55 [PATCH] mfd : dbx500 : fix compilation error Daniel Lezcano
2012-04-03 21:29 ` Linus Walleij
2012-04-16 14:42 ` Samuel Ortiz
2012-04-16 20:13   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).