/* omap_write_buf8 - write buffer to NAND controller @mtd: MTD device structure @buf: data buffer @len: number of bytes to write  */
static void omap_write_buf8(struct mtd_info *mtd, const u_char *buf, int len)
/* omap_write_buf8 - write buffer to NAND controller @mtd: MTD device structure @buf: data buffer @len: number of bytes to write  */
static void omap_write_buf8(struct mtd_info *mtd, const u_char *buf, int len)
{
	struct omap_nand_info *info = container_of(mtd,
						struct omap_nand_info, mtd);
	u_char *p = (u_char *)buf;
	while (len--) {
		iowrite8(*p++, info->nand.IO_ADDR_W);
		while (GPMC_BUF_EMPTY == (readl(info->gpmc_baseaddr +
						GPMC_STATUS) & GPMC_BUF_FULL));
	}
}