From patchwork Wed Feb 14 14:44:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10219191 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 84A8F601C2 for ; Wed, 14 Feb 2018 14:48:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7689728ED0 for ; Wed, 14 Feb 2018 14:48:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B5D628FDF; Wed, 14 Feb 2018 14:48:50 +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 08E9628FC9 for ; Wed, 14 Feb 2018 14:48:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030746AbeBNOss (ORCPT ); Wed, 14 Feb 2018 09:48:48 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:51346 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031058AbeBNOrJ (ORCPT ); Wed, 14 Feb 2018 09:47:09 -0500 Received: by mail-wm0-f66.google.com with SMTP id r71so23198261wmd.1 for ; Wed, 14 Feb 2018 06:47:09 -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=Lio1WQJ96gejmPrm7KfUniA2ludQ+zUWWZyM+iQnNWo=; b=KQqnSf/Wo+qkOuQpRu3ZPVeLfV/3bwRsO1lJ/ljK50qZgrTCwywCU8YTatcWlFiegp ah/ID0CcDnKNUZ9bPA782z4aeUsglWZdoroAkXZZ8PLWAAaLT8nnd0vAC9iGe94u9xYy koGvvCK05UZlpAs0BZfBPKTqfbyBlNmMnNlrA= 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=Lio1WQJ96gejmPrm7KfUniA2ludQ+zUWWZyM+iQnNWo=; b=uJ77pSBo+3r8EBLzA+2tScBsvLBqe+LeEcPxSnx4L5RdN+gajgI9u/Ys3UveKJzoVx YLXBtCjjL6IpNrscKEGvbvM5JCmSJFkd9+O6BwLxRWyceYnnrcYA0XlFcdoogJI46khB USD5HEMoPLAYj4B7iaV0/xpDpvd/7lgZCik/4urS48yvAb6y/MikbmmUenFJXKEbO6TL i5z4WNav9wwGd6UwPJzFmzYc4hoLKgQ48VY/tbhpT5ue9iWGrC942T3MadVfvpcX+Iiw LJXa5AxRuxFV4C2aZN37Ku9XdS4Hxtae+f54gfWkL9g/jXlHuX95VkYjhaUYbC+duBz4 PE1A== X-Gm-Message-State: APf1xPA1N258efsedUxlIbWTq7DJsGQAtDFWMvG3iwf3F7OmDhpKBKcn lKlZAXewcV94y6/YeTttyfKrQmq9n8s= X-Google-Smtp-Source: AH8x2278vkuHELH1cVHUSxPz4bN1RzS1Jb3JeRHjnCNH4UIIgZYXTisvwgmRgp5TnDG6xommqLpi3Q== X-Received: by 10.28.194.2 with SMTP id s2mr4262979wmf.55.1518619628563; Wed, 14 Feb 2018 06:47:08 -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 u20sm7675965wrg.13.2018.02.14.06.47.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Feb 2018 06:47:07 -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-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 v2 1/5] dmaengine: qcom: bam_dma: make bam clk optional Date: Wed, 14 Feb 2018 14:44:55 +0000 Message-Id: <20180214144459.29813-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180214144459.29813-1-srinivas.kandagatla@linaro.org> References: <20180214144459.29813-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 | 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 d076940e0c69..ae4c7b6930b8 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -1233,13 +1233,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);