Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp419390ybk; Wed, 13 May 2020 03:44:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZcQZ1I+iTLkipBtisLgApC6E+2/nGmlZgu8bWLnHU3mv1cx/S8uR/E1j48/oNTnHE72Mj X-Received: by 2002:a50:e791:: with SMTP id b17mr10625315edn.248.1589366656139; Wed, 13 May 2020 03:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589366656; cv=none; d=google.com; s=arc-20160816; b=t1VHha7w0w3qQa2LpopQNeAJYOXcRtKlk8R3nvHp5bnicEvTko7yeMRTEYH0w1GwnN pISlVAgAEcq/HD4S4+kxtMNbSbL2A+ZGa24heRXNWvGQ7jAc02tBPE8uOmf8Dd9KoMed +LNORx1sfDtERhfA0nv0MKQ9ShFBL93m7oZL2Y7uvg+mMUNHVoTFW3mr6MS4XQGig9xC pMjMDjHphPJnZlVBX4IkJNbGox4h7i50FVcRieTM2Zw/54AucdYYEg4MPMHG7PQZXlSr 8EfFdQG8pz83HPO9uN3odqG2MsEL6cjjdKomFBPyqlX+qaoJQk6O61T6AOiQo81yq164 3J+A== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=rNsOr3YDNbr/DpfdIXSCr5gamzjnptnYgviLSecCt0E=; b=tkVGaLF2zlZ+psDoSg97Fh/ujPZ0yBKqwKuPTYfD+ifbFSoUPjNqlVMdc4lYWxsjS9 adsXMS7CMt81Km2qMUXmp/PO2R26Yu4Md27t31/E8rvq0Zct+EswRY/C63MPiPpqZ+uV WnQLWKMtuW1oOhDlgEaS63d4laoWvxsPbO18JOV33Xr8qXVdAWVhI5jtjT1903GxoRaS hGT6HhEYBXHlUdVxZBVLSlfyD4eVJNc8pfSUHor18MsJ3Gv7qqu2UI7NpGHnEmRvIjf1 S0j8/JlxIOr2kG/nKcVYnfQGDLz03aoRxBzJIyamazp6jn4oD/O3Duld0SOoRYUI7CnS vxrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o14si4127159ejx.69.2020.05.13.03.43.52; Wed, 13 May 2020 03:44:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731194AbgEMKlj (ORCPT + 99 others); Wed, 13 May 2020 06:41:39 -0400 Received: from mx2.suse.de ([195.135.220.15]:59744 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727918AbgEMKli (ORCPT ); Wed, 13 May 2020 06:41:38 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A1977AC6D; Wed, 13 May 2020 10:41:39 +0000 (UTC) Date: Wed, 13 May 2020 12:41:27 +0200 From: Mian Yousaf Kaukab To: Stephen Warren Cc: robh+dt@kernel.org, robin.murphy@arm.com, devicetree@vger.kernel.org, talho@nvidia.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, afaerber@suse.de, arnd@arndb.de, gregkh@linuxfoundation.org Subject: Re: [PATCH 2/4] dt-bindings: sram: add documentation for reserved-only flag Message-ID: <20200513104127.GA2309@suse.de> References: <20200512144803.24344-1-ykaukab@suse.de> <20200512144803.24344-2-ykaukab@suse.de> <52f099e4-5c03-2141-f049-cd3adeb04c5b@wwwdotorg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52f099e4-5c03-2141-f049-cd3adeb04c5b@wwwdotorg.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 12, 2020 at 01:45:28PM -0600, Stephen Warren wrote: > On 5/12/20 8:48 AM, Mian Yousaf Kaukab wrote: > > Add documentation for the new optional flag added for SRAM driver. > > > diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml > > > + reserved-only: > > + description: > > + The flag indicating, that only SRAM reserved regions have to be remapped. > > + remapping type is selected depending upon no-memory-wc as usual. > > + type: boolean > > This feels a bit like a SW flag rather than a HW description, so I'm not > sure it's appropriate to put it into DT. Reserved regions themselves are software descriptions, no? Then we have 'pool' flag which is again a software flag and so on. This flag falls into same category and nothing out of ordinary. > > Are there any cases where the SW should map all of the SRAM, i.e. where > we wouldn't expect to set reserved-only? [...] Yes, here are a few examples: arch/arm/boot/dts/aspeed-g*.dtsi arch/arm/boot/dts/at91*.dtsi arch/arm/boot/dts/bcm7445.dtsi Then arch/arm/boot/dts/dra7.dtsi is an example where we should map everything except the reserved region. > [...] I'd expect reserved-only to be > the default, and perhaps only, mode of operation for the SRAM driver. It will break compatibility with existing dtbs. > If we can't do that because some SW currently expects to be able to map > arbitrary portions of the SRAM, shouldn't that SW be fixed to tell the > SRAM driver which parts it's using, hence still allowing the driver to > only map in-use portions? User doesn’t need sram driver in that case. It can use genalloc api directly. BR, Yousaf