ARM: rockchip: disable dapswjdp during suspend
authorChris Zhong <zyw@rock-chips.com>
Wed, 15 Apr 2015 05:57:11 +0000 (13:57 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 16 Apr 2015 19:15:47 +0000 (21:15 +0200)
commit0ea001d3b43cc9d387c093ae205c4228cd88a886
tree736112af9cc549d24725599269dffe3b8545c53d
parenta0307d186f5015ee3d77e209e5c06190cbf02478
ARM: rockchip: disable dapswjdp during suspend

Reset dapswjdp is controlled by JTAG_TRSTN, if the iomux of this pin is
not "jtag_trstn". the AP would think this pin is always high, so it can
not reset before resume. When system resume, but the dapswjdp is not in
a default state, it may Access some illegal address, it cause system
crash during resume.
Let's disable this jtag function by clear the dapdeviceen bit, it
prohibit the dapswjdp to access memory and registers. This bit would
be enable in MASKROM, so we need clear it in suspend everytime.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm/mach-rockchip/pm.c
arch/arm/mach-rockchip/pm.h