qemu-e2k/hw/arm
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
..
Kconfig ptimer: express dependencies with Kconfig 2019-03-07 21:45:53 +01:00
Makefile.objs hw/arm/musca.c: Implement models of the Musca-A and -B1 boards 2019-02-21 18:17:47 +00:00
allwinner-a10.c hw: Remove unused 'hw/devices.h' include 2019-03-07 22:16:11 +01:00
armsse.c hw/arm/armsse: Unify init-svtor and cpuwait handling 2019-02-28 11:03:04 +00:00
armv7m.c elf: Add optional function ptr to load_elf() to parse ELF notes 2019-02-05 16:50:16 +01:00
aspeed.c i2c: Split smbus into parts 2019-02-27 21:06:08 -06:00
aspeed_soc.c
bcm2835_peripherals.c
bcm2836.c
boot.c hw/arm/boot: introduce fdt_add_memory_node helper 2019-03-05 15:55:08 +00:00
collie.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
cubieboard.c hw: Remove unused 'hw/devices.h' include 2019-03-07 22:16:11 +01:00
digic.c
digic_boards.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
exynos4_boards.c
exynos4210.c hw/arm/exynos4210: Zero memory allocated for Exynos4210State 2018-11-06 11:32:14 +00:00
fsl-imx6.c
fsl-imx6ul.c
fsl-imx7.c
fsl-imx25.c
fsl-imx31.c
gumstix.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
highbank.c hw: Remove unused 'hw/devices.h' include 2019-03-07 22:16:11 +01:00
imx25_pdk.c
integratorcp.c
kzm.c
mainstone.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
mcimx6ul-evk.c
mcimx7d-sabre.c
microbit.c arm: Stub out NRF51 TWI magnetometer/accelerometer detection 2019-01-29 11:46:03 +00:00
mps2-tz.c hw: Remove unused 'hw/devices.h' include 2019-03-07 22:16:11 +01:00
mps2.c hw/arm/mps2: Fix ID register errors on AN511 and AN385 2018-08-24 13:17:50 +01:00
msf2-soc.c
msf2-som.c
musca.c hw/arm/musca: Wire up PL011 UARTs 2019-02-21 18:17:47 +00:00
musicpal.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
netduino2.c
nrf51_soc.c hw: Remove unused 'hw/devices.h' include 2019-03-07 22:16:11 +01:00
nseries.c
omap1.c
omap2.c char: allow specifying a GMainContext at opening time 2019-02-13 14:23:39 +01:00
omap_sx1.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
palm.c
pxa2xx.c i2c: have I2C receive operation return uint8_t 2019-02-27 21:06:08 -06:00
pxa2xx_gpio.c
pxa2xx_pic.c
raspi.c
realview.c scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline() 2018-09-25 11:12:25 +10:00
sabrelite.c
smmu-common.c hw/arm/smmu-common: Fix the name of the iommu memory regions 2018-09-25 14:14:07 +01:00
smmu-internal.h
smmuv3-internal.h hw/arm/smmuv3: fix eventq recording and IRQ triggerring 2018-09-25 15:13:24 +01:00
smmuv3.c hw/arm/smmuv3: fix eventq recording and IRQ triggerring 2018-09-25 15:13:24 +01:00
spitz.c hw: Remove unused 'hw/devices.h' include 2019-03-07 22:16:11 +01:00
stellaris.c hw/arm/stellaris: Implement watchdog timer 2019-03-05 15:55:09 +00:00
stm32f205_soc.c
strongarm.c strongarm: mask off high[31:28] bits from dir and state registers 2018-11-02 14:03:33 +00:00
strongarm.h
sysbus-fdt.c hw/arm/sysbus-fdt: Only call match_fn callback if the type matches 2018-11-13 10:47:58 +00:00
tosa.c i2c: have I2C receive operation return uint8_t 2019-02-27 21:06:08 -06:00
trace-events
versatilepb.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
vexpress.c hw: Use PFLASH_CFI0{1,2} and TYPE_PFLASH_CFI0{1,2} 2019-03-11 22:53:44 +01:00
virt-acpi-build.c hw/arm/virt: Rename highmem IO regions 2019-03-05 15:55:09 +00:00
virt.c hw: Use PFLASH_CFI0{1,2} and TYPE_PFLASH_CFI0{1,2} 2019-03-11 22:53:44 +01:00
xilinx_zynq.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
xlnx-versal-virt.c hw/arm: versal: Plug memory leaks 2019-01-07 15:23:46 +00:00
xlnx-versal.c hw/arm: versal: Add a model of Xilinx Versal SoC 2018-11-02 14:10:53 +00:00
xlnx-zcu102.c
xlnx-zynqmp.c hw/arm/xlnx-zynqmp: Realize cluster after putting RPUs in it 2019-01-29 11:46:05 +00:00
z2.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00