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: 128352 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp685826ljc; Wed, 14 Feb 2018 06:47:14 -0800 (PST) X-Google-Smtp-Source: AH8x226CAkkX/Rv7zkrjB8ZAqwgWP0cRFg9y9uRyFGjrAZBZLmXB7e2kI9MHicyhd56NWEyV3hps X-Received: by 10.99.122.74 with SMTP id j10mr3988673pgn.84.1518619634113; Wed, 14 Feb 2018 06:47:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518619634; cv=none; d=google.com; s=arc-20160816; b=TIYCLKHVPFhGoF1rOWAf13Trmbll5KK7CnoLnIF+l2Qrx04KAak5zt1wBjdcD0X3qc Iai6riv+TsKzZh9XK9CtQQCsMCmSEcKxzaKjzu0AdZ12oMCBhpqZAbS1JHupj7k4E6n+ Jcdg+gdmtLjyFXaC6mlirVV8IjqCrLrEwlgxjwc6iVjHwLl9GNH0gCVxhl7qOXI8V01/ xqTOSRJvSc6NDIJI4VnuD+n0J7ZGfsVEDhSBgoahQLGWUvNnaHNtOZA5zQX2qBG2j85f kwc6/m0ZtdETufhGFlUKIfmdOwLYNpAspfuDHCMC6UaCe6OczPS8buLxq+nUv69rHWmT ZDww== 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=hE7BYemC44dZwb3Wzr2PfSGjJHTC0am6H92quq98YLA=; b=Zt+z+gZ0pXX/rr5wl/c7+vuwZR1Bl43KGnW3Jb6DFrWJNeyzcwk8q1FgHR5pNczkUb 4uMJwDL/i/QYTjbHghx53Rn0qXyu8E4sH5sFFs5++6RP1WD8f6++kVb57U+A67FVHovH FvYjbVaIsHkip4Q9R1+FUEXJQ4t+9ZyQd/crZeDyeFY1zAe/v+kFAd1XbtP6CJ56ikoY 50ZAFiIkh8sDTDI1g+nPaYMOr+D+ow0xkTuaeqDGlsFqfr3bqF/yE6tl/0fYuLr2efDX LwWxLKkzkdSEAVeFgUfnOWtm3URa9JL3F38TlZka5K9sMrY9n25L6xCAfcY02KDrMSvT ZETw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KQqnSf/W; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 p18si4070309pge.487.2018.02.14.06.47.13; Wed, 14 Feb 2018 06:47:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=KQqnSf/W; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1031069AbeBNOrL (ORCPT + 6 others); Wed, 14 Feb 2018 09:47:11 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:54420 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031056AbeBNOrJ (ORCPT ); Wed, 14 Feb 2018 09:47:09 -0500 Received: by mail-wm0-f66.google.com with SMTP id o189so3376689wme.4 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=CQ1jb0futqUUcahKMfdcoYSskbZWdUdT+KPTM0WFtSviwqwf5YwROx18Npm1RLlMiL SPZGIoGcou1K4KN8DHgfRsLAXti46FIGVwSyouL610d0G5FiDtcvjmO9vDAURXHicRbd p1dShdyacS9BkrAaUy0tUT92b+j53oU0flDfG2K3o+lDTWaNTd7lXnMfJE1xOkxIi+sa AZ1uEqbVsi+FSP5FcARU6kqtQkVYUZLlZalUj2ZX43A5mPBgI+HZJYY2EGLWoMK3SJAZ eHZ7O+0TPyTCpzEtC41N064kaoWv02E3+Q9ehMu9JDyj3dQzXTX19QRimg3iaKwm2ibo WhsA== X-Gm-Message-State: APf1xPAB5kXkV05g4yFwxeKhEFJKfHo+CgLxKPbKkdZjTOf01De6q9j2 Qo6ie0xSOqWC4eMUtzNzFlG2YQ== 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 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(-) -- 2.15.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" 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 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);