diff options
author | Markus Armbruster | 2019-03-08 10:46:10 +0100 |
---|---|---|
committer | Markus Armbruster | 2019-03-11 22:53:44 +0100 |
commit | ce14710f4fdfca32123d7efd3ddcbee984ef0ae5 (patch) | |
tree | 388b367cf788d97d74ba123bca43353e861af1a0 /hw/ppc/virtex_ml507.c | |
parent | pflash: Clean up after commit 368a354f02b, part 1 (diff) | |
download | qemu-ce14710f4fdfca32123d7efd3ddcbee984ef0ae5.tar.gz qemu-ce14710f4fdfca32123d7efd3ddcbee984ef0ae5.tar.xz qemu-ce14710f4fdfca32123d7efd3ddcbee984ef0ae5.zip |
pflash: Clean up after commit 368a354f02b, part 2
Our pflash devices are simplistically modelled has having
"num-blocks" sectors of equal size "sector-length". Real hardware
commonly has sectors of different sizes. How our "sector-length"
property is related to the physical device's multiple sector sizes
is unclear.
Helper functions pflash_cfi01_register() and pflash_cfi02_register()
create a pflash device, set properties including "sector-length" and
"num-blocks", and realize. They take parameters @size, @sector_len
and @nb_blocs.
QOMification left parameter @size unused. Obviously, @size should
match @sector_len and @nb_blocs, i.e. size == sector_len * nb_blocs.
All callers satisfy this.
Remove @nb_blocs and compute it from @size and @sector_len.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20190308094610.21210-16-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw/ppc/virtex_ml507.c')
-rw-r--r-- | hw/ppc/virtex_ml507.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c index 2e87a1abd6..0e4c7409e0 100644 --- a/hw/ppc/virtex_ml507.c +++ b/hw/ppc/virtex_ml507.c @@ -228,8 +228,7 @@ static void virtex_init(MachineState *machine) dinfo = drive_get(IF_PFLASH, 0, 0); pflash_cfi01_register(PFLASH_BASEADDR, "virtex.flash", FLASH_SIZE, dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, - 64 * KiB, FLASH_SIZE >> 16, - 1, 0x89, 0x18, 0x0000, 0x0, 1); + 64 * KiB, 1, 0x89, 0x18, 0x0000, 0x0, 1); cpu_irq = (qemu_irq *) &env->irq_inputs[PPC40x_INPUT_INT]; dev = qdev_create(NULL, "xlnx.xps-intc"); |