From patchwork Fri Mar 17 15:41:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frode Isaksen X-Patchwork-Id: 9630989 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0951B60245 for ; Fri, 17 Mar 2017 15:42:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7EBA26E82 for ; Fri, 17 Mar 2017 15:42:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCA8B285EB; Fri, 17 Mar 2017 15:42:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2B9626E82 for ; Fri, 17 Mar 2017 15:42:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751047AbdCQPmY (ORCPT ); Fri, 17 Mar 2017 11:42:24 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:33924 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751022AbdCQPmW (ORCPT ); Fri, 17 Mar 2017 11:42:22 -0400 Received: by mail-wm0-f51.google.com with SMTP id 196so9426663wmm.1 for ; Fri, 17 Mar 2017 08:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=K5V6Fnvx7ACs8G35++qzQEEaLSv1FVmDsSjc1dcp3mw=; b=JgITK8r3nzwd+qIuVKQv5FPfrTOps1NptQqFLM4ahk4gR4eo7Ylr2zAtpwZHQSJM7Y W1DT445guBlxyZv2ei2bYaevA6GhpQQ5JGpd9AOkMLvMGUDO4/wg+63cvMbplpSdI4kc L/AV53rTgc2me6e5syis2rCd2AKvRjqu1omgujtC82KoXONCcs75EwSyaAe9+Zeja5o/ xc1k6FqpORxSuaheUfFOI9ds+w28uajE/26haTa2nFrylgd5Jz1SGEjo9Z+TRlMZgw4W Y9sTncq7KU53G9ZKnBEn8RraQQr5G5+TlUOza7odopE1ILx9n3OUpu9d72pggM6b1nKu t8xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=K5V6Fnvx7ACs8G35++qzQEEaLSv1FVmDsSjc1dcp3mw=; b=n3sMNPJJk992z32GcmV+PZ4Ckkz1r3/FxjoN3sE911mjxbBtdA6pEnlB/iFVx2Zxa/ oYKJFlct/OWv50BiGrVFg/u1nBJG09dXIcrzPXmEI7eD5wuIqf/oLl3QwAOaC1CEagbw NRVTAzwV4jNagZnUxZ8tBD6RpBK67ANgP6SKLTq/CvUqHifA9Sw55Ra9sTlsIQ53+NrV iatnYZT2N6hG0sFQz600ZvCFwODZMFAG9P7H2JJxb7e4f11kvM/BVU/sMomsO7vGT5x8 XFC04RDNxYr0bMcndrNUggHSuaPEOoHD1oEEAwEMj4mWauT9Y7l+dkNhjBZElrOu7voc 6bdg== X-Gm-Message-State: AFeK/H1bl4AFVxR7rVrzrJS1Oya4NAJzocjeq9iq0TwTI90HJzWfkwvtxDk2D5SSpjBa/jSC X-Received: by 10.28.141.16 with SMTP id p16mr3349555wmd.42.1489765283790; Fri, 17 Mar 2017 08:41:23 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id b10sm3036396wmi.34.2017.03.17.08.41.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Mar 2017 08:41:23 -0700 (PDT) From: Frode Isaksen To: nsekhar@ti.com, khilman@baylibre.com, ptitiano@baylibre.com, linux-arm-kernel@lists.infradead.org Cc: broonie@kernel.org, linux-spi@vger.kernel.org, Frode Isaksen Subject: [PATCH] spi: davinci: add comment about dummy tx buffer usage Date: Fri, 17 Mar 2017 16:41:10 +0100 Message-Id: <1489765270-17950-1-git-send-email-fisaksen@baylibre.com> X-Mailer: git-send-email 2.7.4 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add explanation about using the the rx buffer as the dummy tx buffer. Signed-off-by: Frode Isaksen --- drivers/spi/spi-davinci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index f37bbdd..595acdc 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -660,7 +660,11 @@ static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t) goto err_desc; if (!t->tx_buf) { - /* use rx buffer as dummy tx buffer */ + /* To avoid errors when doing rx-only transfers with + * many SG entries (> 20), use the rx buffer as the + * dummy tx buffer so that dma reloads are done at the + * same time for rx and tx. + */ t->tx_sg.sgl = t->rx_sg.sgl; t->tx_sg.nents = t->rx_sg.nents; }