Skip to content

Commit

Permalink
Merge remote-tracking branch 'gpio/ib-omap' into omap-for-v4.21/dt-ti…
Browse files Browse the repository at this point in the history
…-sysc
  • Loading branch information
Tony Lindgren committed Oct 18, 2018
2 parents a35f408 + 5284521 commit b3378de
Show file tree
Hide file tree
Showing 4 changed files with 237 additions and 130 deletions.
7 changes: 3 additions & 4 deletions arch/arm/mach-omap2/pm24xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* published by the Free Software Foundation.
*/

#include <linux/cpu_pm.h>
#include <linux/suspend.h>
#include <linux/sched.h>
#include <linux/proc_fs.h>
Expand All @@ -29,8 +30,6 @@
#include <linux/clk-provider.h>
#include <linux/irq.h>
#include <linux/time.h>
#include <linux/gpio.h>
#include <linux/platform_data/gpio-omap.h>

#include <asm/fncpy.h>

Expand Down Expand Up @@ -87,7 +86,7 @@ static int omap2_enter_full_retention(void)
l = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0) | OMAP24XX_USBSTANDBYCTRL;
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
* to sleeping unnecessarily. */
Expand All @@ -100,7 +99,7 @@ static int omap2_enter_full_retention(void)
OMAP_SDRC_REGADDR(SDRC_POWER));

no_sleep:
omap2_gpio_resume_after_idle();
cpu_cluster_pm_exit();

clk_enable(osc_ck);

Expand Down
14 changes: 5 additions & 9 deletions arch/arm/mach-omap2/pm34xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@
* published by the Free Software Foundation.
*/

#include <linux/cpu_pm.h>
#include <linux/pm.h>
#include <linux/suspend.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/list.h>
#include <linux/err.h>
#include <linux/gpio.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/omap-dma.h>
#include <linux/omap-gpmc.h>
#include <linux/platform_data/gpio-omap.h>

#include <trace/events/power.h>

Expand Down Expand Up @@ -197,7 +196,6 @@ void omap_sram_idle(void)
int mpu_next_state = PWRDM_POWER_ON;
int per_next_state = PWRDM_POWER_ON;
int core_next_state = PWRDM_POWER_ON;
int per_going_off;
u32 sdrc_pwr = 0;

mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);
Expand Down Expand Up @@ -227,10 +225,8 @@ void omap_sram_idle(void)
pwrdm_pre_transition(NULL);

/* PER */
if (per_next_state < PWRDM_POWER_ON) {
per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0;
omap2_gpio_prepare_for_idle(per_going_off);
}
if (per_next_state == PWRDM_POWER_OFF)
cpu_cluster_pm_enter();

/* CORE */
if (core_next_state < PWRDM_POWER_ON) {
Expand Down Expand Up @@ -295,8 +291,8 @@ void omap_sram_idle(void)
pwrdm_post_transition(NULL);

/* PER */
if (per_next_state < PWRDM_POWER_ON)
omap2_gpio_resume_after_idle();
if (per_next_state == PWRDM_POWER_OFF)
cpu_cluster_pm_exit();
}

static void omap3_pm_idle(void)
Expand Down
Loading

0 comments on commit b3378de

Please sign in to comment.