/* Map op to supported operations. We don't use a table since we would just have to relocate it from flash anyway.  */
static int fpga_get_op(char *opstr)
/* Map op to supported operations. We don't use a table since we would just have to relocate it from flash anyway.  */
static int fpga_get_op(char *opstr)
{
	int op = FPGA_NONE;
	if (!strcmp ("info", opstr)) {
		op = FPGA_INFO;
	} else if (!strcmp ("loadb", opstr)) {
		op = FPGA_LOADB;
	} else if (!strcmp ("load", opstr)) {
		op = FPGA_LOAD;
	} else if (!strcmp ("loadmk", opstr)) {
		op = FPGA_LOADMK;
	} else if (!strcmp ("dump", opstr)) {
		op = FPGA_DUMP;
	}
	if (op == FPGA_NONE) {
		printf ("Unknown fpga operation \"%s\"\n", opstr);
	}
	return op;
}