Changeset 42086


Ignore:
Timestamp:
2014-08-09T01:05:24+02:00 (3 years ago)
Author:
hauke
Message:

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.

backport of: r42083

Signed-off-by: Hauke Mehrtens <hauke@…>

Location:
branches/barrier_breaker/target/linux/brcm47xx/patches-3.10
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/144-make-reboot-more-reliable.patch

    r41969 r42086  
     1From 26db431400c336c4cc658cb4888bab18d254c64a Mon Sep 17 00:00:00 2001 
     2From: Hauke Mehrtens <hauke@hauke-m.de> 
     3Date: Sat, 9 Aug 2014 00:00:09 +0200 
     4Subject: [PATCH] MIPS: BCM47XX: fix reboot problem on BCM4705/BCM4785 
     5 
     6This adds some code based on code from the Broadcom GPL tar to fix the 
     7reboot problems on BCM4705/BCM4785. I tried rebooting my device for ~10 
     8times and have never seen a problem. This reverts the changes in the 
     9previous commit and adds the real fix as suggested by Rafał. 
     10 
     11Setting bit 22 in Reg 22, sel 4 puts the BIU (Bus Interface Unit) into 
     12async mode. 
     13 
     14The previous try was this: 
     15commit 316cad5c1d4daee998cd1f83ccdb437f6f20d45c 
     16Author: Hauke Mehrtens <hauke@hauke-m.de> 
     17Date:   Mon Jul 28 23:53:57 2014 +0200 
     18 
     19    MIPS: BCM47XX: make reboot more relaiable 
     20 
     21Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> 
    122--- a/arch/mips/bcm47xx/setup.c 
    223+++ b/arch/mips/bcm47xx/setup.c 
    3 @@ -55,12 +55,12 @@ static void bcm47xx_machine_restart(char 
     24@@ -55,7 +55,16 @@ static void bcm47xx_machine_restart(char 
    425        switch (bcm47xx_bus_type) { 
    526 #ifdef CONFIG_BCM47XX_SSB 
    627        case BCM47XX_BUS_TYPE_SSB: 
    7 -               ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 1); 
    8 +               ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 3); 
     28+               if (bcm47xx_bus.bcma.bus.chipinfo.id == 0x4785) 
     29+                       write_c0_diag4(1 << 22); 
     30                ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 1); 
     31+               if (bcm47xx_bus.bcma.bus.chipinfo.id == 0x4785) { 
     32+                       __asm__ __volatile__( 
     33+                               ".set\tmips3\n\t" 
     34+                               "sync\n\t" 
     35+                               "wait\n\t" 
     36+                               ".set\tmips0"); 
     37+               } 
    938                break; 
    1039 #endif 
    1140 #ifdef CONFIG_BCM47XX_BCMA 
    12         case BCM47XX_BUS_TYPE_BCMA: 
    13 -               bcma_chipco_watchdog_timer_set(&bcm47xx_bus.bcma.bus.drv_cc, 1); 
    14 +               bcma_chipco_watchdog_timer_set(&bcm47xx_bus.bcma.bus.drv_cc, 3); 
    15                 break; 
    16  #endif 
    17         } 
  • branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/170-fix-74k-cpu.patch

    r39252 r42086  
    2323 #include <bcm47xx_nvram.h> 
    2424 #include <bcm47xx_board.h> 
    25 @@ -231,6 +232,31 @@ void __init plat_mem_setup(void) 
     25@@ -240,6 +241,31 @@ void __init plat_mem_setup(void) 
    2626        mips_set_machine_name(bcm47xx_board_get_name()); 
    2727 } 
  • branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/208-b44-use-fixed-PHY-device-if-we-do-not-find-any.patch

    r39469 r42086  
    3131 #include <linux/ssb/ssb_embedded.h> 
    3232 #include <linux/bcma/bcma_soc.h> 
    33 @@ -257,6 +260,12 @@ static int __init bcm47xx_cpu_fixes(void 
     33@@ -266,6 +269,12 @@ static int __init bcm47xx_cpu_fixes(void 
    3434 } 
    3535 arch_initcall(bcm47xx_cpu_fixes); 
     
    4444 { 
    4545        switch (bcm47xx_bus_type) { 
    46 @@ -275,6 +284,7 @@ static int __init bcm47xx_register_bus_c 
     46@@ -284,6 +293,7 @@ static int __init bcm47xx_register_bus_c 
    4747        bcm47xx_buttons_register(); 
    4848        bcm47xx_leds_register(); 
  • branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/830-huawei_e970_support.patch

    r39469 r42086  
    99 #include <asm/prom.h> 
    1010 #include <asm/reboot.h> 
    11 @@ -266,6 +267,33 @@ static struct fixed_phy_status bcm47xx_f 
     11@@ -275,6 +276,33 @@ static struct fixed_phy_status bcm47xx_f 
    1212        .duplex = DUPLEX_FULL, 
    1313 }; 
     
    4343 { 
    4444        switch (bcm47xx_bus_type) { 
    45 @@ -285,6 +313,7 @@ static int __init bcm47xx_register_bus_c 
     45@@ -294,6 +322,7 @@ static int __init bcm47xx_register_bus_c 
    4646        bcm47xx_leds_register(); 
    4747        bcm47xx_workarounds(); 
  • branches/barrier_breaker/target/linux/brcm47xx/patches-3.10/980-wnr834b_no_cardbus_invariant.patch

    r39252 r42086  
    11--- a/arch/mips/bcm47xx/setup.c 
    22+++ b/arch/mips/bcm47xx/setup.c 
    3 @@ -127,6 +127,10 @@ static int bcm47xx_get_invariants(struct 
     3@@ -136,6 +136,10 @@ static int bcm47xx_get_invariants(struct 
    44        if (bcm47xx_nvram_getenv("cardbus", buf, sizeof(buf)) >= 0) 
    55                iv->has_cardbus_slot = !!simple_strtoul(buf, NULL, 10); 
Note: See TracChangeset for help on using the changeset viewer.