Author: hauke
Date: 2014-08-09 01:05:24 +0200 (Sat, 09 Aug 2014)
New Revision: 42086

Modified:
   
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/144-make-reboot-more-reliable.patch
   
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/170-fix-74k-cpu.patch
   
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/208-b44-use-fixed-PHY-device-if-we-do-not-find-any.patch
   
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/830-huawei_e970_support.patch
   
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/980-wnr834b_no_cardbus_invariant.patch
Log:
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?\197?\130.

Setting bit 22 in Reg 22, sel 4 puts the BIU (Bus Interface Unit) into
async mode.

backport of: r42083

Signed-off-by: Hauke Mehrtens <[email protected]>


Modified: 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/144-make-reboot-more-reliable.patch
===================================================================
--- 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/144-make-reboot-more-reliable.patch
     2014-08-08 22:59:45 UTC (rev 42085)
+++ 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/144-make-reboot-more-reliable.patch
     2014-08-08 23:05:24 UTC (rev 42086)
@@ -1,17 +1,40 @@
+From 26db431400c336c4cc658cb4888bab18d254c64a Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <[email protected]>
+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 <[email protected]>
+Date:   Mon Jul 28 23:53:57 2014 +0200
+
+    MIPS: BCM47XX: make reboot more relaiable
+
+Signed-off-by: Hauke Mehrtens <[email protected]>
 --- a/arch/mips/bcm47xx/setup.c
 +++ b/arch/mips/bcm47xx/setup.c
-@@ -55,12 +55,12 @@ static void bcm47xx_machine_restart(char
+@@ -55,7 +55,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
-       }

Modified: 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/170-fix-74k-cpu.patch
===================================================================
--- 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/170-fix-74k-cpu.patch
   2014-08-08 22:59:45 UTC (rev 42085)
+++ 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/170-fix-74k-cpu.patch
   2014-08-08 23:05:24 UTC (rev 42086)
@@ -22,7 +22,7 @@
  #include <bcm47xx.h>
  #include <bcm47xx_nvram.h>
  #include <bcm47xx_board.h>
-@@ -231,6 +232,31 @@ void __init plat_mem_setup(void)
+@@ -240,6 +241,31 @@ void __init plat_mem_setup(void)
        mips_set_machine_name(bcm47xx_board_get_name());
  }
  

Modified: 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/208-b44-use-fixed-PHY-device-if-we-do-not-find-any.patch
===================================================================
--- 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/208-b44-use-fixed-PHY-device-if-we-do-not-find-any.patch
        2014-08-08 22:59:45 UTC (rev 42085)
+++ 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/208-b44-use-fixed-PHY-device-if-we-do-not-find-any.patch
        2014-08-08 23:05:24 UTC (rev 42086)
@@ -30,7 +30,7 @@
  #include <linux/ssb/ssb.h>
  #include <linux/ssb/ssb_embedded.h>
  #include <linux/bcma/bcma_soc.h>
-@@ -257,6 +260,12 @@ static int __init bcm47xx_cpu_fixes(void
+@@ -266,6 +269,12 @@ static int __init bcm47xx_cpu_fixes(void
  }
  arch_initcall(bcm47xx_cpu_fixes);
  
@@ -43,7 +43,7 @@
  static int __init bcm47xx_register_bus_complete(void)
  {
        switch (bcm47xx_bus_type) {
-@@ -275,6 +284,7 @@ static int __init bcm47xx_register_bus_c
+@@ -284,6 +293,7 @@ static int __init bcm47xx_register_bus_c
        bcm47xx_buttons_register();
        bcm47xx_leds_register();
        bcm47xx_workarounds();

Modified: 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/830-huawei_e970_support.patch
===================================================================
--- 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/830-huawei_e970_support.patch
   2014-08-08 22:59:45 UTC (rev 42085)
+++ 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/830-huawei_e970_support.patch
   2014-08-08 23:05:24 UTC (rev 42086)
@@ -8,7 +8,7 @@
  #include <asm/bootinfo.h>
  #include <asm/prom.h>
  #include <asm/reboot.h>
-@@ -266,6 +267,33 @@ static struct fixed_phy_status bcm47xx_f
+@@ -275,6 +276,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) {
-@@ -285,6 +313,7 @@ static int __init bcm47xx_register_bus_c
+@@ -294,6 +322,7 @@ static int __init bcm47xx_register_bus_c
        bcm47xx_leds_register();
        bcm47xx_workarounds();
        fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status);

Modified: 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/980-wnr834b_no_cardbus_invariant.patch
===================================================================
--- 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/980-wnr834b_no_cardbus_invariant.patch
  2014-08-08 22:59:45 UTC (rev 42085)
+++ 
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/980-wnr834b_no_cardbus_invariant.patch
  2014-08-08 23:05:24 UTC (rev 42086)
@@ -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);
  
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to