From patchwork Wed May 14 03:23:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 30143 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8DD1B20369 for ; Wed, 14 May 2014 03:26:07 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf6167478oag.0 for ; Tue, 13 May 2014 20:26:07 -0700 (PDT) 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=05hszqWcVS7n+FF8jILQ29l8QI8mT/1gGRtvNZBJiF8=; b=CIaCE7MJhHw6WeMtuW2eDYZVaFYReNVqWyz7LT9dgJxekUzmM9BCeZCImQOXKJZBdK dcLoqj9ASo20ypGHErliyrseYaTmq/BGwAawLxcCes5Xk0rjtTv/RP6xtL1We7kc6twj gIbF7ZEqU9b6JtGflSSr1D9jtOpeRi+faThn88VLXAm0I1Lny41wpIrg1yjMRuXv7icD /pDqIo7zNjnCVBu/OYDwk0tLv4hPKTr1UjL0dIASP4T5lhWigZTSKQkumIA97d2JvlDi RCFWtdrmmetKKSFROVDpxhLoPogvJF0ttx4+I5OovrIbpj7NSoQdA3+bnfcJrUEzZLXg AJ0A== X-Gm-Message-State: ALoCoQnIbGOC4ur8v+yRjmNFK8Zp9lJPv+M7o5ZPxURxWV20LLSmjWdVzkB9bOtat7epnqT0nE3d X-Received: by 10.50.50.2 with SMTP id y2mr983444ign.1.1400037967137; Tue, 13 May 2014 20:26:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.105 with SMTP id s96ls2217414qgd.25.gmail; Tue, 13 May 2014 20:26:07 -0700 (PDT) X-Received: by 10.52.104.7 with SMTP id ga7mr626930vdb.29.1400037967052; Tue, 13 May 2014 20:26:07 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id gu9si88437vdc.178.2014.05.13.20.26.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 20:26:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id lc6so1674688vcb.2 for ; Tue, 13 May 2014 20:26:07 -0700 (PDT) X-Received: by 10.221.7.71 with SMTP id on7mr801941vcb.18.1400037966977; Tue, 13 May 2014 20:26:06 -0700 (PDT) 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.220.221.72 with SMTP id ib8csp198977vcb; Tue, 13 May 2014 20:26:06 -0700 (PDT) X-Received: by 10.66.248.228 with SMTP id yp4mr1165222pac.94.1400037966264; Tue, 13 May 2014 20:26:06 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hu10si259455pbc.186.2014.05.13.20.26.05; Tue, 13 May 2014 20:26:05 -0700 (PDT) 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 S1754105AbaENDZq (ORCPT + 27 others); Tue, 13 May 2014 23:25:46 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:57764 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754007AbaENDZl (ORCPT ); Tue, 13 May 2014 23:25:41 -0400 Received: by mail-pa0-f53.google.com with SMTP id kp14so1086245pab.40 for ; Tue, 13 May 2014 20:25:41 -0700 (PDT) X-Received: by 10.66.136.131 with SMTP id qa3mr1043837pab.77.1400037941227; Tue, 13 May 2014 20:25:41 -0700 (PDT) Received: from linaro.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id ay3sm685976pbb.62.2014.05.13.20.25.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 20:25:40 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org Cc: vinod.koul@intel.com, dan.j.williams@intel.com, jassisinghbrar@gmail.com Subject: [PATCH] dma: pl330: Add support for DMA_PAUSE command Date: Wed, 14 May 2014 08:53:50 +0530 Message-Id: <1400037830-21211-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 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: tushar.behera@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.220.171 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: , While playing back audio, pmc_dmaengine requests the DMA channel to stop DMA transmission through DMA_PAUSE command. Currently PL330 driver doesn't support DMA pause command, leaving the DMA state inconsistent when the system resumes. Instead, it would be better to terminate the DMA transfer during suspend and restart again during resume. Tested with audio playback across a suspend-resume cycle. Signed-off-by: Tushar Behera --- drivers/dma/pl330.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 73fa9b7..cd70f42 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2362,6 +2362,7 @@ static int pl330_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, unsigned LIST_HEAD(list); switch (cmd) { + case DMA_PAUSE: case DMA_TERMINATE_ALL: spin_lock_irqsave(&pch->lock, flags);