Commit Graph

11 Commits

Author SHA1 Message Date
Marcel Ziswiler 32aca03c2c This is the 4.9.166 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlybBmIACgkQONu9yGCS
 aT4ezBAAxtx4Yg4wQSzIrlMxtqorXqdZptiwqSmRgWrOGrwF0YrwKxCjst5bra1x
 plwflHn3+xcP4xIuxiyQOTsipvg5rAtr4peBa2WZqC4MaqRfeO32Uz3Hhh2TeWVJ
 EvB4acedWG78MB81DbA31mo8txbc8qoKEwKglvxaGraddNJBiIl3d0ySyxpKxM5I
 pYZYLdODWUesa+GFIkNzRbSNnZiDUXcI1Srt/TUZ9T4X8LsOXTWhNAEauKZwiDzq
 EJzzENbQrq1ULoaGbg/blgUDxrGiCWsltm5lirzsNaZGtdD1Ha2GCPt0XOftT6ks
 a0LfDj5pAYxBs6DCS1P1tyhg6qDzd7jVCH65RLiFbsYixcZPJs+3Dpsgs/QvkyAK
 29aCBP/K3otS85+ZPP5t5uJwdADT4+bcYxG59BQGoTfZYsDgx8EjBi4jYp2XUbp2
 vYt9ti/I7ZkFzcGur4BRlZ87OfMsIENbgyBcmzmbG0CTqVbJV8fnbhwRkWSbLEUp
 hcp/8T1tuhjWfHvEw4ofawRN44WsrdVelvcFKkDtfZwX9VMiuxM1xPM/MWeayY7s
 3yrNkJIQn7CzIMamCKLA7QE8DzJ0ZnyQjh/CICTyTgjKfLNYYiloBkHDLGWUcQIS
 9e9d2wtsPI7FoQpiirMsxgLYAIGR1bM9FoAJIc9Ntfk9MKspQ1A=
 =KTD5
 -----END PGP SIGNATURE-----

Merge tag 'v4.9.166' into 4.9-2.3.x-imx

This is the 4.9.166 stable release
2019-03-28 14:32:06 +01:00
Anson Huang 559ddc885a ARM: imx: update the cpu power up timing setting on i.mx6sx
[ Upstream commit 1e434b7032 ]

The sw2iso count should cover ARM LDO ramp-up time,
the MAX ARM LDO ramp-up time may be up to more than
100us on some boards, this patch sets sw2iso to 0xf
(~384us) which is the reset value, and it is much
more safe to cover different boards, since we have
observed that some customer boards failed with current
setting of 0x2.

Fixes: 05136f0897 ("ARM: imx: support arm power off in cpuidle for i.mx6sx")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-01-13 10:03:47 +01:00
Peng Fan 045381d19c MLK-16750-5: arm: imx: support using psci to handle power stuff
Support using PSCI to handle Power stuff.
Use PSCI to differentiate secure/non-secure kernel.
i.MX7 LPSR mode not implemented now.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-08-24 12:41:33 +03:00
Leonard Crestez 2ce4137660 ARM: cpuidle-imx*: Report the entered state index
When a cpuidle driver is called it can choose to enter a different state
that what was asked from above. When this happens it should return the
actual entered_state index for proper accounting.

This fixes the various imx cpuidle drivers which depend on low busfreq
for LOW-POWER-IDLE to correctly report that they entered WAIT instead.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-08-24 12:41:33 +03:00
Anson Huang a358aa6ca1 MLK-9708 arm: imx: add low power idle support for i.mx6sx
Enable low power idle for i.MX6SX:

   WFI            -> first level idle;
   WAIT mode      -> second level idle;
   Low power idle -> third level idle, only when system is in low bus mode.

In low powe idle mode, below operations will be done:

   ARM power off;
   AHB freq lower to 3MHz;
   PERCLK freq lower to 6MHz;
   MMDC freq lower to 1MHz;

Anatop will be put into low power mode, and regular band-gap will
be off and low power band-gap will be enabled instead.

