summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge https://source.denx.de/u-boot/custodians/u-boot-x86Tom Rini2021-05-104-29/+76
|\ | | | | | | | | - x86: correct regwidth prompt in cbsysinfo - virtio: convert README.virtio to reST
| * MAINTAINERS: Add an entry for VirtIOBin Meng2021-05-101-0/+12
| | | | | | | | | | | | | | This was missed when VirtIO support was initially brought to U-Boot back in 2018. Add an entry for it and list myself as the maintainer. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
| * doc: develop: Convert README.virtio to reSTBin Meng2021-05-102-28/+63
| | | | | | | | | | | | | | This converts the existing README.virtio to reST, and puts it under the develop/driver-model/ directory. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
| * x86: Correct regwidth prompt in cbsysinfoSimon Glass2021-05-101-1/+1
|/ | | | | | | This should be 'regwidth', not 'baud'. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini2021-05-076-2/+51
|\
| * cmd/exception: support ebreak exception on RISC-VHeinrich Schuchardt2021-05-052-0/+13
| | | | | | | | | | | | | | | | The ebreak instruction should generate a breakpoint exception. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com>
| * atcspi200: Add timeout mechanism in spi_xfer()Dylan Jhong2021-05-051-2/+8
| | | | | | | | | | | | | | | | | | Adding timeout mechanism to avoid spi driver from stucking in the while loop in __atcspi200_spi_xfer(). Signed-off-by: Dylan Jhong <dylan@andestech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Rick Chen <rick@andestech.com>
| * riscv: cpu: fu740: clear feature disable CSRGreen Wan2021-05-051-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Clear feature disable CSR to turn on all features of hart. The detail is specified at section, 'SiFive Feature Disable CSR', in user manual https://sifive.cdn.prismic.io/sifive/aee0dd4c-d156-496e-a6c4-db0cf54bbe68_sifive_U74MC_rtl_full_20G1.03.00_manual.pdf Signed-off-by: Green Wan <green.wan@sifive.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com>
| * riscv: cpu: Add callback to init each coreGreen Wan2021-05-052-0/+15
| | | | | | | | | | | | | | | | | | | | | | Add a callback harts_early_init() to start.S to allow different riscv hart perform setup code for each hart as early as possible. Since all the harts enter the callback, they must be able to run the same setup. Signed-off-by: Green Wan <green.wan@sifive.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | Merge branch '2021-05-06-misc-updates'Tom Rini2021-05-0630-36/+516
|\ \ | |/ |/| | | | | | | | | | | - Allow for boards to update bootargs before booting the OS (helpful in some forms of secure boot). - Enhance GPT write support. - gpio-sysinfo updates - Allow env to be appended from dtb
| * fdt_support.c: Allow late kernel cmdline modificationNiko Mauno2021-05-042-1/+21
| | | | | | | | | | | | | | | | 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>
| * cmd: gpt: Add option to write GPT partitions to environment variableFarhan Ali2021-05-042-8/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change would enhance the existing 'gpt read' command to allow (optionally) writing of the read GPT partitions to an environment variable in the UBOOT partitions layout format. This would allow users to easily change the overall partition settings by editing said variable and then using the variable in the 'gpt write' and 'gpt verify' commands. Signed-off-by: Farhan Ali <farhan.ali@broadcom.com> Cc: Simon Glass <sjg@chromium.org> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Corneliu Doban <cdoban@broadcom.com> Cc: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
| * sandbox: add test of CONFIG_ENV_IMPORT_FDTRasmus Villemoes2021-05-045-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | Check that a variable defined in /config/environment is found in the run-time environment, and that clearing fdt_env_path from within that node works. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Acked-by: Joe Hershberger <joe.hershberger@ni.com> [trini: Conditionalize the test being linked in] Signed-off-by: Tom Rini <trini@konsulko.com>
| * env: allow environment to be amended from control dtbRasmus Villemoes2021-05-045-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * test: Add gpio-sysinfo testSean Anderson2021-05-048-0/+82
| | | | | | | | | | | | | | This adds a test for the gpio-sysinfo driver. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * sysinfo: Add gpio-sysinfo driverSean Anderson2021-05-044-0/+187
| | | | | | | | | | | | | | | | This uses the newly-added dm_gpio_get_values_as_int_base3 function to implement a sysinfo device. The revision map is stored in the device tree. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * sysinfo: Require that sysinfo_detect be called before other methodsSean Anderson2021-05-044-20/+64
| | | | | | | | | | | | | | | | | | | | 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>
| * sysinfo: Use global sysinfo IDs for existing sysinfo driversSean Anderson2021-05-042-4/+6
| | | | | | | | | | | | | | | | | | Since 07c9e683a4 ("smbios: Allow a few values to come from sysinfo") there are common global sysinfo IDs. This patch moved existing IDs above SYSINFO_ID_USER. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: gpio: Fix gpio_get_list_count failing with livetreeSean Anderson2021-05-041-3/+3
|/ | | | | | | | | | | | of_parse_phandle_with_args (called by dev_read_phandle_with_args) does not support getting the length of a phandle list by using the index -1. Instead, use dev_count_phandle_with_args which supports exactly this use-case. Fixes: 8558217153 ("gpio: Convert to use APIs which support live DT") Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge tag 'dm-pull-29apr21' of ↵WIP/29Apr2021Tom Rini2021-04-2930-277/+472
|\ | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-dm buildman environment fix binman FMAP improvements minor test improvements and fixes minor dm improvements
| * tpm: missing event typesHeinrich Schuchardt2021-04-291-8/+16
| | | | | | | | | | | | | | Add a reference for the TPM event types and provide missing constants. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
| * test: dm: add test item for ofnode_get_addr() and ofnode_get_size()Chen Guanqiao2021-04-291-0/+31
| | | | | | | | | | | | | | | | | | | | | | Add test item for getting address and size functions Test the following function: - ofnode_get_addr() - ofnode_get_size() Signed-off-by: Chen Guanqiao <chenguanqiao@kuaishou.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add size operations on device tree referencesChen Guanqiao2021-04-293-2/+24
| | | | | | | | | | | | | | | | | | | | Add functions to add size of addresses in the device tree using ofnode references. If the size is not set, return FDT_SIZE_T_NONE. Signed-off-by: Chen Guanqiao <chenguanqiao@kuaishou.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * buildman: Use bytes for the environmentSimon Glass2021-04-293-11/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | At present we sometimes see problems in gitlab where the environment has 0x80 characters or sequences which are not valid UTF-8. Avoid this by using bytes for the environment, both internal to buildman and when writing out the 'env' file. Add a test to make sure this works as expected. Reported-by: Marek Vasut <marex@denx.de> Fixes: e5fc79ea718 ("buildman: Write the environment out to an 'env' file") Signed-off-by: Simon Glass <sjg@chromium.org>
| * buildman: Handle exceptions in threads gracefullySimon Glass2021-04-294-11/+56
| | | | | | | | | | | | | | | | | | | | | | There have been at least a few cases where an exception has occurred in a thread and resulted in buildman hanging: running out of disk space and getting a unicode error. Handle these by collecting a list of exceptions, printing them out and reporting failure if any are found. Add a test for this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * buildman: Use common code to send an resultSimon Glass2021-04-291-8/+13
| | | | | | | | | | | | | | At present the code to report a build result is duplicated. Put it in a common function to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * buildman: Tidy up a few commentsSimon Glass2021-04-293-5/+20
| | | | | | | | | | | | Add some function comments which are missing, or missing arguments. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Fix uninitialized return value from dm_scan_fdt_nodeSean Anderson2021-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | If there are no nodes or if all nodes are disabled, this function would return err without setting it first. Fix this by initializing err to zero. Fixes: 94f7afdf7e ("dm: core: Ignore disabled devices when binding") Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add address translation in fdt_get_resourcePatrick Delaunay2021-04-296-24/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today of_address_to_resource() is called only in ofnode_read_resource() for livetree support and fdt_get_resource() is called when livetree is not supported. The fdt_get_resource() doesn't do the address translation so when it is required, but the address translation is done by ofnode_read_resource() caller, for example in drivers/firmware/scmi/smt.c::scmi_dt_get_smt_buffer() { ... ret = ofnode_read_resource(args.node, 0, &resource); if (ret) return ret; faddr = cpu_to_fdt32(resource.start); paddr = ofnode_translate_address(args.node, &faddr); ... The both behavior should be aligned and the address translation must be called in fdt_get_resource() and removed for each caller. Fixes: a44810123f9e ("dm: core: Add dev_read_resource() to read device resources") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
| * binman: Support adding sections to FMAPsSimon Glass2021-04-294-9/+50
| | | | | | | | | | | | | | When used with hierarchical images, use the Chromium OS convention of adding a section before all the subentries it contains. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Tweak implementation of fmapSimon Glass2021-04-291-31/+38
| | | | | | | | | | | | | | | | | | Use an interator in two of the fmap tests so it is easier to add new items. Also check the name first since that is the first indication that something is wrong. Use a variable for the expected size of the fmap to avoid repeating the code. Signed-off-by: Simon Glass <sjg@chromium.org>
| * patman: Parse checkpatch by message instead of by lineEvan Benn2021-04-292-92/+144
| | | | | | | | | | | | | | | | | | | | | | | | Parse each empty-line-delimited message separately. This saves having to deal with all the different line content styles, we only care about the header ERROR | WARNING | NOTE... Also make checkpatch print line information for a uboot specific warning. Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * patman: Assume we always have pygit2 for testsTom Rini2021-04-291-17/+2
| | | | | | | | | | | | | | | | Given that we have tests that require pygit2 and it can be installed like any other python module, fail much more loudly if it is missing. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
| * tests: patman: Add requests to the module listTom Rini2021-04-291-0/+1
| | | | | | | | | | | | | | The patman tests require the requests module, add it. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
| * Azure/GitLab: Ensure we use requirements.txt for testsuitesTom Rini2021-04-292-2/+2
| | | | | | | | | | | | | | | | | | Given that test/py/requirements.txt has all required test modules, make use of that rather than a manual pip install list before running our assorted tool testsuites. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * test: Use positive conditional in test_matches()Andy Shevchenko2021-04-291-6/+6
| | | | | | | | | | | | | | | | | | | | It is easier to read the positive conditional. While at it, convert hard coded length of "_test_" to strlen("_test_") which will be converted to a constant bu optimizing compiler. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test: Allow simple glob pattern in the test nameAndy Shevchenko2021-04-291-2/+9
| | | | | | | | | | | | | | | | | | When run `ut dm [test name]` allow to use simple pattern to run all tests started with given prefix. For example, to run all ACPI test cases: ut dm acpi* Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dtoc: Correct dtoc output when testingSimon Glass2021-04-292-53/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present each invocation of run_steps() updates OUTPUT_FILES_COMMON, since it does not make a copy of the dict. This is fine for a single invocation, but for tests, run_steps() is invoked many times. As a result it may include unwanted items from the previous run, if it happens that a test runs twice on the same CPU. The problem has not been noticied previously, as there are few enough tests and enough CPUs that is is rare for the 'wrong' combination of tests to run together. Fix this by making a copy of the dict, before updating it. Update the tests to suit, taking account of the files that are no-longer generated. With this fix, we no-longer generate files which are not needed for a particular state of OF_PLATDATA_INST, so the check_instantiate() function is not needed anymore. It has become dead code and so fails the code-coverage test (dtoc -T). Remove it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Correct testSplNoDtb() and Tpl alsoSimon Glass2021-04-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | These two tests require an ELF image so that symbol information can be written into the SPL/TPL binary. At present they rely on other tests having set it up first, but every test must run independently. This can cause occasional errors in CI. Fix this by setting up the required files, as other tests do. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* | Merge tag 'xilinx-for-v2021.07-rc2' of ↵Tom Rini2021-04-2919-95/+189
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2021.07-rc2 xilinx: - Enable saving variables based on bootmode - Cleanup usb dfu setup and wire it up with usb bootmode - Fix bootscript address logic - Remove GD references (spi, Versal) - Enable capsule update clk: - Small Kconfig fix net: - Fix gmii2rgmii bridge binding usb: - Propagate error (dfu gadget)
| * | spi: zynqmp: Remove gd referenceMichal Simek2021-04-291-3/+0
| | | | | | | | | | | | | | | | | | gd is not used in this file that's why doesn't make sense to declare it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | net: phy: xilinx: Break while loop over ethernet phyMichal Simek2021-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 6c993815bbea ("net: phy: xilinx: Be compatible with live OF tree") change driver behavior to while loop which wasn't correct because the driver was looping over again and again. The reason was that ofnode_valid() is taking 0 as correct value. Fix it by changing while loop to ofnode_for_each_subnode() which is only loop over available nodes. Fixes: 6c993815bbea ("net: phy: xilinx: Be compatible with live OF tree") Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | arm64: zynqmp: Enable capsule updateMichal Simek2021-04-262-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable EFI capsule update features to be enabled by default also with all dfu valid options for ZynqMP. This feature was tested on Xilinx ZynqMP zcu104 board with defining dfu_alt_info="mmc 0:1=boot.bin fat 0 1;u-boot.itb fat 0 1" and dfu_alt_info="sf 0:0=boot.bin raw 0 0x50000;u-boot.itb raw 0x80000 0x500000". There is a need to increase malloc size for getting dfu mmc to work. Signed-off-by: Michal Simek <michal.simek@xilinx.com> CC: Sughosh Ganu <sughosh.ganu@linaro.org> CC: Ilias Apalodimas <ilias.apalodimas@linaro.org> CC: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | arm64: versal: Remove gd referenceMichal Simek2021-04-231-3/+0
| | | | | | | | | | | | | | | | | | gd is not used in this file that's why doesn't make sense to declare it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | clk: Fix typo in Zynq Kconfig symbol descriptionMichal Simek2021-04-231-1/+1
| | | | | | | | | | | | | | | | | | Trivial typo fix. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: Enable GUID partitions and EFI variable commandsMichal Simek2021-04-232-0/+5
| | | | | | | | | | | | | | | | | | | | | For work with EFI it is good to have GUID partitions enabled and also option to work with UEFI variables. That's why enable both. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: common: Fix boot script addressT Karthik Reddy2021-04-231-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently u-boot supports addresses upto 39-bits only. If anybody wants to use addresses of more than 39-bits in Linux they will have a separate memory node in DT. In such cases they will have multiple memory nodes. Currently u-boot selects and runs on lower memory bank region. But bootscript is being loaded on dram bank 0, where dram bank 0 will point to 1st memory node in DT. If first memory node is mentioned as higher ddr(>39-bits address) then u-boot cannot load the bootscript. So fix this issue by setting bootscript address within the lower memory bank region. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: Enable DFU_TIMEOUT configT Karthik Reddy2021-04-232-0/+2
| | | | | | | | | | | | | | | | | | | | | Enable CONFIG_DFU_TIMEOUT to set timeout waiting for dfu command. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: zynq: Add usb dfu/thor distro boot supportT Karthik Reddy2021-04-233-33/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for usb dfu & thor to distro boot on zynq platform. Add 60s timeout of dfu-utils to start transaction. Remove DFU_ALT_INFO_RAM as we use bootcmd_usb_dfu instead of dfu_ram. Remove DFU_ALT_INFO_MMC as part of distro boot cleanup. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | xilinx: versal: Add usb dfu/thor distro boot supportT Karthik Reddy2021-04-232-26/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change "dfu_usb" to "usb_dfu" for better representation and change required macros. Add 60s timeout of dfu-utils to start transaction. Add support for usb thor to distro boot. Remove DFU_ALT_INFO_RAM as we use bootcmd_usb_dfu instead of dfu_ram. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>