qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Roy Franz <roy.franz@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Patch Tracking <patches@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] block: mask NOR flash buffered write length
Date: Fri, 18 Oct 2013 07:05:58 -0700	[thread overview]
Message-ID: <CAFECyb_uLvn-moZ8B_5FnfOWFp06QLm_dkK3-y5JApGBemMXHg@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA_Ct=PaKYQpShVoKM5PFKdJcMurhpmr=rS_0f9wy_qcTQ@mail.gmail.com>

On Fri, Oct 18, 2013 at 7:01 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 18 October 2013 14:54, Roy Franz <roy.franz@linaro.org> wrote:
>> On Fri, Oct 18, 2013 at 6:36 AM, Peter Maydell <peter.maydell@linaro.org> 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

  reply	other threads:[~2013-10-18 14:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18  2:30 [Qemu-devel] [PATCH] block: mask NOR flash buffered write length Roy Franz
2013-10-18 11:38 ` Stefan Hajnoczi
2013-10-18 13:36   ` Peter Maydell
2013-10-18 13:54     ` Roy Franz
2013-10-18 14:01       ` Peter Maydell
2013-10-18 14:05         ` Roy Franz [this message]
2013-10-18 14:11           ` Peter Maydell
2013-10-18 14:14             ` Roy Franz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFECyb_uLvn-moZ8B_5FnfOWFp06QLm_dkK3-y5JApGBemMXHg@mail.gmail.com \
    --to=roy.franz@linaro.org \
    --cc=kwolf@redhat.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).