From patchwork Wed Aug 6 12:59:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 4685791 Return-Path: X-Original-To: patchwork-dmaengine@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 576089F39D for ; Wed, 6 Aug 2014 12:59:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A027A200ED for ; Wed, 6 Aug 2014 12:59:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C91892015A for ; Wed, 6 Aug 2014 12:59:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756137AbaHFM7b (ORCPT ); Wed, 6 Aug 2014 08:59:31 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:43533 "EHLO michel.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756138AbaHFM70 (ORCPT ); Wed, 6 Aug 2014 08:59:26 -0400 Received: from ayla.of.borg ([84.193.84.167]) by michel.telenet-ops.be with bizsmtp id bQzM1o00n3cczKo06QzMDL; Wed, 06 Aug 2014 14:59:24 +0200 Received: from geert by ayla.of.borg with local (Exim 4.76) (envelope-from ) id 1XF0oL-0001Uz-NW; Wed, 06 Aug 2014 14:59:21 +0200 From: Geert Uytterhoeven To: Mark Brown , Simon Horman Cc: Laurent Pinchart , linux-spi@vger.kernel.org, linux-sh@vger.kernel.org, dmaengine@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 04/12] spi: rspi: Configure DMA slave bus width to 8 bit Date: Wed, 6 Aug 2014 14:59:01 +0200 Message-Id: <1407329949-5695-5-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1407329949-5695-1-git-send-email-geert+renesas@glider.be> References: <1407329949-5695-1-git-send-email-geert+renesas@glider.be> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 new Renesas R-Car Gen2 DMA Controller driver (rcar-dmac) requires explicit configuration of the DMA slave bus width. Hardcode the DMA transfer size to 1 byte for both directions, as that's the only supported configuration (16-bit DMA support was removed in commit 9c5de2c1754c2bb3c69c4d7bf0d0edc0a61d8232 ("spi: rspi: Remove unused 16-bit DMA support")). Signed-off-by: Geert Uytterhoeven --- drivers/spi/spi-rspi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index aa1c6a893570..6a4eb2d7f644 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -919,10 +919,13 @@ static struct dma_chan *rspi_request_dma_chan(struct device *dev, memset(&cfg, 0, sizeof(cfg)); cfg.slave_id = id; cfg.direction = dir; - if (dir == DMA_MEM_TO_DEV) + if (dir == DMA_MEM_TO_DEV) { cfg.dst_addr = port_addr; - else + cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; + } else { cfg.src_addr = port_addr; + cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; + } ret = dmaengine_slave_config(chan, &cfg); if (ret) {