qemu/hw/mips
Markus Armbruster ce14710f4f pflash: Clean up after commit 368a354f02, 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>
2019-03-11 22:53:44 +01:00
..
addr.c
boston.c char: allow specifying a GMainContext at opening time 2019-02-13 14:23:39 +01:00
cps.c
gt64xxx_pci.c
Kconfig ptimer: express dependencies with Kconfig 2019-03-07 21:45:53 +01:00
Makefile.objs
mips_fulong2e.c mips_fulong2e: Add on-board graphics chip 2019-03-11 08:04:55 +01:00
mips_int.c hw/mips_int: hold BQL for all interrupt requests 2019-02-14 17:47:28 +01:00
mips_jazz.c
mips_malta.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
mips_mipssim.c
mips_r4k.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00