diff options
author | Juan Gutierrez <jgutierrez@ti.com> | 2012-03-01 12:07:17 -0600 |
---|---|---|
committer | Ziyann <jaraidaniel@gmail.com> | 2014-10-01 12:57:09 +0200 |
commit | a33cd14c91c1b86d8b78460880d1d7d72018bb25 (patch) | |
tree | f03b9489145e87273c48a67e21b294d12d915520 /drivers/remoteproc | |
parent | 5de1aae0e7bf0356c129624fad47ad136d139f87 (diff) | |
download | kernel_samsung_tuna-a33cd14c91c1b86d8b78460880d1d7d72018bb25.tar.gz kernel_samsung_tuna-a33cd14c91c1b86d8b78460880d1d7d72018bb25.tar.bz2 kernel_samsung_tuna-a33cd14c91c1b86d8b78460880d1d7d72018bb25.zip |
omap: remoteproc: use device-specific dump-register ops
The current omap register dump function is catering only to
ARM cores. Introduce device-specific dump register functions
so that the omap remoteproc code can call into them based on
the processor type.
This patch also adds a minimal support for dumping dsp
registers in addition to moving the existing functionality
for ARM cores to the device-specific function.
Change-Id: Ic446695a6a5a1a4b1f600c1900f74c3e5932c158
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/omap_remoteproc.c | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index 3f24db84fa8..7bb5dc65dcb 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -85,43 +85,10 @@ static int omap_suspend(struct rproc *rproc, bool force) static void omap_rproc_dump_registers(struct rproc *rproc) { - unsigned long flags; - char buf[64]; - struct pt_regs regs; - - if (!rproc->cdump_buf1) - return; - - 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"); + struct device *dev = rproc->dev; + struct omap_rproc_pdata *pdata = dev->platform_data; + + pdata->ops->dump_registers(rproc); } static int |