Skip to content

Commit 99f13d7

Browse files
sicelotmlind
authored andcommitted
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 <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Message-ID: <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 06c2afb commit 99f13d7

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

drivers/bus/omap_l3_smx.c

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -166,19 +166,10 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
166166
irqreturn_t ret = IRQ_NONE;
167167

168168
int_type = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR;
169-
if (!int_type) {
169+
if (!int_type)
170170
status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0);
171-
/*
172-
* if we have a timeout error, there's nothing we can
173-
* do besides rebooting the board. So let's BUG on any
174-
* of such errors and handle the others. timeout error
175-
* is severe and not expected to occur.
176-
*/
177-
BUG_ON(status & L3_STATUS_0_TIMEOUT_MASK);
178-
} else {
171+
else
179172
status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_1);
180-
/* No timeout error for debug sources */
181-
}
182173

183174
/* identify the error source */
184175
err_source = __ffs(status);
@@ -190,6 +181,14 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
190181
ret |= omap3_l3_block_irq(l3, error, error_addr);
191182
}
192183

184+
/*
185+
* if we have a timeout error, there's nothing we can
186+
* do besides rebooting the board. So let's BUG on any
187+
* of such errors and handle the others. timeout error
188+
* is severe and not expected to occur.
189+
*/
190+
BUG_ON(!int_type && status & L3_STATUS_0_TIMEOUT_MASK);
191+
193192
/* Clear the status register */
194193
clear = (L3_AGENT_STATUS_CLEAR_IA << int_type) |
195194
L3_AGENT_STATUS_CLEAR_TA;

0 commit comments

Comments
 (0)