From: zhang sanshan Date: Mon, 10 Jul 2017 09:30:02 +0000 (+0800) Subject: MA-9822 Device has to be booted manually to recovery mode to apply the OTA update... X-Git-Tag: rel_imx_4.9.88_2.0.0_ga~443 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=3bce86febc7ad9ae18dea33966470e283eef93f3;p=u-boot.git MA-9822 Device has to be booted manually to recovery mode to apply the OTA update when booting from NAND uboot can't get the correct misc info. nand_info[0] is the info of mtd in v2016 or more older version. nand_info[0] hold the pointer of mtd info in v2017. Change-Id: I6b336efeafeed1e0f4e3224f738e72b83f1e09df Signed-off-by: zhang sanshan --- diff --git a/drivers/usb/gadget/command.c b/drivers/usb/gadget/command.c index 543b99eef5..f3254f8904 100644 --- a/drivers/usb/gadget/command.c +++ b/drivers/usb/gadget/command.c @@ -73,7 +73,7 @@ int bcb_read_command(char *command) char *addr_str; char *nand_str; ulong misc_info_size; - struct mtd_info *nand = &nand_info[0]; + struct mtd_info *nand = nand_info[0]; if (command == NULL) return -1; memset(read_cmd, 0, 128); @@ -97,7 +97,7 @@ int bcb_write_command(char *command) char *addr_str; char *nand_str; ulong misc_info_size; - struct mtd_info *nand = &nand_info[0]; + struct mtd_info *nand = nand_info[0]; if (command == NULL) return -1; memset(cmd, 0, 128); diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 89a2dcc53a..c5b603e07f 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -442,7 +442,7 @@ static int write_to_ptn(struct fastboot_ptentry *ptn) unsigned long off; unsigned int ok_start; - nand = &nand_info[nand_curr_device]; + nand = nand_info[nand_curr_device]; printf("\nDevice %d bad blocks:\n", nand_curr_device); @@ -1263,7 +1263,7 @@ static void parameters_setup(void) { interface.nand_block_size = 0; #if defined(CONFIG_FASTBOOT_STORAGE_NAND) - struct mtd_info *nand = &nand_info[0]; + struct mtd_info *nand = nand_info[0]; if (nand) interface.nand_block_size = nand->writesize; #endif