From patchwork Wed Jan 3 06:42:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 10141745 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 972886034B for ; Wed, 3 Jan 2018 06:42:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9189B28F5D for ; Wed, 3 Jan 2018 06:42:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84CDC28F69; Wed, 3 Jan 2018 06:42:27 +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=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6FE7228F64 for ; Wed, 3 Jan 2018 06:42:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=j1JWycBHzscAmUf2W8mPns2ag4UlF+hBfznkU7YcWWA=; b=iOdHv5gWZDaW27 7Gb7Xo+Pi2LzZgQm67vfAsXt9JhOwjS45XkSil84p0K5fwJbbhzjDOLkzuuv8k87hasjiPej8g7Pm XzMwq0KnsnTOSz3VxK6F8QKODH6JvJp719cu+lHFBfh7yjKRYGAaRe90kjhMZxuUp2wC7sa9hsZ1a zu//fgK+C3AsFiK48r9hnFHyAGTv7udg7J6rDLvA72XkP5OQYNkMyk62ZIMlUSlhbNjpHklmwifGS +0ee5d7TcT5jVZTvyKSUEmOjeMa+tW1dEwVI9HMFAHncYpX84w7vERBaKaY+JqMkHmEJ3pGDh2TRS 9VcmyjVnwXkjnKEagI7g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eWckn-0005vb-Bi; Wed, 03 Jan 2018 06:42:21 +0000 Received: from mail-by2nam03on0059.outbound.protection.outlook.com ([104.47.42.59] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eWcki-0005tI-IV for linux-arm-kernel@lists.infradead.org; Wed, 03 Jan 2018 06:42:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mWIGFc039vktan7JUnYyptURbasAfzEu9p/3wA6dVYU=; b=shtAQEMBorpeCgBpyw+YFTknjuwrIhsp8LI1GtJgt/5Bkk3wriieWPYBL3apRlW7wS/epWPcgq9bavR4UppuoZ230zwygOssOvwt2mKowEZsrDF6iy/4lM6TKZCOIpUCJHq7yYBz3tuCFx3QOpOywVgvhK7xCGu8YDCpgvPnE/U= Received: from BN6PR02CA0091.namprd02.prod.outlook.com (10.161.158.32) by DM5PR02MB3273.namprd02.prod.outlook.com (10.164.148.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.366.8; Wed, 3 Jan 2018 06:42:02 +0000 Received: from BL2NAM02FT033.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::202) by BN6PR02CA0091.outlook.office365.com (2603:10b6:405:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.366.8 via Frontend Transport; Wed, 3 Jan 2018 06:42:01 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT033.mail.protection.outlook.com (10.152.77.163) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Wed, 3 Jan 2018 06:42:01 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:35377 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1eWckS-0004Eq-Iu; Tue, 02 Jan 2018 22:42:00 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1eWckS-0006Qt-GD; Tue, 02 Jan 2018 22:42:00 -0800 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w036fsH1011728; Tue, 2 Jan 2018 22:41:54 -0800 Received: from [172.23.37.94] (helo=ubuntu.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1eWckM-0006Pm-1c; Tue, 02 Jan 2018 22:41:54 -0800 From: Kedareswara rao Appana To: , , , , , , , , Subject: [PATCH v2 1/4] dmaengine: xilinx_dma: populate dma caps properly Date: Wed, 3 Jan 2018 12:12:08 +0530 Message-ID: <1514961731-1916-2-git-send-email-appanad@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514961731-1916-1-git-send-email-appanad@xilinx.com> References: <1514961731-1916-1-git-send-email-appanad@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23568.006 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(346002)(39860400002)(39380400002)(376002)(2980300002)(438002)(199004)(189003)(2906002)(478600001)(48376002)(59450400001)(2201001)(76176011)(9786002)(36386004)(106466001)(50466002)(51416003)(77096006)(7696005)(6666003)(54906003)(5660300001)(63266004)(2950100002)(7416002)(316002)(47776003)(106002)(16586007)(110136005)(305945005)(50226002)(39060400002)(8676002)(356003)(81156014)(81166006)(8936002)(4326008)(36756003)(107986001)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR02MB3273; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT033; 1:Y0EhO+obKeq6ZeIUF7H/Ax1rVv1OBZSQZpXc06AgW54kRGxkK8SKqYZwkRSHFlZ/Om11hjCYXldBBq7UX1Q5w17Txnd7l0fOLGtV9UAzDuUdNEN/z2779d+1KZjR4Ke/ MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 07ce6a42-5401-4bfa-fa94-08d552751849 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(4608076)(2017052603307)(7153060); SRVR:DM5PR02MB3273; X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB3273; 3:LHwvDOSDnS6RKGpTsYZIiJYagQMrHLxlnyexM/k8/ZXxu1qr7VxWjzyihBDK2MiACwk+opPBT3j5kqWH//sNj79smdpx0JfGh9Pe+SYq6T1OcrP6PhXjygMvEnHU7b8mzBcUuwa5W7ZKJidjgjRT2hH6/h9QjWWy4BiLTt+M5Tv3RWFHtN/KPN+DtZRATitlgbGes2v6OKptXfmX5w624TBREG2iYng3ez0fqmMSCZs5lrtUKtN7rVF6gjV96noHnzdB/3s7p3Nya/1CHhD/xaNW8Hp1R8+/xyHY8ekvNZ0cuNmyJnhvQ3QWVBG1xtSfOD/TBIdxDVsceQ+2OzmR8Pipr/7ASNtuKdOGcR36ct8=; 25:zaSUM8XnoH7pO5ZLWaT505eCRxbHGcYSUm+IGfvCFJKDD8kZqYjS7ch5IMSSxzjXJQ/u2dP1uQoSNIHlEuY0nZV6r0xpIcGPQcm1cvAkkMmuRt8a+VhWBo5y/y8mCc3rGbPNSi27Q4UyKsOzhkbUrIhi6gAD9ERWvDa6K7Oz1emRTYV+XBkBMq6MsDn44v3kXSU9iU9eFCUVgowfvgTE4XiH7jqBbb2GL2vLlU0enfC1AIjOO0jwQgQ7cHkzgtaf2PptBzd/blB6BAbfuIlUnvdaOONYbQzaEMzJxCp0YSMqsO3r+oJyxt+Y1vkajcRI/olpZumlPR7F5sJe5sbmkw== X-MS-TrafficTypeDiagnostic: DM5PR02MB3273: X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB3273; 31:51I/di5AK89DQGgcVEAN3h5FD9WqHZ8ZVfNquP3c0v+HJJc24RyM+9Y3Uw2UL1Kx4KzESyG5LejKfaVAoDSIA6ew9c/Nr/zgmwOwS8NNrfFJqFTPWwFUywwG2L+xCXSfAP8hq4iAb0xt9x4UkGaUVLnuAuG2RpJEutrIp4Jeu0eSNhjzRJCsLFBe3d1A72yYm/95hsVz9HsoranHZBsd9yN0IP7x9VIzfYdFJsTstgM=; 20:h4cHmFRwl3hWygoJUYSG37edrgMJmglcLUD2NwDE6qZK9w3qw6RKHb36Gw0CJvqLIlJo5tgehu2unlsLwyEL+e8/sI07X/R0PQG+imfqaLJGL1aww61eSNBt+yX3pmJMGzpI/OeY/acCMK/f9jHycHLU7oXlNUXXymXyQCQ3Sc1tVhsjkvVJSE6LcJphVJLOKVUfvj1jcHy1E4MsSlek0XhgZHjXTBdR9ajVYUiIVYbowi83hVPSuL7BaJiv+6hm0P3IPpxFc0hcECEO1YJOiFJA3endXvKySIjyYVAeUoRYaY/vMvF38YEOLJmBV/7bWSz41sbOR4NHuc9NUiQyB2PRoDuYYpxMxkNgpZV65KPjNApz/mpgTnQvr9NXJiUnO3cpysQ+hJnCv6Xcf3j2cb07AfL2SM7gjz4c2uVo1V8HVpX/gU4gT/kJrIoIO5dDKaDogKIrYhWP+GOuGONFEVUfWq9hGdDxzU/ok6UbZIfOQOzNEBbkVJFjROXkP7Jm X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(3231023)(944501075)(93006095)(93004095)(10201501046)(6055026)(6041268)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:DM5PR02MB3273; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR02MB3273; X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB3273; 4:+Caf3c+RADGMAxgiNGTCg/rcYAFpmqxuAB8NFaSMH4DdcWu/aWATgqxFO6nSLiQdrqxIpx7L9nRr/LeiNQIuXDAvUHNC0vo34IllMdb4U1F6j5IPiqohS8b/h1uauYcyhptSXEFrURBdk8QhyCnA8/UNDJBNbHmbdk4nIKyFNlP3+WL5ATYFTtOz7domXqwnPC3KMRxt3A2wd4EePp4t+YA0esf9n/uhIZUZYBU+T0iFslyz7Utc2SWzpT6iH2Ja3Tqkb7bXXJVYGrr5fbD2hSPKiZ8NPc2Y54+RnEQn9dJuOHQoYXsjH5OnROjfhL7L X-Forefront-PRVS: 0541031FF6 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR02MB3273; 23:HnDsQ396FTvSkUDevW0rPRXnNj9hg3FjwFYHSNoTX?= =?us-ascii?Q?aPoX3HXNoDOt3kzC8lj0DFtLRf2+9IJZdRy2OL33Y14KSkce3j9TxEFflpd4?= =?us-ascii?Q?ZMXICWvVai4k8XsazZaqgvWQA5/sDwaw2uJgMHjUqj17wzOSuJLy5ft678z1?= =?us-ascii?Q?6PiwmeD0ZAGQPqodf3YcoOBlYdQhm3JkzoLOjCGMSAipYg15MtOi0o5NSypi?= =?us-ascii?Q?qxsvTSLxwiw4gFJfRQAZkp4ru7pWKwAX2JLjandHnPZp8DVzgsAQnF48QQpD?= =?us-ascii?Q?RANMB52uodngiMijmnfrn3tCPVG8aLJ+MkZQvaU4OqlqFBt+eNcwjIrpYu+P?= =?us-ascii?Q?7tyC7qWWj4H0D/ZCT/KeBKEIlFS3mdmqQ++doj0EwnZTNwPk4+j25e7HEvQO?= =?us-ascii?Q?hjc+jWSs03S36z66/yeXjeITnqIVp0L3syVDMW2u/Zl64C7yYXJNR2n8wepg?= =?us-ascii?Q?qK+yV6OO/laM4ko5nBpyHtKdvKUo1+NxKjv3h3ZatTHX49LrRLJK+EjW4BrF?= =?us-ascii?Q?nGGjS3dZS0/2RGLmNFkymYvhpA1mL7IOthjbzztnJoxei34pYZBbfq7+C6sE?= =?us-ascii?Q?Ra7RenkyoBUahhKxZpoR9uf+1VHVyBAJRnT5yHkwPbz76MGumaxQ8DByuFmp?= =?us-ascii?Q?fvbrEsonvTlp09xDiZrvsucQhd8AnOe8aXNHfss8o/VQP5IIO2CFFtzLyjjg?= =?us-ascii?Q?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aVg7xO3OMqjixvJV5aqR60kWEVs3p4HzoLS/Y2p0v8QUT7JNkp5xnWRB3nLKBDqaMEdahVayyOpooaLl4TCu1O4cYs=; 7:2rEdCzsZR2+IThcoqXTbZhObWynKGTGa+lyKo+13gzrBEbr0XWf/fXSAsLLce3ZaKj30fyEHGA1F4QxCTyvdDoMibUA0moQiAjcrv5la3FNX4KTvqB87Clhi895DVZyBVQlmBDo3p6qV/g75hinRg1xlmiJ+Dcmdx1miPaiyrOnFgomrv7p2sy7z5DMf3Igtlw9LuEnUnEmh4smbxOccruPIhCWmR+8zM7ZqAoYqOMcvGlCfKPmN2uPQHdryQrMX SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2018 06:42:01.3070 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 07ce6a42-5401-4bfa-fa94-08d552751849 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB3273 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180102_224216_703383_36867DFA X-CRM114-Status: UNSURE ( 7.96 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When client driver uses dma_get_slave_caps() api, it checks for certain fields of dma_device struct currently driver is not settings the directions and addr_widths fields resulting dma_get_slave_caps() returning failure. This patch fixes this issue by populating proper values to the struct dma_device directions and addr_widths fields. Signed-off-by: Kedareswara rao Appana --- Changes for v2: --> Improved commit message title and description as suggested by Vinod. drivers/dma/xilinx/xilinx_dma.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 88d317d..21ac954 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -2398,6 +2398,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev, chan->direction = DMA_MEM_TO_DEV; chan->id = chan_id; chan->tdest = chan_id; + xdev->common.directions = BIT(DMA_MEM_TO_DEV); chan->ctrl_offset = XILINX_DMA_MM2S_CTRL_OFFSET; if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) { @@ -2415,6 +2416,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev, chan->direction = DMA_DEV_TO_MEM; chan->id = chan_id; chan->tdest = chan_id - xdev->nr_channels; + xdev->common.directions |= BIT(DMA_DEV_TO_MEM); chan->ctrl_offset = XILINX_DMA_S2MM_CTRL_OFFSET; if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) { @@ -2629,6 +2631,8 @@ static int xilinx_dma_probe(struct platform_device *pdev) dma_cap_set(DMA_PRIVATE, xdev->common.cap_mask); } + xdev->common.dst_addr_widths = BIT(addr_width / 8); + xdev->common.src_addr_widths = BIT(addr_width / 8); xdev->common.device_alloc_chan_resources = xilinx_dma_alloc_chan_resources; xdev->common.device_free_chan_resources =