futility: updater: Add '--ccd' for programming with closed case debugging

CCD via Servo v4 or SuzyQ-like cables is becoming more popular so more
developers want to flash firmware with that, and it seems better to
have one short cut
'--ccd' instead of always typing '--wp=0 --force --fast -p raiden_debug_spi'.

BUG=None
TEST=make futil; build/futility/futility update --ccd -i image.bin -v
BRANCH=None

Change-Id: I0ca8c49a46cc5f8f87fb4dc1936ac9eb0a889baa
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1564235
Reviewed-by: Julius Werner <jwerner@chromium.org>
diff --git a/futility/cmd_update.c b/futility/cmd_update.c
index b3308c8..1a56c4f 100644
--- a/futility/cmd_update.c
+++ b/futility/cmd_update.c
@@ -16,6 +16,7 @@
 
 enum {
 	OPT_DUMMY = 0x100,
+	OPT_CCD,
 	OPT_FAST,
 };
 
@@ -42,6 +43,7 @@
 	{"wp", 1, NULL, 'W'},
 	{"host_only", 0, NULL, 'H'},
 	{"emulate", 1, NULL, 'E'},
+	{"ccd", 0, NULL, OPT_CCD},
 	{"output_dir", 1, NULL, 'U'},
 	{"sys_props", 1, NULL, 'S'},
 	{"debug", 0, NULL, 'd'},
@@ -86,6 +88,7 @@
 		"    --host_only     \tUpdate only AP (host) firmware\n"
 		"    --emulate=FILE  \tEmulate system firmware using file\n"
 		"    --model=MODEL   \tOverride system model for images\n"
+		"    --ccd           \tDo fast,force,wp=0,p=raiden_debug_spi\n"
 		"    --signature_id=S\tOverride signature ID for key files\n"
 		"    --sys_props=LIST\tList of system properties to override\n"
 		"-d, --debug         \tPrint debugging messages\n"
@@ -177,6 +180,12 @@
 			args.verbosity++;
 			break;
 
+		case OPT_CCD:
+			args.fast_update = 1;
+			args.force_update = 1;
+			args.write_protection = 0;
+			args.programmer = "raiden_debug_spi";
+			break;
 		case OPT_FAST:
 			args.fast_update = 1;
 			break;