aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-10-31test: provide test for errno_str()Heinrich Schuchardt2-0/+47
Provide a unit test for errno_str(). Test that known and unknown error numbers are handled correctly. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-31lib: errno: check for unsupported error numberHeinrich Schuchardt1-1/+7
If errno_str() is called with an unsupported error number, do not return a random pointer but a reasonable text. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-31lib: time: Add microsecond timerMarek Vasut3-3/+15
Add get_timer_us(), which is useful e.g. when we need higher precision timestamps. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> [trini: Fixup arch/arm/mach-bcm283x/include/mach/timer.h] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-31NVMe: do PCI enumerate before nvme scanPatrick Wildt1-0/+1
Make sure that the PCI busses are enumerated before trying to find a NVMe device. Signed-off-by: Patrick Wildt <patrick@blueri.se> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-31nvme: use page-aligned buffer for identify commandPatrick Wildt1-6/+18
Change the stack-allocated buffer for the identification command to explicitly allocate page-aligned buffers. Even though the spec seems to allow having admin queue commands on non page-aligned buffers, it seems to not be possible on my i.MX8MQ board with a a Silicon Power P34A80. Since all of the NVMe drivers I have seen always do admin commands on a page-aligned buffer, which does work on my system, it makes sense for us to do that as well. Signed-off-by: Patrick Wildt <patrick@blueri.se> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-31nvme: flush dcache on both r/w, and the prp listPatrick Wildt1-3/+5
It's possible that the data cache for the buffer still holds data to be flushed to memory, since the buffer was probably used as stack before. Thus we need to make sure to flush it also on reads, since it's possible that the cache is automatically flused to memory after the NVMe DMA transfer happened, thus overwriting the NVMe transfer's data. Also add a missing dcache flush for the prp list. Signed-off-by: Patrick Wildt <patrick@blueri.se> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-31virtio: pci: use correct type in virtio_pci_bind()Heinrich Schuchardt1-1/+1
For printing as %u we should use an unsigned int. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-31checkpatch.pl: update from Linux kernel v5.4-rc3Heinrich Schuchardt1-113/+333
Update from upstream. Just minor changes like checking that the author has also done a sign-off. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-10-30dts: Kconfig: Fix help for SPL_OF_CONTROLWalter Lozano1-1/+1
As initially this feature was implemented as a negative CONFIG and later it was redesigned to be positive the help text should be updated to reflect this change. This commit updates the help text to match the current implementation. Signed-off-by: Walter Lozano <wlozano@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-30Makefile: Fix printing problem in size_check on overflowTom Rini1-1/+1
When we have an excess size growth, fix the "limit" printf call to pass in just the limit variable rather than the string bytes to the format character. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-10-30gpio: da8xx_gpio: Fix the _gpio_direction_output functionKeerthy1-7/+7
_gpio_direction_output function currently calls gpio_set_value with the wrong gpio number. gpio_set_value in the uclass driver expects a different gpio number and the _gpio_direction_output is currently providing the number specific to the bank. Hence fix it by calling the _gpio_set_value function instead. Reported-by: Faiz Abbas <faiz_abbas@ti.com> Fixes: 8e51c0f254 ("dm: gpio: Add DM compatibility to GPIO driver for Davinci") Signed-off-by: Keerthy <j-keerthy@ti.com>
2019-10-30test/py: Use raw strings more to avoid deprecation warningsTom Rini2-6/+3
We have two further uses of raw string usage in the test/py codebase that are used under CI. The first of which is under the bind test and is a direct update. The second of which is to strip VT100 codes from the match buffer. While switching this to a raw string is also a direct update, the comment it notes that problems were encountered on Ubuntu 14.04 (and whatever Python 2 version that was) that required slight tweaks to the regex. Replace that now that we're saying Python 3.5 is the minimum. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30gitlab/travis: Rework how and when we use virtualenv in order to use python3Tom Rini2-21/+19
As things stand today, we have tools that CI requires where "python" must be "python2". We need to use a virtualenv and pip in order to ensure that our pytest tests can be run. Rework things slightly so that: - On Travis-CI, we install python-pyelftools for the platforms that require pyelftools to be installed. - On GitLab-CI, we move to a newer base image that includes python3-pip and continue to use a virtualenv per job that needs it, for the correct set of packages. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Update docs, add requirements.txt for pipTom Rini2-21/+48
To be more closely aligned with Python community best practices, we need to better document our usage of pip and make use of a requirements.txt file that shows the versions of the tools that we are using. This will aide in ensuring reproducibility of our tests as well. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Rework test.py to be a different kind of wrapperTom Rini1-16/+4
Now that we have moved to being based on pytest for python3 we need to make our test.py wrapper more robust in terms of only calling python3 rather than possibly finding and using python2. To do this, change from execvp()'ing pytest to invoking the package itself via python. In the event that pytest is unavailable we still get a user-friendly error: pkg_resources.DistributionNotFound: The 'pytest' distribution was not found and is required by the application Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Update test_fs to decode check_output callsTom Rini1-12/+12
The check_output function from the subprocess Python module by default returns data as encoded bytes and leaves decoding to the application. Given our uses of the call, it makes the most sense to immediately decode the results. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: test_efi_selftest.py: Updates for python 3 supportTom Rini1-18/+18
- In python 3 you must use raw strings for regex as other forms are deprecated and would require further changes to the pattern here. In one case this lets us have a simpler match pattern. - As strings are now Unicode our complex tests (Euro symbol, SHIFT+ALT+FN 5) we need to declare that as a bytes string and then decode it for use. Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: test_ut.py: Ensure we use bytesTom Rini1-3/+3
In the case of some unit tests we are working with providing a fake flash device that we have written some text strings in to. In this case we want to tell Python to encode things to bytes for us. Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Manual python3 fixesTom Rini5-12/+19
- Modern pytest is more visible in telling us about parameters that we had not described, so describe a few more. - ConfigParser.readfp(...) is now configparser.read_file(...) - As part of the "strings vs bytes" conversions in Python 3, we use the default encoding/decoding of utf-8 but in some places tell Python to replace problematic conversions rather than throw a fatal error. - Fix a typo noticed while doing the above ("tot he" -> "to the"). - As suggested by Stephen, re-alphabetize the import list - Per Heinrich, replace how we write contents in test_fit.py Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Automated conversion to Python 3Tom Rini8-80/+71
Use the 2to3 tool to perform numerous automatic conversions from Python 2 syntax to Python 3. Also fix whitespace problems that Python 3 catches that Python 2 did not. Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Fix pytest4 deprecation warningsMarek Vasut3-20/+14
Fix the following spit from pytest: u-boot/test/py/conftest.py:438: RemovedInPytest4Warning: MarkInfo objects are deprecated as they contain merged marks which are hard to deal with correctly. Please use node.get_closest_marker(name) or node.iter_markers(name). Docs: https://docs.pytest.org/en/latest/mark.html#updating-code for board in mark.args: In both cases, the later suggestion is applicable. Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Igor Opaniuk <igor.opaniuk@gmail.com> [trini: Update for current file with a few more cases, un-pin pytest in CI] Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Split mark to multiple linesTom Rini2-4/+9
We inconsistently note multiple dependencies today in our tests, sometimes with a single line that declares multiple and sometimes multiple single lines. Current pytest seems to fail on the single line format so change to multiple declarations. Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30gitlab-ci: Prepend to PATH rather than replace itTom Rini1-1/+1
Currently we set the entire PATH rather than prepend the new paths that we need to have searched. This however breaks parts of the "virtualenv" that was have set up and need to use as that also will be modifying PATH. To fix this, prepend our new locations instead. Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30gitlab-ci: Fix indentation in some stanzasTom Rini1-20/+20
In a number of our stanzas we had multi-line commands that were one space short of alignment, correct this. Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30Merge tag 'u-boot-clk-23Oct2019' of ↵Tom Rini12-64/+407
https://gitlab.denx.de/u-boot/custodians/u-boot-clk - Add I2C clocks for i.MX6Q CCF driver - Fix check in clk_set_default_parents() - Managed API to get clock from device tree - Fixes for core clock code (including sandbox regression tests)
2019-10-30Prepare v2020.01-rc1v2020.01-rc1Tom Rini1-3/+3
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30Merge tag 'mmc-10-29-2019' of ↵Tom Rini2-42/+6
https://gitlab.denx.de/u-boot/custodians/u-boot-mmc - fsl_esdhc driver cleanup - spl_mmc bug fix to avoid access wrong emmc partition
2019-10-30Merge branch '2019-10-28-azure-ci-support'Tom Rini20-79/+578
- Clean up Travis-CI slightly and then add support for Microsoft Azure pipelines, all from Bin Meng.
2019-10-30Merge https://gitlab.denx.de/u-boot/custodians/u-boot-sunxiTom Rini56-94/+359
- H6 dts(i) sync (Clément) - H6 PIO (Icenowy) - Fix pll1 clock calculation (Stefan) - H6 dram, half DQ (Jernej) - A64 OLinuXino eMMC (Sunil)
2019-10-29Bring all testings in gitlab and travis CI to Azure PipelinesBin Meng1-0/+382
This expands current Azure Pipelines Windows host tools build testing to cover all the CI testing in gitlab and travis CI. Note for some unknown reason, the 'container' cannot be used for any jobs that have buildman, for buildman does not exit properly and hangs the job forever. As a workaround, we manually call docker to run the image to perform the CI tasks. A complete run on Azure Pipelines takes about 2 hours and 10 minutes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-29.travis.yml: Remove the unneeded '&' for ls20xx buildmanBin Meng1-1/+1
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-10-29arm: mvebu: Avoid generating kwbimage.cfg in the source treeBin Meng5-10/+21
At present some boards generate kwbimage.cfg in the source tree during the build. This breaks buildman testing on some systems where the source tree is read-only. Update makefile rules to generate it in the build tree instead. Note some other boards have the kwbimage.cfg file written in advance, hence we need check if the file exists in the build tree first, otherwise we fall back to one in the source tree. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-29tools: buildman: Remove useless mkdir() in Make() in test.pyBin Meng1-8/+0
In the 'Make' function, the codes tries to create a directory if current stage is 'build'. But the directory isn't used at all anywhere. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-29tools: buildman: Honor output directory when generating boards.cfgBin Meng1-5/+5
buildman always generates boards.cfg in the U-Boot source tree. When '-o' is given, we should generate boards.cfg to the given output directory. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-29spl: spl_mmc: fix getting raw_sect when boot from emmc boot partitionPeng Fan1-2/+3
On i.MX8, when booting from eMMC boot partition, the whole flash.bin is stored in boot partition, however SPL switches to user partition during the init of mmc driver: spl_mmc_load() -> mmc_init() Then it tries to load the container image in spl_mmc_get_uboot_raw_sector(), but here it reads the data from user partition and the header is not recognized as a valid header. So we move spl_mmc_get_uboot_raw_sector after eMMC partition switch to address this issue. Anyway put spl_mmc_get_uboot_raw_sector before eMMC partition switch is not correct, so let's move it after eMMC partition switch. Reported-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-10-29mmc: fsl_esdhc: drop i.MX DDR support codeYangbo Lu1-6/+2
A previous patch below adding DDR mode support was actually for i.MX platforms. Now i.MX eSDHC driver is fsl_esdhc_imx.c. For QorIQ eSDHC, it uses different process for DDR mode, and hasn't been supported. Let's drop DDR support code for i.MX in fsl_esdhc driver. 0e1bf61 mmc: fsl_esdhc: Add support for DDR mode Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2019-10-29mmc: fsl_esdhc: remove redundant DM_MMC checkingYangbo Lu1-2/+0
Remove redundant DM_MMC checking which is already in DM_MMC conditional compile block. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2019-10-29mmc: fsl_esdhc: make BLK as hard requirement of DM_MMCYangbo Lu1-32/+1
U-boot prefers DM_MMC + BLK for MMC. Now eSDHC driver has already support it, so let's force to use it. - Drop non-BLK support for DM_MMC introduced by below patch. 66fa035 mmc: fsl_esdhc: fix probe issue without CONFIG_BLK enabled - Support only DM_MMC + BLK (assuming BLK is always enabled for DM_MMC). - Use DM_MMC instead of BLK for conditional compile. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2019-10-28Add Microsoft Azure Pipelines configurationBin Meng1-0/+38
Microsoft Azure Pipelines [1] provides unlimited CI/CD minutes and 10 parallel jobs to every open source project for free. This adds a configuration file for Azure Pipelines to utilize the free Windows VM hosted by Microsoft to ensure no build broken in building U-Boot host tools for Windows. [1] https://azure.microsoft.com/en-us/blog/announcing-azure-pipelines-with-unlimited-ci-cd-minutes-for-open-source/ Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28tools: Avoid creating symbolic links for tools/version.hBin Meng3-4/+7
When building U-Boot host tools for Windows from Microsoft Azure Pipelines, the following errors were seen: HOSTCC tools/mkenvimage.o In file included from tools/mkenvimage.c:25: ./tools/version.h:1:1: error: expected identifier or ‘(’ before ‘.’ token 1 | ../include/version.h | ^ tools/mkenvimage.c: In function ‘main’: tools/mkenvimage.c:117:4: warning: implicit declaration of function ‘usage’ [-Wimplicit-function-declaration] 117 | usage(prg); | ^~~~~ tools/mkenvimage.c:120:35: error: ‘PLAIN_VERSION’ undeclared (first use in this function) 120 | printf("%s version %s\n", prg, PLAIN_VERSION); | ^~~~~~~~~~~~~ tools/mkenvimage.c:120:35: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [scripts/Makefile.host:114: tools/mkenvimage.o] Error 1 It turns out tools/version.h is a symbolic link and with Windows default settings it is unsupported hence the actual content of tools/version.h is not what file include/version.h has, but the the linked file path, which breaks the build. To fix this, remove the symbolic links for tools/version.h. Instead we perform a copy from include/version.h during the build. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28Add .gitattributes for line endingsBin Meng1-0/+2
When building U-Boot host tools for Windows from Microsoft Azure Pipelines, we see tons of weird warnings and errors emitted from every Kconfig files: Kconfig:6:warning: ignoring unsupported character '' Kconfig:6:warning: ignoring unsupported character '' Kconfig:8:warning: ignoring unsupported character '' Kconfig:9:warning: ignoring unsupported character '' Kconfig:10:warning: ignoring unsupported character '' Kconfig:10:warning: ignoring unsupported character '' Kconfig:13:warning: ignoring unsupported character '' arch/Kconfig:1:warning: ignoring unsupported character '' arch/Kconfig:2:warning: ignoring unsupported character '' arch/Kconfig:2:warning: ignoring unsupported character '' arch/Kconfig:4:warning: ignoring unsupported character '' ... After several rounds of experiments, it turns out this is caused by line endings. Historically, Linux and macOS used linefeed (LF) characters while Windows used a carriage return plus a linefeed (CRLF). When Azure Pipelines checks out the U-Boot repo, Git tries to compensate for the difference by automatically making lines end in CRLF in the working directory on Windows, which confuses the Kconfig file parsing logic. Fortunately Git provides a way for repos to tell Git not to do such automatical line endings conversion via .gitattributes file below: * text eol=lf Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28doc: Add documentation for how to build U-Boot host toolsBin Meng3-0/+67
This adds a reST document for how to build U-Boot host tools, including information for both Linux and Windows. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28tools: ifwitool: Define __packed when it is not definedBin Meng1-0/+2
Some compilers may provide __packed define for us. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28linux/types.h: Surround 'struct ustat' with __linux__Bin Meng1-0/+2
'struct ustat' uses linux-specific typedefs to declare its memebers: __kernel_daddr_t and __kernel_ino_t. It is currently not used by any U-Boot codes, but when we build U-Boot tools for other platform like Windows, this becomes a problem. Let's surround it with __linux__. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28tools: zynqmpbif: Use compiler builtin instead of linux-specific __swab32Bin Meng1-1/+1
__swab32() is a Linux specific macro defined in linux/swab.h. Let's use the compiler equivalent builtin function __builtin_bswap32() for better portability. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28tools: mtk_image.h: Use portable uintXX_t instead of linux-specific __leXXBin Meng1-43/+43
__leXX has Linux kernel specific __attribute__((bitwise)) which is not portable. Use corresponding uintXX_t instead. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-28tools: image.h: Use portable uint32_t instead of linux-specific __be32Bin Meng1-7/+7
__be32 has Linux kernel specific __attribute__((bitwise)) which is not portable. Use uint32_t instead. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-25Merge tag 'mips-pull-2019-10-25' of git://git.denx.de/u-boot-mipsTom Rini75-545/+2327
- bmips: add BCRM NAND support for BCM6368, BCM6328, BCM6362 and BCM63268 SoCs - bmips: various small fixes - mtmips: add new drivers for clock, reset-controller and pinctrl - mtmips: add support for high speed UART - mtmips: update/enhance drivers for SPI and ethernet - mtmips: add support for MMC
2019-10-25Merge branch '2019-10-24-ti-imports'Tom Rini44-28/+39198
- Enable DFU on dra7xx boards - Further Keystone 3 platform improvements
2019-10-25arm: dts: k3-am65: Add R5F ranges in interconnect nodesSuman Anna1-0/+4
Add the address spaces for the R5F cores in MCU domain to the ranges property of the cbass_mcu interconnect node so that the addresses within the R5F nodes can be translated properly by the relevant OF address API. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>