/* zynq_nand_write_page_raw -  raw page write function @mtd: mtd info structure @chip: nand chip info structure @buf: data buffer @oob_required: must write chip->oob_poi to OOB  */
static int zynq_nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, const u8 *buf, int oob_required, int page)
/* zynq_nand_write_page_raw -  raw page write function @mtd: mtd info structure @chip: nand chip info structure @buf: data buffer @oob_required: must write chip->oob_poi to OOB  */
static int zynq_nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, const u8 *buf, int oob_required, int page)
{
	unsigned long data_width = 4;
	unsigned long data_phase_addr = 0;
	u8 *p;
	chip->write_buf(mtd, buf, mtd->writesize);
	p = chip->oob_poi;
	chip->write_buf(mtd, p, (mtd->oobsize - data_width));
	p += (mtd->oobsize - data_width);
	data_phase_addr = (unsigned long)chip->IO_ADDR_W;
	data_phase_addr |= ZYNQ_NAND_CLEAR_CS;
	data_phase_addr |= (1 << END_CMD_VALID_SHIFT);
	chip->IO_ADDR_W = (void __iomem *)data_phase_addr;
	chip->write_buf(mtd, p, data_width);
	return 0;
}