]> git.proxmox.com Git - mirror_qemu.git/commit - hw/microblaze/petalogix_ml605_mmu.c
pflash: Clean up after commit 368a354f02b, part 2
authorMarkus Armbruster <armbru@redhat.com>
Fri, 8 Mar 2019 09:46:10 +0000 (10:46 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 11 Mar 2019 21:53:44 +0000 (22:53 +0100)
commitce14710f4fdfca32123d7efd3ddcbee984ef0ae5
tree388b367cf788d97d74ba123bca43353e861af1a0
parent940d5b132fab085bd8ec2bcfa5c1dd119785b217
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>
23 files changed:
hw/arm/collie.c
hw/arm/digic_boards.c
hw/arm/gumstix.c
hw/arm/mainstone.c
hw/arm/musicpal.c
hw/arm/omap_sx1.c
hw/arm/versatilepb.c
hw/arm/xilinx_zynq.c
hw/arm/z2.c
hw/block/pflash_cfi01.c
hw/block/pflash_cfi02.c
hw/i386/pc_sysfw.c
hw/lm32/lm32_boards.c
hw/lm32/milkymist.c
hw/microblaze/petalogix_ml605_mmu.c
hw/microblaze/petalogix_s3adsp1800_mmu.c
hw/mips/mips_malta.c
hw/mips/mips_r4k.c
hw/ppc/ppc405_boards.c
hw/ppc/sam460ex.c
hw/ppc/virtex_ml507.c
hw/sh4/r2d.c
include/hw/block/flash.h