external/pflash: Correct erase alignment checks
external/pflash: Correct erase alignment checks

pflash should check the alignment of addresses and sizes when asked to
erase. There are two possibilities:
1. The user has specified sizes manually in which case pflash should
be as flexible as possible, blocklevel_smart_erase() permits this. To
prevent possible mistakes pflash will require --force to perform a
manual erase of unaligned sizes.
2. The user used -P to specify a partition, partitions aren't
necessarily erase granule aligned anymore, blocklevel_smart_erase() can
handle. In this it doesn't make sense to warn/error about misalignment
since the misalignment is inherent to the FFS partition and not really
user input.

Signed-off-by: Cyril Bur <6ce38dade8c4b52fd55c193fae70fd1d1275c3c3@au1.ibm.com>
Reviewed-by: Samuel Mendoza-Jonas <f16bed56189e249fe4ca8ed10a1ecae60e8ceac0@mendozajonas.com>
Signed-off-by: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.vnet.ibm.com>

open-power/skiboot,legoater/skiboot,qemu/skiboot,open-power/skiboot,qemu/skiboot,legoater/skiboot,open-power/skiboot,shenki/skiboot,qemu/skiboot,open-power/skiboot,qemu/skiboot,open-power/skiboot,legoater/skiboot,stewart-ibm/skiboot,qemu/skiboot,shenki/skiboot,stewart-ibm/skiboot,mikey/skiboot,legoater/skiboot,legoater/skiboot,stewart-ibm/skiboot,shenki/skiboot,mikey/skiboot,shenki/skiboot,shenki/skiboot,mikey/skiboot