/* Set up the IFC hardware block and page address fields, and the ifc nand structure addr field to point to the correct IFC buffer in memory  */
static void set_addr(struct mtd_info *mtd, int column, int page_addr, int oob)
/* Set up the IFC hardware block and page address fields, and the ifc nand structure addr field to point to the correct IFC buffer in memory  */
static void set_addr(struct mtd_info *mtd, int column, int page_addr, int oob)
{
	struct nand_chip *chip = mtd_to_nand(mtd);
	struct fsl_ifc_mtd *priv = nand_get_controller_data(chip);
	struct fsl_ifc_ctrl *ctrl = priv->ctrl;
	struct fsl_ifc_runtime *ifc = ctrl->regs.rregs;
	int buf_num;
	ctrl->page = page_addr;
	ifc_out32(&ifc->ifc_nand.row0, page_addr);
	ifc_out32(&ifc->ifc_nand.col0, (oob ? IFC_NAND_COL_MS : 0) | column);
	buf_num = page_addr & priv->bufnum_mask;
	ctrl->addr = priv->vbase + buf_num * (mtd->writesize * 2);
	ctrl->index = column;
	if (oob)
		ctrl->index += mtd->writesize;
}