brcm47xx: deactivate mips wait instruction only for BCM4706
[openwrt.git] / target / linux / brcm47xx / patches-3.10 / 170-fix-74k-cpu.patch
1 --- a/arch/mips/bcm47xx/setup.c
2 +++ b/arch/mips/bcm47xx/setup.c
3 @@ -35,6 +35,7 @@
4  #include <asm/prom.h>
5  #include <asm/reboot.h>
6  #include <asm/time.h>
7 +#include <asm/idle.h>
8  #include <bcm47xx.h>
9  #include <bcm47xx_nvram.h>
10  #include <bcm47xx_board.h>
11 @@ -214,6 +215,15 @@ static void __init bcm47xx_register_bcma
12                 panic("Failed to initialize BCMA bus (err %d)", err);
13  
14         bcm47xx_fill_bcma_boardinfo(&bcm47xx_bus.bcma.bus.boardinfo, NULL);
15 +
16 +       /* The BCM4706 has a problem with the CPU wait instruction.
17 +        * When r4k_wait or r4k_wait_irqoff is used will just hang and 
18 +        * not return from a msleep(). Removing the cpu_wait 
19 +        * functionality is a workaround for this problem. The BCM4716 
20 +        * does not have this problem.
21 +        */
22 +       if (bcm47xx_bus.bcma.bus.chipinfo.id == BCMA_CHIP_ID_BCM4706)
23 +               cpu_wait = NULL;
24  }
25  #endif
26