qemu/hw/i386
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
..
kvm ioapic: use TYPE_FOO MACRO than constant string 2019-01-09 11:33:47 +01:00
xen xen: introduce new 'XenBus' and 'XenDevice' object hierarchy 2019-01-14 13:45:40 +00:00
acpi-build.c i386, acpi: cleanup build_facs by removing second unused argument 2019-02-05 10:58:33 -05:00
acpi-build.h
amd_iommu.c update copyright notice 2019-03-11 16:33:49 +01:00
amd_iommu.h update copyright notice 2019-03-11 16:33:49 +01:00
intel_iommu.c intel_iommu: reset intr_enabled when system reset 2019-02-05 10:58:33 -05:00
intel_iommu_internal.h intel_iommu: dma read/write draining support 2018-12-19 16:48:16 -05:00
Kconfig i386-softmmu.mak: remove all CONFIG_* except boards definitions 2019-03-07 21:45:53 +01:00
kvmvapic.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
Makefile.objs i386: express dependencies with Kconfig 2019-03-07 21:45:53 +01:00
multiboot.c elf: Add optional function ptr to load_elf() to parse ELF notes 2019-02-05 16:50:16 +01:00
multiboot.h
pc.c i386: extended the cpuid_level when Intel PT is enabled 2019-03-11 16:33:49 +01:00
pc_piix.c boards.h: Ignore migration for SMBus devices on older machines 2019-02-27 21:06:08 -06:00
pc_q35.c boards.h: Ignore migration for SMBus devices on older machines 2019-02-27 21:06:08 -06:00
pc_sysfw.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
trace-events intel_iommu: convert invalid traces into error reports 2018-12-19 16:48:16 -05:00
vmmouse.c
vmport.c
x86-iommu.c x86-iommu: turn on IR by default if proper 2018-12-20 13:25:11 -05:00