Implemented direct-read for <16M locations using ATH-SST

This helps to fix what may have been a caching issue when writing to,
and then immediately reading from, the ATH flash device.

Change-Id: Ifcfac53d5e8027b8d13f73197ab3d6826378f018
diff --git a/drivers/mtd/devices/ath_flash.c b/drivers/mtd/devices/ath_flash.c
index 7e07e67..982fc2a 100755
--- a/drivers/mtd/devices/ath_flash.c
+++ b/drivers/mtd/devices/ath_flash.c
@@ -156,22 +156,31 @@
 
 static int
 read_buff_under16m(struct mtd_info *mtd, loff_t from, size_t len,
-		  size_t *retlen, u_char *buf)
+		size_t *retlen, u_char *buf)
 {
-	uint32_t addr = from | 0x9f000000;
-
-	if (!len)
-		return (0);
-	if (from + len > mtd->size)
+	size_t i;
+	if (len == 0) {
+		return 0;
+	}
+	if (from + len > mtd->size) {
 		return (-EINVAL);
+	}
 
 	ath_flash_spi_down();
 
-	memcpy(buf, (uint8_t *)(addr), len);
-	*retlen = len;
+	ath_spi_write_enable();
+	ath_spi_bit_banger(ATH_SPI_CMD_READ);
+	ath_spi_send_addr((uint32_t) from);
+	for (i = 0; i < len; ++i) {
+		ath_spi_delay_8();
+		buf[i] = (u_char) ath_reg_rd(ATH_SPI_RD_STATUS);
+	}
+	ath_spi_go();
+	ath_spi_done();
 
 	ath_flash_spi_up();
 
+	*retlen = len;
 	return 0;
 }