qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH V5 0/7] block, arm: Fix buffered flash writes on VEx


From: Roy Franz
Subject: [Qemu-devel] [PATCH V5 0/7] block, arm: Fix buffered flash writes on VExpress
Date: Thu, 5 Dec 2013 13:35:52 -0800

This patchset fixes buffered flash writes on the VExpress
platform.  Buffered writes should now work properly on platforms whose
flash interface width is different from the device width.  The default
is for the device-width to be set to 0, so platforms
that can benefit from this change will need to be updated.  This patchset
updates the configuration for the VExpress platform which requires it.
UEFI firmware uses buffered writes for persistent variable storage,
and this patchset enables this usage on QEMU.

The CFI and device ID changes were tested against a real VExpress board
by dumping the data.  UEFI itself does not use the device ID or CFI
information.

I think that the current device ID handling code is broken.  I did not remove
it in this patchset as I am reluctant to make changes to platforms I can't test,
and do not know the actual flash device configuration for.


Changes from v4:
* Added device_max_width parameter to enable proper device id and CFI
  responses.
* Device width now set to 0 to indicate it is not set, and this is used
  to keep behavior unchanged for platforms not updated.
* Fixed device ID and CFI responses to properly take into account device
  width.  For the VExpress platform this mostly matches the hardware.
* Refactored VExpress flash init code based on feedback.
* now uses helper functions for many bitfield operations.
* Fixed checkpatch problems in v4.
* NOTE: patch 2/4 of v5 was mis-identified in that submission as v5.

Changes from v3:
* Broke out width->bank_width name change into separate patch.
* Added patch that returns status for each device in bank.
* Reviewed code for other uses of device_width.  The one remaining place
  this should be used is in the handling of returning the device ID.  The
  existing code looks a bit suspect, as it is combining 16 bit values by
  shifting 8 bits and oring them.  I have no good way to test various
  flash configurations, so I am reluctant to make major changes to that code.
Changes from v2:
(All changes in patch 2/2, 1/1 unchanged.)
* Set flash invariant properties directly in VExpress specific flash init
  routine rather than passing long argument list.
* Fix typo in comment.

Changes from v1:
* Add device-width property and use this to mask write length instead
  of devices mas write length
* Update vexpress init code to set device-width to proper value.

Roy Franz (7):
  rename pflash_t member width to bank_width
  Add device-width property to pflash_cfi01
  return status for each NOR flash device
  Set proper device-width for vexpress flash
  Add max device width parameter for NOR devices
  Fix CFI query responses for NOR flash
  Fix NOR flash device ID reading

 hw/arm/vexpress.c       |   44 +++++++--
 hw/block/pflash_cfi01.c |  244 ++++++++++++++++++++++++++++++++++++++++-------
 2 files changed, 246 insertions(+), 42 deletions(-)

-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]