Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2950466imm; Fri, 20 Jul 2018 07:40:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeWG+eqT5rkDw2j9Xj98LwPrg5hYyxnPw2Cy7YFmOG0cdxWLqYgTFkd8uegN7WHskc6cuV9 X-Received: by 2002:a17:902:6b0b:: with SMTP id o11-v6mr2413294plk.101.1532097619623; Fri, 20 Jul 2018 07:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532097619; cv=none; d=google.com; s=arc-20160816; b=FuQbvbgqO56IZCd+CP2WakiSUi3AZiK4sEsSaPGnLTOs+moaOZhjZh5oL0i8FgM0qJ K45hZ3OuC1ZIj168FYSlWcHGj9tWutG3ngPcn6Nmg47yEjLmoRdFZWh0Q89D0w4YJ4M4 2W6a3AWY6oS7JFn1Dqlt/qH9rG8FDzaT/2Tw+HTuITBhrSRbse/n6YJTCIpdiHwZKl5l 2KW0AEpqsPkodUfTR5w7LMGMeQVaM9ci3/VXWtYY5L45RaqdYeK9kQ9zFcihTBCyog3E F/XogoHRsRca07FAU/o3msak5Y4LOk9MQf1lJXhJoosotDtcOxClo+GvXLwxO/Bs2WRM VM6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:date:message-id:autocrypt :openpgp:references:cc:to:subject:from:dkim-signature :arc-authentication-results; bh=oyISpPnA++Y5PK0tj8A0vfH2r+hsrfA8ONlHyDip7ys=; b=0i742Orhovgqar7jccvus6jb2ozNKmJFJ5QYYQqvH515D54KMKeBCHqBpBBza+wfDb FFRD/y2wY1mg+KXgdINzJK3qS0Nn59OWqJXVzuzL9C+uPUEj+4G/WTyK++aQnLfihf2j oy2+CE2dV62XTZ8MIGJZpDNh862AumLawD3iVH1uAr9SGOrUKLbWwfaLovq+j3URNDAK Zkwu+6bbk0XsfQy80aQ6iHh5Zw2KT4LEhjS53illsJynCVccSM/Fm2jBqo/vtsceiPo3 An0cQylz3a65zSHrBKHQxA4baV2g5CGO5Vg3ooJypvb4UIRXPdFru23j0Eid0CWME+0g OU3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b0pmwnA7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 z1-v6si1785905plb.152.2018.07.20.07.40.03; Fri, 20 Jul 2018 07:40:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b0pmwnA7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731708AbeGTP17 (ORCPT + 99 others); Fri, 20 Jul 2018 11:27:59 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:38833 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731546AbeGTP17 (ORCPT ); Fri, 20 Jul 2018 11:27:59 -0400 Received: by mail-wr1-f67.google.com with SMTP id v14-v6so11554290wro.5 for ; Fri, 20 Jul 2018 07:39:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:subject:to:cc:references:openpgp:autocrypt:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=oyISpPnA++Y5PK0tj8A0vfH2r+hsrfA8ONlHyDip7ys=; b=b0pmwnA7fyPq+RLOIYK+J4UCkv9KjwESOPNv16diSSGy2g1ZEleqt54gXwjgEVMSYo 1uFO076+HB7M9alMTcZjqSqxc5rZNh3hEEH6xXxcj8GHxcjYUnVtRiO8O2XdFUfssBDV O9wshm06W5MFFKwOEHPb8qjp/1manR3OQcKJo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:openpgp:autocrypt :message-id:date:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oyISpPnA++Y5PK0tj8A0vfH2r+hsrfA8ONlHyDip7ys=; b=QD8MqLPKx991l4cKSzURpluDnUtB4y7o4rTeBk4p/IdfsU/xzLf0dOh7rMM0pE2uBI r4tHeUvXLlY1b2uLEX3/pYVaDlIOvvoHniXaLTcQHBFSurLZ98dJXcfR9vmVhkuN/kUI CsNTqfIoZEwKCbAVQblp5MJyapzuw8QQ06Y5j6AEmLM5VP/SI4jaXelKa+9J32lFcN6L rgqlYIt4VT4/UEmBth+9GLvd9DRgCO/lxfwqkm7Nuiohq9pe5ETyZ/vnRpNPIJ9uUmIg YXI1NqSygDVkGJBMSTd034B/tN9N1l72qgJLuoflGODcfR5FZNSY4BuvvgK70qMGn7Mh bviw== X-Gm-Message-State: AOUpUlGJ9xl74AbTudx7d0bpPHjfvAow4Jz3f/2IdUI0ZfN4Njvnnlxv MVyVqMbrPoEVlH0h1kwHJTJs0Q== X-Received: by 2002:a5d:4785:: with SMTP id w5-v6mr1623108wrq.188.1532097562394; Fri, 20 Jul 2018 07:39:22 -0700 (PDT) Received: from [10.44.66.8] ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id l10-v6sm1854705wrv.23.2018.07.20.07.39.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 07:39:21 -0700 (PDT) From: Georgi Djakov Subject: Re: [PATCH v6 4/8] interconnect: qcom: Add RPM communication To: Evan Green Cc: linux-pm@vger.kernel.org, gregkh@linuxfoundation.org, rjw@rjwysocki.net, robh+dt@kernel.org, Michael Turquette , khilman@baylibre.com, Alexandre Bailon , Vincent Guittot , Saravana Kannan , Bjorn Andersson , amit.kucheria@linaro.org, seansw@qti.qualcomm.com, daidavid1@codeaurora.org, mka@chromium.org, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, tfiga@chromium.org References: <20180709155104.25528-1-georgi.djakov@linaro.org> <20180709155104.25528-5-georgi.djakov@linaro.org> Openpgp: preference=signencrypt Autocrypt: addr=georgi.djakov@linaro.org; prefer-encrypt=mutual; keydata= xsFNBFjTuRcBEACyAOVzghvyN19Sa/Nit4LPBWkICi5W20p6bwiZvdjhtuh50H5q4ktyxJtp 1+s8dMSa/j58hAWhrc2SNL3fttOCo+MM1bQWwe8uMBQJP4swgXf5ZUYkSssQlXxGKqBSbWLB uFHOOBTzaQBaNgsdXo+mQ1h8UCgM0zQOmbs2ort8aHnH2i65oLs5/Xgv/Qivde/FcFtvEFaL 0TZ7odM67u+M32VetH5nBVPESmnEDjRBPw/DOPhFBPXtal53ZFiiRr6Bm1qKVu3dOEYXHHDt nF13gB+vBZ6x5pjl02NUEucSHQiuCc2Aaavo6xnuBc3lnd4z/xk6GLBqFP3P/eJ56eJv4d0B 0LLgQ7c1T3fU4/5NDRRCnyk6HJ5+HSxD4KVuluj0jnXW4CKzFkKaTxOp7jE6ZD/9Sh74DM8v etN8uwDjtYsM07I3Szlh/I+iThxe/4zVtUQsvgXjwuoOOBWWc4m4KKg+W4zm8bSCqrd1DUgL f67WiEZgvN7tPXEzi84zT1PiUOM98dOnmREIamSpKOKFereIrKX2IcnZn8jyycE12zMkk+Sc ASMfXhfywB0tXRNmzsywdxQFcJ6jblPNxscnGMh2VlY2rezmqJdcK4G4Lprkc0jOHotV/6oJ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e99a5+eHNhtZJcMAIO89wZmj 7ayYJIXFqjl/X0KBcCbiAl4vbdBw1bqFnO4zd1lMXKVoa29UHqby4MPbQhjWNVv9kqp8A39+ E9xw890l1xdERkjVKX6IEJu2hf7X3MMl9tOjBK6MvdOUxvh1bNNmXh7OlBL1MpJYY/ydIm3B KEmKjLDvB0pePJkdTw== Message-ID: Date: Fri, 20 Jul 2018 17:39:20 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Evan, On 07/11/2018 01:34 AM, Evan Green wrote: > On Mon, Jul 9, 2018 at 8:51 AM Georgi Djakov wrote: >> >> On some Qualcomm SoCs, there is a remote processor, which controls some of >> the Network-On-Chip interconnect resources. Other CPUs express their needs >> by communicating with this processor. Add a driver to handle communication >> with this remote processor. >> >> Signed-off-by: Georgi Djakov >> --- >> .../bindings/interconnect/qcom-smd.txt | 32 +++++++ >> drivers/interconnect/qcom/Kconfig | 11 +++ >> drivers/interconnect/qcom/Makefile | 2 + >> drivers/interconnect/qcom/smd-rpm.c | 91 +++++++++++++++++++ >> drivers/interconnect/qcom/smd-rpm.h | 15 +++ >> 5 files changed, 151 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/interconnect/qcom-smd.txt >> create mode 100644 drivers/interconnect/qcom/Kconfig >> create mode 100644 drivers/interconnect/qcom/Makefile >> create mode 100644 drivers/interconnect/qcom/smd-rpm.c >> create mode 100644 drivers/interconnect/qcom/smd-rpm.h >> >> diff --git a/Documentation/devicetree/bindings/interconnect/qcom-smd.txt b/Documentation/devicetree/bindings/interconnect/qcom-smd.txt >> new file mode 100644 >> index 000000000000..88a5aeb50935 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/interconnect/qcom-smd.txt >> @@ -0,0 +1,32 @@ >> +Qualcomm SMD-RPM interconnect driver binding >> +------------------------------------------------ >> +The RPM (Resource Power Manager) is a dedicated hardware engine >> +for managing the shared SoC resources in order to keep the lowest >> +power profile. It communicates with other hardware subsystems via >> +the shared memory driver (SMD) back-end and accepts requests for >> +various resources. >> + >> +Required properties : >> +- compatible : shall contain only one of the following: >> + "qcom,interconnect-smd-rpm" >> + >> +Example: >> + smd { >> + compatible = "qcom,smd"; >> + >> + rpm { >> + interrupts = <0 168 1>; >> + qcom,ipc = <&apcs 8 0>; >> + qcom,smd-edge = <15>; >> + >> + rpm_requests { >> + compatible = "qcom,rpm-msm8916"; >> + qcom,smd-channels = "rpm_requests"; >> + >> + interconnect-smd-rpm { >> + compatible = "qcom,interconnect-smd-rpm"; >> + }; >> + >> + }; >> + }; >> + }; >> diff --git a/drivers/interconnect/qcom/Kconfig b/drivers/interconnect/qcom/Kconfig >> new file mode 100644 >> index 000000000000..b0c2ff928d88 >> --- /dev/null >> +++ b/drivers/interconnect/qcom/Kconfig >> @@ -0,0 +1,11 @@ >> +config INTERCONNECT_QCOM >> + bool "Qualcomm Network-on-Chip interconnect drivers" >> + depends on INTERCONNECT >> + depends on ARCH_QCOM || COMPILE_TEST >> + >> +config INTERCONNECT_QCOM_SMD_RPM >> + tristate "Qualcomm SMD RPM interconnect driver" >> + depends on INTERCONNECT_QCOM > > Should this also depend on CONFIG_QCOM_SMD_RPM, since it uses > qcom_rpm_smd_write? Yes, you are right. >> + help >> + This is a driver for communicating interconnect related configuration >> + details with a remote processor (RPM) on Qualcomm platforms. > ... >> diff --git a/drivers/interconnect/qcom/smd-rpm.h b/drivers/interconnect/qcom/smd-rpm.h >> new file mode 100644 >> index 000000000000..c33b91a3dd51 >> --- /dev/null >> +++ b/drivers/interconnect/qcom/smd-rpm.h >> @@ -0,0 +1,15 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ >> +/* >> + * Copyright (c) 2018, Linaro Ltd. >> + * Author: Georgi Djakov >> + */ >> + >> +#ifndef __DRIVERS_INTERCONNECT_QCOM_RPM_H >> +#define __DRIVERS_INTERCONNECT_QCOM_RPM_H > > Nit: this still doesn't quite match, it would need an _SMD like: > __DRIVERS_INTERCONNECT_QCOM_SMD_RPM_H > Ok, thanks! Georgi