aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Huang <d-huang@ti.com>2017-07-25 18:36:54 -0500
committerDavid Huang <d-huang@ti.com>2017-07-25 18:36:54 -0500
commita1f5a823fe756b783f42e6fbc8b2c284998c7b82 (patch)
tree7bf7c463f8db2ee3a0f5db381280678cd2a6c537
parent3100c1e4fc33d463cba2d0943bf1da43e3dcfce2 (diff)
downloadjacinto6evm-a1f5a823fe756b783f42e6fbc8b2c284998c7b82.tar.gz
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.c6
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)
reset_fastboot_cmd();
if (strncmp("xloader", cmd, 7) == 0) {
- snprintf(cmdbuf, FB_MAX_CMD_LEN, "sf update 0x%x 0 40000",
+ snprintf(cmdbuf, FB_MAX_CMD_LEN, "sf write 0x%x 0 40000",
(unsigned int)CONFIG_FASTBOOT_BUF_ADDR);
add_fastboot_cmd(0, cmdbuf);
} else if (strncmp("bootloader", cmd, 10) == 0) {
- snprintf(cmdbuf, FB_MAX_CMD_LEN, "sf update 0x%x 40000 100000",
+ snprintf(cmdbuf, FB_MAX_CMD_LEN, "sf write 0x%x 40000 100000",
(unsigned int)CONFIG_FASTBOOT_BUF_ADDR);
add_fastboot_cmd(0, cmdbuf);
}
@@ -839,6 +839,8 @@ static void cb_oem(struct usb_ep *ep, struct usb_request *req)
} else if (strncmp("spi", cmd + 4, 3) == 0) {
flash_spi = 1;
add_fastboot_cmd(0, "sf probe 0");
+ add_fastboot_cmd(1, "sf erase 0 0x40000");
+ add_fastboot_cmd(2, "sf erase 0x40000 0x100000");
} else if (strncmp("unlock", cmd + 4, 8) == 0) {
fastboot_tx_write_str("FAILnot implemented");
return ;