/* return the buffer address on the memory device It will be combined with CMD_MAP_XX  */
static void s3c_onenand_reset(void)
/* return the buffer address on the memory device It will be combined with CMD_MAP_XX  */
static void s3c_onenand_reset(void)
{
	unsigned long timeout = 0x10000;
	int stat;
	writel(ONENAND_MEM_RESET_COLD, &onenand->reg->mem_reset);
	while (timeout--) {
		stat = readl(&onenand->reg->int_err_stat);
		if (stat & RST_CMP)
			break;
	}
	stat = readl(&onenand->reg->int_err_stat);
	writel(stat, &onenand->reg->int_err_ack);
	writel(0x0, &onenand->reg->int_err_ack);
	writel(0x0, &onenand->reg->ecc_err_stat);
}