-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'imx-soc-3.20' of git://git.kernel.org/pub/scm/linux/kernel…
…/git/shawnguo/linux into next/soc Merge "ARM: imx: soc changes for 3.20" from Shawn Guo: The i.MX SoC changes for 3.20: - Add .disable_unused function hook for shared gate clock to ensure the clock tree use count matches the hardware state - Add a deeper idle state for i.MX6SX cpuidle driver powering off the ARM core - One correction on i.MX6Q esai_ipg parent clock setting - Add a missing iounmap call for imx6q_opp_check_speed_grading() - Add missing clocks for VF610 UART4, UART5 and SNVS blocks - Expand VF610 device tree compatible matching table to cover more Vybrid family SoCs - Expand i.MX clk-pllv3 a bit with the shift for frequency multiplier to support Vybrid's USB PLL oddity * tag 'imx-soc-3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: clk-imx6q: refine esai_ipg's parent ARM i.MX6q: unmap memory mapped at imx6q_opp_check_speed_grading() ARM: imx: clk-vf610: Add clock for SNVS ARM: imx: clk-vf610: Add clock for UART4 and UART5 ARM: imx: drop CPUIDLE_FLAG_TIME_VALID from cpuidle-imx6sx ARM: imx: support arm power off in cpuidle for i.mx6sx ARM: imx: remove unnecessary setting for DSM ARM: imx: correct the hardware clock gate setting for shared nodes ARM: imx: pllv3: add shift for frequency multiplier ARM vf610: add compatibilty strings of supported Vybrid SoC's Signed-off-by: Olof Johansson <olof@lixom.net>
- Loading branch information
Showing
16 changed files
with
195 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
/* | ||
* Copyright (C) 2014 Freescale Semiconductor, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#include <linux/cpuidle.h> | ||
#include <linux/cpu_pm.h> | ||
#include <linux/module.h> | ||
#include <asm/cpuidle.h> | ||
#include <asm/proc-fns.h> | ||
#include <asm/suspend.h> | ||
|
||
#include "common.h" | ||
#include "cpuidle.h" | ||
|
||
static int imx6sx_idle_finish(unsigned long val) | ||
{ | ||
cpu_do_idle(); | ||
|
||
return 0; | ||
} | ||
|
||
static int imx6sx_enter_wait(struct cpuidle_device *dev, | ||
struct cpuidle_driver *drv, int index) | ||
{ | ||
imx6q_set_lpm(WAIT_UNCLOCKED); | ||
|
||
switch (index) { | ||
case 1: | ||
cpu_do_idle(); | ||
break; | ||
case 2: | ||
imx6_enable_rbc(true); | ||
imx_gpc_set_arm_power_in_lpm(true); | ||
imx_set_cpu_jump(0, v7_cpu_resume); | ||
/* Need to notify there is a cpu pm operation. */ | ||
cpu_pm_enter(); | ||
cpu_cluster_pm_enter(); | ||
|
||
cpu_suspend(0, imx6sx_idle_finish); | ||
|
||
cpu_cluster_pm_exit(); | ||
cpu_pm_exit(); | ||
imx_gpc_set_arm_power_in_lpm(false); | ||
imx6_enable_rbc(false); | ||
break; | ||
default: | ||
break; | ||
} | ||
|
||
imx6q_set_lpm(WAIT_CLOCKED); | ||
|
||
return index; | ||
} | ||
|
||
static struct cpuidle_driver imx6sx_cpuidle_driver = { | ||
.name = "imx6sx_cpuidle", | ||
.owner = THIS_MODULE, | ||
.states = { | ||
/* WFI */ | ||
ARM_CPUIDLE_WFI_STATE, | ||
/* WAIT */ | ||
{ | ||
.exit_latency = 50, | ||
.target_residency = 75, | ||
.flags = CPUIDLE_FLAG_TIMER_STOP, | ||
.enter = imx6sx_enter_wait, | ||
.name = "WAIT", | ||
.desc = "Clock off", | ||
}, | ||
/* WAIT + ARM power off */ | ||
{ | ||
/* | ||
* ARM gating 31us * 5 + RBC clear 65us | ||
* and some margin for SW execution, here set it | ||
* to 300us. | ||
*/ | ||
.exit_latency = 300, | ||
.target_residency = 500, | ||
.enter = imx6sx_enter_wait, | ||
.name = "LOW-POWER-IDLE", | ||
.desc = "ARM power off", | ||
}, | ||
}, | ||
.state_count = 3, | ||
.safe_state_index = 0, | ||
}; | ||
|
||
int __init imx6sx_cpuidle_init(void) | ||
{ | ||
imx6_enable_rbc(false); | ||
/* | ||
* set ARM power up/down timing to the fastest, | ||
* sw2iso and sw can be set to one 32K cycle = 31us | ||
* except for power up sw2iso which need to be | ||
* larger than LDO ramp up time. | ||
*/ | ||
imx_gpc_set_arm_power_up_timing(2, 1); | ||
imx_gpc_set_arm_power_down_timing(1, 1); | ||
|
||
return cpuidle_register(&imx6sx_cpuidle_driver, NULL); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.