From patchwork Thu Sep 14 05:39:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 9952461 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 4BBEB602C9 for ; Thu, 14 Sep 2017 05:38:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F49828B8A for ; Thu, 14 Sep 2017 05:38:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3411E28BC1; Thu, 14 Sep 2017 05:38:57 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 CE76728B8A for ; Thu, 14 Sep 2017 05:38:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751130AbdINFi4 (ORCPT ); Thu, 14 Sep 2017 01:38:56 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34758 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750798AbdINFiz (ORCPT ); Thu, 14 Sep 2017 01:38:55 -0400 Received: by mail-pf0-f194.google.com with SMTP id g65so1059126pfe.1; Wed, 13 Sep 2017 22:38:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=omRKEsaQX0mMhQCktKcf398w9warDbiwmt31fpDHJGU=; b=Ea3fqvXLOdpFinXMzkBHYXV4UT4kXSdisxvQSMm9fxcSJv3snJU4EFVnmbhwsWAx0J wqvArbqZLUfaagn3r6OxO3+xhEql0zZ96pUaNSpboZMCWGuwm+AwM1I0XfrGDa9Dg179 iZHv3luzV8LIyrWQy1dltpbiEX5/jlgajc/GD9vJqE5FiW5rwtrO+B2mSTcIhJmm+qV0 ICxknDo1nGX9trYukc+PX8UbgrKwDLjc3PRszr7df3S8ZcZGcdTjdI3sudf23zFDkVlN SiiDfKF0qgTlOw1BaxEBav/e9XEDaYG+9LEwRZblH3+t7WZ2MS8CY6DumHp8I1Ltf6Lp tf2A== 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=omRKEsaQX0mMhQCktKcf398w9warDbiwmt31fpDHJGU=; b=Lk2if7psLOvR4FHT2Cyg8W1PVBbry3aqQJqve8rBMpdGh0VXZOMuY6RwV4BxkdtzQY UfUi1JnXNXslh5Ys1vyj7AGYjVm3lFjOrz08TI7BwjnD70LM5KuNl8BE3EEEW8jo6+IB ukoUiZlEMJpEWZE6/VdTT9DYfxoM9icEs9aScL4mZDXC5XeSTVR0mPjLgqXdZZUXd65X DR1hMlP94fnCR1NtXshuvMINfSTKHUU00aamzK5dYPmK+s+qCMfz2j5XHRfvLdyul/X3 oWAH2OxGm9UixzkHG2QzeRxs7G4s+bfgTLncaFgoF9cmnQcv3mKDdj7gIjoJf0S8k5+W OqgA== X-Gm-Message-State: AHPjjUhj3xPZNHaP4sFN2XOnWzQNv3s0cCa8T9VtRgkHiIAjhwIL5PX9 qexFCLBHmPE+EQ== X-Google-Smtp-Source: ADKCNb5fd15Z/AwF1SCehlTdffcj3UmKGnn63Ts180R1kSCq51rWd6JgOU5sxb6S+IArO95lOP//7w== X-Received: by 10.84.177.131 with SMTP id x3mr23430960plb.123.1505367534999; Wed, 13 Sep 2017 22:38:54 -0700 (PDT) Received: from Asurada-Nvidia.nvidia.com (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id u12sm23394799pfg.146.2017.09.13.22.38.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Sep 2017 22:38:54 -0700 (PDT) From: Nicolin Chen To: vinod.koul@intel.com Cc: fabio.estevam@nxp.com, dan.j.williams@intel.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: imx-sdma: Correct addr widths Date: Wed, 13 Sep 2017 22:39:20 -0700 Message-Id: <1505367560-24071-1-git-send-email-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.1.4 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The driver also supports 2_BYTES and 1_BYTE in sdma_prep_slave_sg(). So this patch just adds them to the lists. Signed-off-by: Nicolin Chen --- drivers/dma/imx-sdma.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index a67ec1b..2be8d0d 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -178,6 +178,10 @@ #define SDMA_WATERMARK_LEVEL_HWE BIT(29) #define SDMA_WATERMARK_LEVEL_CONT BIT(31) +#define SDMA_DMA_BUSWIDTHS (BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | \ + BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | \ + BIT(DMA_SLAVE_BUSWIDTH_4_BYTES)) + /* * Mode/Count of data node descriptors - IPCv2 */ @@ -1851,8 +1855,8 @@ static int sdma_probe(struct platform_device *pdev) sdma->dma_device.device_prep_dma_cyclic = sdma_prep_dma_cyclic; sdma->dma_device.device_config = sdma_config; sdma->dma_device.device_terminate_all = sdma_disable_channel_with_delay; - sdma->dma_device.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); - sdma->dma_device.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); + sdma->dma_device.src_addr_widths = SDMA_DMA_BUSWIDTHS; + sdma->dma_device.dst_addr_widths = SDMA_DMA_BUSWIDTHS; sdma->dma_device.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); sdma->dma_device.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT; sdma->dma_device.device_issue_pending = sdma_issue_pending;