fastboot: Extract fastboot_okay/fail to fb_common.c

Add drivers/fastboot/fb_common.c, where fastboot_okay/fail are implemented
so we can call them from a non-USB implementation.

Introduce fastboot_response which takes varargs parameters so we can
use it to generate formatted response strings. Refactor fastboot_okay/fail
to use it.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
Alex Kiernan
2018-05-29 15:30:41 +00:00
committed by Marek Vasut
parent c4ded03ef6
commit d2df2abbcd
5 changed files with 88 additions and 16 deletions

View File

@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0+
obj-y += fb_common.o
ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
obj-y += fb_mmc.o
endif