summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* travis: Install pyelftools via pipTom Rini2020-07-271-1/+1
| | | | | | | | | | With the migration to python3 for all of our tests, we need to install pyelftools via pip now rather than the system tools as they will otherwise not be present in our virtualenv. Signed-off-by: Tom Rini <trini@konsulko.com> --- Changes in v2: Switch to pip
* Merge tag 'dm-pull-20jul20-take2a' of ↵Tom Rini2020-07-27321-656/+2548
|\ | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-dm binman support for FIT new UCLASS_SOC patman switch 'test' command minor fdt fixes patman usability improvements
| * binman: Re-enable concurrent testsSimon Glass2020-07-261-1/+3
| | | | | | | | | | | | | | | | | | | | With the change to absolute imports the concurrent tests feature unfortunately broke. Fix it. We cannot easy add a warning, since the output messes up tests which check the output. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Don't change the descriptor in testsSimon Glass2020-07-263-5/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | At present testPackX86RomMeNoDesc removes the contents of the descriptor.bin file and testPackX86RomMeMissingDesc removes the file completely. If a test that relies on this file happens to run after it is removed, it will not work. Since we have no control over the selecting of tests that run in parallel and series, we must avoid changing the files. Update this tests to use separate files instead. Signed-off-by: Simon Glass <sjg@chromium.org>
| * treewide: convert devfdt_get_addr() to dev_read_addr()Masahiro Yamada2020-07-25120-125/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you enable CONFIG_OF_LIVE, you will end up with a lot of conversions. To generate this commit, I used coccinelle excluding drivers/core/, include/dm/, and test/ The semantic patch that makes this change is as follows: <smpl> @@ expression dev; @@ -devfdt_get_addr(dev) +dev_read_addr(dev) </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * treewide: remove (phys_addr_t) casts from devfdt_get_addr()Masahiro Yamada2020-07-255-5/+5
| | | | | | | | | | | | This cast is unneeded. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr()Masahiro Yamada2020-07-2546-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the _ptr suffixed variant instead of casting. Also, convert it to dev_read_addr_ptr(), which is safe to CONFIG_OF_LIVE. One curious part is an error check like follows in drivers/watchdog/omap_wdt.c: priv->regs = (struct wd_timer *)devfdt_get_addr(dev); if (!priv->regs) return -EINVAL; devfdt_get_addr() returns FDT_ADDR_T_NONE (i.e. -1) on error. So, this code does not catch any error in DT parsing. dev_read_addr_ptr() returns NULL on error, so this error check will work. I generated this commit by the following command: $ find . -name .git -prune -o -name '*.[ch]' -type f -print | \ xargs sed -i -e 's/([^*)]*\*)devfdt_get_addr(/dev_read_addr_ptr(/' I manually fixed drivers/usb/host/ehci-mx6.c Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * fdt_support: skip MTD node with "disabled" in fdt_fixup_mtdparts()Masahiro Yamada2020-07-251-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | Currently, fdt_fixup_mtdparts() only checks the compatible property. It is pointless to fix up the disabled node. Skip the node if it has the property: status = "disabled" Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * fdt_support: call mtdparts_init() after finding MTD node to fix upMasahiro Yamada2020-07-251-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Platform code can call fdt_fixup_mtdparts() in order to hand U-Boot's MTD partitions over to the Linux device tree. Currently, fdt_fixup_mtdparts() calls mtdparts_init() in its entry. If no target MTD device is found, an error message like follows is displayed: Device nand0 not found! This occurs when the same code (e.g. arch/arm/mach-uniphier/fdt-fixup.c) is shared among several boards, but not all of them support an MTD device. Parse the DT first, then call mtdparts_init() only when the target MTD node is found. Yet, you still need to call mtdparts_init() before device_find(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test/dm: check if devices existHeinrich Schuchardt2020-07-255-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | Running 'ut dm' on the sandbox without -D or -d results in segmentation faults due to NULL pointer dereferences. Check that device pointers are non-NULL before using them. Use ut_assertnonnull() for pointers instead of ut_assert(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Philippe Reynes <philippe.reynes@softathome.com>
| * arm: mach-k3: Use SOC driver for device identificationDave Gerlach2020-07-253-36/+19
| | | | | | | | | | | | | | Make use of UCLASS_SOC to find device family and revision for print_cpuinfo. Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
| * configs: j721e_evm: Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3Dave Gerlach2020-07-254-0/+8
| | | | | | | | | | | | | | Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3 so the TI K3 SoC driver can be used for SoC detection. Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
| * configs: am65x_evm: Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3Dave Gerlach2020-07-254-0/+8
| | | | | | | | | | | | | | Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3 so the TI K3 SoC driver can be used for SoC detection. Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
| * arm: dts: k3-j721e-mcu-wakeup: Introduce chipid nodeDave Gerlach2020-07-252-0/+9
| | | | | | | | | | | | | | Introduce a chipid node to provide a UCLASS_SOC driver to identify TI K3 SoCs. Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
| * arm: dts: k3-am65-wakeup: Introduce chipid nodeDave Gerlach2020-07-252-0/+9
| | | | | | | | | | | | | | Introduce a chipid node to provide a UCLASS_SOC driver to identify TI K3 SoCs. Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
| * dm: soc: Introduce soc_ti_k3 driver for TI K3 SoCsDave Gerlach2020-07-253-0/+132
| | | | | | | | | | | | | | | | | | | | | | Introduce an soc_ti_k3_driver that allows identification and selection of SoC specific data based on the JTAG ID register for device identification, as described for AM65x[0] and J721E[1] devices. [0] http://www.ti.com/lit/ug/spruid7e/spruid7e.pdf [1] http://www.ti.com/lit/ug/spruil1a/spruil1a.pdf Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
| * test: Add tests for SOC uclassDave Gerlach2020-07-259-0/+186
| | | | | | | | | | | | | | Add a sandbox SOC driver, and some tests for the SOC uclass. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
| * dm: soc: Introduce UCLASS_SOC for SOC ID and attribute matchingDave Gerlach2020-07-255-0/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce UCLASS_SOC to be used for SOC identification and attribute matching based on the SoC ID info. This allows drivers to be provided for SoCs to retrieve SoC identifying information and also for matching device attributes for selecting SoC specific data. This is useful for other device drivers that may need different parameters or quirks enabled depending on the specific device variant in use. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
| * doc: Add new doc for soc ID driver modelDave Gerlach2020-07-252-0/+69
| | | | | | | | | | | | | | | | | | Add a new documentation file for UCLASS_SOC and its usage to describe the SoC Device ID framework that allows SoC identification and device data matching. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * fdt_support: add static to fdt_node_set_part_info()Masahiro Yamada2020-07-251-2/+2
| | | | | | | | | | | | | | This function is only called from fdt_fixup_mtdpart() in the same file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * patman: When no tracking branch is provided, tell the userNicolas Boichat2020-07-251-2/+3
| | | | | | | | | | | | | | | | The user can either count the number of patches, or provide a tracking branch. Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * patman: Make sure sendemail.suppresscc is (un)set correctlyNicolas Boichat2020-07-252-0/+27
| | | | | | | | | | | | | | | | | | Setting sendemail.suppresscc to all or cccmd leads to --cc-cmd parameter being ignored, and emails going either nowhere, or just to the To: line maintainer. Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * Revert "lib: fdt: Split fdtdec_setup_mem_size_base()"Michal Simek2020-07-252-28/+3
| | | | | | | | | | | | | | | | | | This reverts commit 3ebe09d09a407f93022d945a205c5318239eb3f6. There is no user of this split function that's why remove it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * Revert "lib: fdt: Split fdtdec_setup_memory_banksize()"Michal Simek2020-07-252-31/+6
| | | | | | | | | | | | | | | | | | This reverts commit 118f4d4559a4386fa87a1e2509e84a1986b24a34. There is no user of this split function that's why remove it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * ARM: rmobile: Switch back to fdtdec_setup_memory/banksize_fdt()Michal Simek2020-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The commit 361377dbdbc9 ("ARM: rmobile: Merge prior-stage firmware DT fragment into U-Boot DT on Gen3") reverted changes introduced by commit 175f5027345c ("ARM: renesas: Configure DRAM size from ATF DT fragment") that's why there is no reason to use functions with _fdt() suffix because parameter is gd->fdt_blob as is already for functions without _fdt() suffix. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * Add information for skipped commit optionsPatrick Delaunay2020-07-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unsupported Commit-xxx option are silently skipped and removed as 're_remove=Commit-\w*', this patch adds warning message in this case to detect misspelled issue for the 2 supported options: Commit-notes: Commit-changes: For example: the final 's' is missing (Commit-note:) NB: no issue for Series-xxx option as only the supported options are accepted (see valid_series in series.py) Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * lib: libfdt: fdt_region: avoid NULL pointer accessPhilippe Reynes2020-07-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The function fdt_find_regions look in the exclude list for each property, even if the name is NULL. It could happen if the fit image is corrupted. On sandbox, it generates a segfault. To avoid this issue, if the name of a property is NULL, we report an error and avoid looking in the exclude list. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * patman: Detect unexpected ENDPatrick Delaunay2020-07-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detect unexpected 'END' line when a section is not detected. This patch detect issue when tag name for section start is misspelled, for example 'Commit-note:' for 'Commit-notes:' Commit-note: .... END Then 'Commit-note:' is removed silently by re_remove = "Commit-\w*:" but 'END' is kept in commit message. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * cpu: Convert the methods to use a const udevice *Simon Glass2020-07-2515-58/+63
| | | | | | | | | | | | | | These functions should not modify the device. Convert them to const so that callers don't need to cast if they have a const udevice *. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Add support for generating a FITSimon Glass2020-07-255-0/+384
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FIT (Flat Image Tree) is the main image format used by U-Boot. In some cases scripts are used to create FITs within the U-Boot build system. This is not ideal for various reasons: - Each architecture has its own slightly different script - There are no tests - Some are written in shell, some in Python To help address this, add support for FIT generation to binman. This works by putting the FIT source directly in the binman definition, with the ability to adjust parameters, etc. The contents of each FIT image come from sub-entries of the image, as is normal with binman. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Allow adding variable-sized data to a dtbSimon Glass2020-07-252-2/+19
| | | | | | | | | | | | | | Add a method for adding a property containing arbitrary bytes. Make sure that the tree can expand as needed in this case. Signed-off-by: Simon Glass <sjg@chromium.org>
| * mkimage: Allow updating the FIT timestampSimon Glass2020-07-254-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Normally the FIT timestamp is created the first time mkimage is run on a FIT, when converting the source .its to the binary .fit file. This corresponds to using the -f flag. But if the original input to mkimage is a binary file (already compiled) then the timestamp is assumed to have been set previously. Add a -t flag to allow setting the timestamp in this case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * binman: Allow zero-length entries to overlapSimon Glass2020-07-253-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | Some binary blobs unfortunately obtain their position in the image from other binary blobs, such as Intel's 'descriptor'. In this case we cannot rely on packing to work. It is not possible to produce a valid image in any case, due to the missing blobs. Allow zero-length overlaps so that this does not cause any problems. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * binman: Allow missing Intel blobsSimon Glass2020-07-254-14/+55
| | | | | | | | | | | | | | Update the Intel blob entries to support missing binaries. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * binman: Detect when valid images are not producedSimon Glass2020-07-257-3/+76
| | | | | | | | | | | | | | When external blobs are missing, show a message indicating that the images are not functional. Signed-off-by: Simon Glass <sjg@chromium.org>
| * patman: Update errors and warnings to use stderrSimon Glass2020-07-252-2/+5
| | | | | | | | | | | | | | | | When warnings and errors are produced by tools they should be written to stderr. Update the tout implementation to handle this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * binman: Allow external binaries to be missingSimon Glass2020-07-258-8/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes it is useful to build an image even though external binaries are not present. This allows the build system to continue to function without these files, albeit not producing valid images. U-Boot does with with ATF (ARM Trusted Firmware) today. Add a new flag to binman to request this behaviour. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * binman: Convert existing binary blobs to blob_extSimon Glass2020-07-2516-39/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | Many of the existing blobs rely on external binaries which may not be available. Move them over to use blob_ext to indicate this. Unfortunately cros-ec-rw cannot use this class because it inherits another. So set the 'external' value for that class. While we are here, drop the import of Entry since it is not used (and pylint3 complains). Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Add an etype for external binary blobsSimon Glass2020-07-255-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | It is useful to be able to distinguish between ordinary blobs such as u-boot.bin and external blobs that cannot be build by the U-Boot build system. If the external blobs are not available for some reason, then we know that a value image cannot be built. Introduce a new 'blob-ext' entry type for that. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * binman: Use super() instead of specifying parent typeSimon Glass2020-07-2557-87/+86
| | | | | | | | | | | | | | | | It is easier and less error-prone to use super() when the parent type is needed. Update binman to remove the type names. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * binman: Adjust pylibfdt for incremental buildSimon Glass2020-07-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the pylibfdt shared-object file is detected, then Python assumes that the libfdt.py file exists also. Sometimes when an incremental build aborts, the shared-object file is built but the libfdt.py is not. The only way out at this point is to use 'make mkproper', or similar. Fix this by removing the .so file before it is built. This seems to make Python rebuild everything. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * binman: Fix a few typos in the entry docsSimon Glass2020-07-242-2/+2
| | | | | | | | | | | | | | Some typos have been fixed in the generated entry docs but the code was not updated. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Add support for calling mkimageSimon Glass2020-07-245-0/+120
| | | | | | | | | | | | | | | | As a first step to integrating mkimage into binman, add a new entry type that feeds data into mkimage for processing and incorporates that output into the image. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Set a default toolpathSimon Glass2020-07-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | When binman is run from 'make check' it is given a toolpath so that the latest tools (e.g. mkimage) are used. When run manually with no toolpath, it relies on the system mkimage. But this may be missing or old. Make some effort to find the built-from-soruce version by looking in the current directory and in the builds created by 'make check'. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Specify the toolpath when running test coverageSimon Glass2020-07-242-6/+13
| | | | | | | | | | | | | | | | | | | | | | At present binman's test coverage runs without a toolpath set. This means that the system tools will be used. That may not be correct if they are out of date or missing and this can result in a reduction in test coverage below 100%. Provide the toolpath to binman in this case. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Correct the search patch for pylibfdtSimon Glass2020-07-241-0/+1
| | | | | | | | | | | | | | | | | | Now that binman uses tools/ as its base directory for importing modules, the path to the pylibfdt build by U-Boot is incorrect. Fix it with a new path. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * binman: cbfs: Fix IFWI typoSimon Glass2020-07-241-1/+1
| | | | | | | | | | | | | | This comment references the wrong thing. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * binman: Output errors to stderrSimon Glass2020-07-241-1/+1
| | | | | | | | | | | | | | | | | | At present binman outputs errors to stdout which means that fails are effectively silent when printed by buildman, for example. Fix this by outputing errors to stderr. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * .gitignore: Ignore Python 3 cache directoriesSimon Glass2020-07-241-0/+3
| | | | | | | | | | | | | | | | These can appear when moving between branches that have different tools in the tree. Ignore them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * dm: core Fix long line in device_bind_common()Simon Glass2020-07-241-1/+2
| | | | | | | | | | | | | | Fix an over-length line in this function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>