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 3BE2BC433F5 for ; Wed, 24 Nov 2021 12:36:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343583AbhKXMjn (ORCPT ); Wed, 24 Nov 2021 07:39:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:35692 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344107AbhKXMfX (ORCPT ); Wed, 24 Nov 2021 07:35:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F2E3160FE7; Wed, 24 Nov 2021 12:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637756488; bh=wAcq/QbrQa58HbAyjghxl82mV4OBsMbJuIOPp79spaw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d7Gf09rqUX5oLc1OuZsfy8ucUHiNhkRZa+k10RGrqaJl/0mpCQVlEsf+bmAzeQlka hDXkgJTuzuNQAYYMI+3h+t8j0b5LXp6DrYtV3Zu6Yc9EUf5kNPnyM9FF2bYEcC/N+q AcQVCxKb/3W/OFodgS/nK4DFBh8LqRtVWVIgKWn0= 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.14 071/251] MIPS: lantiq: dma: add small delay after reset Date: Wed, 24 Nov 2021 12:55:13 +0100 Message-Id: <20211124115712.716656180@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115710.214900256@linuxfoundation.org> References: <20211124115710.214900256@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 805b3a6ab2d60..ce7e033b4bb18 100644 --- a/arch/mips/lantiq/xway/dma.c +++ b/arch/mips/lantiq/xway/dma.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -234,6 +235,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