ramips: fix hang on boot on rt305x
[openwrt/svn-archive/archive.git] / target / linux / ramips / patches-3.18 / 064-MIPS-ralink-fix-clearing-the-illegal-access-interrup.patch
1 From f5d9bea58b576b50cdc0d7a607646b0849ff79c4 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Mon, 25 May 2015 16:51:34 +0200
4 Subject: [PATCH] MIPS: ralink: fix clearing the illegal access interrupt
5
6 Due to a typo the illegal access interrupt is never cleared in by
7 the interupt handler, causing an effective deadlock on the first
8 illegal access.
9
10 This was broken since the code was introduced in 5433acd81e87 ("MIPS:
11 ralink: add illegal access driver"), but only exposed when the Kconfig
12 symbol was added, thus enabling the code.
13
14 Cc: <stable@vger.kernel.org> [3.18+]
15 Fixes: a7b7aad383c ("MIPS: ralink: add missing symbol for RALINK_ILL_ACC")
16 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
17 ---
18 arch/mips/ralink/ill_acc.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21 --- a/arch/mips/ralink/ill_acc.c
22 +++ b/arch/mips/ralink/ill_acc.c
23 @@ -41,7 +41,7 @@ static irqreturn_t ill_acc_irq_handler(i
24 addr, (type >> ILL_ACC_OFF_S) & ILL_ACC_OFF_M,
25 type & ILL_ACC_LEN_M);
26
27 - rt_memc_w32(REG_ILL_ACC_TYPE, REG_ILL_ACC_TYPE);
28 + rt_memc_w32(ILL_INT_STATUS, REG_ILL_ACC_TYPE);
29
30 return IRQ_HANDLED;
31 }