ARM: rockchip: fix undefined instruction of reset_ctrl_regs
authorChris Zhong <zyw@rock-chips.com>
Sat, 21 Mar 2015 16:04:51 +0000 (00:04 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 16 Apr 2015 19:17:26 +0000 (21:17 +0200)
commitb403125d3bbf8046c1186e1a49cb17bb5551db14
treea71540ca75dd0f65c491333046a67c67f272c29b
parent0ea001d3b43cc9d387c093ae205c4228cd88a886
ARM: rockchip: fix undefined instruction of reset_ctrl_regs

Sometimes the debug module may not work well after resume, since it has
not been correctly reset when wakeup from suspend. That cause system
crash during reusme, and a 'undefined instruction' is displayed on the
console. Set the GRF_FORCE_JTAG bit of RK3288_GRF_SOC_CON0 can ensure
that debug modul is reset. And we can change the value of
RK3288_GRF_SOC_CON0 back when system resume.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Tested-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
According to discussions, there does not seem a better solution available.
Please also see the potential security implication described in the
comment inline in the code.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm/mach-rockchip/pm.c
arch/arm/mach-rockchip/pm.h