Sometimes we want to read/write more than 4 bytes of chip content at once

Add chip_{read,write}n to the external flasher infrastructure which
read/write n bytes at once.

Fix a few places where the code used memcpy/memcmp although that is
strictly impossible with external flashers.
Place a FIXME in the layout.c code because usage is not totally clear
and needs to be fixed to support external flashers.

As a nice side benefit, we get a noticeable speedup for builtin flash
reading which is now a memcpy() of the full flash area instead of a
series of single-byte reads.

Corresponding to flashrom svn r579.

Signed-off-by: Carl-Daniel Hailfinger <>
Acked-by: Urja Rannikko <>
Acked-by: Uwe Hermann <>
7 files changed