From patchwork Tue Dec 16 21:05:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Bresticker X-Patchwork-Id: 5503421 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 712529F30B for ; Tue, 16 Dec 2014 21:05:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA966209D3 for ; Tue, 16 Dec 2014 21:05:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D26AF209E5 for ; Tue, 16 Dec 2014 21:05:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751843AbaLPVFu (ORCPT ); Tue, 16 Dec 2014 16:05:50 -0500 Received: from mail-yh0-f74.google.com ([209.85.213.74]:61863 "EHLO mail-yh0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751176AbaLPVFt (ORCPT ); Tue, 16 Dec 2014 16:05:49 -0500 Received: by mail-yh0-f74.google.com with SMTP id 29so828709yhl.1 for ; Tue, 16 Dec 2014 13:05:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TeSguO8RXXrTfea96URkWzNfS93jKROPasX7CLxwhrc=; b=PwValqD3+zddLywH5u5ZVOcsU3jcjfOAbq5xXi9WTmRmAC6G6K/hdno+ALc5HrjKAV 2186xNDERmH9Xv72loVsewszsWEvo3kiMvvqrdXASWYbDmpVGQM3Or7/e2U34bf+39vR winxrEoubjeOpMIZeNsSPhciacMUz6IPC8Mpp7PctpuyLeQNyufgg6wB+M27ShrVXOHb WZU2SZhMh/zEf0esT6dt6LeUzCNuCtZmlC8/YLUKklUdOUCLCVfqGgDfHgyUQJTXFOgE fL6AzeIAPFKG4D6QDHz0JaeJdHri1EqfgwPGRARY4t5aaFD8GSOLO9XvghadaNOD7Em6 HCkw== X-Gm-Message-State: ALoCoQnbLZdaCtjTxCJfSCwaGlNd+xKfaRsqS3f6AZ528eXAguS1vovXSv/BEUkjeIRYaPWZw/Uc X-Received: by 10.236.29.36 with SMTP id h24mr3078863yha.28.1418763948443; Tue, 16 Dec 2014 13:05:48 -0800 (PST) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id s23si88204yhf.0.2014.12.16.13.05.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Dec 2014 13:05:48 -0800 (PST) Received: from abrestic.mtv.corp.google.com ([172.22.65.70]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id uiv7N4CL.1; Tue, 16 Dec 2014 13:05:48 -0800 Received: by abrestic.mtv.corp.google.com (Postfix, from userid 137652) id 75B0D220561; Tue, 16 Dec 2014 13:05:47 -0800 (PST) From: Andrew Bresticker To: Mark Brown Cc: Sifan Naeem , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Bresticker Subject: [PATCH 1/3] spi: img-spfi: Enable controller before starting TX DMA Date: Tue, 16 Dec 2014 13:05:44 -0800 Message-Id: <1418763946-22260-1-git-send-email-abrestic@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It is recommended that the SPFI controller be enabled (i.e. setting SPFI_EN in SPFI_CONTROL) before TX DMA begins. Signed-off-by: Andrew Bresticker --- drivers/spi/spi-img-spfi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-img-spfi.c b/drivers/spi/spi-img-spfi.c index 43781c9..e7e79e6 100644 --- a/drivers/spi/spi-img-spfi.c +++ b/drivers/spi/spi-img-spfi.c @@ -390,14 +390,14 @@ static int img_spfi_start_dma(struct spi_master *master, dma_async_issue_pending(spfi->rx_ch); } + spfi_start(spfi); + if (xfer->tx_buf) { spfi->tx_dma_busy = true; dmaengine_submit(txdesc); dma_async_issue_pending(spfi->tx_ch); } - spfi_start(spfi); - return 1; stop_dma: