aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/s390-virtio-hcall.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-03-08 10:46:04 +0100
committerMarkus Armbruster <armbru@redhat.com>2019-03-11 22:53:44 +0100
commit8468713412b1eb0d24d605bf97d159a9b01d4b02 (patch)
tree388cd087903e84ddb103d5f4dcb1183e98182b9d /hw/s390x/s390-virtio-hcall.c
parentdd59bcae7687df4b2ba8e5292607724996e00892 (diff)
r2d: Fix flash memory size, sector size, width, device ID
pflash_cfi02_register() takes a size in bytes, a block size in bytes and a number of blocks. r2d_init() passes FLASH_SIZE, 16 * KiB, FLASH_SIZE >> 16. Does not compute: size doesn't match block size * number of blocks. The latter happens to win: FLASH_SIZE / 4, i.e. 8MiB. The best information we have on the physical hardware lists a Cypress S29PL127J60TFI130 128MiBit NOR flash addressable in words of 16 bits, in sectors of 4 and 32 Kibiwords. We don't model multiple sector sizes. Fix the flash size from 8 to 16MiB, and adjust the sector size from 16 to 64KiB. Fix the width from 4 to 2. While there, supply the real device IDs 0x0001, 0x227e, 0x2220, 0x2200 instead of zeros. Cc: Magnus Damm <magnus.damm@gmail.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190308094610.21210-10-armbru@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw/s390x/s390-virtio-hcall.c')
0 files changed, 0 insertions, 0 deletions