From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 25 Jun 2018 19:17:25 +0200 (CEST) Received: from nbd.name ([IPv6:2a01:4f8:221:3d45::2]:57964 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23992940AbeFYRQBonqow (ORCPT ); Mon, 25 Jun 2018 19:16:01 +0200 From: John Crispin To: James Hogan , Ralf Baechle Cc: linux-mips@linux-mips.org, Felix Fietkau , Alban Bedel Subject: [PATCH 04/25] MIPS: ath79: fix register address in ath79_ddr_wb_flush() Date: Mon, 25 Jun 2018 19:15:28 +0200 Message-Id: <20180625171549.4618-5-john@phrozen.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180625171549.4618-1-john@phrozen.org> References: <20180625171549.4618-1-john@phrozen.org> Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 64432 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: john@phrozen.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips From: Felix Fietkau ath79_ddr_wb_flush_base has the type void __iomem *, so register offsets need to be a multiple of 4. Cc: Alban Bedel Fixes: 24b0e3e84fbf ("MIPS: ath79: Improve the DDR controller interface") Signed-off-by: Felix Fietkau --- arch/mips/ath79/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/ath79/common.c b/arch/mips/ath79/common.c index fad32543a968..cd6055f9e7a0 100644 --- a/arch/mips/ath79/common.c +++ b/arch/mips/ath79/common.c @@ -58,7 +58,7 @@ EXPORT_SYMBOL_GPL(ath79_ddr_ctrl_init); void ath79_ddr_wb_flush(u32 reg) { - void __iomem *flush_reg = ath79_ddr_wb_flush_base + reg; + void __iomem *flush_reg = ath79_ddr_wb_flush_base + (reg * 4); /* Flush the DDR write buffer. */ __raw_writel(0x1, flush_reg); -- 2.11.0