}
#endif
-#if defined(CONFIG_USB_FUNCTION_FASTBOOT) && !defined(CONFIG_ENV_IS_NOWHERE)
-int fb_set_reboot_flag(void)
+#if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE)
+int fastboot_set_reboot_flag(void)
{
printf("Setting reboot to fastboot flag ...\n");
env_set("dofastboot", "1");
}
#endif
-#if defined(CONFIG_USB_FUNCTION_FASTBOOT)
-int fb_set_reboot_flag(void)
+#if CONFIG_IS_ENABLED(FASTBOOT)
+int fastboot_set_reboot_flag(void)
{
struct rk3128_grf *grf;
}
#endif
-#if defined(CONFIG_USB_FUNCTION_FASTBOOT)
-int fb_set_reboot_flag(void)
+#if CONFIG_IS_ENABLED(FASTBOOT)
+int fastboot_set_reboot_flag(void)
{
struct rk322x_grf *grf;
omap_die_id_get_board_serial(serialnr);
}
-int fb_set_reboot_flag(void)
+int fastboot_set_reboot_flag(void)
{
return omap_reboot_mode_store("b");
}
omap_reboot_mode_store(reboot_mode);
}
-int fb_set_reboot_flag(void)
+int fastboot_set_reboot_flag(void)
{
return omap_reboot_mode_store("b");
}
else
fastboot_response("OKAY", response, NULL);
}
+
+/**
+ * fastboot_set_reboot_flag() - Set flag to indicate reboot-bootloader
+ *
+ * Set flag which indicates that we should reboot into the bootloader
+ * following the reboot that fastboot executes after this function.
+ *
+ * This function should be overridden in your board file with one
+ * which sets whatever flag your board specific Android bootloader flow
+ * requires in order to re-enter the bootloader.
+ */
+int __weak fastboot_set_reboot_flag(void)
+{
+ return -ENOSYS;
+}
do_reset(NULL, 0, 0, NULL);
}
-int __weak fb_set_reboot_flag(void)
-{
- return -ENOSYS;
-}
-
static void cb_reboot(struct usb_ep *ep, struct usb_request *req)
{
char *cmd = req->buf;
if (!strcmp_l1("reboot-bootloader", cmd)) {
- if (fb_set_reboot_flag()) {
+ if (fastboot_set_reboot_flag()) {
fastboot_tx_write_str("FAILCannot set reboot flag");
return;
}
* @response: Pointer to fastboot response buffer
*/
void fastboot_okay(const char *reason, char *response);
-
+int fastboot_set_reboot_flag(void);
#endif /* _FASTBOOT_H_ */