/* onenand_get_2x_blockpage -  Get blockpage at 2x program mode  */
static int onenand_get_2x_blockpage(struct mtd_info *mtd, loff_t addr)
/* onenand_get_2x_blockpage -  Get blockpage at 2x program mode  */
static int onenand_get_2x_blockpage(struct mtd_info *mtd, loff_t addr)
{
	struct onenand_chip *this = mtd->priv;
	int blockpage, block, page;
	block = (int) (addr >> this->erase_shift) & ~1;
	if (addr & this->writesize)
		block++;
	page = (int) (addr >> (this->page_shift + 1)) & this->page_mask;
	blockpage = (block << 7) | page;
	return blockpage;
}