summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-09-03 09:48:28 -0400
committerTom Rini <trini@konsulko.com>2020-09-03 09:48:28 -0400
commit9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426 (patch)
tree50aa5bfd07887062e0d6808158a02434c9a85116 /include
parent7f4d3c044504668fcbc547af52e0c2c4fd715d27 (diff)
parent293a6dfeb96129abebf1ad927fa9aedf03a66d34 (diff)
downloadu-boot-9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426.tar.gz
u-boot-9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426.tar.xz
u-boot-9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426.zip
Merge branch 'master' of git://git.denx.de/u-boot-usb
- Mostly DFU fixes and r8152 fixes
Diffstat (limited to 'include')
-rw-r--r--include/dfu.h2
-rw-r--r--include/fastboot.h23
-rw-r--r--include/usb.h9
-rw-r--r--include/usb_mass_storage.h2
4 files changed, 33 insertions, 3 deletions
diff --git a/include/dfu.h b/include/dfu.h
index 6fa4505936..84abdc79ac 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -79,7 +79,7 @@ struct nand_internal_data {
};
struct ram_internal_data {
- void *start;
+ unsigned long start;
unsigned int size;
};
diff --git a/include/fastboot.h b/include/fastboot.h
index 1933b1d98e..8e9ee80907 100644
--- a/include/fastboot.h
+++ b/include/fastboot.h
@@ -32,6 +32,8 @@ enum {
FASTBOOT_COMMAND_CONTINUE,
FASTBOOT_COMMAND_REBOOT,
FASTBOOT_COMMAND_REBOOT_BOOTLOADER,
+ FASTBOOT_COMMAND_REBOOT_FASTBOOTD,
+ FASTBOOT_COMMAND_REBOOT_RECOVERY,
FASTBOOT_COMMAND_SET_ACTIVE,
#if CONFIG_IS_ENABLED(FASTBOOT_CMD_OEM_FORMAT)
FASTBOOT_COMMAND_OEM_FORMAT,
@@ -41,6 +43,25 @@ enum {
};
/**
+ * Reboot reasons
+ */
+enum fastboot_reboot_reason {
+ FASTBOOT_REBOOT_REASON_BOOTLOADER,
+ FASTBOOT_REBOOT_REASON_FASTBOOTD,
+ FASTBOOT_REBOOT_REASON_RECOVERY,
+ FASTBOOT_REBOOT_REASONS_COUNT
+};
+
+/**
+ * BCB boot commands
+ */
+static const char * const fastboot_boot_cmds[] = {
+ [FASTBOOT_REBOOT_REASON_BOOTLOADER] = "bootonce-bootloader",
+ [FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot",
+ [FASTBOOT_REBOOT_REASON_RECOVERY] = "boot-recovery"
+};
+
+/**
* fastboot_response() - Writes a response of the form "$tag$reason".
*
* @tag: The first part of the response
@@ -77,7 +98,7 @@ void fastboot_okay(const char *reason, char *response);
* which sets whatever flag your board specific Android bootloader flow
* requires in order to re-enter the bootloader.
*/
-int fastboot_set_reboot_flag(void);
+int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason);
/**
* fastboot_set_progress_callback() - set progress callback
diff --git a/include/usb.h b/include/usb.h
index fa9e09607e..5a7af882fb 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -922,6 +922,15 @@ struct ehci_ctrl;
int usb_setup_ehci_gadget(struct ehci_ctrl **ctlrp);
/**
+ * usb_remove_ehci_gadget() - Remove a gadget USB device
+ *
+ * TODO(sjg@chromium.org): Tidy this up when USB gadgets can use driver model
+ *
+ * This provides a way to tell a controller to remove a USB device
+ */
+int usb_remove_ehci_gadget(struct ehci_ctrl **ctlrp);
+
+/**
* usb_stor_reset() - Prepare to scan USB storage devices
*
* Empty the list of USB storage devices in preparation for scanning them.
diff --git a/include/usb_mass_storage.h b/include/usb_mass_storage.h
index c7b770fa3e..08ccc97cf2 100644
--- a/include/usb_mass_storage.h
+++ b/include/usb_mass_storage.h
@@ -25,7 +25,7 @@ struct ums {
struct blk_desc block_dev;
};
-int fsg_init(struct ums *ums_devs, int count);
+int fsg_init(struct ums *ums_devs, int count, unsigned int controller_idx);
void fsg_cleanup(void);
int fsg_main_thread(void *);
int fsg_add(struct usb_configuration *c);