diff options
-rw-r--r-- | common/fb_mmc.c | 8 | ||||
-rw-r--r-- | configs/MPC8544DS_defconfig | 1 | ||||
-rw-r--r-- | configs/MPC8572DS_36BIT_defconfig | 1 | ||||
-rw-r--r-- | configs/MPC8572DS_defconfig | 1 | ||||
-rw-r--r-- | doc/README.dfutftp | 8 | ||||
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/Kconfig | 6 | ||||
-rw-r--r-- | include/configs/MPC8544DS.h | 1 | ||||
-rw-r--r-- | include/configs/MPC8572DS.h | 1 | ||||
-rw-r--r-- | include/configs/efi-x86.h | 1 | ||||
-rw-r--r-- | include/configs/x86-common.h | 1 | ||||
-rw-r--r-- | scripts/config_whitelist.txt | 1 |
12 files changed, 23 insertions, 11 deletions
diff --git a/common/fb_mmc.c b/common/fb_mmc.c index 5065ad5f73..26d60b88d0 100644 --- a/common/fb_mmc.c +++ b/common/fb_mmc.c @@ -132,7 +132,7 @@ static lbaint_t fb_mmc_get_boot_header(struct blk_desc *dev_desc, /* Read the boot image header */ res = blk_dread(dev_desc, info->start, hdr_sectors, (void *)hdr); - if (res == 0) { + if (res != hdr_sectors) { error("cannot read header from boot partition"); fastboot_fail("cannot read header from boot partition"); return 0; @@ -162,7 +162,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc, void *download_buffer, unsigned int download_bytes) { - u32 hdr_addr; /* boot image header address */ + uintptr_t hdr_addr; /* boot image header address */ struct andr_img_hdr *hdr; /* boot image header */ lbaint_t hdr_sectors; /* boot image header sectors */ u8 *ramdisk_buffer; @@ -185,7 +185,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc, } /* Put boot image header in fastboot buffer after downloaded zImage */ - hdr_addr = (u32)download_buffer + ALIGN(download_bytes, PAGE_SIZE); + hdr_addr = (uintptr_t)download_buffer + ALIGN(download_bytes, PAGE_SIZE); hdr = (struct andr_img_hdr *)hdr_addr; /* Read boot image header */ @@ -215,7 +215,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc, ramdisk_buffer = (u8 *)hdr + (hdr_sectors * info.blksz); res = blk_dread(dev_desc, ramdisk_sector_start, ramdisk_sectors, ramdisk_buffer); - if (res == 0) { + if (res != ramdisk_sectors) { error("cannot read ramdisk from boot partition"); fastboot_fail("cannot read ramdisk from boot partition"); return -1; diff --git a/configs/MPC8544DS_defconfig b/configs/MPC8544DS_defconfig index 3e75de7f46..457dfb14c4 100644 --- a/configs/MPC8544DS_defconfig +++ b/configs/MPC8544DS_defconfig @@ -28,5 +28,6 @@ CONFIG_RTL8139=y CONFIG_SCSI=y CONFIG_SYS_NS16550=y CONFIG_USB=y +CONFIG_USB_EHCI_PCI=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT=y diff --git a/configs/MPC8572DS_36BIT_defconfig b/configs/MPC8572DS_36BIT_defconfig index 4a3a7e0f7c..1c4ab115c6 100644 --- a/configs/MPC8572DS_36BIT_defconfig +++ b/configs/MPC8572DS_36BIT_defconfig @@ -27,5 +27,6 @@ CONFIG_PHY_GIGE=y CONFIG_E1000=y CONFIG_SYS_NS16550=y CONFIG_USB=y +CONFIG_USB_EHCI_PCI=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT=y diff --git a/configs/MPC8572DS_defconfig b/configs/MPC8572DS_defconfig index 9af509ffd8..8881713c1c 100644 --- a/configs/MPC8572DS_defconfig +++ b/configs/MPC8572DS_defconfig @@ -26,5 +26,6 @@ CONFIG_PHY_GIGE=y CONFIG_E1000=y CONFIG_SYS_NS16550=y CONFIG_USB=y +CONFIG_USB_EHCI_PCI=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT=y diff --git a/doc/README.dfutftp b/doc/README.dfutftp index 0257f0d503..66901e1577 100644 --- a/doc/README.dfutftp +++ b/doc/README.dfutftp @@ -1,3 +1,11 @@ +# +# Copyright (C) 2015 +# +# Lukasz Majewski <l.majewski@majess.pl> +# +# +# SPDX-License-Identifier: GPL-2.0+ + Device Firmware Upgrade (DFU) - extension to use TFTP ===================================================== diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index d05b74b2d2..199621d9f5 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -561,7 +561,7 @@ static void do_bootm_on_complete(struct usb_ep *ep, struct usb_request *req) puts("Booting kernel..\n"); - sprintf(boot_addr_start, "0x%lx", load_addr); + sprintf(boot_addr_start, "0x%lx", CONFIG_FASTBOOT_BUF_ADDR); do_bootm(NULL, 0, 2, bootm_args); /* This only happens if image is somehow faulty so we start over */ @@ -718,7 +718,7 @@ static void rx_handler_command(struct usb_ep *ep, struct usb_request *req) } if (!func_cb) { - error("unknown command: %s", cmdbuf); + error("unknown command: %.*s", req->actual, cmdbuf); fastboot_tx_write_str("FAILunknown command"); } else { if (req->actual < req->length) { diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 67ad72b4a2..eb035a476b 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -142,6 +142,12 @@ config USB_EHCI_MSM This driver supports combination of Chipidea USB controller and Synapsys USB PHY in host mode only. +config USB_EHCI_PCI + bool "Support for PCI-based EHCI USB controller" + default y if X86 + help + Enables support for the PCI-based EHCI controller. + config USB_EHCI_RCAR_GEN3 bool "Support for Renesas RCar M3/H3 EHCI USB controller" depends on RCAR_GEN3 diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h index e8a6fdf23f..77c3910326 100644 --- a/include/configs/MPC8544DS.h +++ b/include/configs/MPC8544DS.h @@ -347,7 +347,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); */ #ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_USB_EHCI_PCI #define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_PCI_EHCI_DEVICE 0 #endif diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h index 1959fa5b01..218d212608 100644 --- a/include/configs/MPC8572DS.h +++ b/include/configs/MPC8572DS.h @@ -545,7 +545,6 @@ */ #ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_USB_EHCI_PCI #define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_PCI_EHCI_DEVICE 0 #endif diff --git a/include/configs/efi-x86.h b/include/configs/efi-x86.h index fa263632a2..43935bf4b4 100644 --- a/include/configs/efi-x86.h +++ b/include/configs/efi-x86.h @@ -12,7 +12,6 @@ #undef CONFIG_TPM_TIS_BASE_ADDRESS #undef CONFIG_SCSI_AHCI -#undef CONFIG_USB_EHCI_PCI #define CONFIG_STD_DEVICES_SETTINGS "stdin=usbkbd,vga,serial\0" \ "stdout=vga,serial\0" \ diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index 687f8df450..49fcbc5b9f 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -118,7 +118,6 @@ /*----------------------------------------------------------------------- * USB configuration */ -#define CONFIG_USB_EHCI_PCI #define CONFIG_SYS_USB_EVENT_POLL #define CONFIG_USB_HOST_ETHER diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 6c628c878c..0a751e4a91 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -5026,7 +5026,6 @@ CONFIG_USB_EHCI_KIRKWOOD CONFIG_USB_EHCI_MX5 CONFIG_USB_EHCI_MXC CONFIG_USB_EHCI_MXS -CONFIG_USB_EHCI_PCI CONFIG_USB_EHCI_RMOBILE CONFIG_USB_EHCI_SPEAR CONFIG_USB_EHCI_SUNXI |