• M
    pflash: Clean up after commit 368a354f, part 2 · ce14710f
    Markus Armbruster 提交于
    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: NMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
    Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
    Message-Id: <20190308094610.21210-16-armbru@redhat.com>
    Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
    ce14710f
petalogix_s3adsp1800_mmu.c 5.2 KB