From 793e1666a2c2e24ba66b631544ec85acb91e9b12 Mon Sep 17 00:00:00 2001 From: Chen Guoyin Date: Thu, 29 Dec 2016 14:55:32 +0800 Subject: MA-9140 Add variant as imx6ul_pico or imx6ul_iopb depending on the board The bootloader is currently reporting the variant (ie imx6ul_pico) for the product variable and not reporting a product variable. This needs to be changed to report product=imx6ul for both boards and variant=imx6ul_pico or imx6ul_iopb depending on the board. Change-Id: Ic2fd160519b065a9164996fa7e18f24e3500f5df Signed-off-by: Chen Guoyin --- drivers/usb/gadget/f_fastboot.c | 6 +++++- include/configs/mx6ul_nxpu_iopb.h | 3 ++- include/configs/picosom-imx6ul.h | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 5dfdb86..339887a 100755 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -2742,6 +2742,10 @@ static char *get_serial(void) #define PRODUCT_NAME "NXP i.MX" #endif +#if !defined(VARIANT_NAME) +#define VARIANT_NAME "NXP i.MX" +#endif + static void cb_getvar(struct usb_ep *ep, struct usb_request *req) { char *cmd = req->buf; @@ -2799,7 +2803,7 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req) } else if (!strcmp_l1("battery-soc-ok", cmd)) { strncat(response, "yes", chars_left); } else if (!strcmp_l1("variant", cmd)) { - /* just OKAY here */ + strncat(response, VARIANT_NAME, chars_left); } else if (!strcmp_l1("off-mode-charge", cmd)) { strncat(response, "1", chars_left); } else if (!strcmp_l1("downloadsize", cmd) || diff --git a/include/configs/mx6ul_nxpu_iopb.h b/include/configs/mx6ul_nxpu_iopb.h index b27381a..4cc2f1c 100644 --- a/include/configs/mx6ul_nxpu_iopb.h +++ b/include/configs/mx6ul_nxpu_iopb.h @@ -425,6 +425,7 @@ #endif -#define PRODUCT_NAME "imx6ul_iopb" +#define PRODUCT_NAME "imx6ul" +#define VARIANT_NAME "imx6ul_iopb" #endif diff --git a/include/configs/picosom-imx6ul.h b/include/configs/picosom-imx6ul.h index bc92365..6ab032f 100644 --- a/include/configs/picosom-imx6ul.h +++ b/include/configs/picosom-imx6ul.h @@ -399,6 +399,7 @@ #define CONFIG_USB_FASTBOOT_BUF_SIZE 0xc800000 #endif -#define PRODUCT_NAME "imx6ul_pico" +#define PRODUCT_NAME "imx6ul" +#define VARIANT_NAME "imx6ul_pico" #endif -- cgit v1.1