diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2016-06-03 19:31:19 +0300 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2016-06-12 14:48:08 +0300 |
commit | 29380905565655bb797bf670a173bddb8e641da6 (patch) | |
tree | 3bd0b6ca7f5c623e5031cbeb5febb52578999eb8 /arch/arm/mach-imx | |
parent | ac4bbb45e9965b2f53608925eb6e6fa7d5ef8879 (diff) | |
download | linux-29380905565655bb797bf670a173bddb8e641da6.tar.xz |
ARM: imx6: disable deeper idle states when FEC is active w/o HW workaround
The i.MX6 Q/DL has an erratum (ERR006687) that prevents the FEC from
waking the CPUs when they are in wait(unclocked) state. As the hardware
workaround isn't applicable to all boards, disable the deeper idle state
when the workaround isn't present and the FEC is in use.
This allows to safely run a kernel with CPUidle enabled on all i.MX6
boards.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: David S. Miller <davem@davemloft.net> (for network changes)
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/cpuidle-imx6q.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c index 353bb8774112..c3cc8ca8d2ff 100644 --- a/arch/arm/mach-imx/cpuidle-imx6q.c +++ b/arch/arm/mach-imx/cpuidle-imx6q.c @@ -62,6 +62,22 @@ static struct cpuidle_driver imx6q_cpuidle_driver = { .safe_state_index = 0, }; +/* + * i.MX6 Q/DL has an erratum (ERR006687) that prevents the FEC from waking the + * CPUs when they are in wait(unclocked) state. As the hardware workaround isn't + * applicable to all boards, disable the deeper idle state when the workaround + * isn't present and the FEC is in use. + */ +void imx6q_cpuidle_fec_irqs_used(void) +{ + imx6q_cpuidle_driver.states[1].disabled = true; +} + +void imx6q_cpuidle_fec_irqs_unused(void) +{ + imx6q_cpuidle_driver.states[1].disabled = false; +} + int __init imx6q_cpuidle_init(void) { /* Set INT_MEM_CLK_LPM bit to get a reliable WAIT mode support */ |