brcm47xx: fix cpu wait 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 @@ -239,6 +240,14 @@ static int __init bcm47xx_register_bus_c
12  #endif
13  #ifdef CONFIG_BCM47XX_BCMA
14         case BCM47XX_BUS_TYPE_BCMA:
15 +               /* The BCM4706 has a problem with the CPU wait instruction.
16 +                * When r4k_wait or r4k_wait_irqoff is used will just hang and 
17 +                * not return from a msleep(). Removing the cpu_wait 
18 +                * functionality is a workaround for this problem. The BCM4716 
19 +                * does not have this problem.
20 +                */
21 +               if (bcm47xx_bus.bcma.bus.chipinfo.id == BCMA_CHIP_ID_BCM4706)
22 +                       cpu_wait = NULL;
23                 bcma_bus_register(&bcm47xx_bus.bcma.bus);
24                 break;
25  #endif