* [PATCH PM-20081106 0/3] Build fixes into pm-20081106 branch
@ 2008-11-18 12:37 Högander Jouni
2008-11-18 12:42 ` [PATCH PM-20081106 1/3] OMAP3: PM: Do not build suspend code if SUSPEND is not enabled Jouni Hogander
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Högander Jouni @ 2008-11-18 12:37 UTC (permalink / raw)
To: linux-omap; +Cc: Kevin Hilman
This patch set fixes miscellaneous build problems in pm-20081106 branch.
--
Jouni Högander
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH PM-20081106 1/3] OMAP3: PM: Do not build suspend code if SUSPEND is not enabled
2008-11-18 12:37 [PATCH PM-20081106 0/3] Build fixes into pm-20081106 branch Högander Jouni
@ 2008-11-18 12:42 ` Jouni Hogander
2008-11-18 12:42 ` [PATCH PM-20081106 2/3] OMAP: PM: Build fails if PM " Jouni Hogander
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jouni Hogander @ 2008-11-18 12:42 UTC (permalink / raw)
To: linux-omap
Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
---
arch/arm/mach-omap2/pm34xx.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index d2330c4..d499dc7 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -67,7 +67,9 @@
struct power_state {
struct powerdomain *pwrdm;
u32 next_state;
+#ifdef CONFIG_SUSPEND
u32 saved_state;
+#endif
struct list_head node;
};
@@ -511,6 +513,7 @@ out:
local_irq_enable();
}
+#ifdef CONFIG_SUSPEND
static int omap3_pm_prepare(void)
{
saved_idle = pm_idle;
@@ -584,6 +587,7 @@ static struct platform_suspend_ops omap_pm_ops = {
.finish = omap3_pm_finish,
.valid = suspend_valid_only_mem,
};
+#endif /* CONFIG_SUSPEND */
static void __init prcm_setup_regs(void)
{
@@ -862,7 +866,10 @@ int __init omap3_pm_init(void)
core_pwrdm = pwrdm_lookup("core_pwrdm");
omap_push_sram_idle();
+
+#ifdef CONFIG_SUSPEND
suspend_set_ops(&omap_pm_ops);
+#endif /* CONFIG_SUSPEND */
pm_idle = omap3_pm_idle;
omap3_idle_init();
--
1.6.0.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH PM-20081106 2/3] OMAP: PM: Build fails if PM is not enabled
2008-11-18 12:37 [PATCH PM-20081106 0/3] Build fixes into pm-20081106 branch Högander Jouni
2008-11-18 12:42 ` [PATCH PM-20081106 1/3] OMAP3: PM: Do not build suspend code if SUSPEND is not enabled Jouni Hogander
@ 2008-11-18 12:42 ` Jouni Hogander
2008-11-18 12:42 ` [PATCH PM-20081106 3/3] OMAP2: PM: Fix omap2 build Jouni Hogander
2008-11-18 18:50 ` [PATCH PM-20081106 0/3] Build fixes into pm-20081106 branch Kevin Hilman
3 siblings, 0 replies; 5+ messages in thread
From: Jouni Hogander @ 2008-11-18 12:42 UTC (permalink / raw)
To: linux-omap
This patch fixes build in case if PM is not enabled
Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
---
arch/arm/mach-omap2/control.c | 6 ++++--
arch/arm/mach-omap2/serial.c | 32 +++++++++++++++++++-------------
arch/arm/plat-omap/Kconfig | 3 ++-
arch/arm/plat-omap/include/mach/sram.h | 5 +++++
arch/arm/plat-omap/sram.c | 2 ++
5 files changed, 32 insertions(+), 16 deletions(-)
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 743b57e..d28b823 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -26,6 +26,7 @@
static void __iomem *omap2_ctrl_base;
+#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
struct omap3_scratchpad {
u32 boot_config_ptr;
u32 public_restore_ptr;
@@ -133,6 +134,7 @@ struct omap3_control_regs {
};
static struct omap3_control_regs control_context;
+#endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */
#define OMAP_CTRL_REGADDR(reg) (omap2_ctrl_base + (reg))
@@ -176,7 +178,7 @@ void omap_ctrl_writel(u32 val, u16 offset)
__raw_writel(val, OMAP_CTRL_REGADDR(offset));
}
-#ifdef CONFIG_ARCH_OMAP3
+#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
/*
* Clears the scratchpad contents in case of cold boot-
* called during bootup
@@ -425,4 +427,4 @@ void omap3_control_restore_context(void)
omap_ctrl_writel(control_context.csi, OMAP343X_CONTROL_CSI);
return;
}
-#endif /* CONFIG_ARCH_OMAP3 */
+#endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 65cce87..95a2299 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -51,7 +51,7 @@ struct omap_uart_state {
struct plat_serial8250_port *p;
struct list_head node;
-#ifdef CONFIG_ARCH_OMAP3
+#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
int context_valid;
/* Registers to be saved/restored for OFF-mode */
@@ -126,7 +126,7 @@ static inline void __init omap_uart_reset(struct omap_uart_state *uart)
serial_write_reg(p, UART_OMAP_SYSC, (0x02 << 3) | (1 << 2) | (1 << 0));
}
-#ifdef CONFIG_ARCH_OMAP3
+#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
static void omap_uart_save_context(struct omap_uart_state *uart)
{
u16 lcr = 0;
@@ -186,6 +186,18 @@ static inline void omap_uart_save_context(struct omap_uart_state *uart) {}
static inline void omap_uart_restore_context(struct omap_uart_state *uart) {}
#endif /* CONFIG_ARCH_OMAP3 */
+static inline void omap_uart_enable_clocks(struct omap_uart_state *uart)
+{
+ if (uart->clocked)
+ return;
+
+ clk_enable(uart->ick);
+ clk_enable(uart->fck);
+ uart->clocked = 1;
+ omap_uart_restore_context(uart);
+}
+
+#ifdef CONFIG_PM
static void omap_uart_smart_idle_enable(struct omap_uart_state *uart,
int enable)
{
@@ -201,17 +213,6 @@ static void omap_uart_smart_idle_enable(struct omap_uart_state *uart,
serial_write_reg(p, UART_OMAP_SYSC, sysc);
}
-static inline void omap_uart_enable_clocks(struct omap_uart_state *uart)
-{
- if (uart->clocked)
- return;
-
- clk_enable(uart->ick);
- clk_enable(uart->fck);
- uart->clocked = 1;
- omap_uart_restore_context(uart);
-}
-
static inline void omap_uart_disable_clocks(struct omap_uart_state *uart)
{
if (!uart->clocked)
@@ -409,6 +410,11 @@ static void omap_uart_pm(struct uart_port *port,
break;
}
}
+#else
+static inline void omap_uart_idle_init(struct omap_uart_state *uart) {}
+static inline void omap_uart_pm(struct uart_port *port,
+ unsigned int state, unsigned int old_state) {}
+#endif /* CONFIG_PM */
void __init omap_serial_init(void)
{
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 0ee0985..ca67862 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -58,7 +58,7 @@ config OMAP_DEBUG_CLOCKDOMAIN
config OMAP_SMARTREFLEX
bool "SmartReflex support"
- depends on ARCH_OMAP34XX && TWL4030_CORE
+ depends on ARCH_OMAP34XX && TWL4030_CORE && PM
help
Say Y if you want to enable SmartReflex.
@@ -264,6 +264,7 @@ config OMAP_PM_NOOP
bool "No-op/debug PM layer"
config OMAP_PM_SRF
+ depends on PM
bool "PM layer implemented using SRF"
endchoice
diff --git a/arch/arm/plat-omap/include/mach/sram.h b/arch/arm/plat-omap/include/mach/sram.h
index 87f4567..0c0b45f 100644
--- a/arch/arm/plat-omap/include/mach/sram.h
+++ b/arch/arm/plat-omap/include/mach/sram.h
@@ -63,6 +63,11 @@ extern u32 omap3_sram_configure_core_dpll(u32 sdrc_rfr_ctrl,
u32 sdrc_actim_ctrla,
u32 sdrc_actim_ctrlb, u32 m2);
extern unsigned long omap3_sram_configure_core_dpll_sz;
+
+#ifdef CONFIG_PM
extern void omap_push_sram_idle(void);
+#else
+static inline void omap_push_sram_idle(void) {}
+#endif /* CONFIG_PM */
#endif
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index ea95488..b0cefd4 100755
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -373,6 +373,7 @@ u32 omap3_configure_core_dpll(u32 sdrc_rfr_ctrl, u32 sdrc_actim_ctrla,
sdrc_actim_ctrlb, m2);
}
+#ifdef CONFIG_PM
void omap3_sram_restore_context(void)
{
omap_sram_ceil = omap_sram_base + omap_sram_size;
@@ -382,6 +383,7 @@ void omap3_sram_restore_context(void)
omap3_sram_configure_core_dpll_sz);
omap_push_sram_idle();
}
+#endif /* CONFIG_PM */
int __init omap3_sram_init(void)
{
--
1.6.0.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH PM-20081106 3/3] OMAP2: PM: Fix omap2 build
2008-11-18 12:37 [PATCH PM-20081106 0/3] Build fixes into pm-20081106 branch Högander Jouni
2008-11-18 12:42 ` [PATCH PM-20081106 1/3] OMAP3: PM: Do not build suspend code if SUSPEND is not enabled Jouni Hogander
2008-11-18 12:42 ` [PATCH PM-20081106 2/3] OMAP: PM: Build fails if PM " Jouni Hogander
@ 2008-11-18 12:42 ` Jouni Hogander
2008-11-18 18:50 ` [PATCH PM-20081106 0/3] Build fixes into pm-20081106 branch Kevin Hilman
3 siblings, 0 replies; 5+ messages in thread
From: Jouni Hogander @ 2008-11-18 12:42 UTC (permalink / raw)
To: linux-omap
This patch fixes build in case of omap2.
Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
---
arch/arm/mach-omap2/pm.h | 4 ++++
arch/arm/mach-omap2/pm24xx.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 91431f9..4b1ba7c 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -32,7 +32,11 @@ extern void *omap3_secure_ram_storage;
extern void omap2_block_sleep(void);
extern void omap2_allow_sleep(void);
+#ifdef CONFIG_ARCH_OMAP3
extern void omap3_pm_off_mode_enable(int);
+#else
+#define omap3_pm_off_mode_enable(int) do {} while (0);
+#endif
extern int set_pwrdm_state(struct powerdomain *pwrdm, u32 state);
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 4a19804..b385f3c 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -338,7 +338,7 @@ static struct platform_suspend_ops omap_pm_ops = {
.valid = suspend_valid_only_mem,
};
-static int _pm_clkdm_enable_hwsup(struct clockdomain *clkdm)
+static int _pm_clkdm_enable_hwsup(struct clockdomain *clkdm, void *unused)
{
omap2_clkdm_allow_idle(clkdm);
return 0;
@@ -390,7 +390,7 @@ static void __init prcm_setup_regs(void)
omap2_clkdm_sleep(gfx_clkdm);
/* Enable clockdomain hardware-supervised control for all clkdms */
- clkdm_for_each(_pm_clkdm_enable_hwsup);
+ clkdm_for_each(_pm_clkdm_enable_hwsup, NULL);
/* Enable clock autoidle for all domains */
cm_write_mod_reg(OMAP24XX_AUTO_CAM |
--
1.6.0.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH PM-20081106 0/3] Build fixes into pm-20081106 branch
2008-11-18 12:37 [PATCH PM-20081106 0/3] Build fixes into pm-20081106 branch Högander Jouni
` (2 preceding siblings ...)
2008-11-18 12:42 ` [PATCH PM-20081106 3/3] OMAP2: PM: Fix omap2 build Jouni Hogander
@ 2008-11-18 18:50 ` Kevin Hilman
3 siblings, 0 replies; 5+ messages in thread
From: Kevin Hilman @ 2008-11-18 18:50 UTC (permalink / raw)
To: Högander Jouni; +Cc: linux-omap
jouni.hogander@nokia.com (Högander Jouni) writes:
> This patch set fixes miscellaneous build problems in pm-20081106 branch.
>
Thanks, pulling into next PM branch.
Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-11-18 18:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-18 12:37 [PATCH PM-20081106 0/3] Build fixes into pm-20081106 branch Högander Jouni
2008-11-18 12:42 ` [PATCH PM-20081106 1/3] OMAP3: PM: Do not build suspend code if SUSPEND is not enabled Jouni Hogander
2008-11-18 12:42 ` [PATCH PM-20081106 2/3] OMAP: PM: Build fails if PM " Jouni Hogander
2008-11-18 12:42 ` [PATCH PM-20081106 3/3] OMAP2: PM: Fix omap2 build Jouni Hogander
2008-11-18 18:50 ` [PATCH PM-20081106 0/3] Build fixes into pm-20081106 branch Kevin Hilman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.