cfi_flash.c: correct calculation of region erasesize and offset for multiple (size_ratio > 1) chips in parallel

Signed-off-by: Cristiano De Alti <cristiano_dealti@hotmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
bootm: Return error when devicetree file is not a dtb

We check whether the file passed as devicetree actually is a devicetree,
but we missed to return an error if it's not. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
read_file: Use read_full

At least NFS does not fulfill read requests > 1024 bytes at once.
Use read_full in read_file as read doesn't guarantee that the
whole request can be read at once.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>