summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* doc: stm32mp1: Use u-boot.itb if CONFIG_SPL_LOAD_FIT=yMarek Vasut2021-03-121-5/+11
| | | | | | | | | | For systems where SPL loads fitImage, i.e. CONFIG_SPL_LOAD_FIT=y, use u-boot.itb in the relevant documentation parts. Otherwise use u-boot.img. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* arm: stm32mp: Fix compilation issue when SYS_DCACHE_OFF and/or ↵Patrice Chotard2021-03-121-2/+4
| | | | | | | | | | | | | | | | | | | SYS_DCACHE_SYS are enabled Fix following compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled : arch/arm/mach-stm32mp/cpu.c: In function ‘early_enable_caches’: arch/arm/mach-stm32mp/cpu.c:223:10: error: ‘volatile struct arch_global_data’ has no member named ‘tlb_size’ 223 | gd->arch.tlb_size = PGTABLE_SIZE; | ^ arch/arm/mach-stm32mp/cpu.c:224:10: error: ‘volatile struct arch_global_data’ has no member named ‘tlb_addr’ 224 | gd->arch.tlb_addr = (unsigned long)&early_tlb; | ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* board: st: Remove board_early_init_f and board_late_init callbacks for stm32 ↵Patrice Chotard2021-03-126-40/+0
| | | | | | | | | | | boards Remove board_early_init_f() and board_late_init() callbacks for stm32 boards as the corresponding flags (CONFIG_BOARD_LATE_INIT and CONFIG_BOARD_EARLY_INIT_R) are now disabled. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* configs: stm32: Remove BOARD_EARLY_INIT_F and BOARD_LATE_INIT for stm32 boardsPatrice Chotard2021-03-127-10/+0
| | | | | | | | | These flags was defined and callbacks linked to these flags are empty and only returning 0. Remove BOARD_EARLY_INIT_F and BOARD_LATE_INIT flags for these stm32 boards. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* board: stm32mp1: use CONFIG_SYS_MMC_ENV_DEV when availablePatrick Delaunay2021-03-113-1/+9
| | | | | | | | | | | | | | | | | | | | Check whether user has explicitly defined the mmc device to use in mmc_get_env_dev() with CONFIG_SYS_MMC_ENV_DEV. On STMicroelectronics boards the used mmc device for environment is the instance of boot device provided by the ROM code; the mmc instance is configured by alias in device tree. The used partition is defined in device tree with u-boot,mmc-env-partition = "ssbl". This patch allows to override this selection for the support of customer boards without alias; for example when SDMMC1 is not used and ENV in mmc0=SDMMC2, user can force the value: CONFIG_SYS_MMC_ENV_DEV = 0. On STMicroelectronics boards, the current behavior is kept with CONFIG_SYS_MMC_ENV_DEV = -1. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* video: dw_mipi_dsi: update log of dphy_enableYannick Fertre2021-03-111-4/+4
| | | | | | | | | | | | | | | | | | | The DSI phy can be turned on from the DSI digital interface in the dphy_enable() function or from a dedicated DSI phy "wrapper" in phy_ops->init() function. If the STM32MP1 case, the wrapper is used then the dphy_enable() "warning" traces are not relevant. This patch moves these "warning" traces to "debug" traces so they are still available for DSI phy based on the digital interface in debug logging mode, but not there in normal mode for both cases. Note: The related Linux kernel driver uses a "debug" message too. Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Acked-by: Yannick Fertre <yannick.fertre@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* video: dw_mipi_dsi: missing device to log debugYannick Fertre2021-03-111-0/+1
| | | | | | | | | Missing udevice to struct dw_mipi_dsi to log trace. Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Acked-by: Yannick Fertre <yannick.fertre@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* video: stm32: remove all child of DSI bridge when its probe failedPatrick Delaunay2021-03-111-0/+3
| | | | | | | | | | | | | | | | | | | | Remove the child device of the STM32 DSI bridge when the driver probe failed to stop futher probe request on panels used with STMicroelectronics board (orisetech_otm8009a.c or raydium-rm68200.c driver). This patch avoid the trace "cannot get reset GPIO" when STM32MP157 device tree is used on stm32MP151 SOC without DSI support. In this hw_version value is 0, as DSI bridge is absent and the panel ofdata_to_platdata is called for each try of panel probe, the gpio reset pin is requested but after dsi father probe failed). For the next request, the PANEL ofdata_to_platdata failed as the gpio is already used. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* configs: stm32mp15: move bootdelay configuration in defconfigPatrick Delaunay2021-03-115-1/+4
| | | | | | | | | | | | The STM32MP15 boards have no reason to configure bootdelay in stm32mp1.h as it is already done with CONFIG_BOOTDELAY (default = 2) and in include/env_default.h. This patch allows configuration for customers which reuse stm32mp1.h and reduce the size of the default environment. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* stm32mp: bsec: manage clock when present in device treePatrick Delaunay2021-03-111-0/+10
| | | | | | | Enable the clocks during bsec probe when they are present in device tree. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* stm32mp: stm32prog: replace alias by serial device sequence numberPatrick Delaunay2021-03-112-30/+10
| | | | | | | | | | The command "stm32prog serial <dev>" can directly use the device sequence number of serial uclass as this sequence number is egual to alias when it exist; this assumption simplify the code and avoid access to gd->fdt_blob and the device tree parsing. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* stm32mp: stm32prog: reactivate console and display serial errorPatrick Delaunay2021-03-111-4/+10
| | | | | | | | When serial instance is not found in device tree, the console should be enabled and the error should be indicated. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* stm32mp: stm32prog: Add CONFIG_CMD_STM32PROG_SERIAL and _USBPatrick Delaunay2021-03-117-16/+55
| | | | | | | | | | | | | Add CONFIG_CMD_STM32PROG_SERIAL and CONFIG_CMD_STM32PROG_USB to independently select the support of UART or USB communication for STM32CubeProgrammer. For serial boot over UART, user can deactivate CONFIG_CMD_STM32PROG_SERIAL to use U-Boot console of binary loaded by UART (for board bring-up for example). Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* stm32mp: stm32prog: Add Kconfig file for stm32prog commandPatrick Delaunay2021-03-112-17/+19
| | | | | | | Move CONFIG_CMD_STM32PROG in a specific Kconfig file for stm32prog command. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* board: st: remove the nand MTD configuration for NOR boot in stm32mp1 boardPatrick Delaunay2021-03-111-11/+5
| | | | | | | | | | | | | | Since commit d5d726d3cc47 ("configs: stm32mp1: only support SD card after NOR in bootcmd_stm32mp"), the stm32mp1 boards only support SD card after NOR boot device, so the MTD partitions for nand0 or spi-nand0 are useless (no need of "UBI" partition in nand0 or spi-nand0). This patch removes these nand MTD update for nor boot and simplify nand0 and spi-nand0 support (remove the mtd_boot variable). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* configs: stm32mp1_trusted_defconfig rely on SCMI supportPatrick Delaunay2021-03-111-0/+2
| | | | | | | | | Enable SCMI clock and reset domain support for stm32mp1 platform and ARM SMC mailbox driver used as communication channel for SCMI messages between non-secure world and secure SCMI server. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* scmi: cosmetic: reorder include filesPatrick Delaunay2021-03-112-3/+2
| | | | | | | Reorder include files in expected order. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* scmi: define LOG_CATEGORYPatrick Delaunay2021-03-116-0/+12
| | | | | | | | Define LOG_CATEGORY to allow filtering with log command. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* scmi: Include device_compat.hPatrick Delaunay2021-03-111-0/+1
| | | | | | | | | Include the file needed for log function prototype, this patch solves the compilation issue for undefined reference to `dev_err'. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* clk: stm32mp1: gets root clocks from fdtEtienne Carriere2021-03-111-39/+23
| | | | | | | | | | | | This change makes stm32mp1 clock driver to get the root clocks reference from the device node in the FDT rather than fetching straight these clocks by their name. Driver now stores the clock reference and use it to know if a root clock is present, get its rate or gets its related udevice reference. Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driverEtienne Carriere2021-03-111-0/+4
| | | | | | | | | | | | | | | | Define in the RCC clock provider node which root clocks the driver depends on. These are root oscillators, which may be present or not, upon FDT content. This update binding is introduced in Linux kernel device tree by patch "ARM: dts: stm32: move clocks/resets to SCMI resources for stm32mp15" This patch is a preliminary step for SCMI support of stm32mp15 boards with trusted boot chain, based on TF-A or OP-TEE. Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* mtd: spinand: Add WATCHDOG_RESET() in spinand_mtd_read/write()Patrice Chotard2021-03-111-0/+3
| | | | | | | | | In case of big area read/write on spi nand, watchdog timeout may occurs. To fix that, add WATCHDOG_RESET() in spinand_mtd_read() and spinand_mtd_write() to ensure that watchdog is reset. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* mtd: nand: Add WATCHDOG_RESET() in nanddev_mtd_erase()Patrice Chotard2021-03-111-0/+2
| | | | | | | | | In case of big area erased on nand, watchdog timeout may occurs. To fix that, add WATCHDOG_RESET() in nanddev_mtd_erase() to ensure that watchdog is reset. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* spi: stm32_qspi: Add WATCHDOG_RESET in _stm32_qspi_read_fifo()Patrice Chotard2021-03-111-0/+2
| | | | | | | | | | | | | | | In case of reading large area and memory-map mode is misconfigured (memory-map size declared lower than the real size of the memory chip) watchdog can be triggered. Add WATCHDOG_RESET() in _stm32_qspi_read_fifo to fix it. Issue reproduced with stm32mp157c-ev1 board and memory map size set to 1, with following command: sf read 0xC0000000 0 0x4000000 Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* mtd: spi-nor: Add WATCHDOG_RESET() in spi_nor_core callbacksPatrice Chotard2021-03-111-0/+3
| | | | | | | | | | | | In case of big area write/erase on spi nor, watchdog timeout may occurs. Issue reproduced on stm32mp157c-ev1 with following commands: sf write 0xC0000000 0 0x3000000 or sf erase 0 0x1000000 Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* Prepare v2021.04-rc3Tom Rini2021-03-011-1/+1
| | | | Signed-off-by: Tom Rini <trini@konsulko.com>
* log: convert pr_*() to loggingHeinrich Schuchardt2021-03-012-38/+48
| | | | | | | | | | | | In drivers we use a family of printing functions including pr_err() and pr_cont(). CONFIG_LOGLEVEL is used to control which of these lead to output via printf(). Our logging functions allow finer grained control of output. So replace printf() by the matching logging functions. The usage of CONFIG_LOGLEVEL remains unchanged. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* fs: btrfs: do not fail when offset of a ROOT_ITEM is not -1Marek Behún2021-03-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the btrfs_read_fs_root() function is searching a ROOT_ITEM with location key offset other than -1, it currently fails via BUG_ON. The offset can have other value than -1, though. This can happen for example if a subvolume is renamed: $ btrfs subvolume create X && sync Create subvolume './X' $ btrfs inspect-internal dump-tree /dev/root | grep -B 2 'name: X$ location key (270 ROOT_ITEM 18446744073709551615) type DIR transid 283 data_len 0 name_len 1 name: X $ mv X Y && sync $ btrfs inspect-internal dump-tree /dev/root | grep -B 2 'name: Y$ location key (270 ROOT_ITEM 0) type DIR transid 285 data_len 0 name_len 1 name: Y As can be seen the offset changed from -1ULL to 0. Do not fail in this case. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: David Sterba <dsterba@suse.com> Cc: Qu Wenruo <wqu@suse.com> Cc: Tom Rini <trini@konsulko.com>
* uboot-test-hooks: Switch to our GitLab instanceTom Rini2021-02-283-3/+3
| | | | | | | | As Stephen is no longer actively maintaining the uboot-test-hooks repository, switch to using the instance on our GitLab. Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* Correct U-Boot upstream repositoryHeinrich Schuchardt2021-02-2812-67/+67
| | | | | | | The U-Boot source moves to https://source.denx.de/u-boot/u-boot.git effective 2021-02-28. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* Merge tag 'efi-2021-04-rc3-2' of ↵Tom Rini2021-02-276-12/+24
|\ | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2021-04-rc3-2 Bug fixes: * debug build for mkeficapsule * limit output length for VenHw, VenMedia * ACPI tables must be in EfiACPIReclaimMemory
| * cmd/efidebug: add firmware management protocol GUIDHeinrich Schuchardt2021-02-261-0/+4
| | | | | | | | | | | | | | Add missing GUID short text used in the efidebug tables and efidebug dh sub-commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: fix documentation in efi_loader.hHeinrich Schuchardt2021-02-261-7/+13
| | | | | | | | | | | | Correct missing descriptions and typos in efi_loader.h. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: limit output length for VenHw, VenMediaHeinrich Schuchardt2021-02-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | VenHw and VenMedia device path nodes may carry vendor defined data of arbitrary length. When converting a device path node to text ensure that we do not overrun our internal buffer. In our implementation of EFI_DEVICE_PATH_TO_TEXT_PROTOCOL.ConvertDevicePathToText() we could first determine the output length and then allocate buffers but that would nearly double the code size. Therefore keep the preallocated buffers and truncate excessive device paths instead. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * tools/mkeficapsule.c: fix DEBUG buildKlaus Heinrich Kiwi2021-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix a missing comma sign (,) from a printf(), that is only reachable if DEBUG is defined, in which case the build fails with: tools/mkeficapsule.c:266:36: error: expected ‘)’ before ‘bin’ 266 | printf("\tbin: %s\n\ttype: %pUl\n" bin, guid); | ^~~~ | ) Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * MAINTAINERS: assign tools/mkeficapsule.c to EFI PAYLOADHeinrich Schuchardt2021-02-261-0/+1
| | | | | | | | | | | | | | tools/mkeficapsule.c is used to prepare test files for testing the UEFI sub-system. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: ACPI tables must be in EfiACPIReclaimMemoryHeinrich Schuchardt2021-02-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | The UEFI spec does not allow ACPI tables to be in runtime services memory. It recommends EfiACPIReclaimMemory. Remove a superfluous check that the allocated pages are 16 byte aligned. EFI pages are 4 KiB aligned. Fixes: 86df34d42b05 ("efi_loader: Install ACPI configuration tables") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usbTom Rini2021-02-2621-158/+543
|\ \ | | | | | | | | | - fastboot updates / fixes
| * | usb: gadget: dwc2_udc_otg: Fix dwc2_gadget_start() and ↵Patrice Chotard2021-02-261-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usb_gadget_register_driver() Since commit 8745b9ebccae ("usb: gadget: add super speed support") ums was no more functional on platform which use dwc2_udc_otg driver. This was due to a too restrictive test which checked that the gadget driver speed was either FS or HS. So all gadget driver with max speed set to speed higher than HS (SS in case of composite gadget driver in our case) are not allowed, which is wrong. Update the speed test in usb_gadget_register_driver() and in dwc2_gadget_start() to allow all gadget driver speed equal or higher than FS. Tested on stm32mp157c-ev1 board. Fixes: c791c8431c34 ("usb: dwc2: convert driver to DM_USB_GADGET") Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
| * | usb: kbd: Also accept keyboards with Interrupt OUT endpointStefan Brüns2021-02-261-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OUT endpoint can just be ignored as it is not used, just as the corresponding Set_Report request for IN-only interfaces. E.g. the Linux gadget hid keyboard also provides an interrupt endpoint. Also cleanup confusing debug messages like "found set protocol", which is printed when a keyboard device is found, while the Set_Protocol request is issued quite some time later. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
| * | fastboot: add UUU command UCmd and ACmd supportHeiko Schocher2021-02-266-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hs@denx.de> Acked-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
| * | doc: Document partition specificationsSean Anderson2021-02-263-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | This documents the way U-Boot understands partitions specifications. This also updates the fastboot documentation for the changes in the previous commit. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | doc: Rename k210 partitions anchorSean Anderson2021-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This anchor is only for the k210 partition layout, so rename it appropriately. This keeps it from conflicting with the (to be added) anchor for U-Boot partitions in general. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | fastboot: Allow u-boot-style partitionsSean Anderson2021-02-262-62/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for partitions of the form "dev.hwpart:part" and "dev#partname". This allows one to flash to eMMC boot partitions without having to use CONFIG_FASTBOOT_MMC_BOOT1_SUPPORT. It also allows one to flash to an entire device without needing CONFIG_FASTBOOT_MMC_USER_NAME. Lastly, one can also flash MMC devices other than CONFIG_FASTBOOT_FLASH_MMC_DEV. Because devices can be specified explicitly, CONFIG_FASTBOOT_FLASH_MMC_DEV is used only when necessary for existing functionality. For those cases, fastboot_mmc_get_dev has been added as a helper function. This allows There should be no conflicts with the existing system, but just in case, I have ordered detection of these names after all existing names. The fastboot_mmc_part test has been updated for these new names. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | fastboot: Move part_get_info_by_name_or_alias after raw_part_get_info_by_nameSean Anderson2021-02-261-22/+22
| | | | | | | | | | | | | | | | | | | | | This makes the next commit more readable by doing the move now. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | fastboot: Remove mmcpart argument from raw_part_get_info_by_nameSean Anderson2021-02-261-23/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only thing mmcpart was used for was to pass to blk_dselect_hwpart. This calls blk_dselect_hwpart directly from raw_part_get_info_by_name. The error handling is dropped, but it is reintroduced in the next commit (albeit less specificly). Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | part: Support string block devices in part_get_info_by_dev_and_nameSean Anderson2021-02-261-19/+22
| | | | | | | | | | | | | | | | | | | | | | | | This adds support for things like "#partname" and "0.1#partname". The block device parsing is done like in blk_get_device_part_str. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | part: Support getting whole disk from part_get_info_by_dev_and_name_or_numSean Anderson2021-02-263-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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 <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | part: Give several functions more useful return valuesSean Anderson2021-02-261-22/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | Several functions in disk/part.c just return -1 on error. This makes them return different errnos for different failures. This helps callers differentiate between failures, even if they cannot read stdout. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | test: dm: Add test for fastboot mmc partition namingSean Anderson2021-02-264-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | This test verifies the mapping between fastboot partitions and partitions as understood by U-Boot. It also tests the creation of GPT partitions, though that is not the primary goal. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>