Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753096AbbGJGxi (ORCPT ); Fri, 10 Jul 2015 02:53:38 -0400 Received: from mail-by2on0120.outbound.protection.outlook.com ([207.46.100.120]:31338 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752586AbbGJGxa (ORCPT ); Fri, 10 Jul 2015 02:53:30 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none; Date: Fri, 10 Jul 2015 13:44:35 +0800 From: Shengjiu Wang To: Vinod Koul CC: , , Subject: Re: [PATCH] dmaengine: imx-sdma: Add device to device support Message-ID: <20150710054433.GA14762@shlinux2> References: <1435048974-23700-1-git-send-email-shengjiu.wang@freescale.com> <20150707042057.GH11002@localhost> <20150707052420.GA9703@shlinux2> <20150710062205.GA836@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20150710062205.GA836@localhost> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD047;1:Kxi1tF9cY1dwWDZMG1kteKhqukdQq92DkCG+THobPga9FU+g+wJTa/ObUmCquFK47HCBeO4BG9EUEjoQtRWR5WyOqO69wBQ7vFD0FC30kze7wH7Dapw4k2lIad0HYZ7Cb14sySCOl8uez1kyXKqFPZN5hOfVNP5Pc2YWlVTfkEDTjC0NmqO83m5sycYjseHJ7g63RPJBLowM1bdnz2TYIlapIUoaJxtT7v8L2I/vUf53DquyO9EgS4D5CzkFKruSP4XATEbLKZHKDkvlwiWpEFvrpHncXdcO8tCD69ZiA66xqkygO31yH5epaWE/HqZ11QvVqA7ozbZwST748UeKaQ== X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(24454002)(199003)(51704005)(93886004)(46406003)(106466001)(85426001)(2950100001)(77096005)(92566002)(83506001)(104016003)(77156002)(23726002)(50466002)(62966003)(97756001)(189998001)(5001960100002)(47776003)(5001920100001)(6806004)(33656002)(110136002)(105606002)(33716001)(87936001)(46102003)(86362001)(50986999)(76176999)(54356999)(21314002);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR03MB280;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB280;2:y3VWRMEFzGtQ2sqnuJ9SCzgzBVqPttuYfnypqZsDXrEaWIJq3tDECPYaibaxRXW4;3:PiGlsLn9lG+zeqGVisAP9uz+Y51LwG6d/K3XiBFgTGZMBAZSMwtSXGjg2JTCiIUowQykBetA//YnEpfS4QnNHNnPGcDl3PHvCpI/COmoX6ialaichGweuvhUVYGCLMTNux6I2kOpr9U0VM7hkL7giPfXgfePgaYk6LSFJpsePuNNwWPZQeCEeGzww/Zz9jRz46ry7uOJvgU+wWZT3YYq2VVZzZ+WjbZrETQ7nwbTxkM=;25:lxqIZ6VJih0ZK0TbxRquM1m784c3pFzF/kFitJXe2ks/zxQLKI5EHAUiqHe7Mn314jyuuPPJ+WtchjCBuEaSB0QrdVtkK5gWuOPakgw0vE3aAlMPFnsGIKMOfkRIl2UiOfakb6cTEpLCmCReq3Skm2iqUkL/6pG9kDbknqz7KsM2dXUIYA9fGuB4MK+6aD1ZCZp3yAUYkM3XA1nDhSzStWt6L6244AAf4gXobO1L9GE1S002bfBpSuYZSIVSg8YiMQf7T5XdboAfsyGoBTA7KA==;20:M1clkU9CdUui+YFzdr0eik/JSOZ6YX7zb3rp5Ct/c27ZKoEhSn8R8bjEIpLCsl3N9hBVCkjRzcQxJaCdB6Vgloo2hapRpB8NnlrMp353rY/YYCRnajhgNUzAjhSMAlAGAKL6qiTcIfo1+ICfO9AdwCcrzWL5XxwcH74e8Meaj6AtxmFOkrdZ+CFVtX2cvBKx7j8jRv9h8EKLyYJfIkbx3+olYZOiFYBqIJpojzyanoneWfLgHgoRmoraPlENnwvQu9yVt8TRlwAQm6Ni4r5P0DdKtyu4YY5DSUmcbm9XbpCqb9YDPLM22b3yXiGqGTkWciTw+wnSNiTsswblORGLOf9rPcm0CjV57y68KP1RWlg= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB280; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BLUPR03MB280;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB280; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB280;4:xMb8cyXtRCCyY/YAe8Ox370dka2C/DEtTykY1nE/bfYcUHupfSuALs2HLaSYlwWl5kfSLGLvdIJ0bNT2bM/TSSiGjBvWqHp6ll6mFJwPFBF5Tz3n9FmCx1mP+KWTbH8wLPtSM6CehStrL6e6KzEJqdli6HrMYeh1Lwwy3WkgkL8rVvtuoQPKjTnE2XAoaSEiKZryHGugChHZrt2t/Pf3/0DB0Zdnf2zIjsrC4L5EEgGgtfabIpG0xitEYwzuNs5AEoK3xK8TmdB7D0fX2M4ayOVGtfKrdnvfjt+IwfXi+ZU= X-Forefront-PRVS: 06339BAE63 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR03MB280;23:W7Aew0VlX4oM9WqhNo647c8dBVrhzHnNFDtYKHWYoq?= =?us-ascii?Q?EauH6s+sCTENHsqDdaZbk+Pm+8lYnofRzvAP8hPqN3ZYx34bM9x03KSN7/Yk?= =?us-ascii?Q?RY24UTnM9l0ahRCReTq/Eg4bfneS8w7TFsPRMgl2P67gQLhJxji2jGqnrpBn?= =?us-ascii?Q?yHz57ks6sLYkGJWUprwX8fEPufqNHLzfe6h7MqdWPfa5Qeb9W6H2mr0Q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9OFSSZsKt2cx1hZtTbCSE7cO8VpcwfLPgJbAe5mTzlCPMKrdYouCm3aQ==;24:gb/eplnRz+uaAvWrQ1lGAf9xt6SnDNJSyJGFYxbw0dzD7jQGyNvkFAPPo8XZCD9ZebAfceAoi5qclS7qargDbTwx94E8juQEo5FP7lmhZCU=;20:01SgOeSNSmKQQBGIjKJvzeDRlfk3DGQwrwcxjCqSUq78gW8bAbJ+AEQCgxzHuYcnnmVW4fW/E0XvcxmswTTb7Q== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2015 06:53:27.8267 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB280 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1912 Lines: 46 On Fri, Jul 10, 2015 at 11:52:05AM +0530, Vinod Koul wrote: > On Tue, Jul 07, 2015 at 01:24:22PM +0800, Shengjiu Wang wrote: > > > why not use set_bit(), you are modifying driver memory > > Original driver all use the __set_bit. do you think we need to change > > all the __set_bit to set_bit? And from the header file "arch/arm/include/asm > > /bitops.h", the set_bit is same as __set_bit. > New changes should be rightly done. __xxx denotes typically internal API to > a subsystem, so if they are same I would suggest to use set_bit() Ok, I agree with you. > > > > > + /* > > > > + * If LWML(src_maxburst) > HWML(dst_maxburst), we need > > > > + * swap LWML and HWML of INFO(A.3.2.5.1), also need swap > > > > + * r0(event_mask[1]) and r1(event_mask[0]). > > > > + */ > > > > + if (lwml > hwml) { > > > > + sdmac->watermark_level &= ~0xff00ff; > > > Magic number? > ?? I have add a description on V2 patch for the watermark_level definition. > > > > Okay the direction is depreciated, so can you store both source and > > > destination and use them based on direction in prepare() > > > > > > Also I see driver is not doing this, so while at it, can you fix this is > > > current code as well > > > > > which prepare() do you mean? sdma_prep_dma_cyclic, sdma_prep_slave_sg? > both have direction as an argument. So you need to use that I have removed the direction checking. So I think don't need to change the sdma_prep_dma_cyclic, sdma_prep_slave_sg. Anyway please review the V2 patch for this, I have sent it out. In V2, I still use the __set_bit. After you review the V2 patch, I will change them together. Thanks. wang shengjiu > > -- > ~Vinod > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/