diff options
author | Alex Kiernan <alex.kiernan@gmail.com> | 2018-05-29 15:30:42 +0000 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-05-30 11:59:21 +0200 |
commit | 42d8dd4424099ad65400b34af1eb51258130e0b6 (patch) | |
tree | 4b939668ee8fb11379759923ea3a6d0b9e763b09 /drivers/usb/gadget | |
parent | d2df2abbcd4b88539605f8329edd244e6474d7a0 (diff) |
fastboot: Correct dependencies in FASTBOOT_FLASH
Ensure that when selecting FASTBOOT_FLASH you end up with a buildable
configuration. Prior to this you could select NAND without MTDPARTS
and end up with an image which (surprisingly) excluded NAND.
Also fix dependencies on FASTBOOT_GPT_NAME/FASTBOOT_MBR_NAME which require
you have EFI_PARTITION/DOS_PARTITION enabled.
Delete redundant FASTBOOT_FLASH_NAND_DEV from Kconfig - it was only ever
used as a guard and the value was ignored in all cases, we're using
FASTBOOT_FLASH_NAND as the guard now.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 2e6e1615bf..323ac89417 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -20,10 +20,10 @@ #include <linux/compiler.h> #include <version.h> #include <g_dnl.h> -#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV +#ifdef CONFIG_FASTBOOT_FLASH_MMC #include <fb_mmc.h> #endif -#ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV +#ifdef CONFIG_FASTBOOT_FLASH_NAND #include <fb_nand.h> #endif @@ -583,11 +583,11 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req) } fastboot_fail("no flash device defined", response); -#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV +#ifdef CONFIG_FASTBOOT_FLASH_MMC fb_mmc_flash_write(cmd, (void *)CONFIG_FASTBOOT_BUF_ADDR, download_bytes, response); #endif -#ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV +#ifdef CONFIG_FASTBOOT_FLASH_NAND fb_nand_flash_write(cmd, (void *)CONFIG_FASTBOOT_BUF_ADDR, download_bytes, response); #endif @@ -598,7 +598,7 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req) static void cb_oem(struct usb_ep *ep, struct usb_request *req) { char *cmd = req->buf; -#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV +#ifdef CONFIG_FASTBOOT_FLASH_MMC if (strncmp("format", cmd + 4, 6) == 0) { char cmdbuf[32]; sprintf(cmdbuf, "gpt write mmc %x $partitions", @@ -631,10 +631,10 @@ static void cb_erase(struct usb_ep *ep, struct usb_request *req) } fastboot_fail("no flash device defined", response); -#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV +#ifdef CONFIG_FASTBOOT_FLASH_MMC fb_mmc_erase(cmd, response); #endif -#ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV +#ifdef CONFIG_FASTBOOT_FLASH_NAND fb_nand_erase(cmd, response); #endif fastboot_tx_write_str(response); |