aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-01-29cmd: add more implementation IDs to sbi commandWIP/2021-01-29-assorted-fixesHeinrich Schuchardt1-16/+21
Additional SBI implementation IDs have been added to the upcoming next version of the SBI specification. https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-29test: inconsistent string testsHeinrich Schuchardt1-2/+1
Excluding ut str in test/cmd_ut.c but compiling test/str_ut.c results in failure of the Python test invoking the C unit tests as observed on sipeed_riscv_smode_defconfig: FAILED test/py/tests/test_ut.py::test_ut[ut_str_upper] Allow to compile test/str_ut.c on all boards. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-29test: inconsistent bootm testsHeinrich Schuchardt1-1/+1
Excluding ut bootm in test/cmd_ut.c but compiling test/bootm.c results in failure of the Python test invoking the C unit tests as observed on sipeed_riscv_smode_defconfig: FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_nop] FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_nospace] FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_silent] FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_silent_var] FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_subst] FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_subst_both] FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_subst_var] Only compile test/bootm.c on the sandbox. Fixes: f158ba15ee0f ("bootm: Add tests for fixup_silent_linux()") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-29env: sf: cosmetic: remove unnecessary spacePatrick Delaunay1-2/+2
Remove the unnecessary space before the 2 "done:" labels in env_sf_save(). Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-01-29test: Update test_fs to not use deprecated pytest.yield_fixture()Tom Rini1-10/+5
As noted in comments, yield_fixture has been deprecated for longer than our minimum required version of pytest. Newer versions of pytest cause this to be a louder warning, and as the migration is trivial, perform it now. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-29test: correct entry point to pytestHeinrich Schuchardt1-5/+5
With Pytest 6.0.2 'make tests' fails: sandbox: Traceback (most recent call last): File "./test/py/test.py", line 20, in <module> sys.exit(load_entry_point('pytest', 'console_scripts', 'pytest')(args)) TypeError: console_main() takes 0 positional arguments but 1 was given The definition of console_scripts has changed as follows: Pytest 4.6.1: [options.entry_points] console_scripts =         pytest=pytest:main         py.test=pytest:main          Pytest 6.0.2:          [options.entry_points] console_scripts = pytest=pytest:console_main py.test=pytest:console_main The new function console_main() has a comment: "This function is not meant for programmable use; use `main()`" Hence let's call pytest.main() directly. Move args processing into the __main__ paragraph. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Tested-by: Tom Rini <trini@konsulko.com>
2021-01-29test: pr_cont_test.o depends on CONFIG_LOG=yHeinrich Schuchardt1-1/+1
Compiling wandboard_defconfig with CONFIG_UT_LOG=y leads to a build error: test/log/pr_cont_test.c: In function ‘log_test_pr_cont’: test/log/pr_cont_test.c:28:14: error: ‘gd_t’ {aka ‘volatile struct global_data’} has no member named ‘log_fmt’  log_fmt = gd->log_fmt; We do not want to let CONFIG_UT_LOG depend on CONFIG_LOG=y because we have tests for logging functions called with CONFIG_LOG=n. Fix the build dependency. Reported-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-29fs: btrfs: Select SHA256 in KconfigMatthias Brugger1-0/+1
Since commit 565a4147d17a ("fs: btrfs: Add more checksum algorithms") btrfs uses the sha256 checksum algorithm. But Kconfig lacks to select it. This leads to compilation errors: fs/built-in.o: In function `hash_sha256': fs/btrfs/crypto/hash.c:25: undefined reference to `sha256_starts' fs/btrfs/crypto/hash.c:26: undefined reference to `sha256_update' fs/btrfs/crypto/hash.c:27: undefined reference to `sha256_finish' Signed-off-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com>
2021-01-29fs: fat: remove superfluous assignmentsHeinrich Schuchardt2-4/+5
Do not assign a value to a variable if it is not used. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-29fs: fat: avoid out of bounds access warningHeinrich Schuchardt1-5/+2
When copying short name plus extension refer to the encapsulating structure and not to the short name element. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-29avb: AVB_VERIFY depends on MMCHeinrich Schuchardt1-0/+1
AVB Verified Boot uses functions related to MMC. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2021-01-29vexpress_aemv8a: allow overriding BOOTCOMMANDStanislav Pinchuk1-2/+4
Re-send because of line-wraps. This patch fixes the behaviour of the menuconfig's BOOTCOMMAND setting. Which is just ignored without that patch on vexpress_aemv8a platform. Signed-off-by: Stanislav.Pinchuk@kaspersky.com
2021-01-29arm: dts: enable MTK SPI NOR controller driverSkyLake.Huang6-4/+56
1. Enable MTK SPI NOR controller driver on mt7622 & mt7629. 2. Enable quad mode for read and single mode for write. Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
2021-01-29spi: mtk_snor: add support for MTK SPI NOR controllerSkyLake.Huang3-0/+571
This patch adds support for MTK SPI NOR controller, which you can see on mt7622 & mt7629. 1. This controller is designed only for SPI NOR. We can't adjust its bus clock dynamically. Set clock in dts instead. 2. This controller only supports 1-1-1 write mode. 3. Remove mtk_snor_match_read() since upper SPI-MEM layer already handles command. 4. sf read/write/update commands are tested with this driver. Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
2021-01-29test: test_ofplatdata: Mark as sandbox specificTom Rini1-0/+1
This test checks for output specific to the sandbox device tree, mark it as sandbox specific. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-28Merge branch '2021-01-27-assorted-fixes-and-improvements'WIP/28Jan2021Tom Rini34-128/+915
- A wide variety of fixes throughout the tree.
2021-01-27cmd: misc: Fix return value for the sleep commandMarek Szyprowski1-1/+1
If sleeping has been interrupted, return CMD_RET_FAILURE instead of -1 (CMD_RET_USAGE). Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-01-27doc: device-tree-bindings: rtc: Abracon AB x80x i2c rtcYing-Chun Liu (PaulLiu)1-0/+31
Document the bindings for abracon,abx80x and related compatibles. Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
2021-01-27rtc: add rtc-abx80x, a driver for the Abracon AB x80x i2c rtcYing-Chun Liu (PaulLiu)3-0/+563
This is a basic driver for the ultra-low-power Abracon AB x80x series of RTC chips. It supports in particular, the supersets AB0805 and AB1805. It allows reading and writing the time, and enables the supercapacitor or battery charger. Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
2021-01-27autoboot: fix illegal memory access when stop key and delay key are emptyYuezhang.Mo@sony.com1-3/+3
If both stop key and delay key are empty, the length of these keys is 0. The subtraction operation will cause the u_int type variable to overflow, will cause illegal memory access in key input loop. This commit fixes this bug by using int type instead of u_init. Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-27binman: Allow reading entries from a subnodeSimon Glass2-0/+32
Some images may have multiple copies of the same thing, e.g. two versions of the read/write U-Boots. It is necessary to read data from one or other of these under selection of the verified-boot logic. Add a function to select the subnode to use. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-27binman: Move selection of the binman node into a functionSimon Glass1-10/+33
Move this logic out of the main init function so it is available for other purpose. Use a different error when multiple-images is in use but no subnode is available. This makes it easier to determine what is wrong. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-27crc32: Exclude crc32 from TPLSimon Glass1-0/+2
Unfortunately the toolchain often brings in the crc32 table even if the function is not actually used. For now, exclude it from the TPL build, which is very sensitive to size. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-27mmc: pci_mmc: Set the removable flagSimon Glass1-0/+8
Set this flag so that it is available to those looking at the device. For non-removable devices there is no need to check for insertion/removable since the media can never change. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-01-27mmc: pci_mmc: Only generate ACPI code for the SD cardSimon Glass1-1/+10
At present if an eMMC part is in the system, the ACPI table generated will include information about that, as well as the SD card. We only need to include the SD card, since it has a card-detect GPIO. Use a different compatible string for each option, and add code only for the SD card. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-01-27uuid: Add a comment for UUID_STR_LENSimon Glass1-0/+1
This macro is the length of the string but excludes the terminator. Users must add 1 when declaring a large-enough string. Add a comment to make this clear. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-27display_options: Use USE_TINY_PRINTF for SPL checkSimon Glass1-5/+4
At present this code uses a simple printf() format if running in SPL. But SPL can use the full printf. Use USE_TINY_PRINTF instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-27fdtdec: Use CONFIG_IS_ENABLED in board_fdt_blob_setup()Simon Glass1-1/+1
This setting may be different in SPL and TPL. Update the code to check the correct setting. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-27fdtdec: Update the missing-devicetree messageSimon Glass1-1/+2
This includes information about sandbox which is not relevant for most boards. Drop it. Also add the address to help figure out the problem. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-27net: Use CONFIG_IS_ENABLED() in eth_dev_get_mac_address()Simon Glass1-1/+1
This function may be used in SPL where devicetree is not available. Use the correct macro so that the function does not try to read it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-27video: Allow syncing the entire framebuffer to the copySimon Glass2-0/+24
In some cases so much of the framebuffer is updated that it is not worth copying the changes piece by piece to the copy framebuffer. Add a function to copy the whole thing. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-27bloblist: Add missing tag namesSimon Glass1-0/+6
Add tag names for recently added types. Fixes: d2cb7a22da0 (x86: Allow putting some tables in the bloblist) Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-27bloblist: Support relocating to a larger spaceSimon Glass5-4/+73
Typically in TPL/SPL the bloblist is quite small. But U-Boot proper may want to add a lot more to it, such as ACPI tables. Add a way to expand the bloblist by relocating it in U-Boot proper, along with the other relocation activities. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-27spl: Add functions for next and previous phaseSimon Glass2-1/+54
It is useful to be able to figure out which phase we are loading next and which phase we came from. Add some functions to handle this as well as returning the name of a phase. This allows messages like "Booting to x" where x is the next phase. At present, TPL says 'Jumping to U-Boot' at the end, when in fact it is jumping to SPL. This is confusing, so use the new functions to correct this. Tests for this will come with an upcoming minor SPL test refactor. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-27lib: rsa: rsa-verify: don't look for keys in the FIT imagePhilippe Reynes1-2/+2
In the function rsa_verify_hash, if the "main" key doesn't work, u-boot try others keys. But it searches those keys in the FIT image instead of the u-boot device tree. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-27pci: Remove CONFIG_PCI_ENUM_ONLY as it's not used (any more)Stefan Roese4-89/+41
This patch completely removes CONFIG_PCI_ENUM_ONLY from the PCI code as it is not configured for any board (any more). With this removal, some PCI related files get cleaned up a bit. Additional, dm_pciauto_setup_device() is now static, as it's not referenced from any code outside of this C file. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-27common: fit-sig: Fix error message in fit_config_verify_sig()Alexandru Gagniuc1-1/+1
In fit_config_verify_sig(), when no 'signature*' subnode exists in the configuration node, the fdt_for_each_subnode() loop is a no-op. Therefore, no error flags are set, and 'err_,sg' is not populated with an error string. This is incorrect behavior. Populate err_msg to indicate that no 'signature' is found, before entering the loop. The first call to fit_image_verify_sig() will override clear err_msg, or set it to a more specific message. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-27smccc: fix sign bit expansionVolodymyr Babchuk1-2/+2
Signed ARM_SMCCC_FAST_CALL value is shifted to 31'st bit. Then, it is expanded to 64 bit value, which results in 1s in higher 32 bits. This causes corrupted values in 64-bit SMC IDs and issues in buggy handlers of 32-bit calls. We need to make ARM_SMCCC_FAST_CALL unsigned long, so it would work properly on 32 bit architectures. Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
2021-01-27bootcount: allow to use this feature on TPLPhilippe Reynes4-5/+15
This commit add an option TPL_BOOTCOUNT_LIMIT to use bootcount on TPL. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-27Makefile: Do not call useless command 'true'Pali Rohár1-1/+5
Macro 'cmd_objcopy_uboot' currently does not work with passed empty command expanded from 'cmd_static_rela' and therefore dummy command 'true' is set in 'cmd_static_rela' to workaround this issue. Eliminate it now by fixing 'cmd_objcopy_uboot' macro to work also with empty 'cmd_static_rela' macro and remove useless invocation of command 'true'. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-27Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellWIP/27Jan2021Tom Rini16-48/+143
- Espressobin: Disable slot when emmc is not present (Pali) - DS414; config header cleanup (Phil) - PCI: auto-config enhancement (Phil) - pci_mvebu: Also map IO region (Phil) - serial: a3720: Implement pending method for output direction (Pali) - turris_mox: Enable a few commands (Marek) - helios4 & ClearFog changes (Dennis) - Plus some minor misc changes
2021-01-27Merge tag 'doc-2021-04-rc1-3' of ↵Tom Rini22-185/+1596
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for documentation tag doc-2021-04-rc1-3 Update the build system for the HTML documentation to allow using Sphinx 3. Man-page for exception command.
2021-01-27Merge branch '2021-01-27-assorted-net-updates'Tom Rini19-19/+1838
- e1000 fixes for MIPS - netconsole and ping fix - cortina_ni driver - micrel PHY fix - Add fdtoverlays keyword to extlinux file parsing
2021-01-27cmd: pxe: add support for FDT overlaysNeil Armstrong3-0/+113
This adds support for specifying FDT overlays in an extlinux/pxelinux configuration file. Without this, there is no simple way to apply overlays when the kernel and fdt is loaded by the pxe command. This change adds the 'fdtoverlays' keyword for a label, supporting multiple overlay files to be applied on top of the fdt specified in the 'fdt' or 'devicetree' keyword. Example: label linux kernel /Image fdt /soc-board.dtb fdtoverlays /soc-board-function.dtbo append console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait This code makes usage of a new variable called fdtoverlay_addr_r used to load the overlay files without overwritting anything important. Cc: Tom Rini <trini@konsulko.com> Cc: Andre Heider <a.heider@gmail.com> Cc: Jernej Škrabec <jernej.skrabec@siol.net> Cc: Jonas Karlman <jonas@kwiboo.se> Tested-by: Jernej Škrabec <jernej.skrabec@siol.net> Reviewed-by: Jernej Škrabec <jernej.skrabec@siol.net> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-01-27net: phy: micrel: Try default PHY ofnode firstMarek Vasut1-2/+7
The phydev structure has a PHY OF node pointer in it, use that OF node first when looking up PHY OF node properties, since that is likely the correct PHY OF node pointer. If the pointer is not valid, which is the case e.g. on legacy DTs, fall back to parsing MAC ethernet-phy subnode. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Ramon Fried <rfried.dev@gmail.com>
2021-01-27board: presidio-asic: Add CAxxxx Ethernet supportAlex Nemirovsky3-2/+48
Add CAxxxx Ethernet support for the Cortina Access Presidio Engineering Board Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com> CC: Tom Rini <trini@konsulko.com>
2021-01-27net: phy: ca_phy: Add driver for CAxxxx SoCsAbbie Chang6-0/+147
Add phy driver support for MACs embedded inside Cortina Access SoCs Signed-off-by: Abbie Chang <abbie.chang@cortina-access.com> Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com> CC: Joe Hershberger <joe.hershberger@ni.com> CC: Tom Rini <trini@konsulko.com> CC: Aaron Tseng <aaron.tseng@cortina-access.com> Moved out PHY specific code out of Cortina NI Ethernet driver and into a Cortina Access PHY interface driver
2021-01-27net: cortina_ni: Add eth support for Cortina Access CAxxxx SoCsAaron Tseng5-0/+1516
Add Cortina Access Ethernet device driver for CAxxxx SoCs. This driver supports both legacy and DM_ETH network models. Signed-off-by: Aaron Tseng <aaron.tseng@cortina-access.com> Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com> Signed-off-by: Abbie Chang <abbie.chang@cortina-access.com> CC: Joe Hershberger <joe.hershberger@ni.com> CC: Abbie Chang <abbie.chang@Cortina-Access.com> CC: Tom Rini <trini@konsulko.com>
2021-01-27net: fix ping in netconsoleYang Liu1-1/+1
Should not init eth device when doing ping in netconsole. Signed-off-by: Yang Liu <yliu@cybertec.com.au> Cc: Joe Hershberger <joe.hershberger@ni.com>
2021-01-27net: e1000: Add missing address translationsStefan Roese1-5/+5
Add some missing address translations from virtual address in local DRAM to physical address, which is needed for the DMA transactions to work correctly. This issue was detected while testing the e1000 driver on the MIPS Octeon III platform, which needs address translation. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Aaron Williams <awilliams@marvell.com> Cc: Chandrakala Chavva <cchavva@marvell.com>