summaryrefslogtreecommitdiff
path: root/target/linux/brcm47xx
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-08-08 23:10:16 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2014-08-08 23:10:16 +0000
commit47bab2b654d69ad3198479083854099971f6a607 (patch)
treebb9fb17a5e975c53a1fdd06092e3127046be361e /target/linux/brcm47xx
parent8af860e186d718701f78f28f4a8c9bde619eb273 (diff)
downloadmtk-20170518-47bab2b654d69ad3198479083854099971f6a607.zip
mtk-20170518-47bab2b654d69ad3198479083854099971f6a607.tar.gz
mtk-20170518-47bab2b654d69ad3198479083854099971f6a607.tar.bz2
brcm47xx: fix reboot problem on BCM4705/BCM4785
This adds some code based on code from the Broadcom GPL tar to fix the reboot problems on BCM4705/BCM4785. I tried rebooting my device for ~10 times and have never seen a problem. This reverts the changes in the previous commit and adds the real fix as suggested by Rafał. Setting bit 22 in Reg 22, sel 4 puts the BIU (Bus Interface Unit) into async mode. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 42088
Diffstat (limited to 'target/linux/brcm47xx')
-rw-r--r--target/linux/brcm47xx/patches-3.14/144-make-reboot-more-reliable.patch41
-rw-r--r--target/linux/brcm47xx/patches-3.14/153-MIPS-BCM47XX-Detect-more-then-128-MiB-of-RAM-HIGHMEM.patch2
-rw-r--r--target/linux/brcm47xx/patches-3.14/830-huawei_e970_support.patch4
-rw-r--r--target/linux/brcm47xx/patches-3.14/980-wnr834b_no_cardbus_invariant.patch2
4 files changed, 36 insertions, 13 deletions
diff --git a/target/linux/brcm47xx/patches-3.14/144-make-reboot-more-reliable.patch b/target/linux/brcm47xx/patches-3.14/144-make-reboot-more-reliable.patch
index 551c0ff..7c30a9c 100644
--- a/target/linux/brcm47xx/patches-3.14/144-make-reboot-more-reliable.patch
+++ b/target/linux/brcm47xx/patches-3.14/144-make-reboot-more-reliable.patch
@@ -1,17 +1,40 @@
+From 26db431400c336c4cc658cb4888bab18d254c64a Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sat, 9 Aug 2014 00:00:09 +0200
+Subject: [PATCH] MIPS: BCM47XX: fix reboot problem on BCM4705/BCM4785
+
+This adds some code based on code from the Broadcom GPL tar to fix the
+reboot problems on BCM4705/BCM4785. I tried rebooting my device for ~10
+times and have never seen a problem. This reverts the changes in the
+previous commit and adds the real fix as suggested by Rafał.
+
+Setting bit 22 in Reg 22, sel 4 puts the BIU (Bus Interface Unit) into
+async mode.
+
+The previous try was this:
+commit 316cad5c1d4daee998cd1f83ccdb437f6f20d45c
+Author: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Mon Jul 28 23:53:57 2014 +0200
+
+ MIPS: BCM47XX: make reboot more relaiable
+
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
-@@ -59,12 +59,12 @@ static void bcm47xx_machine_restart(char
+@@ -59,7 +59,16 @@ static void bcm47xx_machine_restart(char
switch (bcm47xx_bus_type) {
#ifdef CONFIG_BCM47XX_SSB
case BCM47XX_BUS_TYPE_SSB:
-- ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 1);
-+ ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 3);
++ if (bcm47xx_bus.bcma.bus.chipinfo.id == 0x4785)
++ write_c0_diag4(1 << 22);
+ ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 1);
++ if (bcm47xx_bus.bcma.bus.chipinfo.id == 0x4785) {
++ __asm__ __volatile__(
++ ".set\tmips3\n\t"
++ "sync\n\t"
++ "wait\n\t"
++ ".set\tmips0");
++ }
break;
#endif
#ifdef CONFIG_BCM47XX_BCMA
- case BCM47XX_BUS_TYPE_BCMA:
-- bcma_chipco_watchdog_timer_set(&bcm47xx_bus.bcma.bus.drv_cc, 1);
-+ bcma_chipco_watchdog_timer_set(&bcm47xx_bus.bcma.bus.drv_cc, 3);
- break;
- #endif
- }
diff --git a/target/linux/brcm47xx/patches-3.14/153-MIPS-BCM47XX-Detect-more-then-128-MiB-of-RAM-HIGHMEM.patch b/target/linux/brcm47xx/patches-3.14/153-MIPS-BCM47XX-Detect-more-then-128-MiB-of-RAM-HIGHMEM.patch
index ad0dd7d..777e93b 100644
--- a/target/linux/brcm47xx/patches-3.14/153-MIPS-BCM47XX-Detect-more-then-128-MiB-of-RAM-HIGHMEM.patch
+++ b/target/linux/brcm47xx/patches-3.14/153-MIPS-BCM47XX-Detect-more-then-128-MiB-of-RAM-HIGHMEM.patch
@@ -132,7 +132,7 @@ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
+#endif /* defined(CONFIG_BCM47XX_BCMA) && defined(CONFIG_HIGHMEM) */
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
-@@ -218,6 +218,9 @@ void __init plat_mem_setup(void)
+@@ -227,6 +227,9 @@ void __init plat_mem_setup(void)
bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA;
bcm47xx_register_bcma();
bcm47xx_set_system_type(bcm47xx_bus.bcma.bus.chipinfo.id);
diff --git a/target/linux/brcm47xx/patches-3.14/830-huawei_e970_support.patch b/target/linux/brcm47xx/patches-3.14/830-huawei_e970_support.patch
index 107cedc..ee35eed 100644
--- a/target/linux/brcm47xx/patches-3.14/830-huawei_e970_support.patch
+++ b/target/linux/brcm47xx/patches-3.14/830-huawei_e970_support.patch
@@ -8,7 +8,7 @@
#include <asm/bootinfo.h>
#include <asm/idle.h>
#include <asm/prom.h>
-@@ -269,6 +270,33 @@ static struct fixed_phy_status bcm47xx_f
+@@ -278,6 +279,33 @@ static struct fixed_phy_status bcm47xx_f
.duplex = DUPLEX_FULL,
};
@@ -42,7 +42,7 @@
static int __init bcm47xx_register_bus_complete(void)
{
switch (bcm47xx_bus_type) {
-@@ -288,6 +316,7 @@ static int __init bcm47xx_register_bus_c
+@@ -297,6 +325,7 @@ static int __init bcm47xx_register_bus_c
bcm47xx_workarounds();
fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status);
diff --git a/target/linux/brcm47xx/patches-3.14/980-wnr834b_no_cardbus_invariant.patch b/target/linux/brcm47xx/patches-3.14/980-wnr834b_no_cardbus_invariant.patch
index 650f02f..8bab5f0 100644
--- a/target/linux/brcm47xx/patches-3.14/980-wnr834b_no_cardbus_invariant.patch
+++ b/target/linux/brcm47xx/patches-3.14/980-wnr834b_no_cardbus_invariant.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
-@@ -127,6 +127,10 @@ static int bcm47xx_get_invariants(struct
+@@ -136,6 +136,10 @@ static int bcm47xx_get_invariants(struct
if (bcm47xx_nvram_getenv("cardbus", buf, sizeof(buf)) >= 0)
iv->has_cardbus_slot = !!simple_strtoul(buf, NULL, 10);