break;
}
- if (vi.major != FX2LAFW_VERSION_MAJOR ||
- vi.minor != FX2LAFW_VERSION_MINOR) {
- sr_err("fx2lafw: Expected firmware version %d.%d "
- "got %d.%d.", FX2LAFW_VERSION_MAJOR,
- FX2LAFW_VERSION_MINOR, vi.major, vi.minor);
+ /*
+ * Changes in major version mean incompatible/API changes, so
+ * bail out if we encounter an incompatible version.
+ * Different minor versions are OK, they should be compatible.
+ */
+ if (vi.major != FX2LAFW_REQUIRED_VERSION_MAJOR) {
+ sr_err("fx2lafw: Expected firmware version %d.x, "
+ "got %d.%d.", FX2LAFW_REQUIRED_VERSION_MAJOR,
+ vi.major, vi.minor);
break;
}
#define NUM_SIMUL_TRANSFERS 32
#define MAX_EMPTY_TRANSFERS (NUM_SIMUL_TRANSFERS * 2)
-#define FX2LAFW_VERSION_MAJOR 1
-#define FX2LAFW_VERSION_MINOR 0
+#define FX2LAFW_REQUIRED_VERSION_MAJOR 1
/* 6 delay states of up to 256 clock ticks */
#define MAX_SAMPLE_DELAY (6 * 256)