Changeset 42083


Ignore:
Timestamp:
2014-08-09T00:52:28+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.

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

Location:
trunk/target/linux/brcm47xx/patches-3.10
Files:
6 edited

Legend:

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

    r41910 r42083  
     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         } 
  • trunk/target/linux/brcm47xx/patches-3.10/153-MIPS-BCM47XX-Detect-more-then-128-MiB-of-RAM-HIGHMEM.patch

    r42052 r42083  
    133133--- a/arch/mips/bcm47xx/setup.c 
    134134+++ b/arch/mips/bcm47xx/setup.c 
    135 @@ -214,6 +214,9 @@ void __init plat_mem_setup(void) 
     135@@ -223,6 +223,9 @@ void __init plat_mem_setup(void) 
    136136                bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA; 
    137137                bcm47xx_register_bcma(); 
  • trunk/target/linux/brcm47xx/patches-3.10/170-fix-74k-cpu.patch

    r42052 r42083  
    2323 #include <bcm47xx_nvram.h> 
    2424 #include <bcm47xx_board.h> 
    25 @@ -234,6 +235,31 @@ void __init plat_mem_setup(void) 
     25@@ -243,6 +244,31 @@ void __init plat_mem_setup(void) 
    2626        mips_set_machine_name(bcm47xx_board_get_name()); 
    2727 } 
  • trunk/target/linux/brcm47xx/patches-3.10/208-b44-use-fixed-PHY-device-if-we-do-not-find-any.patch

    r42052 r42083  
    3131 #include <linux/ssb/ssb_embedded.h> 
    3232 #include <linux/bcma/bcma_soc.h> 
    33 @@ -260,6 +263,12 @@ static int __init bcm47xx_cpu_fixes(void 
     33@@ -269,6 +272,12 @@ static int __init bcm47xx_cpu_fixes(void 
    3434 } 
    3535 arch_initcall(bcm47xx_cpu_fixes); 
     
    4444 { 
    4545        switch (bcm47xx_bus_type) { 
    46 @@ -278,6 +287,7 @@ static int __init bcm47xx_register_bus_c 
     46@@ -287,6 +296,7 @@ static int __init bcm47xx_register_bus_c 
    4747        bcm47xx_buttons_register(); 
    4848        bcm47xx_leds_register(); 
  • trunk/target/linux/brcm47xx/patches-3.10/830-huawei_e970_support.patch

    r42052 r42083  
    99 #include <asm/prom.h> 
    1010 #include <asm/reboot.h> 
    11 @@ -269,6 +270,33 @@ static struct fixed_phy_status bcm47xx_f 
     11@@ -278,6 +279,33 @@ static struct fixed_phy_status bcm47xx_f 
    1212        .duplex = DUPLEX_FULL, 
    1313 }; 
     
    4343 { 
    4444        switch (bcm47xx_bus_type) { 
    45 @@ -288,6 +316,7 @@ static int __init bcm47xx_register_bus_c 
     45@@ -297,6 +325,7 @@ static int __init bcm47xx_register_bus_c 
    4646        bcm47xx_leds_register(); 
    4747        bcm47xx_workarounds(); 
  • trunk/target/linux/brcm47xx/patches-3.10/980-wnr834b_no_cardbus_invariant.patch

    r39252 r42083  
    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.