trace: add support for 'trace wipe'

Implement a 'trace wipe' command to delete the currently accumulated
trace data. This comes handy when someone needs to trace a particular
command. For example:

  => trace pause; trace wipe
  => trace resume; dhcp; trace pause
  => trace stats
  => trace calls 0x02100000 0x10000000
  => tftpput $profbase $profoffset 192.168.0.16:trace.bin

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff --git a/cmd/trace.c b/cmd/trace.c
index 937e6a6..d360087 100644
--- a/cmd/trace.c
+++ b/cmd/trace.c
@@ -100,6 +100,10 @@
 	case 's':
 		trace_print_stats();
 		break;
+	case 'w':
+		if (trace_wipe())
+			return CMD_RET_FAILURE;
+		break;
 	default:
 		return CMD_RET_USAGE;
 	}
@@ -113,6 +117,7 @@
 	"stats                        - display tracing statistics\n"
 	"trace pause                        - pause tracing\n"
 	"trace resume                       - resume tracing\n"
+	"trace wipe                         - wipe traces\n"
 	"trace funclist [<addr> <size>]     - dump function list into buffer\n"
 	"trace calls  [<addr> <size>]       "
 		"- dump function call trace into buffer"