From patchwork Sun Jan 1 14:38:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 6016 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A6CF923E10 for ; Sun, 1 Jan 2012 14:38:58 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id 9DB6CA184BB for ; Sun, 1 Jan 2012 14:38:58 +0000 (UTC) Received: by mail-ey0-f180.google.com with SMTP id c11so14040461eaa.11 for ; Sun, 01 Jan 2012 06:38:58 -0800 (PST) Received: by 10.205.132.148 with SMTP id hu20mr8053132bkc.96.1325428738422; Sun, 01 Jan 2012 06:38:58 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs295682bkc; Sun, 1 Jan 2012 06:38:58 -0800 (PST) Received: by 10.42.131.136 with SMTP id z8mr29389799ics.5.1325428736063; Sun, 01 Jan 2012 06:38:56 -0800 (PST) Received: from mail-iy0-f178.google.com (mail-iy0-f178.google.com [209.85.210.178]) by mx.google.com with ESMTPS id wp2si4803901igc.19.2012.01.01.06.38.54 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Jan 2012 06:38:56 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=209.85.210.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) smtp.mail=richard.zhao@linaro.org Received: by mail-iy0-f178.google.com with SMTP id f6so32949795iag.37 for ; Sun, 01 Jan 2012 06:38:54 -0800 (PST) Received: by 10.50.183.166 with SMTP id en6mr53523498igc.7.1325428734796; Sun, 01 Jan 2012 06:38:54 -0800 (PST) Received: from localhost.localdomain ([114.95.105.23]) by mx.google.com with ESMTPS id py9sm77186679igc.2.2012.01.01.06.38.47 (version=SSLv3 cipher=OTHER); Sun, 01 Jan 2012 06:38:54 -0800 (PST) From: Richard Zhao To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: kernel@pengutronix.de, shawn.guo@linaro.org, vinod.koul@intel.com, dan.j.williams@intel.com, eric.miao@linaro.org, patches@linaro.org, Richard Zhao Subject: [PATCH v2 2/2] dma/imx-sdma: add wmb before enable a channel Date: Sun, 1 Jan 2012 22:38:12 +0800 Message-Id: <1325428692-11473-3-git-send-email-richard.zhao@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1325428692-11473-1-git-send-email-richard.zhao@linaro.org> References: <1325428692-11473-1-git-send-email-richard.zhao@linaro.org> dma_alloc_coherent memory may be bufferable. We need to add nececcary memory barrier. Signed-off-by: Richard Zhao --- drivers/dma/imx-sdma.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index f8e87b5..9301bff 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -394,6 +394,7 @@ static int sdma_config_ownership(struct sdma_channel *sdmac, static void sdma_enable_channel(struct sdma_engine *sdma, int channel) { + wmb(); __raw_writel(1 << channel, sdma->regs + SDMA_H_START); }