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: 124760 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp1116744lje; Tue, 16 Jan 2018 11:07:05 -0800 (PST) X-Google-Smtp-Source: ACJfBosDHnlFcTbIxeBZ291/+Sr1uTpLik+LH9O2MqAJ0xX6Ax5GvtNgOlALXLcTZElFftKYKEe7 X-Received: by 10.84.235.137 with SMTP id p9mr18872493plk.377.1516129625047; Tue, 16 Jan 2018 11:07:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516129625; cv=none; d=google.com; s=arc-20160816; b=CE/scvpOVY5xkZZkmmjuY01An/rTGcZlPlvgG7cjNxzzpqRNYY3r8W63iTD/EZothb FAV0xmRjL/u2SDMVWKw1nBYo5DWoCG7toAfZAdbtrRCzajjxdNiCbBdR5sABcpiL/dAP c9EyYLpBm1IQIolNwPP6I4HhI07p3C31k2U3DpE51a+uvWOQqBE3EMmiHqBdRSwiKt6U BkIwMyNVwzlYwM1a9+mq7a+QtEHwMEGIz97WwbhUhoejatlPd4YUbRSS4HNi04ElGhW9 v1ypTwiH5FuhyHSUix/0/HvaT4xAL6JmxRby31pzpz4cbOu4C/ZHZDQTLg+7FpQh6pni 2bwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=SvTpxYbPSHFHzq232hwQpFVBSBQrQYhEzR1jWj5vFAI=; b=0ZW6dBnFSbQ6WjEG7NL4MsAfH77Td3saNVn+Z/rGJyAsQ6j2eF6myUu5YZc6lZ+Ejn mehSMcDvjdiXpoh/vCQwnJfBsPvRUbjxkTzWxHCA5b2wf88RUrWYYLJ4e99UgNHEk6W3 ZtdqDymQVjpE3Fltc4WY1yyZ+AME2CeEwnehEHmyKHsom5VakgtVPXCCQ3OaM1hiruxL 8OI/mdQlgqW8qcURu+btGP60k3HkgXJKr6WY9pXTgjGVUkth6SpVkFH8PBD1Od1S7WrC /ozFxFf2pN/8s4O0bQomOzn9QejwIGGIgBd8GBEdbUzAC9vHev/ydsFQua/EIg40maYE gZmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ifEM9WDl; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j188si2072164pgc.524.2018.01.16.11.07.04; Tue, 16 Jan 2018 11:07:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ifEM9WDl; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751641AbeAPTHC (ORCPT + 9 others); Tue, 16 Jan 2018 14:07:02 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:46431 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751110AbeAPTHA (ORCPT ); Tue, 16 Jan 2018 14:07:00 -0500 Received: by mail-wm0-f67.google.com with SMTP id 143so10423438wma.5 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=Cl9nGmS+Hax/zP2soCU7eK8d8YJmoy+ac7VkZjSGuia1zw4R9otXPPijxxeBJzYO0n kb/APuXn1+fxhNhsk9g8D7RtltnhWFQSl8CBUVysAUn8hG5k5vGpqvVeyHTfvfcZOVsD QG46oymBiAp3GhARa1bWyxnvLBbka8xEwGo0iMOBCTZlzHj/5YRn1nKD9a8tB64yxMzI kMcuQImxxeu86CyEUcL0iEWvSblCPyR3O+JoF1xXBPDvOElVyMIaanJjkxf5OoFsG+AY mpRM0VK5QjEmq2uwdL8d6MsKgSSwRLwqXEOM2rzAc2jVsaQuSlU75XMxz29CuiG/8lBG /Vzw== X-Gm-Message-State: AKwxytf3vL9FtnYJ6neKsIs+7dj1RATsJS8iNubZ6aSEMkc94IZ+5U/l vYmWM+cZNLghvtza27rxcdO5Yw== 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: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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(-) -- 2.15.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);