diff options
Diffstat (limited to 'drivers/remoteproc/omap_remoteproc.c')
-rw-r--r-- | drivers/remoteproc/omap_remoteproc.c | 39 |
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(®s, + (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(®s)); + 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(®s) ? "n" : "ff", + fast_interrupts_enabled(®s) ? "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) |