Also, in low power idle mode, 24MHz XTAL power will be off and 24MHz clk
source will be switched to RC-OSC to save power, this feature is only
enabled on i.MX6SX TO1.2.

This patch is cherry-picked from L3.14.y, it is the latest version, below
conflicts are fixed.

Signed-off-by: Anson Huang <b20788@freescale.com>

Conflicts:
	arch/arm/mach-imx/Makefile
	arch/arm/mach-imx/common.h
	arch/arm/mach-imx/cpuidle-imx6sx.c
	arch/arm/mach-imx/cpuidle.h
	arch/arm/mach-imx/mach-imx6sx.c
	arch/arm/mach-imx/pm-imx6.c
2018-08-23 16:57:36 +03:00
Anson Huang 547e8f5269 ARM: imx: add cpuidle support for i.mx6ul
This patch enables cpuidle driver for i.MX6UL, it
reuses i.MX6SX's cpuidle driver, 3 levels of cpuidle
supported:

1. ARM WFI;
2. SOC in WAIT mode;
3. SOC in WAIT mode + ARM power off.

As i.MX6UL has cortex-A7 CORE with an internal L2
cache, so flushing it before powering down ARM platform
is necessary, flush_cache_all() in last step of cpu_suspend
has very small overhead, just call it to avoid cache
type check for different platforms.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-08-29 22:39:28 +08:00
Anson Huang 6ae44aa651 ARM: imx: enable WAIT mode hardware workaround for imx6sx
Need to enable INT_MEM_CLK_LPM bit in CCM_CGPR for WAIT mode,
without this bit set, if there is pending interrupt during
ARM platform entering WAIT mode without power gating, cache
data will be corrupted, this is a hardware workaround for WAIT
mode and must be enabled.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2016-08-29 22:39:27 +08:00
Shawn Guo 8fb76a07e2 ARM: imx6: set initial power mode in pm function
Rather than setting initial low-power mode in every single i.MX6 clock
initialization function, we should really do that in pm code.  Let's
move imx6q_set_lpm(WAIT_CLOCKED) call into imx6_pm_common_init().

While at it, let's rename the function to imx6_set_lpm() since it's
actually common for all i.MX6 SoCs.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:44:31 +08:00
Daniel Lezcano eeebc3bb4d ARM: cpuidle: Remove duplicate header inclusion
The cpu_do_idle() function is always used by the cpuidle drivers.

That led to have each driver including cpuidle.h and proc-fns.h, they are
always paired. That makes a lot of duplicate headers inclusion. Instead of
including both in each .c file, move the proc-fns.h header inclusion in the
cpuidle.h header file directly, so we can save some line of code.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Kevin Hilman <khilman@linaro.org>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
2015-03-23 18:03:11 +01:00
Shawn Guo c8aeb7dfe6 ARM: imx: drop CPUIDLE_FLAG_TIME_VALID from cpuidle-imx6sx
As the result of commit b82b6cca48 ("cpuidle: Invert
CPUIDLE_FLAG_TIME_VALID logic"), the flag gets removed and hence we see
the compile error below.

  CC      arch/arm/mach-imx/cpuidle-imx6sx.o
arch/arm/mach-imx/cpuidle-imx6sx.c:69:13: error: ‘CPUIDLE_FLAG_TIME_VALID’ undeclared here (not in a function)

Since the behavior of the original flag has been the default, we can
simply drop the flag now.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-01-06 20:14:50 +08:00
Anson Huang 05136f0897 ARM: imx: support arm power off in cpuidle for i.mx6sx
This patch introduces an independent cpuidle driver for
i.MX6SX, and supports arm power off in idle, totally
3 levels of cpuidle are supported as below:

1. ARM WFI;
2. SOC in WAIT mode;
3. SOC in WAIT mode + ARM power off.

ARM power off can save at least 5mW power.

This patch also replaces imx6q_enable_rbc with imx6_enable_rbc.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-01-05 21:34:29 +08:00