From patchwork Fri Jan 13 15:02:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9515793 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 0CB00601DA for ; Fri, 13 Jan 2017 15:02:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2F2E28671 for ; Fri, 13 Jan 2017 15:02:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5B41286D2; Fri, 13 Jan 2017 15:02:11 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 7A46E28671 for ; Fri, 13 Jan 2017 15:02:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751885AbdAMPCK (ORCPT ); Fri, 13 Jan 2017 10:02:10 -0500 Received: from mail-lf0-f50.google.com ([209.85.215.50]:32903 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751828AbdAMPCH (ORCPT ); Fri, 13 Jan 2017 10:02:07 -0500 Received: by mail-lf0-f50.google.com with SMTP id k86so39652108lfi.0 for ; Fri, 13 Jan 2017 07:02:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=HGmRIVNrg+rOVb/x+RLmOX41qGZr2Zi3auEEwkR6CvA=; b=eQdQ/JXEGQ7EVDidqaB+MELf0cPkCiPcvbZdt2R6i8t/aSNAj7Rm5uyROpbFY2vNmv iOTWOk2fFB7tGcmKUXkWdS09wEDmw0il0IULc/Fp+lbDiFoDw4dbW95uImKFlNSBtFlY GNU0ZhA2gU1ys2p0L6wchf+ooHNARDtFlwp/w= 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=HGmRIVNrg+rOVb/x+RLmOX41qGZr2Zi3auEEwkR6CvA=; b=fnYQQc5RoSRWxbKz0gVCRsaWmBXKnON64t6VoqwVJc7PA2vNOHy99j+6GicSs4czLq Q/a/qPcYGewCXCYWKPLSlOtW9fYLHUX86oFYx+fF5O3AtUdE6HrUGJ5EjNTI3OLZIqzs YZNYGSgAsCiRmydGv5C3Hk39jdtJJNubvLG1TnWqrlXzh/vnLdzKjg7fnyb7EFtL+bW0 NbwkNuRFMtyrLztVC8VG5V34AmCkInc9Hh4IemvPdyHYzuF/pilHVr+PpvfQ3CuqCHIh WBaxlnbjJEzxvOLy4GZmljpT4mF6GB/KG2V0BdaZra1s4XaTWfVnw45I0uIFLpT0Ftxa oa0A== X-Gm-Message-State: AIkVDXJIwSmH8YwdK1C+a7um9h7MjSe2rKy7XAW2LHD7epKrjEC1KdVjMSwk8riN+d6Sa6nA X-Received: by 10.46.22.85 with SMTP id 21mr7816037ljw.13.1484319725577; Fri, 13 Jan 2017 07:02:05 -0800 (PST) Received: from gnarp.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id x78sm3984812lfb.44.2017.01.13.07.02.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jan 2017 07:02:04 -0800 (PST) From: Linus Walleij To: Vinod Koul , dmaengine@vger.kernel.org Cc: Linus Walleij Subject: [PATCH 1/2] dma: ste_dma40: indicate directions on channels Date: Fri, 13 Jan 2017 16:02:03 +0100 Message-Id: <20170113150203.27029-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the introduction of the .directions flags, ste_dma40 was never patched to indicate which transfer directions it can manage. This causes a problem when trying to use the dmaengine for generic ALSA SoC DMA: ux500-msp-i2s.1: Failed to get DMA channel capabilities, falling back to period counting: -6 This patch fixes this issue by indicating the supported transfer directions for slave and memcpy channels. Signed-off-by: Linus Walleij --- drivers/dma/ste_dma40.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 8684d11b29bb..2f0852dfbd1b 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -2809,12 +2809,14 @@ static void __init d40_chan_init(struct d40_base *base, struct dma_device *dma, static void d40_ops_init(struct d40_base *base, struct dma_device *dev) { - if (dma_has_cap(DMA_SLAVE, dev->cap_mask)) + if (dma_has_cap(DMA_SLAVE, dev->cap_mask)) { dev->device_prep_slave_sg = d40_prep_slave_sg; + dev->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); + } if (dma_has_cap(DMA_MEMCPY, dev->cap_mask)) { dev->device_prep_dma_memcpy = d40_prep_memcpy; - + dev->directions = BIT(DMA_MEM_TO_MEM); /* * This controller can only access address at even * 32bit boundaries, i.e. 2^2