From: Dietmar Eggemann Date: Sun, 14 Oct 2012 21:25:37 +0000 (+0100) Subject: ARM: hw_breakpoint: Debug powerdown support for self-hosted debug X-Git-Tag: v3.9-rc1~142^2~4^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1;p=pandora-kernel.git ARM: hw_breakpoint: Debug powerdown support for self-hosted debug This patch introduces debug powerdown support for self-hosted debug for v7 and v7.1 debug architecture for a SinglePower system, i.e. a system without a separate core and debug power domain. On a SinglePower system the OS Lock is lost over a powerdown. If CONFIG_CPU_PM is set the new function pm_init() registers hw_breakpoint with CPU PM for a system supporting OS Save and Restore. Receiving a CPU PM EXIT notifier indicates that a single CPU has exited a low power state. A call to reset_ctrl_regs() is hooked into the CPU PM EXIT notifier chain. This function makes sure that the sticky power-down is clear (only v7 debug), the OS Double Lock is clear (only v7.1 debug) and it clears the OS Lock for v7 debug (for a system supporting OS Save and Restore) and v7.1 debug. Furthermore, it clears any vector-catch events and all breakpoint/watchpoint control/value registers for v7 and v7.1 debug. Signed-off-by: Dietmar Eggemann [will: removed redundant has_ossr check] Signed-off-by: Will Deacon --- Reading git-diff-tree failed