libflash/ipmi-hiomap: Fix blocks count issue
libflash/ipmi-hiomap: Fix blocks count issue

We convert data size to block count and pass block count to BMC.
If data size is not block aligned then we endup sending block count
less than actual data. BMC will write partial data to flash memory.

Sample log :
[  594.388458416,7] HIOMAP: Marked flash dirty at 0x42010 for 8
[  594.398756487,7] HIOMAP: Flushed writes
[  594.409596439,7] HIOMAP: Marked flash dirty at 0x42018 for 3970
[  594.419897507,7] HIOMAP: Flushed writes

In this case HIOMAP sent data with block count=0 and hence BMC didn't
flush data to flash.

Lets fix this issue by adjusting block count before sending it to BMC.

Cc: Andrew Jeffery <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@aj.id.au>
Cc: 74fabe089ecbd0f3f71683991d9e2780a4de1f4a@lists.ozlabs.org
Signed-off-by: Vasant Hegde <a6d753843573f7bfed5075c1e875b0be8007a0ab@linux.vnet.ibm.com>
Reviewed-by: Andrew Jeffery <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@aj.id.au>
Signed-off-by: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.ibm.com>

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