Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FE7CC433F5 for ; Wed, 24 Nov 2021 12:22:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244267AbhKXMXO (ORCPT ); Wed, 24 Nov 2021 07:23:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:36014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243512AbhKXMSQ (ORCPT ); Wed, 24 Nov 2021 07:18:16 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8651C61130; Wed, 24 Nov 2021 12:11:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637755882; bh=CaBHb5y99m3Qd8zy0Hrg4tV9zHkZUHAhNx8botNcBZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hAkG7KFw8xQy7uYRttX/UAlP2SG0AJXUddM2v3m3cWJmEQ3J1Xe5Y+9AEgnKJuYZW wzxRTXF0rKBOlP3ayd9v8Hm4aOa4EnbSVL9/NJgsq2tNFnsOYrAlHg5Jdii70cYRPl v11hUEYZRlLhEYi0KhA8yNul6D67xlHghj6MBc2s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aleksander Jan Bajkowski , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 059/207] MIPS: lantiq: dma: add small delay after reset Date: Wed, 24 Nov 2021 12:55:30 +0100 Message-Id: <20211124115705.838773836@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115703.941380739@linuxfoundation.org> References: <20211124115703.941380739@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aleksander Jan Bajkowski [ Upstream commit c12aa581f6d5e80c3c3675ab26a52c2b3b62f76e ] Reading the DMA registers immediately after the reset causes Data Bus Error. Adding a small delay fixes this issue. Signed-off-by: Aleksander Jan Bajkowski Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- arch/mips/lantiq/xway/dma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c index cef811755123f..d89a9bcf92c85 100644 --- a/arch/mips/lantiq/xway/dma.c +++ b/arch/mips/lantiq/xway/dma.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -232,6 +233,8 @@ ltq_dma_init(struct platform_device *pdev) clk_enable(clk); ltq_dma_w32_mask(0, DMA_RESET, LTQ_DMA_CTRL); + usleep_range(1, 10); + /* disable all interrupts */ ltq_dma_w32(0, LTQ_DMA_IRNEN); -- 2.33.0