* [PATCH] ARM: OMAP2+: voltage: fixup oscillator handling when CONFIG_PM=n
@ 2012-11-15 1:13 Kevin Hilman
2012-11-15 1:31 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Kevin Hilman @ 2012-11-15 1:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Kevin Hilman <khilman@ti.com>
commit 908b75e8 (ARM: OMAP: add support for oscillator setup) added a new
API for oscillator setup, but is broken when CONFIG_PM=n.
The new functions have dummy definitions when CONFIG_PM=n, but also have
full implementations available, which conflict.
To fix, wrap the PM implmentations in #ifdef CONFIG_PM.
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
---
This applies to Tony's omap-for-v3.8/pm branch, which includes my
for_3.8-pm-voltage tag where this bug was introduced.
arch/arm/mach-omap2/pm.c | 2 ++
arch/arm/mach-omap2/pm.h | 2 +-
arch/arm/mach-omap2/vc.c | 2 ++
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 109a02e..ef668c756 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -39,6 +39,7 @@ static struct omap_device_pm_latency *pm_lats;
*/
int (*omap_pm_suspend)(void);
+#ifdef CONFIG_PM
/**
* struct omap2_oscillator - Describe the board main oscillator latencies
* @startup_time: oscillator startup latency
@@ -68,6 +69,7 @@ void omap_pm_get_oscillator(u32 *tstart, u32 *tshut)
*tstart = oscillator.startup_time;
*tshut = oscillator.shutdown_time;
}
+#endif
static int __init _init_omap_device(char *name)
{
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 4db7b23..02c291c 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -135,7 +135,7 @@ extern void omap_pm_get_oscillator(u32 *tstart, u32 *tshut);
extern void omap_pm_setup_sr_i2c_pcb_length(u32 mm);
#else
static inline void omap_pm_setup_oscillator(u32 tstart, u32 tshut) { }
-static inline void omap_pm_get_oscillator(u32 *tstart, u32 *tshut) { }
+static inline void omap_pm_get_oscillator(u32 *tstart, u32 *tshut) { *tstart = *tshut = 0; }
static inline void omap_pm_setup_sr_i2c_pcb_length(u32 mm) { }
#endif
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
index 687aa86..a89ec8a 100644
--- a/arch/arm/mach-omap2/vc.c
+++ b/arch/arm/mach-omap2/vc.c
@@ -666,6 +666,7 @@ static u8 omap_vc_calc_vsel(struct voltagedomain *voltdm, u32 uvolt)
return voltdm->pmic->uv_to_vsel(uvolt);
}
+#ifdef CONFIG_PM
/**
* omap_pm_setup_sr_i2c_pcb_length - set length of SR I2C traces on PCB
* @mm: length of the PCB trace in millimetres
@@ -678,6 +679,7 @@ void __init omap_pm_setup_sr_i2c_pcb_length(u32 mm)
{
sr_i2c_pcb_length = mm;
}
+#endif
void __init omap_vc_init_channel(struct voltagedomain *voltdm)
{
--
1.8.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ARM: OMAP2+: voltage: fixup oscillator handling when CONFIG_PM=n
2012-11-15 1:13 [PATCH] ARM: OMAP2+: voltage: fixup oscillator handling when CONFIG_PM=n Kevin Hilman
@ 2012-11-15 1:31 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2012-11-15 1:31 UTC (permalink / raw)
To: linux-arm-kernel
* Kevin Hilman <khilman@deeprootsystems.com> [121114 17:15]:
> From: Kevin Hilman <khilman@ti.com>
>
> commit 908b75e8 (ARM: OMAP: add support for oscillator setup) added a new
> API for oscillator setup, but is broken when CONFIG_PM=n.
>
> The new functions have dummy definitions when CONFIG_PM=n, but also have
> full implementations available, which conflict.
>
> To fix, wrap the PM implmentations in #ifdef CONFIG_PM.
>
> Cc: Tero Kristo <t-kristo@ti.com>
> Signed-off-by: Kevin Hilman <khilman@ti.com>
> ---
> This applies to Tony's omap-for-v3.8/pm branch, which includes my
> for_3.8-pm-voltage tag where this bug was introduced.
Thanks for fixing this quickly. Applied to omap-for-v3.8/pm-part2
and pushed out.
Regards,
Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-15 1:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-15 1:13 [PATCH] ARM: OMAP2+: voltage: fixup oscillator handling when CONFIG_PM=n Kevin Hilman
2012-11-15 1:31 ` Tony Lindgren
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).