Skip to content

Commit ce5cdd3

Browse files
Ansueltsbogend
authored andcommitted
mips: bmips: BCM6358: make sure CBR is correctly set
It was discovered that some device have CBR address set to 0 causing kernel panic when arch_sync_dma_for_cpu_all is called. This was notice in situation where the system is booted from TP1 and BMIPS_GET_CBR() returns 0 instead of a valid address and !!(read_c0_brcm_cmt_local() & (1 << 31)); not failing. The current check whether RAC flush should be disabled or not are not enough hence lets check if CBR is a valid address or not. Fixes: ab327f8 ("mips: bmips: BCM6358: disable RAC flush for TP1") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 277a036 commit ce5cdd3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/mips/bmips/setup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ static void bcm6358_quirks(void)
110110
* RAC flush causes kernel panics on BCM6358 when booting from TP1
111111
* because the bootloader is not initializing it properly.
112112
*/
113-
bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31));
113+
bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31)) ||
114+
!!BMIPS_GET_CBR();
114115
}
115116

116117
static void bcm6368_quirks(void)

0 commit comments

Comments
 (0)