Skip to contentSkip to conversation

Build fixes into pm-20081106 branch

PATCH In review Högander Jouni 2 participants 5 messages Nov 18, 2008

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Build fixes into pm-20081106 branch

This patch set fixes miscellaneous build problems in pm-20081106 branch.

Signature · 6 lines
Jouni Högander

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

PATCH 3/3 OMAP2: PM: Fix omap2 build

This patch fixes build in case of omap2.

---
 arch/arm/mach-omap2/pm.h     |    4 ++++
 arch/arm/mach-omap2/pm24xx.c |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/pm.h +4 -0
index 91431f9..4b1ba7c 100644
@@ -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);
 
 
arch/arm/mach-omap2/pm24xx.c +2 -2
index 4a19804..b385f3c 100644
@@ -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 |
Signature · 1 line
1.6.0.1
#1 lore raw

PATCH 1/3 OMAP3: PM: Do not build suspend code if SUSPEND is not enabled

In reply to Högander Jouni
---
 arch/arm/mach-omap2/pm34xx.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/pm34xx.c +7 -0
index d2330c4..d499dc7 100644
@@ -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();
Signature · 1 line
1.6.0.1
#2 lore raw

PATCH 2/3 OMAP: PM: Build fails if PM is not enabled

In reply to Högander Jouni

This patch fixes build in case if PM is not enabled

---
 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(-)
arch/arm/mach-omap2/control.c +4 -2
index 743b57e..d28b823 100644
@@ -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 */
arch/arm/mach-omap2/serial.c +19 -13
index 65cce87..95a2299 100644
@@ -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)
 {
arch/arm/plat-omap/Kconfig +2 -1
index 0ee0985..ca67862 100644
@@ -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
arch/arm/plat-omap/include/mach/sram.h +5 -0
index 87f4567..0c0b45f 100644
@@ -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
arch/arm/plat-omap/sram.c +2 -0
index ea95488..b0cefd4 100755
@@ -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)
 {
Signature · 1 line
1.6.0.1