summary refs log tree commit diff
path: root/arch/arm/mach-omap2/omap_l3_smx.c
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2011-08-24 19:11:39 +0530
committerSantosh Shilimkar <santosh.shilimkar@ti.com>2011-09-24 13:28:56 +0530
commit342fd144292a6b64ea869e4052eb250486c8f326 (patch)
tree31d565b230763b63eb35238899d2d24dd3b4fe87 /arch/arm/mach-omap2/omap_l3_smx.c
parentb6fd41e29dea9c6753b1843a77e50433e6123bcb (diff)
downloadlinux-342fd144292a6b64ea869e4052eb250486c8f326.tar.gz
OMAP: Improve register access in L3 Error handler.
* Changed the way of accessing L3 target
  registers from standard base rather
  than relative to STDERRLOG_MAIN.

* Use ffs() to find error source from
  the L3_FLAGMUX_REGERRn register.

* Remove extra l3_base[] entry.

* Modified L3 custom error message.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_l3_smx.c')
-rw-r--r--arch/arm/mach-omap2/omap_l3_smx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/omap_l3_smx.c b/arch/arm/mach-omap2/omap_l3_smx.c
index 873c0e33b512..fa07edf938b2 100644
--- a/arch/arm/mach-omap2/omap_l3_smx.c
+++ b/arch/arm/mach-omap2/omap_l3_smx.c
@@ -191,10 +191,9 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
 	}
 
 	/* identify the error source */
-	for (err_source = 0; !(status & (1 << err_source)); err_source++)
-									;
+	err_source = __ffs(status);
 
-	base = l3->rt + *(omap3_l3_bases[int_type] + err_source);
+	base = l3->rt + omap3_l3_bases[int_type][err_source];
 	error = omap3_l3_readll(base, L3_ERROR_LOG);
 	if (error) {
 		error_addr = omap3_l3_readll(base, L3_ERROR_LOG_ADDR);