/* socrates_nand_read_buf - read chip data into buffer @mtd: MTD device structure @buf: buffer to store date @len: number of bytes to read  */
static void socrates_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
/* socrates_nand_read_buf - read chip data into buffer @mtd: MTD device structure @buf: buffer to store date @len: number of bytes to read  */
static void socrates_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
{
	int i;
	struct nand_chip *this = mtd->priv;
	struct socrates_nand_host *host = this->priv;
	uint32_t val;
	val = FPGA_NAND_ENABLE | FPGA_NAND_CMD_READ;
	out_be32(host->io_base, val);
	for (i = 0; i < len; i++) {
		buf[i] = (in_be32(host->io_base) >>
				FPGA_NAND_DATA_SHIFT) & 0xff;
	}
}