app: aboot: Fix the read offset for splash image

the read offset while reading splash image does not
take block size into account and tries to read from unaligned
block. Fix the offset for read to be aligned to block size.

Change-Id: I2c4f415914faabb10449235a6395b18e97b1d673
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index 1ebf2a6..0968cb5 100644
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -2534,6 +2534,7 @@
 	struct fbimage *logo = NULL;
 	uint32_t blocksize;
 	uint32_t readsize;
+	uint32_t logosize;
 	uint32_t ptn_size;
 
 	index = partition_get_index("splash");
@@ -2550,12 +2551,12 @@
 
 	ptn_size = partition_get_size(index);
 	blocksize = mmc_get_device_blocksize();
-	readsize = ROUNDUP(sizeof(logo->header), blocksize);
+	logosize = ROUNDUP(sizeof(logo->header), blocksize);
 
-	logo = (struct fbimage *)memalign(CACHE_LINE, ROUNDUP(readsize, CACHE_LINE));
+	logo = (struct fbimage *)memalign(CACHE_LINE, ROUNDUP(logosize, CACHE_LINE));
 	ASSERT(logo);
 
-	if (mmc_read(ptn, (uint32_t *) logo, readsize)) {
+	if (mmc_read(ptn, (uint32_t *) logo, logosize)) {
 		dprintf(CRITICAL, "ERROR: Cannot read splash image header\n");
 		goto err;
 	}
@@ -2580,7 +2581,7 @@
 			goto err;
 		}
 
-		if (mmc_read(ptn + sizeof(logo->header),(uint32_t *)base, readsize)) {
+		if (mmc_read(ptn + logosize,(uint32_t *)base, readsize)) {
 			fbcon_clear();
 			dprintf(CRITICAL, "ERROR: Cannot read splash image from partition\n");
 			goto err;