Angel Pons has uploaded a new patch set (#3) to the change originally created by Luc Verhaegen. ( https://review.coreboot.org/c/flashrom/+/29080 )
Change subject: pci2: add read/write/mask byte/long mmio accessors ......................................................................
pci2: add read/write/mask byte/long mmio accessors
As for the mask command: For those "embedded developers" who grew up with the awkward x86 in/out assembly instructions with the illogical ordering it will seem alien. As a graphics driver developer who has had to deal with thousands of registers at a time, mostly setting a few bits at a time, i found the increased readability and debuggability of a mask command invaluable. Once the ati_spi code is added, it will be clear just how effective this command is.
As for the lack of automatic rollback: - it makes little sense to roll back every single register written. One could imagine a scenario where this would perfectly undo the flash being written. - it makes little sense to roll back every mask command: Multiple mask commands are likely to touch the same register. - engines, even simple spi engines, are triggered by a single bit or a single register being written. Automatic rollback would trigger engines before the fitting registers are written. - reading might also trigger an engine. How does one roll back those? How, if the register is automatically read before it is written, are we dealing with that? Instead, by providing programmer internal save/restore functions, the programmer gets full control over what is saved and restored, and the order in which those happen. The fact that we automatically retain the device match private, should make it easier to have device specific save/restore callbacks.
Change-Id: I5c3f57e9c510337bb81be30aa6c143840a349a60 Signed-off-by: Luc Verhaegen libv@skynet.be --- M pcidev.c M programmer.h 2 files changed, 101 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/80/29080/3