From 9b840cda9a511794b8f40f988d5b3dc48bb48f5f Mon Sep 17 00:00:00 2001 From: Xiangfu Liu Date: Mon, 7 Mar 2011 10:47:08 +0800 Subject: [PATCH] add reset help --- usbboot/src/cmd.c | 5 +++++ usbboot/src/command_line.c | 1 + 2 files changed, 6 insertions(+) diff --git a/usbboot/src/cmd.c b/usbboot/src/cmd.c index 8e85289..daf17a9 100644 --- a/usbboot/src/cmd.c +++ b/usbboot/src/cmd.c @@ -964,6 +964,11 @@ out: int device_reset(int ops) { + if (usb_get_ingenic_cpu(&ingenic_dev) < 3) { + printf(" Device unboot! Boot it first!\n"); + return -1; + } + if (usb_ingenic_reset(&ingenic_dev, ops) < 1) return -1; diff --git a/usbboot/src/command_line.c b/usbboot/src/command_line.c index a9f9fae..cfc5a53 100644 --- a/usbboot/src/command_line.c +++ b/usbboot/src/command_line.c @@ -37,6 +37,7 @@ static int handle_help(void) { printf( " boot boot device and make it in stage2\n" + " reset reset device\n" " nprog program NAND flash\n" " nquery query NAND flash info\n" " nerase erase NAND flash\n"