Received: by 10.213.65.68 with SMTP id h4csp4306275imn; Tue, 10 Apr 2018 12:40:11 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+iWnUOcF5LAMiKr1WzLt0N9OTiLH3Zc4EvLBHmZQShoq20wcdka+qX3dAaVpsLkYBQVhZC X-Received: by 2002:a17:902:8481:: with SMTP id c1-v6mr1769819plo.310.1523389211007; Tue, 10 Apr 2018 12:40:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523389210; cv=none; d=google.com; s=arc-20160816; b=mN3NlrznR824tp508iW7PjKQp1UTvL5+w9pmLvh/RSo1za/9K7VkzDYC1sETcrWM5r g1tN60oCMZy8VVc/5/g8rSfbjnFvhvjpgRwhKLOc45UCLFiYDtJPiLzdbrwMPHCBuyvP QoIxy74yeaa+hgi06/s6I7NKAQCCPA9EcN/eZv68sD0QuXPHD1VllY0+0riTT9EsZRF8 bSdl3teFKTYeJsSxljJrYMeDt8iqAZQI3961Dm9BZ/6qiKBaySbDSLy2H4xa99eUEdWt 9jE/KFgOw/9utJ/F15ob6ihqyusiABUgljWu/3QfKffE23tpObHeLTNhfDKTbnEHGRTP 3Rug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ulsQdv5U4Q+ycgPZgzvEzzkbSHeW+WxvG3HZEMn/hbs=; b=zL6m2q+8tmgRb2T9zLPPgcYtS9bT3HEB58nxbcIj2fjMtLEb4rkdrYfsdd1tFE0f9G clLpya2RJx3pfPJi7DOzoYPHBlgHTmRI1e/ZKoUD2KB7cn9xLJjqtASDbaiNltNcdG2b csiOMXID8PsoI622yQuXdmNYpF3/IV58rHTTpBk7k3gH9wRr/hOWLNEMtEaStEhqOG38 O6B2Z+o+mP4be7FgLn9bpi7bTnLd3Yd4M97dm3t15FIIDlXwt8VxoxHBLxwNWFmU7EPl q/OLuDCEx11u3fI80au0VMEdZauXcEnv6xLgpV1ZRdceoF28itxqTDGNMfaoPkQ4ik84 3vNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dEu7u9OS; 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 k63si2270408pgc.290.2018.04.10.12.39.28; Tue, 10 Apr 2018 12:40:10 -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=dEu7u9OS; 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 S1752989AbeDJTg1 (ORCPT + 99 others); Tue, 10 Apr 2018 15:36:27 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:42507 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751611AbeDJTgZ (ORCPT ); Tue, 10 Apr 2018 15:36:25 -0400 Received: by mail-oi0-f65.google.com with SMTP id l190-v6so12316258oig.9 for ; Tue, 10 Apr 2018 12:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ulsQdv5U4Q+ycgPZgzvEzzkbSHeW+WxvG3HZEMn/hbs=; b=dEu7u9OSztaB0kyOTi9QtjhPyOPHxhHjdkX165GhXu2mnSYP1240DNjfGsD8/n2xqO ZfshejiZkbNfmgZd2mUxVmh59qM7Vjh6wakANp4A+9b2VBNFtADT+/srYG/cdA7VOPoI r83n2hy7TbWkSLO06s5v5Ki5ayAtp0aOFdeWk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ulsQdv5U4Q+ycgPZgzvEzzkbSHeW+WxvG3HZEMn/hbs=; b=tlvZL6MUrVSBy+wUkw5ubIAPEPdIvQoJXhE/7m8s1w1v8zMGj3xwCVVVlcdEomV3OE jWgX8cYYLZpFL1T0eotVWDpU+UTL5eJUXiIEv7ZuL/zQqRXBv82a7j+ezbZRmLzKGXNr luAG994lxlN47y/dx+xUq1jnMZ8H9fcatQAeaHNQSA+5TS2Y4rMrod2zCgcE6o/sCdCZ JJaGAMVgloCmunDYQ6+QXAnsGeNj2yFgc0zucsi4j0jqMLDDn7PywAW3g11ghNB94qkM jrs4m8mz/sqzvfbv6jXVBkskZx6sE5NXjWrNF/nY52RZDyv77pxF62QkZ9wRsF8C1dIg fCew== X-Gm-Message-State: ALQs6tDoYOJFOOj61GmHtiYvaIV+RcT0yW68DfjOmHTA+eS/P1NozQ9+ HjGJ7cnMMviEzi0atXbUeVa5+A== X-Received: by 2002:aca:ce43:: with SMTP id e64-v6mr1177725oig.342.1523388984584; Tue, 10 Apr 2018 12:36:24 -0700 (PDT) Received: from builder (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id q81-v6sm2146726oih.6.2018.04.10.12.36.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Apr 2018 12:36:23 -0700 (PDT) Date: Tue, 10 Apr 2018 12:36:21 -0700 From: Bjorn Andersson To: Lina Iyer Cc: Stephen Boyd , andy.gross@linaro.org, david.brown@linaro.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, rnayak@codeaurora.org, linux-kernel@vger.kernel.org, evgreen@chromium.org, dianders@chromium.org, devicetree@vger.kernel.org Subject: Re: [PATCH v5 02/10] dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs Message-ID: <20180410193621.GB6727@builder> References: <20180405161834.3850-1-ilina@codeaurora.org> <20180405161834.3850-3-ilina@codeaurora.org> <152306368031.94378.14957212064809086345@swboyd.mtv.corp.google.com> <20180409160800.GC19682@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180409160800.GC19682@codeaurora.org> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 09 Apr 09:08 PDT 2018, Lina Iyer wrote: > On Fri, Apr 06 2018 at 19:14 -0600, Stephen Boyd wrote: > > Quoting Lina Iyer (2018-04-05 09:18:26) > > > diff --git a/Documentation/devicetree/bindings/soc/qcom/rpmh-rsc.txt b/Documentation/devicetree/bindings/soc/qcom/rpmh-rsc.txt [..] > > > +Example 1: > > > + > > > +For a TCS whose RSC base address is is 0x179C0000 and is at a DRV id of 2, the > > > +register offsets for DRV2 start at 0D00, the register calculations are like > > > +this - > > > +First tuple: 0x179C0000 + 0x10000 * 2 = 0x179E0000 > > > +Second tuple: 0x179E0000 + 0xD00 = 0x179E0D00 > > > + > > > + apps_rsc: rsc@179e000 { > > > + label = "apps_rsc"; > > > + compatible = "qcom,rpmh-rsc"; > > > + reg = <0x179e0000 0x10000>, <0x179e0d00 0x3000>; > > > > The first reg property overlaps the second one. Does this second one > > ever move around? I would hardcode it in the driver to be 0xd00 away > > from the drv base instead of specifying it in DT if it's the same all > > the time. [..] > > > The DRV is the voter for an execution environment (Linux, Hypervisor, > ATF) in the RSC. The RSC has a lot of other registers that Linux is not > privy to. They are access restricted. The memory organization of the RSC > mandates that we know the DRV id to access registers specific to the > DRV. Unfortunately, not all RSC have identical DRV configuration and the > register space is also variable depending on the capability of the RSC. > There are functionalities supported by other RSCs in the SoC that are > not supported by the RSC associated with the application processor, > while not many RSCs' support multiple DRVs. Therefore it doesn't benefit > describing the whole RSC as it is not usable from Linux (because of > access restrictions). > I generally prefer that we describe the hardware blocks as accurate as possible, instead of applying current restrictions on Linux onto the description. This ensures that we can reuse the binding and drivers in configurations not considered today. However, afaict we still have the problem that we need a way to express where in the RSC our TCS sits. Regardless of what's right or not, the given example causes the driver to fail probing, so something needs to be changed. (Making the drv size 0xd00 is functional but doesn't really relate to any bondary in the register space). Regards, Bjorn