aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorIliyan Malchev <malchev@google.com>2011-10-13 18:20:36 -0700
committerIliyan Malchev <malchev@google.com>2011-10-13 18:32:16 -0700
commit8a1161bc0e6d84c21adfd01ecb1ebfa8046ba3a2 (patch)
tree2b61edb559153e28e5eb256b8255f84aa72abd2e /drivers/remoteproc
parent696a56e8e70055bbea89bcc47e3502b59409fe51 (diff)
downloadkernel_samsung_tuna-8a1161bc0e6d84c21adfd01ecb1ebfa8046ba3a2.tar.gz
kernel_samsung_tuna-8a1161bc0e6d84c21adfd01ecb1ebfa8046ba3a2.tar.bz2
kernel_samsung_tuna-8a1161bc0e6d84c21adfd01ecb1ebfa8046ba3a2.zip
omap_remotproc: implement method dump_registers
Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/omap_remoteproc.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c
index 72a7d60a3f1..d0f4bc47f23 100644
--- a/drivers/remoteproc/omap_remoteproc.c
+++ b/drivers/remoteproc/omap_remoteproc.c
@@ -82,6 +82,44 @@ static int omap_suspend(struct rproc *rproc, bool force)
}
#endif
+static void omap_rproc_dump_registers(struct rproc *rproc)
+{
+ unsigned long flags;
+ char buf[64];
+ struct pt_regs regs;
+
+ remoteproc_fill_pt_regs(&regs,
+ (struct exc_regs *)rproc->cdump_buf1);
+
+ pr_info("REGISTER DUMP FOR REMOTEPROC %s\n", rproc->name);
+ pr_info("PC is at %08lx\n", instruction_pointer(&regs));
+ pr_info("LR is at %08lx\n", regs.ARM_lr);
+ pr_info("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n"
+ "sp : %08lx ip : %08lx fp : %08lx\n",
+ regs.ARM_pc, regs.ARM_lr, regs.ARM_cpsr,
+ regs.ARM_sp, regs.ARM_ip, regs.ARM_fp);
+ pr_info("r10: %08lx r9 : %08lx r8 : %08lx\n",
+ regs.ARM_r10, regs.ARM_r9,
+ regs.ARM_r8);
+ pr_info("r7 : %08lx r6 : %08lx r5 : %08lx r4 : %08lx\n",
+ regs.ARM_r7, regs.ARM_r6,
+ regs.ARM_r5, regs.ARM_r4);
+ pr_info("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n",
+ regs.ARM_r3, regs.ARM_r2,
+ regs.ARM_r1, regs.ARM_r0);
+
+ flags = regs.ARM_cpsr;
+ buf[0] = flags & PSR_N_BIT ? 'N' : 'n';
+ buf[1] = flags & PSR_Z_BIT ? 'Z' : 'z';
+ buf[2] = flags & PSR_C_BIT ? 'C' : 'c';
+ buf[3] = flags & PSR_V_BIT ? 'V' : 'v';
+ buf[4] = '\0';
+
+ pr_info("Flags: %s IRQs o%s FIQs o%s\n",
+ buf, interrupts_enabled(&regs) ? "n" : "ff",
+ fast_interrupts_enabled(&regs) ? "n" : "ff");
+}
+
static int
omap_rproc_map(struct device *dev, struct iommu *obj, u32 da, u32 pa, u32 size)
{
@@ -501,6 +539,7 @@ static struct rproc_ops omap_rproc_ops = {
.watchdog_init = omap_rproc_watchdog_init,
.watchdog_exit = omap_rproc_watchdog_exit,
#endif
+ .dump_registers = omap_rproc_dump_registers,
};
static int omap_rproc_probe(struct platform_device *pdev)