qemu-patch-raspberry4/hw/sh4
Markus Armbruster 8468713412 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>
2019-03-11 22:53:44 +01:00
..
Kconfig sh4-softmmu.mak: express dependencies with Kconfig 2019-03-07 21:46:19 +01:00
Makefile.objs hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device 2019-02-05 16:50:20 +01:00
r2d.c r2d: Fix flash memory size, sector size, width, device ID 2019-03-11 22:53:44 +01:00
sh7750.c hw/sh/sh7750: Convert away from old_mmio 2018-06-15 15:23:34 +01:00
sh7750_regnames.c sh4: Clean up includes 2016-01-29 15:07:24 +00:00
sh7750_regnames.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
sh7750_regs.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
sh_pci.c hw/sh4/sh_pci: Use DeviceState::realize rather than SysBusDevice::init 2018-10-24 06:44:59 -03:00
shix.c sh4: shix: use generic cpu_model parsing 2017-10-27 16:03:54 +02:00