ARM: imx6q: call WB and RBC configuration from imx6q_pm_enter()
authorShawn Guo <shawn.guo@linaro.org>
Wed, 9 Oct 2013 12:31:28 +0000 (20:31 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Mon, 21 Oct 2013 01:39:25 +0000 (09:39 +0800)
commit1d674a73c59211cc33cb9c2954659033d8458fa9
tree2fd57378f325703391c46ccd9c5d1d8ec95b5b6c
parent9e8147bb5ec5d1dda2141da70f96b98985a306cb
ARM: imx6q: call WB and RBC configuration from imx6q_pm_enter()

The WB and RBC configuration calls are currently made from
imx6q_set_lpm() for WAIT_CLOCKED and WAIT_UNCLOCKED mode with a simple
state tracking.  This becomes unnecessary since we can make the calls
from imx6q_pm_enter() directly now for suspend.

More importantly, the current call of imx6q_enable_wb() from
imx6q_set_lpm() is buggy.  The CLPCR register bits configured by
imx6q_enable_wb() will get lost, because imx6q_set_lpm() caches the same
register and write it back at the end of the function.  That's why the
imx6dl suspend/resume does not work currently - the wakeup from suspend
triggers a reset on imx6dl.

Moves the WB and RBC calls into imx6q_pm_enter() to save the state
tracking and fixes above bug, so that suspend/resume can start working
on imx6dl.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
arch/arm/mach-imx/pm-imx6q.c