From 9f7bb2825b81680c0bc3cb4b0376e6a230501242 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Fri, 5 Feb 2021 09:38:56 -0500 Subject: part: Support getting whole disk from part_get_info_by_dev_and_name_or_num This adds an option to part_get_info_by_dev_and_name_or_num to allow callers to specify whether whole-disk partitions are fine. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- include/part.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/part.h b/include/part.h index 815515aa809..7f78271a983 100644 --- a/include/part.h +++ b/include/part.h @@ -227,12 +227,16 @@ int part_get_info_by_name(struct blk_desc *dev_desc, * @param[in] dev_part_str Input partition description, like "0#misc" or "0:1" * @param[out] dev_desc Place to store the device description pointer * @param[out] part_info Place to store the partition information + * @param[in] allow_whole_dev true to allow the user to select partition 0 + * (which means the whole device), false to require a valid + * partition number >= 1 * @return 0 on success, or a negative on error */ int part_get_info_by_dev_and_name_or_num(const char *dev_iface, const char *dev_part_str, struct blk_desc **dev_desc, - struct disk_partition *part_info); + struct disk_partition *part_info, + int allow_whole_dev); /** * part_set_generic_name() - create generic partition like hda1 or sdb2 -- cgit v1.2.3 From bc820d5bcc507366677c592e400e120481748c05 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Wed, 10 Feb 2021 09:29:03 +0100 Subject: fastboot: add UUU command UCmd and ACmd support add support for the UUU commands ACmd and UCmd. Enable them through the Kconfig option CONFIG_FASTBOOT_UUU_SUPPORT base was commit in NXP kernel 9b149c2a2882: ("MLK-18591-3 android: Add FSL android fastboot support") and ported it to current mainline. Tested this patch on imx6ul based board. Signed-off-by: Heiko Schocher Acked-by: Patrick Delaunay --- include/fastboot.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/fastboot.h b/include/fastboot.h index 797d7dfd529..57daaf12982 100644 --- a/include/fastboot.h +++ b/include/fastboot.h @@ -44,6 +44,10 @@ enum { #if CONFIG_IS_ENABLED(FASTBOOT_CMD_OEM_BOOTBUS) FASTBOOT_COMMAND_OEM_BOOTBUS, #endif +#if CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT) + FASTBOOT_COMMAND_ACMD, + FASTBOOT_COMMAND_UCMD, +#endif FASTBOOT_COMMAND_COUNT }; @@ -169,4 +173,7 @@ void fastboot_data_download(const void *fastboot_data, */ void fastboot_data_complete(char *response); +#if CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT) +void fastboot_acmd_complete(void); +#endif #endif /* _FASTBOOT_H_ */ -- cgit v1.2.3