On 11/09/2015 10:19 AM, Alban Bedel wrote:
This check isn't really needed, if communication isn't possible it will just fails later on. Further it currently prevent communicating with secured devices, so just remove it.
diff --git a/src/main.c b/src/main.c
@@ -352,13 +352,6 @@ int main(int argc, char **argv)
- if (info.op_mode != RCM_OP_MODE_DEVEL && - info.op_mode != RCM_OP_MODE_ODM_OPEN && - info.op_mode != RCM_OP_MODE_ODM_SECURE && - info.op_mode != RCM_OP_MODE_PRE_PRODUCTION) - error(1, ENODEV, "device is not in developer, open, secure, " - "or pre-production mode, cannot flash");
I would rather maintain the sanity check. The set of OP_MODE values should be quite small, so we should be able to simply add another on here. Recasting this as a switch might make the code marginally simpler.
Either way, we should update src/rcm.h to add a new RCM_OP_MODE constant, and dump_platform_info() so that it can print the name of the relevant other mode(s).
-- To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html