From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXAgl-0006gI-Ke for qemu-devel@nongnu.org; Fri, 18 Oct 2013 10:06:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXAgg-0006iy-SU for qemu-devel@nongnu.org; Fri, 18 Oct 2013 10:06:03 -0400 Received: from mail-vb0-f52.google.com ([209.85.212.52]:34923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXAgg-0006is-Od for qemu-devel@nongnu.org; Fri, 18 Oct 2013 10:05:58 -0400 Received: by mail-vb0-f52.google.com with SMTP id f12so1820228vbg.39 for ; Fri, 18 Oct 2013 07:05:58 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1382063402-30359-1-git-send-email-roy.franz@linaro.org> <20131018113847.GA17031@stefanha-thinkpad.redhat.com> Date: Fri, 18 Oct 2013 07:05:58 -0700 Message-ID: From: Roy Franz Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] block: mask NOR flash buffered write length List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Kevin Wolf , Stefan Hajnoczi , QEMU Developers , Stefan Hajnoczi , Patch Tracking On Fri, Oct 18, 2013 at 7:01 AM, Peter Maydell wrote: > On 18 October 2013 14:54, Roy Franz wrote: >> On Fri, Oct 18, 2013 at 6:36 AM, Peter Maydell wrote: >>> Probably instead of a single "width" property we should have two, >>> similar to the device tree binding's pair: >>> - bank-width : Width (in bytes) of the bank. Equal to the >>> device width times the number of interleaved chips. >>> - device-width : (optional) Width of a single mtd chip. If >>> omitted, assumed to be equal to 'bank-width'. > >>> However I'm not very familiar with how flash hardware works... >> You are correct - we really do want to mask based on the device >> width, as that is what the >> actual flash chips will see. Lacking the device width I used the >> writeblock size. Thinking about this more, >> this will not work for 8 bit devices used together, as the mask size >> will be greater than 8 bits and the writeblock size >> will be mis-interpreted like it is now. >> I'll work on adding a device-size property to the pflash* >> implementations. It looks like this will affect about 20 platforms. >> For the platforms that I am not familiar with I plan just set >> bank-width==device-width as that should result in the unchanged >> behavior. > > Yes, you should make the default for the device-width property > be to be the same as the bank-width, since that's what we > currently implement; then we can just change the platforms > where we know that's wrong. > > NB: probably best to leave the existing 'width' property with > the name it has, rather than renaming it to 'bank-width'. > > thanks > -- PMM Thanks Peter. I'm not familiar with the "properties" and how they are used. I think that the device width is likely only of interest internally, so I won't add a device-width property. Roy