diff options
-rw-r--r-- | boot/image-android.c | 7 | ||||
-rw-r--r-- | boot/image-board.c | 4 | ||||
-rw-r--r-- | cmd/bcb.c | 4 | ||||
-rw-r--r-- | drivers/usb/musb-new/ux500.c | 6 | ||||
-rw-r--r-- | include/image.h | 2 |
5 files changed, 11 insertions, 12 deletions
diff --git a/boot/image-android.c b/boot/image-android.c index 09c7a44e058..774565fd1fe 100644 --- a/boot/image-android.c +++ b/boot/image-android.c @@ -393,10 +393,9 @@ int android_image_get_ramdisk(const void *hdr, const void *vendor_boot_img, if (!android_image_get_data(hdr, vendor_boot_img, &img_data)) return -EINVAL; - if (!img_data.ramdisk_size) { - *rd_data = *rd_len = 0; - return -1; - } + if (!img_data.ramdisk_size) + return -ENOENT; + if (img_data.header_version > 2) { ramdisk_ptr = img_data.ramdisk_addr; memcpy((void *)(ramdisk_ptr), (void *)img_data.vendor_ramdisk_ptr, diff --git a/boot/image-board.c b/boot/image-board.c index f2124013046..eca1b1d2bff 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -427,7 +427,9 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a unmap_sysmem(ptr); } - if (ret) + if (ret == -ENOENT) + return -ENOPKG; + else if (ret) return ret; done = true; } diff --git a/cmd/bcb.c b/cmd/bcb.c index fe6d6cb2c38..97a96c00964 100644 --- a/cmd/bcb.c +++ b/cmd/bcb.c @@ -172,8 +172,8 @@ static int __bcb_initialize(const char *iface, int devnum, const char *partp) return CMD_RET_SUCCESS; err_read_fail: - printf("Error: %d %d:%s read failed (%d)\n", block->uclass_id, - block->devnum, partition->name, ret); + printf("Error: %s %d:%s read failed (%d)\n", iface, devnum, + partition->name, ret); __bcb_reset(); return CMD_RET_FAILURE; } diff --git a/drivers/usb/musb-new/ux500.c b/drivers/usb/musb-new/ux500.c index 89dd75b7d05..be0085f403d 100644 --- a/drivers/usb/musb-new/ux500.c +++ b/drivers/usb/musb-new/ux500.c @@ -169,16 +169,14 @@ U_BOOT_DRIVER(ux500_musb) = { .name = "ux500-musb", #ifdef CONFIG_USB_MUSB_HOST .id = UCLASS_USB, + .ops = &musb_usb_ops, #else .id = UCLASS_USB_GADGET_GENERIC, + .ops = &ux500_gadget_ops, #endif .of_match = ux500_musb_ids, - .ops = &ux500_gadget_ops, .probe = ux500_musb_probe, .remove = ux500_musb_remove, -#ifdef CONFIG_USB_MUSB_HOST - .ops = &musb_usb_ops, -#endif .plat_auto = sizeof(struct usb_plat), .priv_auto = sizeof(struct ux500_glue), }; diff --git a/include/image.h b/include/image.h index dd4042d1bd9..2ab17075287 100644 --- a/include/image.h +++ b/include/image.h @@ -1858,7 +1858,7 @@ int android_image_get_kernel(const void *hdr, * @vendor_boot_img : Pointer to vendor boot image header * @rd_data: Pointer to a ulong variable, will hold ramdisk address * @rd_len: Pointer to a ulong variable, will hold ramdisk length - * Return: 0 if succeeded, -1 if ramdisk size is 0 + * Return: 0 if OK, -ENOPKG if no ramdisk, -EINVAL if invalid image */ int android_image_get_ramdisk(const void *hdr, const void *vendor_boot_img, ulong *rd_data, ulong *rd_len); |