Skip to content

Commit bc88ad2

Browse files
nbd168paulburton
authored andcommitted
MIPS: ath79: fix register address in ath79_ddr_wb_flush()
ath79_ddr_wb_flush_base has the type void __iomem *, so register offsets need to be a multiple of 4 in order to access the intended register. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John Crispin <[email protected]> Signed-off-by: Paul Burton <[email protected]> Fixes: 24b0e3e ("MIPS: ath79: Improve the DDR controller interface") Patchwork: https://patchwork.linux-mips.org/patch/19912/ Cc: Alban Bedel <[email protected]> Cc: James Hogan <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: [email protected] Cc: [email protected] # 4.2+
1 parent 38c0a74 commit bc88ad2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/ath79/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ EXPORT_SYMBOL_GPL(ath79_ddr_ctrl_init);
5858

5959
void ath79_ddr_wb_flush(u32 reg)
6060
{
61-
void __iomem *flush_reg = ath79_ddr_wb_flush_base + reg;
61+
void __iomem *flush_reg = ath79_ddr_wb_flush_base + (reg * 4);
6262

6363
/* Flush the DDR write buffer. */
6464
__raw_writel(0x1, flush_reg);

0 commit comments

Comments
 (0)