ath79: add new OF only target for QCA MIPS silicon
[openwrt/staging/blogic.git] / target / linux / ath79 / patches-4.14 / 0013-MIPS-ath79-fix-system-restart.patch
1 From 11562939754b8f877562d9a137854022eb521716 Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@nbd.name>
3 Date: Mon, 5 Mar 2018 11:33:54 +0100
4 Subject: [PATCH 13/27] MIPS: ath79: fix system restart
5
6 Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 Signed-off-by: John Crispin <john@phrozen.org>
8 ---
9 arch/mips/ath79/setup.c | 1 +
10 arch/mips/include/asm/mach-ath79/ath79.h | 1 +
11 2 files changed, 2 insertions(+)
12
13 diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
14 index f206dafbb0a3..26a058d58d37 100644
15 --- a/arch/mips/ath79/setup.c
16 +++ b/arch/mips/ath79/setup.c
17 @@ -40,6 +40,7 @@ static char ath79_sys_type[ATH79_SYS_TYPE_LEN];
18
19 static void ath79_restart(char *command)
20 {
21 + local_irq_disable();
22 ath79_device_reset_set(AR71XX_RESET_FULL_CHIP);
23 for (;;)
24 if (cpu_wait)
25 diff --git a/arch/mips/include/asm/mach-ath79/ath79.h b/arch/mips/include/asm/mach-ath79/ath79.h
26 index 441faa92c3cd..6e6c0fead776 100644
27 --- a/arch/mips/include/asm/mach-ath79/ath79.h
28 +++ b/arch/mips/include/asm/mach-ath79/ath79.h
29 @@ -134,6 +134,7 @@ static inline u32 ath79_pll_rr(unsigned reg)
30 static inline void ath79_reset_wr(unsigned reg, u32 val)
31 {
32 __raw_writel(val, ath79_reset_base + reg);
33 + (void) __raw_readl(ath79_reset_base + reg); /* flush */
34 }
35
36 static inline u32 ath79_reset_rr(unsigned reg)
37 --
38 2.11.0
39