aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVenkateswara Rao Mandela <venkat.mandela@ti.com>2017-03-08 20:45:55 +0530
committerPraneeth Bajjuri <praneeth@ti.com>2017-07-19 23:25:32 -0500
commit3100c1e4fc33d463cba2d0943bf1da43e3dcfce2 (patch)
treeb4568d2ac577f9a584374779a9bd8d1d525e9bef
parent3c7d22946028ca84019268f884d112dd89116ce1 (diff)
downloadjacinto6evm-3100c1e4fc33d463cba2d0943bf1da43e3dcfce2.tar.gz
fastboot: erase QSPI boot areas only when necessary
When switching to QSPI in fastboot using "fastboot oem spi" command, the default was to erase the MLO and u-boot.img regions. This requires us to flash the binaries each time we use "fastboot oem spi" irrespective of whether we want to flash the binaries. 1. Instead use "update" command to flash the binaries. This command erases QSPI sectors only if necessary. 2. Remove the code to always erase QSPI in fastboot. Change-Id: I59cac981373d23a9a1fcda28e0a0d96802b78197 Signed-off-by: Venkateswara Rao Mandela <venkat.mandela@ti.com>
-rw-r--r--drivers/usb/gadget/f_fastboot.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index d125d2a1bf..7881d94201 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 write 0x%x 0 40000",
+ snprintf(cmdbuf, FB_MAX_CMD_LEN, "sf update 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 write 0x%x 40000 100000",
+ snprintf(cmdbuf, FB_MAX_CMD_LEN, "sf update 0x%x 40000 100000",
(unsigned int)CONFIG_FASTBOOT_BUF_ADDR);
add_fastboot_cmd(0, cmdbuf);
}
@@ -839,8 +839,6 @@ 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 ;