Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935330AbbHJKsg (ORCPT ); Mon, 10 Aug 2015 06:48:36 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:43110 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752474AbbHJKsd (ORCPT ); Mon, 10 Aug 2015 06:48:33 -0400 Message-ID: <55C88128.9000204@mentor.com> Date: Mon, 10 Aug 2015 13:47:04 +0300 From: Vladimir Zapolskiy User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.0 MIME-Version: 1.0 To: Greg Kroah-Hartman CC: Philipp Zabel , =?UTF-8?B?SGVpa28gU3TDvGJuZXI=?= , Arnd Bergmann , Subject: Re: [PATCH] misc: sram: extend usage of reserved partitions References: <1439156402-10207-1-git-send-email-vladimir_zapolskiy@mentor.com> <1439156402-10207-2-git-send-email-vladimir_zapolskiy@mentor.com> <20150810032728.GA29840@kroah.com> In-Reply-To: <20150810032728.GA29840@kroah.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [137.202.0.76] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2638 Lines: 78 Hi Greg, On 10.08.2015 06:27, Greg Kroah-Hartman wrote: > On Mon, Aug 10, 2015 at 12:40:02AM +0300, Vladimir Zapolskiy wrote: >> This change adds functionality to operate on reserved SRAM partitions >> described in device tree file. Two partition properties are added, >> "pool" and "export", the first one allows to share a specific partition >> for usage by a kernel consumer in the same manner as it is done for >> the whole SRAM device, and "export" property provides access to some >> SRAM area from userspace over sysfs interface. Practically it is >> possible to specify both properties for an SRAM partition, however >> simultaneous access from a kernel consumer and from userspace is not >> serialized, but still the combination may be useful for debugging >> purpose. >> >> Signed-off-by: Vladimir Zapolskiy >> --- >> To test SRAM partition export to userspace it might be sufficient >> to add an exported subnode, write data to created binary attribute file, >> do soft reboot and read the contents of the same binary attribute >> file. Aware of any potential use of SRAM by a bootloader etc. >> >> To give an idea how to use "pool" partition feature here is an example >> for Freescale iMX6Q SabreAuto with CODA driver as a user: >> >> arch/arm/boot/dts/imx6q.dtsi @@ -82,6 +82,10 @@ >> compatible = "mmio-sram"; >> reg = <0x00900000 0x40000>; >> clocks = <&clks IMX6QDL_CLK_OCRAM>; >> + >> + #address-cells = <1>; >> + #size-cells = <1>; >> + ranges = <0 0x00900000 0x40000>; >> }; >> >> aips-bus@02000000 { /* AIPS1 */ >> arch/arm/boot/dts/imx6qdl-sabreauto.dtsi @@ -490,3 +490,18 @@ >> 0x0000c000 0x1404a38e 0x00000000>; >> }; >> }; >> + >> +&ocram { >> + #address-cells = <1>; >> + #size-cells = <1>; >> + >> + vpu_iram: vpu_iram { >> + reg = <0x00008000 0x00021000>; >> + pool; >> + }; >> +}; >> + >> +&vpu { >> + iram = <&vpu_iram>; >> +}; >> > > Putting a diff in a patch changelog is tricky, do you really need it? you are right, it is tricky, that's why this is actually not a valid diff, I tested on my environment and the email can be applied with git-am. > And why send 2 copies of this patch, what changed? > > confused, > sorry for confusion, occasionally I gave two same files to git-send-email. The versions are absolutely identical, please ignore one of them. With best wishes, Vladimir -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/