Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752736AbbHNGYx (ORCPT ); Fri, 14 Aug 2015 02:24:53 -0400 Received: from mail-bn1bon0130.outbound.protection.outlook.com ([157.56.111.130]:16608 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751255AbbHNGYv (ORCPT ); Fri, 14 Aug 2015 02:24:51 -0400 From: Yao Yuan To: Li Leo CC: Vinod Koul , "stefan@agner.ch" , Arnd Bergmann , Dan Williams , "dmaengine@vger.kernel.org" , lkml , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" Subject: RE: [PATCH v2] dmaengine: fsl-edma: add PM suspend/resume support Thread-Topic: [PATCH v2] dmaengine: fsl-edma: add PM suspend/resume support Thread-Index: AQHQw5QETahgv8214E+kkRhxNaGB9p4KjlKAgABu6+A= Date: Fri, 14 Aug 2015 06:24:48 +0000 Message-ID: References: <1437469005-3162-1-git-send-email-yao.yuan@freescale.com> In-Reply-To: Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yao.yuan@freescale.com; x-originating-ip: [192.158.241.86] x-microsoft-exchange-diagnostics: 1;CY1PR0301MB0732;5:7QfWlAhyYfSks2myUjmiMvdhoIa0BDEIvOJ/fLSKC52NrLb0fwsVlwJ+w/iHkrQRc7Ijyeku01szMYMvwVSzTfNJnQZ8buxk6BFhsp80HkZRbjDdWhZUbF4jSSrddE/+qwQOlEmLUJvjSo6EzCgZKw==;24:aDgFQtSzivfogSsxK7hb+mCOn6cQJ3ue48t92XjYwkjga1fYw5uz7rEcT8vD5vqGVnJiaqIXhbmfcKUY5zD83qITElCXen+zR1eWiWeath0=;20:XWnmljbxIEmn7IXyYnDyyy8jxT3LSPGOwIsnMc2l0NV3Dqsyfvkb/QKR3uAhYhTgcyqgAu4O2mFtDepWBEuvCw== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB0732; 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:CY1PR0301MB0732;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB0732; x-forefront-prvs: 066898046A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(199003)(189002)(24454002)(13464003)(19580405001)(19580395003)(64706001)(74316001)(46102003)(122556002)(40100003)(4001450100002)(10400500002)(2900100001)(2950100001)(92566002)(66066001)(189998001)(5003600100002)(62966003)(77156002)(106356001)(102836002)(106116001)(77096005)(5002640100001)(99286002)(101416001)(54356999)(76176999)(50986999)(105586002)(33656002)(97736004)(81156007)(110136002)(87936001)(5001860100001)(76576001)(5001830100001)(86362001)(4001540100001)(5001960100002)(2656002)(68736005);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0301MB0732;H:CY1PR0301MB1562.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Aug 2015 06:24:48.2223 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB0732 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t7E6OvZ5029726 Content-Length: 1819 Lines: 44 Hi Leo, Thanks for your review. About those two methods for DMA suspend that you have mentioned. We have a lot of the discussions in other DMA driver like DMA for Freescale PowerPC. Finally, we think the device which used the DMA transmission service should cancel the transmission service in its suspend. So DMA in suspend should be idle. Once the DMA in late_suspend is not be idle, we think some driver haven't canceled the DMA transmission. So maybe something is error when other driver in suspend. In the case, we should return failed to stop PM. DMA should not make a choice for other drivers(which used DMA) to force stop DMA transmission. Thanks. Best Regards, Yuan Yao > -----Original Message----- > From: pku.leo@gmail.com [mailto:pku.leo@gmail.com] On Behalf Of Li Yang > Sent: Friday, August 14, 2015 4:58 AM > To: Yuan Yao-B46683 > Cc: Vinod Koul; stefan@agner.ch; Arnd Bergmann; Dan Williams; > dmaengine@vger.kernel.org; lkml; linux-arm-kernel@lists.infradead.org; linux- > pm@vger.kernel.org > Subject: Re: [PATCH v2] dmaengine: fsl-edma: add PM suspend/resume > support > > On Tue, Jul 21, 2015 at 3:56 AM, Yuan Yao wrote: > > This add power management suspend/resume support for the fsl-edma > > driver. > > > > eDMA acted as a basic function used by others. What it needs to do is > > the two steps below to support power management. > > > > In fsl_edma_suspend_late: > > Check whether the DMA chan is idle and if it is not idle, stop PM > > operation. > > You should try to quiesce the device on suspend instead of depending on itself > to be happen in idle and failing if it is not. > > Regards, > Leo ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?