/* RETURNS: 1 if wrong command, 0 if right.  */
static int check_command(int cmd)
/* RETURNS: 1 if wrong command, 0 if right.  */
static int check_command(int cmd)
{
	switch (cmd) {
	case NAND_CMD_READ0:
	case NAND_CMD_READ1:
	case NAND_CMD_READSTART:
	case NAND_CMD_PAGEPROG:
	case NAND_CMD_READOOB:
	case NAND_CMD_ERASE1:
	case NAND_CMD_STATUS:
	case NAND_CMD_SEQIN:
	case NAND_CMD_READID:
	case NAND_CMD_ERASE2:
	case NAND_CMD_RESET:
	case NAND_CMD_RNDOUT:
	case NAND_CMD_RNDOUTSTART:
		return 0;
	case NAND_CMD_STATUS_MULTI:
	default:
		return 1;
	}
}