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: 5945831 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A063C9F380 for ; Thu, 5 Mar 2015 13:04:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA95420381 for ; Thu, 5 Mar 2015 13:03:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 001BB20380 for ; Thu, 5 Mar 2015 13:03:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751813AbbCENDw (ORCPT ); Thu, 5 Mar 2015 08:03:52 -0500 Received: from mail-wg0-f42.google.com ([74.125.82.42]:43816 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752829AbbCENDZ (ORCPT ); Thu, 5 Mar 2015 08:03:25 -0500 Received: by wggy19 with SMTP id y19so53225072wgg.10 for ; Thu, 05 Mar 2015 05:03:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=z3Hcf3CjEhwhkH7UQVAyFLb8/VehIr5JZz3A8v2Uv/c=; b=N+m8jx02aoZBChXD0otadLoX1LuZjupWUW5TpKi7uBTmJ/knIGKtLAbdTQDRflepNY 54wqIQEnuC4huH3nmbrioepQXuk9UsUn0tuMZutrdNtAp+C1gDrgWrmPHr1sFo5OUUZx /qpN0DPZkzpW3YBGAVKILdDJBfwKuhBbBOR3T6Ncd9fryxfZYw3WwtEMqSTx3o2DZZWs w+XDYrkWFPX68atLTXgpWYCM8Jaz+IL216gPochqG0hZX1231uirwy9NfptVCr8BA17K quioJIx1o494wJFt5+OnGywxQx/5VCEOYxTvmR2Yw7bUyf4mLSlAz/LLn0W3Zvf8e//7 POBA== X-Gm-Message-State: ALoCoQnYDV8b3dwzZS49ntddITV4CMOGIt9g1ukpTq23Ck1z7r5Xr08iXNkrKi55zkQ/inbIJjV7 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 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;