Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea4b3afe authored by Jaedon Shin's avatar Jaedon Shin Committed by James Hogan
Browse files

MIPS: BMIPS: Fix missing cbr address



Fix NULL pointer access in BMIPS3300 RAC flush.

Fixes: 738a3f79 ("MIPS: BMIPS: Add early CPU initialization code")
Signed-off-by: default avatarJaedon Shin <jaedon.shin@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 4.7+
Patchwork: https://patchwork.linux-mips.org/patch/16423/


Signed-off-by: default avatarJames Hogan <jhogan@kernel.org>
parent 39dae59d
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -591,11 +591,11 @@ void __init bmips_cpu_setup(void)


		/* Flush and enable RAC */
		/* Flush and enable RAC */
		cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
		cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
		__raw_writel(cfg | 0x100, BMIPS_RAC_CONFIG);
		__raw_writel(cfg | 0x100, cbr + BMIPS_RAC_CONFIG);
		__raw_readl(cbr + BMIPS_RAC_CONFIG);
		__raw_readl(cbr + BMIPS_RAC_CONFIG);


		cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
		cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
		__raw_writel(cfg | 0xf, BMIPS_RAC_CONFIG);
		__raw_writel(cfg | 0xf, cbr + BMIPS_RAC_CONFIG);
		__raw_readl(cbr + BMIPS_RAC_CONFIG);
		__raw_readl(cbr + BMIPS_RAC_CONFIG);


		cfg = __raw_readl(cbr + BMIPS_RAC_ADDRESS_RANGE);
		cfg = __raw_readl(cbr + BMIPS_RAC_ADDRESS_RANGE);