From patchwork Thu Feb 15 12:25:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 128415 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1691542ljc; Thu, 15 Feb 2018 04:28:21 -0800 (PST) X-Google-Smtp-Source: AH8x226AqETdv4n+zgX+R05Sv96umZ14cSoKgdBtF0VJIKCaXklq5gXXslVePKmp1UJMDzVUkgG5 X-Received: by 2002:a17:902:710e:: with SMTP id a14-v6mr2314580pll.291.1518697701836; Thu, 15 Feb 2018 04:28:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518697701; cv=none; d=google.com; s=arc-20160816; b=FoEcolXKLzN6glfpHfVG55a6abuhJZhCJmIq9rT9WIWkldWvV4IOfGDFlooHiWtpzq V1gxQ9ITvAMri8fGmm8De6JXiNcegMTyXyMEzIgQi1vz5ru6kloSs2tSZOM/8uOJqKO/ nLZEX7tWmR4SAYjHxJOc8EOUEagGijWY1IKYZ3/a6bi/Uv6M5xBsO6jWegnVkBN/jyQA gDfo/oC5gSXIHaepgrZTM1S/TQuNW8WTibQ2PEAFemKDxPWcIPdG7zzXuwcY+wHvIuVe kidxW8Bm/PTgCDEpkxZ2ppcKOBqTtShrk3o8iM0Ebr4bIew/n0A5+HWew14osBhT5gAz 71gA== 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=khb9Xkvm9fLETnoWdaE+mFsuv7Fa/b/ntQuH3FYaDo0=; b=LMZCA2hjqnIe+vX6U9KwMCA86BGE8s10+tA+4S9426uwWDLeGXaQ5c+C+g90J9fqK4 MpxTEK62ZXf4z5UMF42Y4AlznVZamyYNopYxKEG0LLon7Lkd1brXXHU5Bb/CtgA30mzU NL6qQdtCBqnC1WY7wdXhJCOuooJwS4dxA8mg3opqET5P/q4KO/ijMY8ln79Mqz/Y0u+B xX7otehqVWCX/uxhVnvSeG9dE+CMLBVVaGGEvCka4b46zC9VpdeGal/dGtq1dmU5wRkU zj3eKuBR6hAAvqYTjOL1XL56xdZEFXuPAb4biyOYoCpp5Uh/hCiqJ8673o2h4HUdghKc L6rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YQHcEC/X; 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 y67si4130463pgb.728.2018.02.15.04.28.21; Thu, 15 Feb 2018 04:28:21 -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=YQHcEC/X; 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 S967723AbeBOM2U (ORCPT + 10 others); Thu, 15 Feb 2018 07:28:20 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:52344 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031287AbeBOM1T (ORCPT ); Thu, 15 Feb 2018 07:27:19 -0500 Received: by mail-wm0-f68.google.com with SMTP id j199so498538wmj.2 for ; Thu, 15 Feb 2018 04:27:19 -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=7y3LwNkgwSq043PbjQPLdWq/K3DSD2bGusoerwoGTVk=; b=YQHcEC/XIlCnS8QD4Q37VZEcR55pAUVflGl6WIZCjx3Z58STKBQfHVDieVV2IwwG5i CS3PUI8qC9Ldfwsfo2eS43StUzc70yvpuI+xQwWX1zcRuEsaX+Jf4pWfyL57Qpk8YLjY hf8Nm3XgP+K3FHAb/aVUvdVTeph+aH/j5dw9U= 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=7y3LwNkgwSq043PbjQPLdWq/K3DSD2bGusoerwoGTVk=; b=X10cYqqY4wCdzcWYme18mJJrE4450ueCmLImvzPTY2KkkE59CyfC5/vQAUOo0Qewr9 Pv6unCtg9El4kRKC+9EXoAlM71IcMejmf5c13VzUyoM6OfRQPDGQryqTu7bwSVgr6tLM tgI0q41nv2mY3ROHrIhIqFbr0DMkiofILm6oJJGDZoQB+fx6WD66gUnFw0STcCujwPZq d3BAeMQ0TMlXxQ0rU+wxLOgazeN5CcCnRyHLT6Uwa5/CmSTzPRxyafcF3cfNglTDYThm l5/aQEdEBWyC80Lt/8NUDUmOrx6KxD+NT07z+32rSu+yIb+BXo5wmO8MEhkFS6ZAHqRg Se/Q== X-Gm-Message-State: APf1xPDMqFbM1IwLSpUoRiheO6fCHGFcsx/HzRgxiZ8Uc1We8ekjsVjZ o+6W+t6swwuDJ1NBP/zZOxrp5Q== X-Received: by 10.28.106.26 with SMTP id f26mr1920825wmc.36.1518697638284; Thu, 15 Feb 2018 04:27:18 -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.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Feb 2018 04:27:17 -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 2/5] dt-bindings: dmaengine: bam_dma: add remote controlled bindings Date: Thu, 15 Feb 2018 12:25:08 +0000 Message-Id: <20180215122511.13517-3-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: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Srinivas Kandagatla This patch adds 2 new properties for remote controlled bam dt bindings. 1. num-channels to indicate number of dma channels. 2. qcom,num-ees to indicate number of Execution Environments. Signed-off-by: Srinivas Kandagatla --- Documentation/devicetree/bindings/dma/qcom_bam_dma.txt | 4 ++++ 1 file changed, 4 insertions(+) -- 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 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt b/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt index 9cbf5d9df8fd..cf5b9e44432c 100644 --- a/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt +++ b/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt @@ -15,6 +15,10 @@ Required properties: the secure world. - qcom,controlled-remotely : optional, indicates that the bam is controlled by remote proccessor i.e. execution environment. +- num-channels : optional, indicates supported number of DMA channels in a + remotely controlled bam. +- qcom,num-ees : optional, indicates supported number of Execution Environments + in a remotely controlled bam. Example: From patchwork Thu Feb 15 12:25:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 128413 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1691075ljc; Thu, 15 Feb 2018 04:27:45 -0800 (PST) X-Google-Smtp-Source: AH8x225Ct/2wd2G17c3d5tN5naSDr+zo/k+kidJsswXqZ7FADDIrLEGeK3ZnYSiA99zWVXM7bfA7 X-Received: by 2002:a17:902:594c:: with SMTP id e12-v6mr2435523plj.323.1518697665795; Thu, 15 Feb 2018 04:27:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518697665; cv=none; d=google.com; s=arc-20160816; b=Pj+HGkbexV+4BKYIgQioeeixs1eUaNApls6cQCuwQJP71fk6+XQN+SONWjvxey7+m2 bEIb0INeHuLNMkKyyWtH94jFfPIEJbfyicSmzZOP5FDnhSIixI6aveJXtnosJYHiOFZj gGijrRTHppiRmI9gxeswFPbGxkWxYTVABxguvLWkGGcwDSvpQrA6UvG3FRS/6VIAe2/O 8UqDEVJ6U3RZrEILgoZ6hfjLvlu74b/KareauGXUFkq58Vx07VokzyLHGRcMCreHRBjL qOuABdAt4bVtAUkO9y812IbMiQBrStLW8FL8Bbw88CXdU8Fanep78ONtRNpD91BUehTw G/uQ== 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=4ZlIQ38WWFNWXdMWjv1X/ZLJHQuCfH1spYj7+sCRZWY=; b=xxWiii/FvnnMmHY/4idV5Tx5QxTySb2NnIxyoVmuwh1iLb/uBD+4Kp9vsVpocktRbp 6VE26E2em9qo0tGeJMcQ8J/Ddh1GkGkV68fmxHVqtYtF0Jn+bZV65T0DCzczf6NQH0FO 4jH4lDRJ+XNDpcryqAAw1RfXfrpoJOWttjBIQ2wf3n0DOfWWKZkFYeWDdv2L+mweET8p 97jGfmQa4+M2cB/uFi5TZAms28stlsrSEeRn0ZFUVGs52CUrjXu7CDwO2rVcSXL1yU25 REz43IDo6tQX/B0oNOHJmbZEHFClABuDOVarhKeuYjUczF2lVe+WDUBeAOV8XlK5mMJZ QwTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bya7RMud; 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 w12-v6si10573451pld.162.2018.02.15.04.27.45; Thu, 15 Feb 2018 04:27:45 -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=bya7RMud; 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 S1031726AbeBOM1n (ORCPT + 10 others); Thu, 15 Feb 2018 07:27:43 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:37090 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031525AbeBOM1X (ORCPT ); Thu, 15 Feb 2018 07:27:23 -0500 Received: by mail-wm0-f68.google.com with SMTP id v71so501334wmv.2 for ; Thu, 15 Feb 2018 04:27:23 -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=mitw7QQlF05ZYn5f+YltPDyfGcQqCth4+uO7SALBKmE=; b=bya7RMudFAEbRE5wIofJurrWuRNp0PtX8aox4paa3+eKKHPTN/T+g7UhVgzd2R+BDI cpe5Fr75tjEREiAFtVP4IvG1F2GQgIo7Ds0uXgDdsLsbJwWwPXQWbIrSxUDC1I6RG9Ju g3S8SMVgRFdQG31gTiZda2/zdxg/zLPQ4ApRQ= 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=mitw7QQlF05ZYn5f+YltPDyfGcQqCth4+uO7SALBKmE=; b=tVjq2zhZaJLtaOaJgaTEVB9Z+P6Tkrm+lxmHMt9fifhBM6lJPvK3MLUvRMBz6ByrqK UkAyM4F/1+vdFJxI7H8ZzWnehBQzXAGlI2zPLpZBWbuQD9r0HXrQilcXX7a1E8S9wKAH I60q4O8JddCNw0Ria/p1I/zhBFhzK7a8UTAzvxTMkO9Oy+zEvr3aJzemomUVQI9u0ZNB vMpB2OuTR79gbrfW4N5HkslPoyn6SGL8LKjtEaQW2nTD1RIgi2lSaIVZREDRatAhnhLb wr/BM2Np/GHqdROrtPzHrRqEHJ0exHX7o4ioxWTPE93zgvFtXlKRJH3TrVa/1izT4gU5 YMig== X-Gm-Message-State: APf1xPAbY1sM+FWCAuRJ6dEU/vPXTpVk4hONeL+kFseIs7v/PNhbfxU2 DPfDlPQOOOHP4O6mjpVUQUK7jg== X-Received: by 10.28.150.139 with SMTP id y133mr1926655wmd.142.1518697642093; Thu, 15 Feb 2018 04:27:22 -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.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Feb 2018 04:27:21 -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 5/5] dmaengine: qcom: bam_dma: disable runtime pm on remote controlled Date: Thu, 15 Feb 2018 12:25:11 +0000 Message-Id: <20180215122511.13517-6-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: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Srinivas Kandagatla Remotely controlled BAM instance should not do any power management from CPU side, as cpu can not reliably say if the BAM is busy or not. Disable it for such instances. Signed-off-by: Srinivas Kandagatla --- drivers/dma/qcom/bam_dma.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 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 6919f501b9f3..d29275b97e84 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -1333,6 +1333,11 @@ static int bam_dma_probe(struct platform_device *pdev) if (ret) goto err_unregister_dma; + if (bdev->controlled_remotely) { + pm_runtime_disable(&pdev->dev); + return 0; + } + pm_runtime_irq_safe(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, BAM_DMA_AUTOSUSPEND_DELAY); pm_runtime_use_autosuspend(&pdev->dev); @@ -1416,7 +1421,8 @@ static int __maybe_unused bam_dma_suspend(struct device *dev) { struct bam_device *bdev = dev_get_drvdata(dev); - pm_runtime_force_suspend(dev); + if (!bdev->controlled_remotely) + pm_runtime_force_suspend(dev); clk_unprepare(bdev->bamclk); @@ -1432,7 +1438,8 @@ static int __maybe_unused bam_dma_resume(struct device *dev) if (ret) return ret; - pm_runtime_force_resume(dev); + if (!bdev->controlled_remotely) + pm_runtime_force_resume(dev); return 0; }