From patchwork Thu Feb 15 12:25:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10221085 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 3F7E66055C for ; Thu, 15 Feb 2018 12:28:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E4B82915C for ; Thu, 15 Feb 2018 12:28:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2297629161; Thu, 15 Feb 2018 12:28:39 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3EE12915C for ; Thu, 15 Feb 2018 12:28:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968039AbeBOM2h (ORCPT ); Thu, 15 Feb 2018 07:28:37 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:41908 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031226AbeBOM1S (ORCPT ); Thu, 15 Feb 2018 07:27:18 -0500 Received: by mail-wr0-f195.google.com with SMTP id f8so733434wrh.8 for ; Thu, 15 Feb 2018 04:27:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EWynJQezwOi2Rg6g9E4IBYEVVvN3bAvry+hdSSbD/bA=; b=eFyHQ+BDv6Wte9hEHRprnoM2hBHFhT9h5ePfLl7b2BdZwwxVW0ubE3Bja5j63Kg0lP S6ytSPb/9LT8qpg2V6c/Kgnabr9UBMGijzvy4E9quLgew7lnuetxfOckX3DNOHnK80qo N/zWyQLnkqWOlmIV97ZIrLgqIpFboTlvp9UuM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EWynJQezwOi2Rg6g9E4IBYEVVvN3bAvry+hdSSbD/bA=; b=SkdspxcpkmYNrSXjVSKsZg4D6N2Iv0az4R7WT1InKZmP75vnonVIXV0jPXe/9oFwts 7pJAJASEZROP6UQyARzvvC0/09U3wCcE+/mQGIHydpVoybCq2gANfuqaE6dUd2BZXjIS SxOQ9YcEc/J6/aXZnGVkuesRcUuJ/OZxTEO8Bx2oS2nvzXr0biscsQRUU0XYJddAjtUa TnPgzh39n5LSs1cyqtnN1uIzvf0+TigMdbXh8SmiPRLVV9n6ZxoauzCEr/xFQr2Zevfp Z9qBEvWtj6BVDBtgOKhy3etnQtqawr8QR+TKJ8eb0gUPLnweV6vrZx7MP+VFhvxwbCce OM8Q== X-Gm-Message-State: APf1xPAjCV7D0XstGgJ3tvKzCCVyJmJOb0cU+CbxRoJFcByQUhZgwtLY cn75ys6FZNNFUrzOGEWZ+f53UA== X-Google-Smtp-Source: AH8x226roAy6lQ+dY0h1pMVbS8BEgDU8tilXMyQ8lPnufK52YeuxseCA7qJ9bAarhV02qhV/e+vI5A== X-Received: by 10.223.164.215 with SMTP id h23mr723363wrb.38.1518697637078; Thu, 15 Feb 2018 04:27:17 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id s9sm15632778wra.4.2018.02.15.04.27.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Feb 2018 04:27:16 -0800 (PST) From: srinivas.kandagatla@linaro.org To: vinod.koul@intel.com, andy.gross@linaro.org, dmaengine@vger.kernel.org Cc: robh+dt@kernel.org, mark.rutland@arm.com, david.brown@linaro.org, dan.j.williams@intel.com, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-soc@vger.kernel.org, yanhe@quicinc.com, ramkri@qti.qualcomm.com, sdharia@quicinc.com, Srinivas Kandagatla Subject: [PATCH v3 1/5] dmaengine: qcom: bam_dma: make bam clk optional Date: Thu, 15 Feb 2018 12:25:07 +0000 Message-Id: <20180215122511.13517-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180215122511.13517-1-srinivas.kandagatla@linaro.org> References: <20180215122511.13517-1-srinivas.kandagatla@linaro.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Kandagatla When BAM is remotely controlled it does not sound correct to control its clk on Linux side. Make it optional, so that its not mandatory for remote controlled BAM instances. Signed-off-by: Srinivas Kandagatla --- drivers/dma/qcom/bam_dma.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index d076940e0c69..b79691fcc82d 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -1233,8 +1233,12 @@ static int bam_dma_probe(struct platform_device *pdev) "qcom,controlled-remotely"); bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk"); - if (IS_ERR(bdev->bamclk)) - return PTR_ERR(bdev->bamclk); + if (IS_ERR(bdev->bamclk)) { + if (!bdev->controlled_remotely) + return PTR_ERR(bdev->bamclk); + + bdev->bamclk = NULL; + } ret = clk_prepare_enable(bdev->bamclk); if (ret) {