summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/command.c')
-rw-r--r--drivers/usb/gadget/command.c47
1 files changed, 3 insertions, 44 deletions
diff --git a/drivers/usb/gadget/command.c b/drivers/usb/gadget/command.c
index 3af3fcf..686065a 100644
--- a/drivers/usb/gadget/command.c
+++ b/drivers/usb/gadget/command.c
@@ -9,8 +9,7 @@
#include "bcb.h"
#ifndef CONFIG_FASTBOOT_STORAGE_NAND
-static char command[32];
-static int read_command(char *command)
+int bcb_read_command(char *command)
{
int ret = 0;
char *p_block = NULL;
@@ -31,7 +30,8 @@ static int read_command(char *command)
return 0;
}
-static int write_command(char *bcb_command)
+
+int bcb_write_command(char *bcb_command)
{
int ret = 0;
char *p_block = NULL;
@@ -61,45 +61,4 @@ static int write_command(char *bcb_command)
free(p_block);
return 0;
}
-
-int recovery_check_and_clean_command(void)
-{
- int ret;
- ret = read_command(command);
- if (ret < 0) {
- printf("read command failed\n");
- return 0;
- }
- if (!strcmp(command, "boot-recovery")) {
- memset(command, 0, 32);
- write_command(command);
- return 1;
- }
- return 0;
-}
-int fastboot_check_and_clean_command(void)
-{
- int ret;
- ret = read_command(command);
- if (ret < 0) {
- printf("read command failed\n");
- return 0;
- }
- if (!strcmp(command, "boot-bootloader")) {
- memset(command, 0, 32);
- write_command(command);
- return 1;
- }
-
- return 0;
-}
-#else
-int recovery_check_and_clean_command(void)
-{
- return 0;
-}
-int fastboot_check_and_clean_command(void)
-{
- return 0;
-}
#endif