summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* board: sifive: add HiFive Unmatched board supportGreen Wan2021-05-311-2/+2
| | | | | | | | Add defconfig and board support for HiFive Unmatched. Signed-off-by: Green Wan <green.wan@sifive.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com>
* Revert "lib: introduce HASH_CALCULATE option"Alexandru Gagniuc2021-05-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When we think of Kconfig, we usually think of features that we like to enable or not. Ideally, we wouldn't use Kconfig to fix a build issue, although sometimes it might make sense. With Kconfig it's hard to guarantee that the fix is universal. We can only say that it works for the set of tested configurations. In the majority of cases, it's preferable to let the linker figure things out for us. The reverted commit attempted to fix a build issue by adding an invisible Kconfig option. This is wrong in several ways: It invents a new Kconfig variable when CONFIG_HASH already exists for the same purpose. Second, hash-checksum.c makes use of the hash_progressive_lookup_algo() symbol, which is only provided with CONFIG_HASH, but this dependency was not expressed in the reverted patch. It feels like Kconfig is turning into a listing of all available source files, and a buffet to 'select' which ones to compile. The purpose of this revert is to enable the next change to make use of CONFIG_HASH instead of adding to Kconfig. This reverts commit 87316da05f2fd49d3709275e64ef0c5980366ade. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Acked-by: Masahisa Kojima <masahisa.kojima@linaro.org>
* spl: Kconfig: Use tabs instead of space for alignmentMichal Simek2021-05-261-12/+12
| | | | | | | | A lot of entries were using spaces instead of tab for alignment that's why it is good to fix it to use the same style everywhere. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* riscv: Drop USE_SPL_FIT_GENERATORBin Meng2021-05-191-2/+1
| | | | | | | | | Now that we have switched to binman to generate u-boot.itb for all RISC-V boards, USE_SPL_FIT_GENERATOR is no longer needed and can be dropped. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* common: kconfig: Correct a typo in SPL_LOAD_FITBin Meng2021-05-191-1/+1
| | | | | | | | It should be FDT, not FTD. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Rick Chen <rick@andestech.com>
* Merge branch '2021-05-17-assorted-fixes'Tom Rini2021-05-181-2/+2
|\
| * cli: slighly more clear error messagespeng.wang@smartm.com2021-05-171-2/+2
| | | | | | | | | | | | This patch tries to distinguish two error messages. Signed-off-by: peng.wang@smartm.com <peng.wang@smartm.com>
* | lib: introduce HASH_CALCULATE optionMasahisa Kojima2021-05-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Build error occurs when CONFIG_EFI_SECURE_BOOT or CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled, because hash-checksum.c is not compiled. Since hash_calculate() implemented in hash-checksum.c can be commonly used aside from FIT image signature verification, this commit itroduces HASH_CALCULATE option to decide if hash-checksum.c shall be compiled. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | hash: Kconfig option for SHA512 hardware accelerationHeinrich Schuchardt2021-05-181-4/+4
|/ | | | | | | | | | | | | | | | | | | | | | Commit a479f103dc1c ("hash: Allow for SHA512 hardware implementations") defined function definitions for hardware accelerated SHA384 and SHA512. If CONFIG_SHA_HW_ACCEL=y, these functions are used. We already have boards using CONFIG_SHA_HW_ACCEL=y but none implements the new functions hw_sha384() and hw_sha512(). For implementing the EFI TCG2 protocol we need SHA384 and SHA512. The missing hardware acceleration functions lead to build errors on boards like peach-pi_defconfig. Introduce a new Kconfig symbol CONFIG_SHA512_HW_ACCEL to control if the functions hw_sha384() and hw_sha512() shall be used to implement the SHA384 and SHA512 algorithms. Fixes: a479f103dc1c ("hash: Allow for SHA512 hardware implementations") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* fdt_support: move fdt_valid from cmd_fdt.c to fdt_support.cKory Maincent2021-05-131-0/+46
| | | | | | | | | | | | Move the fdt_valid function to fdt_support. This changes allow to be able to test the validity of a devicetree in other c files. Update code syntax. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Maxime Ripard <maxime@cerno.tech>
* Revert "fdt: translate address if #size-cells = <0>"Dario Binacchi2021-05-121-4/+2
| | | | | | | | | | | | | | | | This reverts commit d64b9cdcd475eb7f07b49741ded87e24dae4a5fc. As pointed by [1] and [2], the reverted patch made every DT 'reg' property translatable. What the patch was trying to fix was fixed in a different way from previously submitted patches which instead of correcting the generic address translation function fixed the issue with appropriate platform code. [1] https://patchwork.ozlabs.org/project/uboot/patch/1614324949-61314-1-git-send-email-bmeng.cn@gmail.com/ [2] https://lore.kernel.org/linux-clk/20210402192054.7934-1-dariobin@libero.it/T/ Signed-off-by: Dario Binacchi <dariobin@libero.it> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* fdt_support.c: Allow late kernel cmdline modificationNiko Mauno2021-05-041-1/+11
| | | | | | | | By declaring board-specific board_fdt_chosen_bootargs() the kernel command line arguments can be adjusted before injecting to flat dt chosen node. Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
* env: allow environment to be amended from control dtbRasmus Villemoes2021-05-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It can be useful to use the same U-Boot binary for multiple purposes, say the normal one, one for developers that allow breaking into the U-Boot shell, and one for use during bootstrapping which runs a special-purpose bootcmd. Or one can have several board variants that can share almost all boot logic, but just needs a few tweaks in the variables used by the boot script. To that end, allow the control dtb to contain a /config/enviroment node (or whatever one puts in fdt_env_path variable), whose property/value pairs are used to update the run-time environment after it has been loaded from its persistent location. The indirection via fdt_env_path is for maximum flexibility - for example, should the user wish (or board logic dictate) that the values in the DTB should no longer be applied, one simply needs to delete the fdt_env_path variable; that can even be done automatically by including a fdt_env_path = ""; property in the DTB node. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* sysinfo: Require that sysinfo_detect be called before other methodsSean Anderson2021-05-041-0/+4
| | | | | | | | | | This has the uclass enforce calling detect() before other methods. This allows drivers to cache information in detect() and perform (cheaper) retrieval in the other accessors. This also modifies the only instance where this sequencing was not followed. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* IOMUX: Fix buffer overflow in iomux_replace_device()Yuichiro Goto2021-04-271-2/+6
| | | | | | | | | | | | | Use of strcat() against an uninitialized buffer would lead to buffer overflow. This patch fixes it. Fixes: 694cd5618c ("IOMUX: Introduce iomux_replace_device()") Signed-off-by: Yuichiro Goto <goto@k-tech.co.jp> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
* common: edid: Search for valid timing in extension blockJernej Skrabec2021-04-241-0/+18
| | | | | | | | | | | | | One of my monitors have only 4k@60 timing in base EDID block which is out of range for devices with HDMI 1.4. It turns out that it has additional detailed timings in CTA-861 Extension Block and two of them are appropriate for HDMI 1.4. Add additional search for valid detailed timing in extension block. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Acked-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
* common: edid: extract code for detailed timing searchJernej Skrabec2021-04-241-21/+28
| | | | | | | | | | | | | | Code which searches for valid detailed timing entry will be used in more places. Extract it. No functional change is made. However, descriptors are casted to edid_detailed_timing instead of edid_monitor_descriptor. Descriptor can be of either type, but since we're interested only in DTD, it is more fitting to cast to edid_detailed_timing. Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
* common: edid: check for digital display earlierJernej Skrabec2021-04-241-4/+5
| | | | | | | | | | When searching for detailed timing in EDID, check for digital display earlier. There is no point parsing other parameters if this flag is not present. Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
* Add support for stack-protectorJoel Peshkin2021-04-203-0/+38
| | | | | | | | | | Add support for stack protector for UBOOT, SPL, and TPL as well as new pytest for stackprotector Signed-off-by: Joel Peshkin <joel.peshkin@broadcom.com> Adjust UEFI build flags. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* Revert "spl: Drop bd_info in the data section"Alexandru Gagniuc2021-04-192-21/+8
| | | | | | | | | | | | | | | | | | | | | This reverts commit 38d6b7ebdaee3e0e8426ef1b9df88bdce8ae2e75. struct global_data contains a pointer to the bd_info structure. This pointer was populated spl_set_bd() to a pre-allocated bd_info in the ".data" section. The referenced commit replaced this mechanism to one that uses malloc(). That new mechanism is only used if SPL_ALLOC_BD=y. which very few boards do. The result is that (struct global_data)->bd is NULL in SPL on most platforms. This breaks falcon mode, since arch_fixup_fdt() tries to access (struct global_data)->bd and set the "/memory" node in the devicetree. The result is that the "/memory" node contains garbage values, causing linux to panic() as it sets up the page table. Instead of trying to fix the mess, potentially causing other issues, revert to the code that worked, while this change is reworked. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
* image-fit: Accept OP-TEE images when booting a FITAlexandru Gagniuc2021-04-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | OP-TEE images are normally packaged with type = "tee; os = "tee"; However, fit_image_load() thinks that is somehow invalid. However if they were declared as type = "kernel", os = "linux", fit_image_load() would happily accept them and allow the boot to continue. There is no technical limitation to excluding "tee". Allowing "tee" images is useful in a boot flow where OP-TEE is executed before linux. In fact, I think it's unintuitive for a "load"ing function to also do parsing and contain a bunch ad-hoc heuristics that only its caller might know. But I don't make the rules, I just write fixes. In more polite terms: refactoring the fit_image API is beyond the scope of this change. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* image-fit: Accept IH_TYPE_FIRMWARE in fit_image_load() as validAlexandru Gagniuc2021-04-141-0/+2
| | | | | | | | | | | | | | | | | | | | | Consider the following FIT: images { whipple {}; }; configurations { conf-1 { firmware = "whipple"; }; }; Getting the 'firmware' image with fit_image_load() is not possible, as it doesn't understand 'firmware =' properties. Although one could pass IH_TYPE_FIRMWARE for 'image_type', this needs to be converted to a "firmware" string for FDT lookup -- exactly what this change does. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* spl: LOAD_FIT_FULL: Support 'kernel' and 'firmware' propertiesAlexandru Gagniuc2021-04-141-1/+18
| | | | | | | | The 'firmware' property of a config node takes precedence over the 'kernel' property. 'standalone' is deprecated. However, give users a couple of releases where 'standalone' still works, but warns loudly. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
* spl: LOAD_FIT_FULL: Relocate FDT for u-boot payloadsAlexandru Gagniuc2021-04-141-1/+11
| | | | | | | | | | | | | | | | | U-Boot expects the FDT to be located right after the _end linker symbol (see fdtdec.c: board_fdt_blob_setup()) The "basic" LOAD_FIT path is aware of this limitation, and relocates the FDT at the expected location. Guessing the expected location probably only works reliably on 32-bit arm, and it feels like a hack. One proposal would be to pass the FDT address to u-boot (e.g. using 'r2' on arm platforms). The variable is named "fdt_hack" to remind future contributors that, "hey! we should fix the underlying problem". However, that is beyond the scope of this patch. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
* spl: LOAD_FIT_FULL: Do not hard-code os to IH_OS_U_BOOTAlexandru Gagniuc2021-04-141-2/+3
| | | | | | | | | | The information on the OS should be contained in the FIT, as the self-explanatory "os" property of a node under /images. Hard-coding this to U_BOOT might send us down the wrong path later in the boot process. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
* spl: LOAD_FIT_FULL: Fix selection of the "fdt" nodeAlexandru Gagniuc2021-04-141-3/+1
| | | | | | | | | | | | | | | | | | | The correct FDT to use is described by the "fdt" property of the configuration node. When the fit_unamep argument to fit_image_load() is "fdt", we get the "/images/fdt" node. This is incorrect, as it ignores the "fdt" property of the config node, and in most cases, the "/images/fdt" node doesn't exist. Use NULL for the 'fit_unamep' argument. With NULL, fit_image_load() uses the IH_TYPE_FLATDT value to read the config property "fdt", which points to the correct FDT node(s). fit_image_load() should probably be split into a function that reads an image by name, and one that reads an image by config reference. I don't make those decisions, I just point out the craziness. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* common: fit: Add weak board_fit_config_name_matchSean Anderson2021-04-141-0/+5
| | | | | | | | | | Several architectures had a default board_fit_config_name_match already; this provides a generic weak version. We default to rejecting all configs. This will use the FIT's default config, instead of the first config. This may result in boot failures if there are multiple configurations and the first config is *not* the default. Signed-off-by: Sean Anderson <sean.anderson@seco.com>
* Kconfig: Document the limitations of the simple SPL_LOAD_FIT pathAlexandru Gagniuc2021-04-141-0/+10
| | | | | | | | | | | | | | The "simple" SPL_LOAD_FIT path is the most compliant with the format documented in doc/uImage.FIT/source_file_format.txt. The other two paths to load a FIT are SPL_LOAD_FIT_FULL and the "bootm" command. Since the Kconfig menu is the most likely place for a new user to see these options, it seems like the most logical candidate to document the limitations. This documents the _known_ issues, and is not intended to be a complete list of all follies. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* spl: fit: Support loading FPGA images from list of "loadables"Alexandru Gagniuc2021-04-141-0/+24
| | | | | | | | | | | | | Commit 4afc4f37c70e ("doc: FIT image: Clarify format and simplify syntax") and delegated FPGA images to be added via the list of "loadables" in lieu of the "fpga" property. Now actually implement this in code. Note that the "compatible" property is ignored for the time being, as implementing "compatible" loading is beyond the scope of this change. However, "u-boot,fpga-legacy" is accepted without warning. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
* spl: fit: Warn if FIT contains "fpga" property in config nodeAlexandru Gagniuc2021-04-141-0/+8
| | | | | | | | | | | | | Commit 4afc4f37c70e ("doc: FIT image: Clarify format and simplify syntax") requires that FPGA images be referenced through the "loadables" in the config node. This means that "fpga" properties in config nodes are deprecated. Given that there are likely FIT images which use "fpga", let's not break those right away. Print a warning message that such use is deprecated, and give users a couple of releases to update their Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
* spl: fit: Move FPGA loading code to separate functionsAlexandru Gagniuc2021-04-141-25/+45
| | | | | | | | | The FPGA loading code in spl_simple_fit_read() can easily be separated from the rest of the logic. It is split into two functions instead of one because spl_fit_upload_fpga() is used in a subsequent patch. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* spl: fit: Don't overwrite previous loadable if "load" is missingAlexandru Gagniuc2021-04-141-2/+9
| | | | | | | | | | | | | | | | | | | | | | | spl_load_fit_image() will try to load an image at the address given in the "load" property. Absent such property, it uses image_info->load_addr Correct use of this is demonstrated in spl_fit_append_fdt(), which resets the 'load_addr' before each spl_load_fit_image() call. On the other hand loading "loadables" loop in spl_load_simple_fit() completely ignores this. It re-uses the same structure, but doesn't reset load_addr. If loadable [i] does not have a "load" property, its load address defaults to load_addr, which still contains the address of loadable [i - 1]. A simple solution is to treat NULL as an invalid load address. The caller can set load_addr = 0 to request an abort if the "load" property is absent. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* lib: Add support for ECDSA image signingAlexandru Gagniuc2021-04-141-2/+9
| | | | | | | | | | | | | mkimage supports rsa2048, and rsa4096 signatures. With newer silicon now supporting hardware-accelerated ECDSA, it makes sense to expand signing support to elliptic curves. Implement host-side ECDSA signing and verification with libcrypto. Device-side implementation of signature verification is beyond the scope of this patch. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* lib: Rename rsa-checksum.c to hash-checksum.cAlexandru Gagniuc2021-04-142-2/+2
| | | | | | | | | | | rsa-checksum.c sontains the hash_calculate() implementations. Despite the "rsa-" file prefix, this function is useful for other algorithms. To prevent confusion, move this file to lib/, and rename it to hash-checksum.c, to give it a more "generic" feel. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* x86: qemu: move QFW to its own uclassAsherah Connor2021-04-122-0/+106
| | | | | | | | | | | | | We move qfw into its own uclass and split the PIO functions into a specific driver for that uclass. The PIO driver is selected in the qemu-x86 board config (this covers x86 and x86_64). include/qfw.h is cleaned up and documentation added. Signed-off-by: Asherah Connor <ashe@kivikakk.ee> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* hush: Fix assignments being misinterpreted as commandsSean Anderson2021-04-121-1/+1
| | | | | | | | | | | If there were no variable substitutions in a command, then initial assignments would be misinterpreted as commands, instead of being skipped over. This is demonstrated by the following example: => foo=bar echo baz Unknown command 'foo=bar' - try 'help' Signed-off-by: Sean Anderson <seanga2@gmail.com>
* hash: Allow for SHA512 hardware implementationsJoel Stanley2021-04-121-2/+22
| | | | | | | | Similar to support for SHA1 and SHA256, allow the use of hardware hashing engine by enabling the algorithm and setting CONFIG_SHA_HW_ACCEL / CONFIG_SHA_PROG_HW_ACCEL. Signed-off-by: Joel Stanley <joel@jms.id.au>
* lib: optee: migration optee_copy_fdt_nodes for OF_LIVE supportPatrick Delaunay2021-04-121-1/+1
| | | | | | | | | | | | | | | The optee_copy_fdt_nodes is only used to copy op-tee nodes of U-Boot device tree (from gd->fdt_blob when OF_LIVE is not activated) to external device tree but it is not compatible with OF_LIVE. This patch migrates all used function fdt_ functions to read node on old_blob to ofnode functions, compatible with OF_LIVE and remove this parameter "old_blob". The generated "device tree" is checked on stm32mp platform with OF_LIVE activated. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* board_f: cosmetic: change the debug trace to KB in reserve_videoPatrick Delaunay2021-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | Update the debug trace for the reserved video memory to KB as indicated in the message with "%luk"; before the patch the computed size gd->relocaddr - addr is in bytes. This patch aligns the debug trace in reserve_video() with others functions, for example on stm32mp157c-dk2: - Reserving 3080192k for video at: dfd00000 + Reserving 3008k for video at: dfd00000 Reserving 873k for U-Boot at: dfc25000 Reserving 32776k for malloc() at: ddc23000 Reserving 72 Bytes for Board Info at: ddc22fb0 Reserving 280 Bytes for Global Data at: ddc22e90 Reserving 119072 Bytes for FDT at: ddc05d70 Reserving 0x278 Bytes for bootstage at: ddc05af0 Fixes: 5630d2fbc50f3035 ("board: Show memory for frame buffers") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge tag 'u-boot-imx-20210409' of ↵Tom Rini2021-04-091-6/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20210409 ------------------- - Secure Boot : - HAB for MX8M / MX7ULP - CAAM fixes - Fixes for imxrt1020 - Fixes for USDHC driver - Fixes for Toradex (Colibri / Apalis) - Switch to DM for several boards - mx23 olinuxo - usbarmory - marsboard / riotboard - Gateworks GW Ventana - NXP upstream patches (LPDDR / CAAM / HAB) CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/7089
| * spl: fit: nand: allow for non-page-aligned elementsTim Harvey2021-04-081-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a weak nand_get_mtd function for nand drivers to provide mtd info and use this to set pagesize such that reading of non page-aligned elements can succeed. The spl_load_simple_fit already handles block block access so all we need to do is provide the nand writesize as the block length. Further cleanup of the drivers which use nand_spl_loaders.c such as am335x_spl_bch.c, atmel_nand.c, and nand_spl_simple.c could be done using info from mtd_info instead of statically defined details. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * spl: fit: nand: skip bad block handling if NAND chip not fully definedTim Harvey2021-04-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | commit 9f6a14c47ff9 ("spl: fit: nand: fix fit loading in case of bad blocks") added support for adjusting the image offset to account for bad blocks. However this requires nand_spl_adjust_offset() which requires fully defined specifics of the NAND chip being used may not be avialable. Allow skipping this support for drivers or configs which don't specify the NAND chip details statically with defines. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | riscv: sifive: Rename fu540 board to unleashedBin Meng2021-04-081-2/+3
|/ | | | | | | | In preparation to add SiFive Unmatched board support, let's rename the existing fu540 board to unleashed. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
* Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini2021-04-061-2/+3
|\ | | | | | | - XHCI fixes
| * usb: hub: Fix usb_get_port_status() for big-endian platformsAaron Williams2021-04-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add missing endianness conversions to usb_get_port_status(). This (amongst others) is necessary to enable the use of USB 3 hubs on big-endian platforms like MIPS Octeon. Signed-off-by: Aaron Williams <awilliams@marvell.com> Signed-off-by: Stefan Roese <sr@denx.de> Cc: Chandrakala Chavva <cchavva@marvell.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de>
* | Convert CONFIG_MISC_INIT_F to KconfigSimon Glass2021-04-061-0/+6
|/ | | | | | | | This converts the following to Kconfig: CONFIG_MISC_INIT_F Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
* Merge tag 'v2021.04-rc5' into nextTom Rini2021-03-292-2/+2
|\ | | | | | | Prepare v2021.04-rc5
| * avb: Fix error when partition not foundschspa2021-03-171-1/+1
| | | | | | | | | | | | | | | | part_get_info_by_name will return -1 on error, and >0 on success. Signed-off-by: schspa <schspa@gmail.com> Cc: Igor Opaniuk <igor.opaniuk@gmail.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
| * image: Avoid -ENODATA in host toolsSimon Glass2021-03-171-1/+1
| | | | | | | | | | | | | | | | | | Unfortunately -ENODATA is not available in OpenBSD. Use -EBADMSG instead, to indicate a missing timestamp. Fixes: c5819701a3d image: Adjust the workings of fit_check_format() Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
* | sysinfo: Allow showing model info from sysinfoSimon Glass2021-03-271-8/+29
| | | | | | | | | | | | | | | | | | Some boards may want to show the SKU ID or other information obtained at runtime. Allow this to come from sysinfo. The board can then provide a sysinfo driver to provide it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>