aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bus
diff options
context:
space:
mode:
authorSicelo A. Mhlongo <absicsz@gmail.com>2023-08-01 21:22:40 +0200
committerTony Lindgren <tony@atomide.com>2023-08-09 12:28:50 +0300
commit99f13d7a1686b9ec69fa4d4be4fd43757fa7aed9 (patch)
tree4b2094abda0d47bc12fb053fb47cfdec50205bf3 /drivers/bus
parent06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 (diff)
downloadlinux-99f13d7a1686b9ec69fa4d4be4fd43757fa7aed9.tar.gz
bus: omap_l3_smx: identify timeout cause before rebooting
Identify and print the error source before rebooting the board due to an l3 timeout error. This is helpful when debugging, e.g. via serial. Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Message-ID: <20230801192240.1063764-1-absicsz@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/omap_l3_smx.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c
index bb1606f5ce2d77..8e1a38bfcd8b30 100644
--- a/drivers/bus/omap_l3_smx.c
+++ b/drivers/bus/omap_l3_smx.c
@@ -166,19 +166,10 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
irqreturn_t ret = IRQ_NONE;
int_type = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR;
- if (!int_type) {
+ if (!int_type)
status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0);
- /*
- * if we have a timeout error, there's nothing we can
- * do besides rebooting the board. So let's BUG on any
- * of such errors and handle the others. timeout error
- * is severe and not expected to occur.
- */
- BUG_ON(status & L3_STATUS_0_TIMEOUT_MASK);
- } else {
+ else
status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_1);
- /* No timeout error for debug sources */
- }
/* identify the error source */
err_source = __ffs(status);
@@ -190,6 +181,14 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
ret |= omap3_l3_block_irq(l3, error, error_addr);
}
+ /*
+ * if we have a timeout error, there's nothing we can
+ * do besides rebooting the board. So let's BUG on any
+ * of such errors and handle the others. timeout error
+ * is severe and not expected to occur.
+ */
+ BUG_ON(!int_type && status & L3_STATUS_0_TIMEOUT_MASK);
+
/* Clear the status register */
clear = (L3_AGENT_STATUS_CLEAR_IA << int_type) |
L3_AGENT_STATUS_CLEAR_TA;