diff options
author | David Huang | 2017-07-25 18:36:54 -0500 |
---|---|---|
committer | David Huang | 2017-07-25 18:36:54 -0500 |
commit | a1f5a823fe756b783f42e6fbc8b2c284998c7b82 (patch) | |
tree | 7bf7c463f8db2ee3a0f5db381280678cd2a6c537 | |
parent | 3100c1e4fc33d463cba2d0943bf1da43e3dcfce2 (diff) | |
download | u-boot-a1f5a823fe756b783f42e6fbc8b2c284998c7b82.tar.gz u-boot-a1f5a823fe756b783f42e6fbc8b2c284998c7b82.tar.xz u-boot-a1f5a823fe756b783f42e6fbc8b2c284998c7b82.zip |
Revert "fastboot: erase QSPI boot areas only when necessary"
This change prevents fastboot from flashing u-boot.img
to SPI with normal fastboot flash process.
This reverts commit 3100c1e4fc33d463cba2d0943bf1da43e3dcfce2.
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 7881d94201..d125d2a1bf 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c | |||
@@ -623,11 +623,11 @@ static void fastboot_update_bootloader(char *cmd) | |||
623 | reset_fastboot_cmd(); | 623 | reset_fastboot_cmd(); |
624 | 624 | ||
625 | if (strncmp("xloader", cmd, 7) == 0) { | 625 | if (strncmp("xloader", cmd, 7) == 0) { |
626 | snprintf(cmdbuf, FB_MAX_CMD_LEN, "sf update 0x%x 0 40000", | 626 | snprintf(cmdbuf, FB_MAX_CMD_LEN, "sf write 0x%x 0 40000", |
627 | (unsigned int)CONFIG_FASTBOOT_BUF_ADDR); | 627 | (unsigned int)CONFIG_FASTBOOT_BUF_ADDR); |
628 | add_fastboot_cmd(0, cmdbuf); | 628 | add_fastboot_cmd(0, cmdbuf); |
629 | } else if (strncmp("bootloader", cmd, 10) == 0) { | 629 | } else if (strncmp("bootloader", cmd, 10) == 0) { |
630 | snprintf(cmdbuf, FB_MAX_CMD_LEN, "sf update 0x%x 40000 100000", | 630 | snprintf(cmdbuf, FB_MAX_CMD_LEN, "sf write 0x%x 40000 100000", |
631 | (unsigned int)CONFIG_FASTBOOT_BUF_ADDR); | 631 | (unsigned int)CONFIG_FASTBOOT_BUF_ADDR); |
632 | add_fastboot_cmd(0, cmdbuf); | 632 | add_fastboot_cmd(0, cmdbuf); |
633 | } | 633 | } |
@@ -839,6 +839,8 @@ static void cb_oem(struct usb_ep *ep, struct usb_request *req) | |||
839 | } else if (strncmp("spi", cmd + 4, 3) == 0) { | 839 | } else if (strncmp("spi", cmd + 4, 3) == 0) { |
840 | flash_spi = 1; | 840 | flash_spi = 1; |
841 | add_fastboot_cmd(0, "sf probe 0"); | 841 | add_fastboot_cmd(0, "sf probe 0"); |
842 | add_fastboot_cmd(1, "sf erase 0 0x40000"); | ||
843 | add_fastboot_cmd(2, "sf erase 0x40000 0x100000"); | ||
842 | } else if (strncmp("unlock", cmd + 4, 8) == 0) { | 844 | } else if (strncmp("unlock", cmd + 4, 8) == 0) { |
843 | fastboot_tx_write_str("FAILnot implemented"); | 845 | fastboot_tx_write_str("FAILnot implemented"); |
844 | return ; | 846 | return ; |