Fix CFI query responses for NOR flash
commit4433e660e3ff19747d9ca7fd3873407ecfb276bf
authorRoy Franz <roy.franz@linaro.org>
Tue, 17 Dec 2013 19:42:27 +0000 (17 19:42 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 17 Dec 2013 19:42:27 +0000 (17 19:42 +0000)
tree9195b8b6085517afdfeaed3803cdcbb5d63e7986
parentfa21a7b13e97120c789eda1dbae87a9bcb1efe09
Fix CFI query responses for NOR flash

This change fixes the CFI query responses to handle NOR device
widths that are different from the bank width.  Support is also
added for multi-width devices in a x8 configuration.  This is
typically x8/x16 devices, but the CFI specification mentions
x8/x32 devices so those should be supported as well if they
exist.
The query response data is now replicated per-device in the bank,
and is adjusted for x16 or x32 parts configured in x8 mode.

The existing code is left in place for boards that have not
been updated to specify an explicit device_width.  The VExpress
board has been updated in an earlier patch in this series so
this is the only board currently affected.

Signed-off-by: Roy Franz <roy.franz@linaro.org>
Message-id: 1386279359-32286-7-git-send-email-roy.franz@linaro.org
[PMM: fixed a few formatting nits]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/block/pflash_cfi01.c