Fix NOR flash device ID reading
commit0163a2dc80b52553a478fa6e60f09cef4b338d42
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)
tree13c8a9f373641d852e7d1860d2b3602a7bc9e489
parent4433e660e3ff19747d9ca7fd3873407ecfb276bf
Fix NOR flash device ID reading

Fix NOR flash manufacturer and device ID reading.  This now
properly takes into account device widths and device max widths
as required.  The reading of these IDs uses the same max_width
dependent addressing as CFI queries.

The old code remains for chips that don't specify a device width,
as the new code relies on a device width being set in order to
properly operate.  The existing code seems very broken.

Only ident0 and ident1 are used in the new code, as other fields
relate to the lock state of blocks in flash.

The VExpress flash configuration has been updated to match
the new code, as the existing definition was 'wrong' in order
to return the expected results with the broken device ID code.

Signed-off-by: Roy Franz <roy.franz@linaro.org>
Message-id: 1386279359-32286-8-git-send-email-roy.franz@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/vexpress.c
hw/block/pflash_cfi01.c