net: fastboot: Merge AOSP UDP fastboot
Merge UDP fastboot support from AOSP:
https://android.googlesource.com/platform/external/u-boot/+/android-o-mr1-iot-preview-8
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alex Deymo <deymo@google.com>
Signed-off-by: Jocelyn Bohr <bohr@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/fastboot/fb_nand.c b/drivers/fastboot/fb_nand.c
index 535f541..526bc12 100644
--- a/drivers/fastboot/fb_nand.c
+++ b/drivers/fastboot/fb_nand.c
@@ -88,7 +88,7 @@
}
static int _fb_nand_write(struct mtd_info *mtd, struct part_info *part,
- void *buffer, unsigned int offset,
+ void *buffer, u32 offset,
size_t length, size_t *written)
{
int flags = WITH_WR_VERIFY;
@@ -146,6 +146,21 @@
}
/**
+ * fastboot_nand_get_part_info() - Lookup NAND partion by name
+ *
+ * @part_name: Named device to lookup
+ * @part_info: Pointer to returned part_info pointer
+ * @response: Pointer to fastboot response buffer
+ */
+int fastboot_nand_get_part_info(char *part_name, struct part_info **part_info,
+ char *response)
+{
+ struct mtd_info *mtd = NULL;
+
+ return fb_nand_lookup(part_name, &mtd, part_info, response);
+}
+
+/**
* fastboot_nand_flash_write() - Write image to NAND for fastboot
*
* @cmd: Named device to write image to
@@ -154,7 +169,7 @@
* @response: Pointer to fastboot response buffer
*/
void fastboot_nand_flash_write(const char *cmd, void *download_buffer,
- unsigned int download_bytes, char *response)
+ u32 download_bytes, char *response)
{
struct part_info *part;
struct mtd_info *mtd = NULL;