On 3/7/19 2:03 PM, Markus Armbruster wrote: > 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 <[email protected]> > Reviewed-by: Laszlo Ersek <[email protected]> > Reviewed-by: Alex Bennée <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
