From patchwork Tue Jan 16 19:02:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10167961 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 9686F603B5 for ; Tue, 16 Jan 2018 19:07:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 819792094F for ; Tue, 16 Jan 2018 19:07:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74C6621BED; Tue, 16 Jan 2018 19:07:03 +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 E7A4A2094F for ; Tue, 16 Jan 2018 19:07:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751604AbeAPTHC (ORCPT ); Tue, 16 Jan 2018 14:07:02 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:43259 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751438AbeAPTHA (ORCPT ); Tue, 16 Jan 2018 14:07:00 -0500 Received: by mail-wm0-f66.google.com with SMTP id g1so10447726wmg.2 for ; Tue, 16 Jan 2018 11:06:59 -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=XGIf9SPtoDfNF6br+/LkXDsguO5GPewMxs2tCr1J5d4=; b=ifEM9WDlbIhvdf2ehOaXU7srP9Sq3UGhJPNDPDUbz0QgnAoZR9kj2pOuTCc8mklqEg 0rLnOii7grqdix+RdnF8ehAuEORk4Y8n+dEKE1JMtEFbuiYLd1vF7jbDr6XhjKpejdV6 JGy208wzfRnM/HPzvZLUnHXW6NE6CFs+5oP5M= 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=XGIf9SPtoDfNF6br+/LkXDsguO5GPewMxs2tCr1J5d4=; b=dK3f8z9UTZ4fD3wcjCaWbdKuL3LsFE5k4BKxSQob066diOtzZujy2e0lNvTqjxf0os VMm1l3L8vTRzsYAfKZ8jVPdu4Sqi65rjP1dx/YfoS3vjolTnXfXgZjz1dOFrNMEbP3c0 L73aIPXqNEpwMu52fGzqc4pPI5cJuGSJhxfOfaNXTOkgl6hbE0Vr3Iv7194H8IvmFQl6 MD+kebygGLtMnwcmuLQavFS64AAbkevmwx4NOoqWNcKCeL7Ufoxr2LL/iQS0sK889JXO m2iq3vwOsaJV5SH2x11Ut8DfL6jrXtJQRUurpCWqkn9/GDT8VvYuTlFGUZxS3HKT8WaR lgKw== X-Gm-Message-State: AKwxytf3ZWkUN0isIGz+TrbqjFeiVgl2lGZSbOAsj/tRESR+r+5QRGpv 7efkBP6Uyg7FtOzRmTMhbMb5Ug== X-Google-Smtp-Source: ACJfBovzdVEzyhM1laWymPOwtDWpsL8bBoR8+LmC8ga4Tq2wSp7r8ZAm1RLthyWX9grfX9QJTAfjPw== X-Received: by 10.28.31.133 with SMTP id f127mr111898wmf.140.1516129619214; Tue, 16 Jan 2018 11:06:59 -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 198sm3257074wmo.21.2018.01.16.11.06.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Jan 2018 11:06:58 -0800 (PST) From: srinivas.kandagatla@linaro.org To: Vinod Koul , Andy Gross , dmaengine@vger.kernel.org Cc: Rob Herring , Mark Rutland , David Brown , Dan Williams , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, yanhe@quicinc.com, ramkri@qti.qualcomm.com, sdharia@quicinc.com, Srinivas Kandagatla Subject: [PATCH 1/4] dmaengine: qcom: bam_dma: make bam clk optional Date: Tue, 16 Jan 2018 19:02:33 +0000 Message-Id: <20180116190236.14558-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180116190236.14558-1-srinivas.kandagatla@linaro.org> References: <20180116190236.14558-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 madatory for remote controlled BAM instances. Signed-off-by: Srinivas Kandagatla --- drivers/dma/qcom/bam_dma.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index 03c4eb3fd314..78e488e8f96d 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -1180,13 +1180,14 @@ 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); - - ret = clk_prepare_enable(bdev->bamclk); - if (ret) { - dev_err(bdev->dev, "failed to prepare/enable clock\n"); - return ret; + if (IS_ERR(bdev->bamclk)) { + bdev->bamclk = NULL; + } else { + ret = clk_prepare_enable(bdev->bamclk); + if (ret) { + dev_err(bdev->dev, "failed to prepare/enable clock\n"); + return ret; + } } ret = bam_init(bdev);