onenand: Switch to byte-based block access
commit441692ddd8321d5e0f09b163e86410e578d87236
authorEric Blake <eblake@redhat.com>
Fri, 6 May 2016 16:26:37 +0000 (6 10:26 -0600)
committerKevin Wolf <kwolf@redhat.com>
Thu, 12 May 2016 13:22:09 +0000 (12 15:22 +0200)
tree976fca6ae8171f26574a889f058c039778ba8eea
parent9fc0d361cc412251500cfe3fe9a548a363c635be
onenand: Switch to byte-based block access

Sector-based blk_write() should die; switch to byte-based
blk_pwrite() instead.  Likewise for blk_read().

This particular device picks its size during onenand_initfn(),
and can be at most 0x80000000 bytes; therefore, shifting an
'int sec' request to get back to a byte offset should never
overflow 32 bits.  But adding assertions to document that point
should not hurt.

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/block/onenand.c