Commit ff19473b authored by Linus Walleij's avatar Linus Walleij

Merge branch 'ib-omap' into devel

parents c4c958aa 5284521a
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <linux/cpu_pm.h>
#include <linux/suspend.h> #include <linux/suspend.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
...@@ -29,8 +30,6 @@ ...@@ -29,8 +30,6 @@
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/time.h> #include <linux/time.h>
#include <linux/gpio.h>
#include <linux/platform_data/gpio-omap.h>
#include <asm/fncpy.h> #include <asm/fncpy.h>
...@@ -87,7 +86,7 @@ static int omap2_enter_full_retention(void) ...@@ -87,7 +86,7 @@ static int omap2_enter_full_retention(void)
l = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0) | OMAP24XX_USBSTANDBYCTRL; l = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0) | OMAP24XX_USBSTANDBYCTRL;
omap_ctrl_writel(l, OMAP2_CONTROL_DEVCONF0); omap_ctrl_writel(l, OMAP2_CONTROL_DEVCONF0);
omap2_gpio_prepare_for_idle(0); cpu_cluster_pm_enter();
/* One last check for pending IRQs to avoid extra latency due /* One last check for pending IRQs to avoid extra latency due
* to sleeping unnecessarily. */ * to sleeping unnecessarily. */
...@@ -100,7 +99,7 @@ static int omap2_enter_full_retention(void) ...@@ -100,7 +99,7 @@ static int omap2_enter_full_retention(void)
OMAP_SDRC_REGADDR(SDRC_POWER)); OMAP_SDRC_REGADDR(SDRC_POWER));
no_sleep: no_sleep:
omap2_gpio_resume_after_idle(); cpu_cluster_pm_exit();
clk_enable(osc_ck); clk_enable(osc_ck);
......
...@@ -18,19 +18,18 @@ ...@@ -18,19 +18,18 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <linux/cpu_pm.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/suspend.h> #include <linux/suspend.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/gpio.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/omap-dma.h> #include <linux/omap-dma.h>
#include <linux/omap-gpmc.h> #include <linux/omap-gpmc.h>
#include <linux/platform_data/gpio-omap.h>
#include <trace/events/power.h> #include <trace/events/power.h>
...@@ -197,7 +196,6 @@ void omap_sram_idle(void) ...@@ -197,7 +196,6 @@ void omap_sram_idle(void)
int mpu_next_state = PWRDM_POWER_ON; int mpu_next_state = PWRDM_POWER_ON;
int per_next_state = PWRDM_POWER_ON; int per_next_state = PWRDM_POWER_ON;
int core_next_state = PWRDM_POWER_ON; int core_next_state = PWRDM_POWER_ON;
int per_going_off;
u32 sdrc_pwr = 0; u32 sdrc_pwr = 0;
mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm); mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);
...@@ -227,10 +225,8 @@ void omap_sram_idle(void) ...@@ -227,10 +225,8 @@ void omap_sram_idle(void)
pwrdm_pre_transition(NULL); pwrdm_pre_transition(NULL);
/* PER */ /* PER */
if (per_next_state < PWRDM_POWER_ON) { if (per_next_state == PWRDM_POWER_OFF)
per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0; cpu_cluster_pm_enter();
omap2_gpio_prepare_for_idle(per_going_off);
}
/* CORE */ /* CORE */
if (core_next_state < PWRDM_POWER_ON) { if (core_next_state < PWRDM_POWER_ON) {
...@@ -295,8 +291,8 @@ void omap_sram_idle(void) ...@@ -295,8 +291,8 @@ void omap_sram_idle(void)
pwrdm_post_transition(NULL); pwrdm_post_transition(NULL);
/* PER */ /* PER */
if (per_next_state < PWRDM_POWER_ON) if (per_next_state == PWRDM_POWER_OFF)
omap2_gpio_resume_after_idle(); cpu_cluster_pm_exit();
} }
static void omap3_pm_idle(void) static void omap3_pm_idle(void)
......
This diff is collapsed.
...@@ -197,23 +197,12 @@ struct omap_gpio_platform_data { ...@@ -197,23 +197,12 @@ struct omap_gpio_platform_data {
bool is_mpuio; /* whether the bank is of type MPUIO */ bool is_mpuio; /* whether the bank is of type MPUIO */
u32 non_wakeup_gpios; u32 non_wakeup_gpios;
u32 quirks; /* Version specific quirks mask */
struct omap_gpio_reg_offs *regs; struct omap_gpio_reg_offs *regs;
/* Return context loss count due to PM states changing */ /* Return context loss count due to PM states changing */
int (*get_context_loss_count)(struct device *dev); int (*get_context_loss_count)(struct device *dev);
}; };
#if IS_BUILTIN(CONFIG_GPIO_OMAP)
extern void omap2_gpio_prepare_for_idle(int off_mode);
extern void omap2_gpio_resume_after_idle(void);
#else
static inline void omap2_gpio_prepare_for_idle(int off_mode)
{
}
static inline void omap2_gpio_resume_after_idle(void)
{
}
#endif
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment