From patchwork Thu Mar 5 13:03:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 45458 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 45EF721494 for ; Thu, 5 Mar 2015 13:03:38 +0000 (UTC) Received: by wghk14 with SMTP id k14sf7136885wgh.3 for ; Thu, 05 Mar 2015 05:03:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=v8zfkU/2xZ58R8qDqQg9VLY46KPlFBy1Ydm32pvoF1g=; b=Gy5W7MkO2sYIeRElPjaUPNqnul1Wr8RJmmfwVnz0DNGxyggHK0+fjh6heRnLVrxQHC VfF8+pi1tDN8kOtgnAlF7MqGbmb5z3yddOSIjUof2i9kSSmgt0FFBHaNKp51y1fzvmrh g593Uu2nwt9snhJEixazV/b2aap4YherjDtaWC/j8Wiq48K+FqrMNrxcUFs6aXElD2aI YAvF8zPA2qybItLvwdqeQx7Xwt0OiNY+juWLvmWj8XrPATrvgYnSIdwsuleNQXX+QD8q HbucxY0UkNPXPlCxJgl/tIMAKCOfQYqQ3JsXIOrI0O2wuh20l57/879bSFT+vSXLblg1 Noug== X-Gm-Message-State: ALoCoQlNrvHXimWU1KhZpDpXCIF05fT9q2tDeIgEHOQiCuVRbq6DC8/WomBCZ73L92OBpymE4N4H X-Received: by 10.112.13.228 with SMTP id k4mr1455960lbc.8.1425560617479; Thu, 05 Mar 2015 05:03:37 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.201 with SMTP id n9ls325695lag.41.gmail; Thu, 05 Mar 2015 05:03:37 -0800 (PST) X-Received: by 10.112.36.69 with SMTP id o5mr7823245lbj.59.1425560617283; Thu, 05 Mar 2015 05:03:37 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id a2si4433340lah.96.2015.03.05.05.03.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2015 05:03:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbiv13 with SMTP id v13so32468025lbi.1 for ; Thu, 05 Mar 2015 05:03:37 -0800 (PST) X-Received: by 10.112.185.66 with SMTP id fa2mr7457187lbc.117.1425560616998; Thu, 05 Mar 2015 05:03:36 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp468851lbj; Thu, 5 Mar 2015 05:03:35 -0800 (PST) X-Received: by 10.68.57.168 with SMTP id j8mr15579810pbq.135.1425560614453; Thu, 05 Mar 2015 05:03:34 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oc4si9528438pdb.4.2015.03.05.05.03.33; Thu, 05 Mar 2015 05:03:34 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755117AbbCEND2 (ORCPT + 28 others); Thu, 5 Mar 2015 08:03:28 -0500 Received: from mail-wg0-f43.google.com ([74.125.82.43]:40431 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752973AbbCENDZ (ORCPT ); Thu, 5 Mar 2015 08:03:25 -0500 Received: by wghk14 with SMTP id k14so9430316wgh.7 for ; Thu, 05 Mar 2015 05:03:24 -0800 (PST) X-Received: by 10.180.14.66 with SMTP id n2mr64021060wic.50.1425560604378; Thu, 05 Mar 2015 05:03:24 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by mx.google.com with ESMTPSA id k1sm10443577wjn.9.2015.03.05.05.03.22 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Mar 2015 05:03:23 -0800 (PST) From: Stanimir Varbanov To: Vinod Koul Cc: Dan Williams , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2] dmaengine: bam-dma: fix a warning about missing capabilities Date: Thu, 5 Mar 2015 15:03:04 +0200 Message-Id: <1425560584-3721-1-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 1.7.0.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stanimir.varbanov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Avoid the warning below triggered during dmaengine async device registration. WARNING: CPU: 1 PID: 1 at linux/drivers/dma/dmaengine.c:863 dma_async_device_register+0x2a8/0x4b8() this driver doesn't support generic slave capabilities reporting To do that fill mandatory .directions bit mask, .src/dst_addr_widths and .residue_granularity dma_device fields with appropriate values. Signed-off-by: Stanimir Varbanov --- v1 -> v2 - the patch subject has been changed - now fill also .residue_granularity and src/dts_addr_widths - added the warning in patch description v1 can be found at https://lkml.org/lkml/2015/3/4/896 drivers/dma/qcom_bam_dma.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/dma/qcom_bam_dma.c b/drivers/dma/qcom_bam_dma.c index c3113e3..9c914d6 100644 --- a/drivers/dma/qcom_bam_dma.c +++ b/drivers/dma/qcom_bam_dma.c @@ -1143,6 +1143,10 @@ static int bam_dma_probe(struct platform_device *pdev) dma_cap_set(DMA_SLAVE, bdev->common.cap_mask); /* initialize dmaengine apis */ + bdev->common.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); + bdev->common.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT; + bdev->common.src_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES; + bdev->common.dst_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES; bdev->common.device_alloc_chan_resources = bam_alloc_chan; bdev->common.device_free_chan_resources = bam_free_chan; bdev->common.device_prep_slave_sg = bam_prep_slave_sg;