From patchwork Mon Oct 19 20:54:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Mosberger-Tang X-Patchwork-Id: 7439931 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AFF1ABEEA4 for ; Mon, 19 Oct 2015 21:02:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF0A3206EC for ; Mon, 19 Oct 2015 21:02:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DB4672052F for ; Mon, 19 Oct 2015 21:02:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753928AbbJSVCZ (ORCPT ); Mon, 19 Oct 2015 17:02:25 -0400 Received: from c-67-176-63-119.hsd1.co.comcast.net ([67.176.63.119]:51203 "EHLO pearl.egauge.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753628AbbJSVCX (ORCPT ); Mon, 19 Oct 2015 17:02:23 -0400 X-Greylist: delayed 443 seconds by postgrey-1.27 at vger.kernel.org; Mon, 19 Oct 2015 17:02:22 EDT Received: by pearl.egauge.net (Postfix, from userid 1000) id 338A7546BF6; Mon, 19 Oct 2015 14:54:59 -0600 (MDT) From: David Mosberger-Tang To: linux-spi@vger.kernel.org, Nicolas Ferre Cc: David Mosberger-Tang , linux-arm-kernel@lists.infradead.org, cyrille.pitchen@atmel.com Subject: [PATCH] spi: atmel: Fix DMA-setup for transfers with more than 8 bits per word. Date: Mon, 19 Oct 2015 14:54:44 -0600 Message-Id: <1445288084-31805-1-git-send-email-davidm@egauge.net> X-Mailer: git-send-email 1.9.1 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, 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 The DMA-slave configuration depends on the whether <= 8 or > 8 bits are transferred per word, so we need to call atmel_spi_dma_slave_config() with the correct value. Signed-off-by: David Mosberger Acked-by: Nicolas Ferre --- drivers/spi/spi-atmel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 04e48e5..855cc56 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -758,7 +758,8 @@ static int atmel_spi_next_xfer_dma_submit(struct spi_master *master, *plen = len; - if (atmel_spi_dma_slave_config(as, &slave_config, 8)) + if (atmel_spi_dma_slave_config(as, &slave_config, + xfer->bits_per_word)) goto err_exit; /* Send both scatterlists */