aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-11-09Prepare v2021.01-rc2HEADv2021.01-rc2masterTom Rini1-1/+1
Signed-off-by: Tom Rini <trini@konsulko.com>
2020-11-09Merge tag 'efi-2021-01-rc2-2' of ↵Tom Rini7-16/+252
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2021-01-rc2 (2) The following bugs are fixed: * The conitrace command failed to build. * Non-volatile UEFI variables were not delete form the file store. The following features are added: * Support for the FN1 - FN10 keys on crosswire keyboards is added. * An EFI binary is provided to dump the binary device tree. tpm2_get_capability() is adjusted in preparation of the implementation of the EFI_TCG2_PROTOCOL.
2020-11-09configs: Resync with savedefconfigTom Rini13-29/+24
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2020-11-09arm: actions: increase SYS_MALLOC_F_LENAmit Singh Tomar1-1/+1
after commit 4ab3817ff16a ("clk: fixed-rate: Enable DM_FLAG_PRE_RELOC flag") Cubieboard7 (based on actions S700 SoC) fails to boot. It is due to the fact that the default value of CONFIG_SYS_MALLOC_F_LEN (0x400) would not provide enough memory for clock device to probe (before relocation) well. This commit fixes it, by increasing SYS_MALLOC_F_LEN to value 0x2000. Suggested-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
2020-11-09net: ks8851: Implement EEPROM MAC address readoutMarek Vasut1-0/+29
In case there is an EEPROM attached to the KS8851 MAC and the EEPROM contains a valid MAC address, the MAC address is loaded into the NIC registers on power on. Read the MAC address out of the NIC registers and provide it to U-Boot. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Eugen Hristev <eugen.hristev@microchip.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-11-09tpm: Change response length of tpm2_get_capability()Ilias Apalodimas2-4/+4
For implementing the EFI_TCG2_PROTOCOL we need the count field returned by the TPM when reading capabilities via tpm2_get_capability(). Adjust the implementation of the 'tpm2 get_capability' command accordingly. Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-11-09efi_selftest: add tool to download dtbHeinrich Schuchardt2-0/+220
For validating the fixed up device tree we need a tool to need to save it to a file. dtbdump.efi copies the configuration table with the device tree to a file on the same partition from which dtbdump.efi was invoked. The file name can be entered on the console. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-11-09efi_loader: non-volatile variable not deleted from fileHeinrich Schuchardt1-0/+1
When deleting a non-volatile variable it was deleted from memory but the deletion was not persisted to the file system. SetVariable() may be called with attributes == 0 to delete a variable. To determine if the deletion shall be persisted we have to consider the non-volatile flag in the attributes of the deleted variable and not the value passed in the call parameter. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-11-09input: add support for FN1 - FN10 on crosswire kbdHeinrich Schuchardt1-10/+25
Chromebooks and the sandbox use a crosswire keyboard with function keys FN1 - FN10. These keys are needed when running UEFI applications like GRUB or the UEFI SCT. Add support for these keys when translating from key codes to ECMA-48 (or withdrawn ANSI 3.64) escape sequences. All escape sequences start with 0x1b. So we should not repeat this byte in the kbd_to_ansi364 table. For testing use: sandbox_defconfig + CONFIG_EFI_SELFTEST=y $ ./u-boot -D -l => setenv efi_selftest extended text input => bootefi selftest Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-09cmd: conitrace: replace getc() by getchar()Heinrich Schuchardt1-2/+2
This command was missed when renaming getc() to getchar(). Fixes: c670aeee3df9 ("common: rename getc() to getchar()") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-11-06Merge tag 'dm-pull5nov20' of git://git.denx.de/u-boot-dmTom Rini37-388/+2293
patman status subcommand to collect tags from Patchwork patman showing email replies from Patchwork sandbox poweroff command minor fixes in binman, tests
2020-11-06Merge tag 'u-boot-amlogic-20201105' of ↵Tom Rini5-16/+26
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic - meson64_android: don't show logo on ROM USB boot - doc: update support matrix and fix vim3/l build instructions - meson64: relocate config_distro_bootcmmd header
2020-11-06Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86Tom Rini144-590/+1645
- Add a new SMBIOS parser and enable it when booting from coreboot - Fix up various driver names to avoid dtoc warnings - Fully enable ACPI support on Google Chromebook Coral - Add a way to set SMBIOS properties using the devicetree - Update existing boards to use devicetree for SMBIOS using a new default sysinfo driver
2020-11-06Makefile: Fix calling make with V=1Pali Rohár1-1/+1
Calling 'make V=1 all' on Ubuntu 18.04 with gcc version 9.2.1 and GNU Make version 4.1 fails on error: scripts/Kbuild.include:220: *** Recursive variable 'echo-cmd' references itself (eventually). Stop. As a workaround expand 'echo-cmd' variable via 'call' construction instead of expanding it directly. Signed-off-by: Pali Rohár <pali@kernel.org> Reported-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com> Fixes: ae897022d7bd ("Makefile: Fix u-boot-nodtb.bin target")
2020-11-06smbios: Drop the unused Kconfig optionsSimon Glass12-68/+13
Now that we can use devicetree to specify this information, drop the old CONFIG options. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: Provide default SMBIOS manufacturer/productSimon Glass17-1/+63
Add a file containing defaults for these, using the existing CONFIG options. This file must be included with #include since it needs to be passed through the C preprocessor. Enable the driver for all x86 boards that generate SMBIOS tables. Disable it for coral since it has its own driver. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: reword the commit message a little bit] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: galileo: Use devicetree for SMBIOS settingsSimon Glass2-11/+28
Add settings and enable the default sysinfo driver so that these can come from the device tree. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06arm64: mvebu: Use devicetree for SMBIOS settings on uDPUSimon Glass2-1/+22
Add settings and enable the default sysinfo driver so that these can come from the device tree. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06odroid-c2: Use devicetree for SMBIOS settingsSimon Glass2-2/+25
Add settings and enable the default sysinfo driver so that these can come from the device tree. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06imx: Use devicetree for SMBIOS settings on MYiR MYS-6ULXSimon Glass2-1/+27
Add settings and enable the default sysinfo driver so that these can come from the device tree. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06rockchip: Use devicetree for SMBIOS settingsSimon Glass8-8/+93
Add settings and enable the default sysinfo driver so that these can come from the device tree. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06sysinfo: Provide a default driver to set SMBIOS valuesSimon Glass4-0/+36
Some boards want to specify the manufacturer or product name but do not need to have their own sysinfo driver. Add a default driver which provides a way to specify this SMBIOS information in the devicetree, without needing any board-specific functionality. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06smbios: Add documentation and devicetree bindingSimon Glass2-0/+85
Add information about how to set SMBIOS properties using the devicetree. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06smbios: Add more propertiesSimon Glass1-0/+4
The current tables only support a subset of the available fields defined by the SMBIOS spec. Add a few more. We could use CONFIG_SYS_CPU or CONFIG_SYS_SOC as a default for family, but the meaning of that value relates more to the whole system rather than just the SoC. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06smbios: Allow properties to come from the device treeSimon Glass1-17/+81
Support a way to put SMBIOS properties in the device tree. These can be placed in a 'board' device in an 'smbios' subnode. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: Pass an ofnode into each SMBIOS functionSimon Glass2-19/+30
As a first step to obtaining SMBIOS information from the devicetree, add an ofnode parameter to the writing functions. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06doc: Add a binding for sysinfoSimon Glass1-0/+19
Add a simple binding file for this, so that it is clear what this binding directory is for. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06board: Rename uclass to sysinfoSimon Glass29-308/+314
This uclass is intended to provide a way to obtain information about a U-Boot board. But the concept of a U-Boot 'board' is the whole system, not just one circuit board, meaning that 'board' is something of a misnomer for this uclass. In addition, the name 'board' is a bit overused in U-Boot and we want to use the same uclass to provide SMBIOS information. The obvious name is 'system' but that is so vague as to be meaningless. Use 'sysinfo' instead, since this uclass is aimed at providing information on the system. Rename everything accordingly. Note: Due to the patch delta caused by the symbol renames, this patch shows some renamed files as being deleted in one place and created in another. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: zimage: Quieten down the zimage boot processSimon Glass1-5/+6
Much of the output is not very useful. The bootm command is quite a bit quieter. Convert some output to use log_debug(). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-11-06x86: zimage: Sanity-check the kernel version before printing itSimon Glass1-0/+9
With Chrome OS the kernel setup block is stored in a separate place from the kernel, so it is not possible to access the kernel version string. At present, garbage is printed. Add a sanity check to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: zimage: Add a little more loggingSimon Glass3-0/+8
Add logging for each part of the boot process, using a new Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-11-06x86: fsp: Adjust calculations for MTRR range and DRAM topSimon Glass1-13/+22
At present the top of available DRAM is the same as the top of the range of the low-memory MTRR. In fact, U-Boot is allowed to use memory up until the start of the FSP reserved memory. Use that value for low_end, since it makes more memory available. Keep the same calculation as before for mtrr_top, i.e. the top of reserved memory. A side-effect of this change is that the E820 tables have a single entry that extends from the bottom of the memory used by U-Boot to the bottom of the FSP reserved memory. This includes the bloblist, if ACPI tables are placed there. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: pinctrl: Silence the warning when a pin is not foundSimon Glass1-1/+1
This does not necessarily indicate a problem, since some pins are optional. Let the caller show an error if necessary. Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-06x86: acpi: Don't show the UART address by defaultSimon Glass1-1/+1
This is useful when using Linux's earlycon since the MMIO address must be provided on some platforms, e.g.: earlycon=uart8250,mmio32,0xddffc000,115200n8 However this is only for debugging, so don't show it by default. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: acpi: Include the TPMv1 table only if neededSimon Glass1-8/+11
This table is not needed if a v2 TPM is in use. Add a condition to avoid adding it when not needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: Silence some logging statementsSimon Glass5-11/+11
Quite a few log_info() calls are included in the x86 code which should use log_debug() instead. Convert them to reduce unwanted output. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: fsp: Convert fsp_dram to use log_debug()Simon Glass1-2/+6
Use log_debug() instead of debug() in this file, to enable the extra features. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: Boot coral into Chrome OS by defaultSimon Glass2-4/+15
Add a script to boot Chrome OS from the internal MMC. This involved adding a few commands and options. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: Set up Chrome OS to boot into developer modeSimon Glass1-6/+20
Set up a few fields necessarily to make Chrome OS boot without showing a firmware error. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: Use CONFIG_CHROMEOS_VBOOT for verified bootSimon Glass7-7/+23
At present CONFIG_CHROMEOS is used to determine whether verified boot is in use. The code to implement that is not in U-Boot mainline. However, it is useful to be able to boot a Chromebook in developer mode in U-Boot mainline without needing the verified boot code. To allow this, use CONFIG_CHROMEOS_VBOOT to indicate that verified boot should be used, and CONFIG_CHROMEOS to indicate that the board supports Chrome OS. That allows us to define CONFIG_CHROMEOS on coral. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: Define the Chrome OS GNVS regionSimon Glass1-1/+50
It is not possible to boot Chrome OS properly without passing some basic information from U-Boot. This applies even if verified boot is not being used. Add a structure definition for this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06acpi: Don't reset the tables with every new generationSimon Glass4-4/+20
At present if SSDT and DSDT code is created, only the latter is retained for examination by the 'acpi items' command. Fix this by only resetting the list when explicitly requested. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: acpi: Put the generated code first in DSDTSimon Glass1-9/+18
The current implementation for DSDT tables is not correct for the case where there is generated code, as the length ends up being incorrect. Also, we want the generated code to go first in the table. Rewrite this piece to correct these problems. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: acpi: Allow the SSDT to be emptySimon Glass1-7/+15
If there is nothing in the SSDT we should not include it in the tables. Update the implementation to check this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06acpi: Correct reset handling in acpi_device_add_power_res()Simon Glass1-1/+1
If there is no reset line, this still emits ACPI code for the reset GPIO. Fix it by updating the check. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: sound: Correct error handlingSimon Glass2-3/+3
A few functions have changed to return pin numbers or I2C addresses. The error checking for some of the callers is therefore wrong. Fix them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: Show the interrupt pointer with 'irqinfo'Simon Glass3-7/+27
It is useful for this command to show the address of the interrupt table. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: nhlt: Fix a few bugs in the table generationSimon Glass1-1/+3
At present these tables do not have the correct header, and there is an occasional incorrect value due to uninited data. Fix these bugs. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: nhlt: Correct output of bytes and 16-bit dataSimon Glass1-3/+10
At present these functions are incorrect. Fix them and add some logging and checking to avoid future problems. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-06x86: Allow putting some tables in the bloblistSimon Glass5-5/+69
At present all tables are placed starting at address f0000 in memory, and can be up to 64KB in size. If the tables are very large, this may not provide enough space. Also if the tables point to other tables (such as console log or a ramoops area) then we must allocate other memory anyway. The bloblist is a nice place to put these tables since it is contiguous, which makes it easy to reserve this memory for linux using the 820 tables. Add an option to put some of the tables in the bloblist. For SMBIOS and ACPI, create suitable pointers from the f0000 region to the new location of the tables. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: squashed in http://patchwork.ozlabs.org/project/uboot/patch/ 20201105062407.1.I8091ad931cbbb5e3b6f6ababdf3f8d5db0d17bb9@changeid/] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05Merge tag 'u-boot-imx-20201105' of ↵Tom Rini72-535/+6099
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx for 2021.1 --------------------- - new boards : GE (new B1x5v2), phytec phyCORE-i.MX8MM - converted doc to reST - fixes for verdin-imx8mm (Toradex) - fixes for i.MX thermal driver - mx7ulp: Align the PLL_USB frequency - mx53: primary/secondary bmode Travis: https://travis-ci.org/github/sbabic/u-boot-imx/builds/741465284
2020-11-05patman: Support listing comments from patchworkSimon Glass6-36/+268
While reviewing feedback it is helpful to see the review comments on the command line to check that each has been addressed. Add an option to support that. Update the workflow documentation to describe the new features. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Support parsing of review snippetsSimon Glass2-0/+168
Add support for parsing the contents of a patchwork 'patch' web page containing comments received from reviewers. This allows patman to show these comments in a simple 'snippets' format. A snippet is some quoted code plus some unquoted comments below it. Each review is from a unique person/email and can produce multiple snippets, one for each part of the code that attracts a comment. Show the file and line-number info at the top of each snippet if available. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Support updating a branch with review tagsSimon Glass6-16/+289
It is tedious to add review tags into the local branch and errors can sometimes be made. Add an option to create a new branch with the review tags obtained from patchwork. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Support checking for review tags in patchworkSimon Glass6-6/+784
Before sending out a new version of a series for review, it is important to add any review tags (e.g. Reviewed-by, Acked-by) collected by patchwork. Otherwise people waste time reviewing the same patch repeatedly, become frustrated and stop reviewing your patches. To help with this, add a new 'status' subcommand that checks patchwork for review tags, showing those which are not present in the local branch. This allows users to see what new review tags have been received and then add them. Sample output: $ patman status 1 Subject 1 Reviewed-by: Joe Bloggs <joe@napierwallies.co.nz> 2 Subject 2 Tested-by: Lord Edmund Blackaddër <weasel@blackadder.org> Reviewed-by: Fred Bloggs <f.bloggs@napier.net> + Reviewed-by: Mary Bloggs <mary@napierwallies.co.nz> 1 new response available in patchwork The '+' indicates a new tag. Colours are used to make it easier to read. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Detect missing upstream in CountCommitsToBranchSimon Glass2-3/+26
At present if we fail to find the upstream then the error output is piped to wc, resulting in bogus results. Avoid the pipe and check the output directly. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Improve handling of filesSimon Glass1-3/+8
Sometimes warnings are associated with a file and sometimes with the patch as a whole. Update the regular expression to handle both cases, even in emacs mode. Also add support for detecting new files. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Allow showing a Commit as a stringSimon Glass1-0/+3
Use the subject of the Commit object when printing it out. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Don't ignore lines starting with hashSimon Glass1-2/+5
These lines can indicate a continuation of an error and should not be ignored. Fix this. Fixes: 666eb15e923 ("patman: Handle checkpatch output with notes and code") Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Fix spelling of plural for warningSimon Glass1-4/+5
Tidy up the extra 's' when there is only a single warning. Fix the empty print statement also. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Convert testBasic() to use an interatorSimon Glass1-28/+27
On balance it is easier to use an iterator here, particularly if we need to insert lines due to new functionality. The only niggle is the need to keep the previous iterator value around in one case. Convert this test to use iter(). Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Add some tests for warningsSimon Glass3-13/+116
Add tests that check that warnings are generated when expected. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Add a test for PatchStream tagsSimon Glass2-5/+44
The current functional tests run most of patman. Add a smaller test that just checks tag handling with the PatchStream class. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Drop unused signoff memberSimon Glass2-1/+1
This is not used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Convert 'Series-xxx' tag errors into warningsSimon Glass2-2/+8
If the Series-xxx tag is not recognised patman currently reports a fatal error. This is inconvenient if a new feature is later added to patman that an earlier version does not support. Report a warning instead, to allow the user to take action if needed, but still allow operation to proceed. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Attach warnings to individual patchesSimon Glass2-4/+13
At present warnings are produced across the whole set of patches when parsing them. It is more useful to associate each warning with the patch (or commit) that generated it. Attach warnings to the Commit object and move them out of PatchStream. Also avoid generating duplicate warnings for the same commit. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Move warning collection to a functionSimon Glass1-13/+23
Add a new function in PatchStream to collect the warnings generated while parsing the stream. This will allow us to adjust the logic, such as dealing with per-commit warnings. Two of the warnings are in fact internal errors, so change them to raise and exception. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Fix up argument/return docs in patchstreamSimon Glass1-32/+50
Add missing documentation and type information. Fix up some missing docs on exceptions also. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Drop unused args in patchstreamSimon Glass1-5/+3
Drop a few arguments that are not used in functions. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Rename variables in patchstreamSimon Glass1-26/+26
Some variables are too short or shadow other variables or types. Fix these to keep pylint3 happy. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Rename functions in patchstreamSimon Glass5-56/+56
Rename these functions to lower case as per PEP8. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Fix constant style in patchstreamSimon Glass1-22/+22
These constants should use upper case. Update them to keep pylint3 happy. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Fix indenting in patchstreamSimon Glass1-13/+16
Update the indenting to keep pylint3 happy. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Allow linking a series with patchworkSimon Glass3-1/+17
Add a new Series-links tag to tell patman how to find the series in patchwork. Each item is the series ID optionally preceded by the series version that the link refers to. An empty version indicates this is the latest series. For example: Series-links: 209816 1:203302 Documentation is added in a later patch. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Fix remaining pylint3 warnings in func_testSimon Glass1-18/+58
This fixes all but the ones about too many variables/statements. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Use capture_sys_output() consistentlySimon Glass1-18/+2
One test still uses its own function for capturing output. Modify it to use the standard one in test_util Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Fix whitespace errors in func_testSimon Glass1-18/+19
Fix up various indentation and other minor things to make pylint3 happier. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Update how tests are runSimon Glass1-5/+3
The current instructions are out-of-date. Fix them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05azure/gitLab/travis: Add pygit2 as a dependency for testsSimon Glass3-2/+3
This lets patman run all of its tests, rather than skipping quite a few. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05patman: Correct operation of -nSimon Glass1-6/+5
This operation was unfortunately broken by a recent change. It is now necessary to use -i in addition to -n, if there are errors or warnings in the patches. Correct this by always showing the summary information. Fixes: f3653759758 ("patman: Move main code out to a control module") Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05binman: Correct calculation for image-posSimon Glass1-1/+1
A recent change removed the base offset from the calculation. This is used on coral to find the FSP-S binary. Fix it. Fixes: a9fad07d4b8 ("binman: Avoid reporting image-pos with compression") Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05binman: Update intel_ifwi to store padded sectionSimon Glass2-1/+17
With a recent change this entry stores only part of the section data, leaving out the padding at the end. Fix this by using GetPaddedData() to get the data. Add this function to the base Entry class also. Fixes: d1d3ad7d1fe ("binman: Move section padding to the parent") Signed-off-by: Simon Glass <sjg@chromium.org>
2020-11-05test: linking test/compression.c failsHeinrich Schuchardt2-1/+10
Building U-Boot with unit tests on a non-sandbox systems fails: ld.bfd: test/built-in.o: in function `compress_using_gzip': test/compression.c:138: undefined reference to `gzip' ld.bfd: test/built-in.o: in function `uncompress_using_bzip2': test/compression.c:187: undefined reference to `BZ2_bzBuffToBuffDecompress' ld.bfd: test/built-in.o: in function `uncompress_using_lzma': test/compression.c:222: undefined reference to `lzmaBuffToBuffDecompress' ld.bfd: test/built-in.o: in function `uncompress_using_lzo': test/compression.c:257: undefined reference to `lzop_decompress' ld.bfd: test/built-in.o: in function `uncompress_using_lz4': test/compression.c:292: undefined reference to `ulz4fn Add the missing dependencies. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-05test: test/bloblist.c depends on asm/state.hHeinrich Schuchardt1-0/+2
Building test/bloblist.c fails for non sandbox devices: test/bloblist.c:10:10: fatal error: asm/state.h: No such file or directory #include <asm/state.h> ^~~~~~~~~~~~~ Build the test only on the sandbox. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-05cros_ec: Support keyboard scanning with EC_CMD_GET_NEXT_EVENTAlper Nebi Yasak3-6/+52
The cros_ec_keyb driver currently uses EC_CMD_MKBP_STATE to scan the keyboard, but this host command was superseded by EC_CMD_GET_NEXT_EVENT and unavailable on more recent devices (including gru-kevin), as it was removed in cros-ec commit 87a071941b89 ("mkbp: Add support for buttons and switches.") dated 2016-07-06. The EC_CMD_GET_NEXT_EVENT has been available since cros-ec commit d1ed75815efe ("MKBP event signalling implementation") dated 2014-10-20, but it looks like it isn't included in firmware-* branches for at least link, nyan-big, samus, snow, spring, panther and peach-pit which have defconfigs in U-Boot. So this patch falls back to the old method if the EC doesn't recognize the newer command. The implementation is mostly adapted from Depthcharge commit f88af26b44fc ("cros_ec: Change keyboard scanning method."). On a gru-kevin, the current driver before this patch fails to read the pressed keys with: out: cmd=0x60: 03 9d 60 00 00 00 00 00 in-header: 03 fc 01 00 00 00 00 00 in-data: ec_command_inptr: len=-1, din=0000000000000000 check_for_keys: keyboard scan failed However the keyboard works fine with the newer command: out: cmd=0x67: 03 96 67 00 00 00 00 00 in-header: 03 ef 00 00 0e 00 00 00 in-data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ec_command_inptr: len=14, din=00000000f412df30 key_matrix_decode: num_keys = 0 0 valid keycodes found out: cmd=0x67: 03 96 67 00 00 00 00 00 in-header: 03 df 00 00 0e 00 00 00 in-data: 00 00 00 00 00 00 00 00 00 00 00 00 10 00 ec_command_inptr: len=14, din=00000000f412df30 key_matrix_decode: num_keys = 1 valid=1, row=4, col=11 keycode=28 1 valid keycodes found {0d} Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-05binman: Fix typo in kernel-doc format for binman_symname()Michal Simek1-1/+1
Fix typo. Fixes: 19790632648b ("binman: Support accessing binman tables at run time") Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-05binman: Call helper function binman_set_rom_offset() to fill offsetMichal Simek1-2/+2
There is prepared function for filing rom_offset. That's why use it instead of copying content of it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-05doc: add sandbox APIHeinrich Schuchardt2-0/+10
Add sandbox API to generated HTML documentation Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-05sandbox: update function descriptions in os.hHeinrich Schuchardt1-93/+130
Use Sphinx style function descriptions. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-05test: adjust sysreset testsHeinrich Schuchardt1-3/+8
As we have a working COLD_RESET on the sandbox the sysreset test has to be adjusted. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-05sandbox: implement resetHeinrich Schuchardt6-0/+61
Up to now the sandbox would shutdown upon a cold reset request. Instead it should be reset. In our coding we use static variables like LIST_HEAD(efi_obj_list). A reset can occur at any time, e.g. via an UEFI binary calling the reset service. The only safe way to return to an initial state is to relaunch the U-Boot binary. The reset implementation uses execv() to relaunch U-Boot. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-05sandbox: use O_CLOEXEC in os_open()Heinrich Schuchardt1-0/+5
During a cold reset execv() is used to relaunch the U-Boot binary. We must ensure that all files are closed in this case. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-05test/py: test poweroffHeinrich Schuchardt1-4/+4
It is the 'poweroff' and not the 'reset' command that should shut down the sandbox. Adjust the unit test accordingly Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-05sandbox: enable poweroff commandHeinrich Schuchardt1-1/+2
The command to shut down a device is 'poweroff'. It is a deficit of the sandbox that it does not support resetting yet but shuts down upong seeing the 'reset' command. Once the sandbox properly supports reset we need the 'poweroff' command to leave the sandbox. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-05sandbox: eth-raw: do not close the console inputHeinrich Schuchardt2-5/+8
When the sandbox eth-raw device host_lo is removed this leads to closing the console input. Do not call close(0). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-11-05configs: meson64: relocate config_distro_bootcmmd headerJaehoon Chung1-1/+2
Relocate a config_distro_bootcmd header before defined CONFIG_EXTRA_ENV_SETTINGS. Otherwise it can't change to specific environment. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-11-05doc: board: vim3: Fix build instructionsNeil Armstrong2-8/+12
The build instructions were buggy and changed a little since they were written. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-11-05doc: board: amlogic: Update support matrixNeil Armstrong1-3/+5
Update the matrix table with new supported features and new SoC features to support. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-11-05x86: Use if instead of #ifdef in write_tables()Simon Glass1-19/+19
Use if() to remove the extra build path in this code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05x86: Add SMBIOS info for CoralSimon Glass1-0/+8
This is required by Chrome OS so that the audio and other unibuild features work correctly. Add it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05x86: coral: Drop the duplicate PCIe settingsSimon Glass1-2/+0
These settings are included twice. The second lot are correct, so drop the others. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05x86: Don't bother clearing global NVSSimon Glass1-1/+0
The bloblist guarantees that blobs are zeroed so there is no need to do an additional memset(). Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05x86: acpi: Store the ACPI context in global_dataSimon Glass2-1/+19
At present we create the ACPI context but then drop it after generation of tables is complete. This is annoying because we have to then search for tables later. To fix this, allocate the context and store it in global_data. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05x86: Allow writing tables to failSimon Glass3-3/+15
At present write_tables() can fail but does not report this problem to its caller. Fix this by changing the return type. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05x86: Add support for private filesSimon Glass1-0/+4
Some boards need to include binary data into the image for use during the boot process. Add a node for these. An example is the audio-codec configuration used by some audio drivers on Intel platforms. If no private files are provided, they will be omitted. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05x86: Add a layout for Chrome OS verified bootSimon Glass1-0/+38
Add definitions for part of the vboot context used with verified boot. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05x86: apl: Add core init for the SoCSimon Glass7-21/+170
Set up MSRs required for Apollo Lake. This enables Linux to use the timers correctly. Also write the fixed MSRs for this platform. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05Add an assembly guard around linux/bitops.hSimon Glass1-2/+2
This file can be included by any header but it includes C code. Guard it to avoid errors when compiling ASL, etc. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05coreboot: make use of smbios parserChristian Gmeiner2-0/+46
If u-boot gets used as coreboot payload it might be nice to get vendor, model and bios version from smbios. I am not sure about the output of all the read information. With qemu target for coreboot this could look this: CBFS: Found @ offset 14f40 size 3b188 Checking segment from ROM address 0xffc15178 Checking segment from ROM address 0xffc15194 Loading segment from ROM address 0xffc15178 code (compression=1) New segment dstaddr 0x01110000 memsize 0x889ef srcaddr 0xffc151b0 filesize 0x3b150 Loading Segment: addr: 0x01110000 memsz: 0x00000000000889ef filesz: 0x000000000003b150 using LZMA Loading segment from ROM address 0xffc15194 Entry Point 0x01110000 BS: BS_PAYLOAD_LOAD run times (exec / console): 77 / 1 ms Jumping to boot code at 0x01110000(0x07fa7000) U-Boot 2020.10-00536-g5dcf7cc590-dirty (Oct 07 2020 - 14:21:51 +0200) CPU: x86_64, vendor AMD, device 663h DRAM: 127.1 MiB MMC: Video: No video mode configured in coreboot! Video: No video mode configured in coreboot! Vendor: QEMU Model: Standard PC (i440FX + PIIX, 1996) Bios Version: 4.12-3152-g326a499f6f-dirty Net: e1000: 52:54:00:12:34:56 eth0: e1000#0 No working controllers found Finalizing coreboot Hit any key to stop autoboot: 0 Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05smbios: add parsing APIChristian Gmeiner4-0/+129
Add a very simple API to be able to access SMBIOS strings like vendor, model and bios version. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05x86: Fix up driver names to avoid dtoc warningsSimon Glass14-21/+21
At present there are a lot of dtoc warnings reported when building chromebook_coral, of the form: WARNING: the driver intel_apl_lpc was not found in the driver list Correct these by using driver names that matches their compatible string. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-05cros_ec: Fix up driver names to avoid dtoc warningsSimon Glass3-6/+6
Fix the dtoc warning in these file by using a driver name that matches the compatible string. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-11-04board: ge: b1x5v2: Add MAINTAINERSSebastian Reichel1-0/+9
Introduce maintainers file for the GE B1x5 board. Cc: Huan 'Kitty' Wang <HuanWang@ge.com> Cc: Ian Ray <ian.ray@ge.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-04board: ge: ppd: Update MAINTAINERSSebastian Reichel1-4/+6
This updates the PPD MAINTAINERS file doing a couple of changes: * Replace Martyn with myself, since he no longer has the hardware available and add Ian Ray as maintainer * Fix the board directory path, which was still listing freescale/ instead of ge/ * Order the list of files alphabetically * Add board specific device tree files to the file list Cc: Martyn Welch <martyn.welch@collabora.com> Cc: Ian Ray <ian.ray@ge.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-04board: ge: bx50v3: Update MAINTAINERSSebastian Reichel1-3/+8
This updates the Bx50v3 MAINTAINERS file, so that it also catches changes to the related device tree files. Additionally the list of files has been sorted alphabetically and I added myself as maintainer. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-04arch: Move NEEDS_MANUAL_RELOC symbol to KconfigMichal Simek4-7/+5
CONFIG_NEEDS_MANUAL_RELOC macro was out of Kconfig. Move it there to be able to use compile-time checks to reduce the number of build paths. Fixes: f9a882438966 ("dm: core: Convert #ifdef to if() in root.c") for Microblaze Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-11-03env: sf: fix init function behaviourHeiko Schocher2-3/+7
Michael wrote: commit 92765f45bb95 ("env: Access Environment in SPI flashes before relocation") at least breaks the Kontron sl28 board. I guess it also breaks others which use a (late) SPI environment. reason is, that env_init() sets the init bit, if there is no init function defined in an environment driver, and use default return value -ENOENT in this case later for setting the default environment. Change: Environment driver can now implement an init function and return, if this function does nothing, simply -ENOENT. env_init() now handles -ENOENT correct by setting the inited bit for the environment driver. And if there is no other environment driver whose init function returns 0, load than the default environment. This prevents that each environment driver needs to set the default environment. Fixes: 92765f45bb95 ("env: Access Environment in SPI flashes before relocation") Reported-by: Michael Walle <michael@walle.cc> Tested-by: Michael Walle <michael@walle.cc> [For the SF environment] Signed-off-by: Heiko Schocher <hs@denx.de>
2020-11-02Merge tag 'u-boot-atmel-fixes-2021.01-a' of ↵Tom Rini9-9/+9
https://gitlab.denx.de/u-boot/custodians/u-boot-atmel First set of u-boot-atmel fixes for 2021.01 cycle: This specific feature set includes the patches for DT required to fix the warnings for newer DTC version (1.6.0+), i2c and spi bus unit address.
2020-11-02ARM: dts: at91: sama5d3xmb_cmp: fix SPI bus unit addressEugen Hristev1-1/+1
w+arch/arm/dts/.at91sam9260ek.dtb.pre.tmp:119.21-123.7: Warning (spi_bus_reg): /ahb/apb/spi@fffc8000/mtd_dataflash@0: SPI bus unit address format error, expected "1" Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2020-11-02ARM: dts: at91: sam9260ek: fix SPI bus unit addressEugen Hristev1-1/+1
w+arch/arm/dts/.at91sam9260ek.dtb.pre.tmp:119.21-123.7: Warning (spi_bus_reg): /ahb/apb/spi@fffc8000/mtd_dataflash@0: SPI bus unit address format error, expected "1" Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2020-11-02ARM: dts: at91: sama5d3xmb: fix I2C bus unit addressEugen Hristev1-1/+1
w+arch/arm/dts/sama5d3xmb.dtsi:64.25-83.7: Warning (i2c_bus_reg): /ahb/apb/i2c@f0018000/camera@0x30: I2C bus unit address format error, expected "30" Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2020-11-02ARM: dts: at91: gurnard: fix SPI bus unit addressEugen Hristev1-1/+1
w+arch/arm/dts/.at91sam9g45-gurnard.dtb.pre.tmp:118.21-122.7: Warning (spi_bus_reg): /ahb/apb/spi@fffa4000/mtd_dataflash@0: SPI bus unit address format error, expected "1" Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2020-11-02ARM: dts: at91: at91sam9g25ek: fix I2C bus unit addressEugen Hristev1-1/+1
w+arch/arm/dts/.at91sam9g25ek.dtb.pre.tmp:28.25-47.7: Warning (i2c_bus_reg): /ahb/apb/i2c@f8010000/camera@0x30: I2C bus unit address format error, expected "30" Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2020-11-02ARM: dts: at91: at91sam9g20ek_common: fix SPI bus unit addressEugen Hristev1-1/+1
w+arch/arm/dts/at91sam9g20ek_common.dtsi:100.21-104.7: Warning (spi_bus_reg): /ahb/apb/spi@fffc8000/mtd_dataflash@0: SPI bus unit address format error, expected "1" Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2020-11-02ARM: dts: at91: at91sam9g20-taurus: fix SPI bus unit addressEugen Hristev1-1/+1
w+arch/arm/dts/.at91sam9g20-taurus.dtb.pre.tmp:79.18-83.4: Warning (spi_bus_reg): /ahb/apb/spi@fffc8000/mtd_dataflash@0: SPI bus unit address format error, expected "1" Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2020-11-02ARM: dts: at91: at91sam9261ek: fix SPI unit address warningEugen Hristev1-1/+1
w+arch/arm/dts/.at91sam9261ek.dtb.pre.tmp:124.15-144.7: Warning (spi_bus_reg): /ahb/apb/spi@fffc8000/tsc2046@0: SPI bus unit address format error, expected "2" Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2020-11-02ARM: dts: at91: vinco: fix I2C warning bus unit addressEugen Hristev1-1/+1
w+arch/arm/dts/.at91-vinco.dtb.pre.tmp:131.18-134.7: Warning (i2c_bus_reg): /ahb/apb/i2c@f8024000/rtc@64: I2C bus unit address format error, expected "32" Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2020-11-01Merge tag 'efi-2020-01-rc2-2' of ↵Tom Rini20-106/+389
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2021-01-rc2 (2) The series contains the following enhancements * preparatory patches for UEFI capsule updates * initialization of the emulated RTC using an environment variable and a bug fix * If DisconnectController() is called for a child controller that is the only child of the driver, the driver must be disconnected.
2020-11-01board: ge: b1x5v2: Add GE B1x5v2 and B1x5Pv2Sebastian Reichel9-0/+2233
GE B1x5v2 patient monitor series is similar to the CARESCAPE Monitor series (GE Bx50). It consists of a carrier PCB used in combination with a Congatec QMX6 SoM. This adds U-Boot support using device model everywhere and SPL for memory initialization. Proper configuration is provided as 'ge_b1x5v2_defconfig' and the combined image u-boot-with-spi.imx can be flashed directly to 1024 byte offset to /dev/mtdblock0. Alternatively SPL and u-boot.imx can be loaded separately via USB-OTG using e.g. imx_usb. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2020-11-01board: ge: common: vpd: separate I2C specific codeSebastian Reichel4-12/+27
This separates the I2C specific code from the generic GE vital product data code, so that the generic parts can be used on hardware with VPD stored in SPI flash memory. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-01board: ge: common: add config option for RTC and VPD featureSebastian Reichel4-1/+13
While this code is being used by all GE platforms its useful to have it behind a config option for hardware bringup of new platforms. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-01board: ge: common: rename ge_common.c to ge_rtc.cSebastian Reichel5-3/+3
The file only contains RTC related code, so let's name it accordingly. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-01sysreset: Add poweroff-gpio driverSebastian Reichel3-0/+100
Add GPIO poweroff driver, which is based on the Linux driver and uses the same DT binding. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-01imx6: allow usage of disable_ldb_di_clock_sources for CONFIG_MX6QDLSebastian Reichel1-1/+1
Allow using disable_ldb_di_clock_sources with just the combined CONFIG_MX6QDL being enabled. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-01rtc: m41t62: add oscillator fail bit reset supportSebastian Reichel1-0/+50
In case of empty battery or glitches the oscillator fail bit might be set. This will reset the bit in the reset routine. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-01rtc: m41t62: reset SQW in m41t62_rtc_resetSebastian Reichel1-6/+83
This takes care of resetting the 32kHz square wave, which is used by some boards as clock source for the SoC. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-01bootcount: add a DM SPI flash backing store for bootcountSebastian Reichel3-0/+136
This driver allows to use SPI flash as backing store for boot counter values with DM enabled. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-01board: phytec: imx8mm: Add PHYTEC phyCORE-i.MX8MM supportTeresa Remmet12-0/+2658
Add support PHYTEC phyCORE-i.MX8MM SOM. Supported features: - 2GB LPDDR4 RAM - 1x 1Gbit Ethernet - eMMC - external SD - debug UART3 - watchdog - i2c eeprom Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
2020-11-01ARM: imx: Add support for the primary/secondary bmode to MX53Marek Vasut1-1/+20
Implement the 'getprisec' subcommand of 'bmode' command for i.MX53 and also the primary/secondary bootmode switching. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2020-11-01watchdog: Hide WATCHDOG_RESET_DISABLEMichael Walle1-6/+7
This option is only supported by the IMX watchdog and seems to be similar to CONFIG_WATCHDOG. Move it below the IMX watchdog and make it dependent on IMX_WATCHDOG. Signed-off-by: Michael Walle <michael@walle.cc>
2020-11-01defconfig: Enable CONFIG_SHOW_BOOT_PROGRESS for imx53's HSC and DDC devicesLukasz Majewski1-0/+1
This option allows using show_boot_progress to visualize the state of boot process. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2020-11-01dts: Provide LED DTS description for HSC and DDC imx53 devicesLukasz Majewski1-0/+4
Those two LEDs are used to indicate U-Boot's boot stage. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2020-11-01arm: Implement show_boot_progress() for imx53's HSC and DDC devicesLukasz Majewski1-0/+51
This patch provides information regarding the boot stage with using LEDs. On the very beginning of U-Boot execution the GREEN LED is turned on. When the execution is passed to Linux kernel the GREEN LED is off and RED one is ON. Afterwards, when Linux takes over the execution, the "heartbeat" driver provides indication if the board is still alive. Please also note that this patch uses {set|clr}bits_le32 macros as turning ON GREEN LED is performed in a _very_ early stage of U-Boot execution before DM_GPIOs are initialized. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2020-11-01mx7ulp: clock: Align the PLL_USB frequencyFabio Estevam1-1/+1
The command 'clocks' shows the following output: => clocks PLL_A7_SPLL 528 MHz PLL_A7_APLL 529 MHz PLL_USB 0 MHz Add some extra spaces so that the PLL_USB information gets aligned with the previous reported frequencies. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2020-11-01mx7ulp: clock: Remove unuseful informationFabio Estevam1-3/+1
The command 'clocks' shows the following output: => clocks PLL_A7_SPLL 528 MHz PLL_A7_APLL 529 MHz PLL_USB 0 MHz .... [do_mx7_showclocks] addr = 0x9FFB61F1 The last line is not useful at all, so just remove it. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2020-11-01thermal: imx_tmu: fix missing includeTim Harvey1-0/+1
commit c05ed00afb dropped linux/delay.h from common header add linux/delay.h to avoid compile warning here Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2020-11-01imx: cpu: terminate line with CR if invalid temp sensorTim Harvey1-1/+2
Ensure we terminate the line with a CR if we get an invalid sensor device or reading. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2020-11-01mx6: peripheral clock from oscillatorJorge Ramirez-Ortiz1-1/+4
In order to be able to run the I2C bus at 400Khz, the chip errata[1] recommends that the peripheral clock runs out of the 24MHz oscillator. Systems running I2C from OP-TEE before Linux executes - for example to access a Secure Element [2] providing the cryptographic support - expect this clock to be configured by the bootloader [3]. [1] IMX6SLCE Rev. 5, 02/2019, ERR007805. [2] OP-TEE: support for NXP SE05X Plug and Trust (patch on the list). [3] OP-TEE: check the imx_i2c.c driver (imx6 patch on the list). Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2020-11-01verdin-imx8mm: enable fdt overlays and env importingIgor Opaniuk1-1/+1
Enable CONFIG_CMD_IMPORTENV and CONFIG_OF_LIBFDT_OVERLAY needed for booting regular Toradex BSP images. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-11-01doc: board: Convert i.MX6ULL EVK README to reSTPeng Fan2-9/+21
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-11-01doc: board: Convert i.MX6UL 14x14 EVK README to reSTPeng Fan2-23/+40
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-11-01doc: board: Convert i.MX6 Sabresd README to reSTPeng Fan3-114/+133
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-11-01doc: board: Convert i.MX6 Sabreauto README to reSTPeng Fan3-82/+101
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-11-01doc: board: Convert i.MXRT1050 EVK README to reSTPeng Fan3-31/+42
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-11-01doc: board: Convert i.MXRT1020 EVK README to reSTPeng Fan3-31/+42
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-11-01doc: board: Convert i.MX8QXP MEK README to reSTPeng Fan3-50/+67
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-11-01doc: board: Convert i.MX8MQ EVK README to reSTPeng Fan3-37/+57
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-11-01doc: board: Convert i.MX8MM EVK README to reSTPeng Fan3-37/+57
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-11-01doc: board: Convert i.MX8MN EVK README to reSTPeng Fan3-37/+58
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-11-01doc: board: Convert i.MX8MP EVK README to reSTPeng Fan3-41/+62
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-11-01board: imx: address dd usage in READMEPeng Fan11-22/+22
When using cygwin64 "dd (coreutils) 8.26 Packaged by Cygwin (8.26-2)", the last not 512bytes aligned data wat cut off and not burned into SD card. Saying the flash.bin size is 1085608 bytes, not 512bytes aligned. It only burned 1085440 bytes, the leaving 168 bytes were not burnned and cause boot issue. So update README dd command to add "conv=notrunc" Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-10-30Merge tag 'u-boot-rockchip-20201031' of ↵Tom Rini32-35/+773
https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip - New PX30 board: Engicam PX30.Core; - Fix USB HID support for rock960; - Remove host endianness dependency for rockchip mkimage; - dts update for rk3288-tinker; - Enable console MUX for some ROCKPi boards; - Add config-based ddr selection for px30;
2020-10-30Merge tag 'dm-pull-30oct20' of ↵Tom Rini89-501/+1860
https://gitlab.denx.de/u-boot/custodians/u-boot-dm of-platdata and dtoc improvements sandbox SPL tests binman support for compressed sections
2020-10-30log: typo logl_pref in documentationHeinrich Schuchardt1-1/+1
The name of structure element logl_prev is not matched by the documentation. %s/logl_pref/logl_prev/ Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-10-30Merge branch '2020-10-30-misc-changes'Tom Rini28-543/+1626
- Additional log improvements - SPI flash environment improvements
2020-10-30doc: rockchip: Document Rockchip miniloader flashingJagan Teki1-1/+39
This would be useful and recommended boot flow for new boards which has doesn't have the DDR support yet in mainline. Sometimes it is very useful for debugging mainline DDR support. Documen it for px30 boot flow. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2020-10-30rockchip: Add Engicam PX30.Core C.TOUCH 2.0Jagan Teki5-0/+144
PX30.Core is an EDIMM SOM based on Rockchip PX30 from Engicam. C.TOUCH 2.0 is a general purpose carrier board with capacitive touch interface support. PX30.Core needs to mount on top of this Carrier board for creating complete PX30.Core C.TOUCH 2.0 board. Add support for it. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2020-10-30arm64: dts: rockchip: px30: Add Engicam C.TOUCH 2.0Jagan Teki1-0/+8
Engicam C.TOUCH 2.0 is an EDIMM compliant general purpose carrier board with capacitive touch interface. Genaral features: - TFT 10.1" industrial, 1280x800 LVDS display - Ethernet 10/100 - Wifi/BT - USB Type A/OTG - Audio Out - CAN - LVDS panel connector SOM's like PX30.Core needs to mount on top of this Carrier board for creating complete PX30.Core C.TOUCH 2.0 board. Add support for it. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2020-10-30rockchip: Add Engicam PX30.Core EDIMM2.2 Starter KitJagan Teki9-0/+189
PX30.Core is an EDIMM SOM based on Rockchip PX30 from Engicam. EDIMM2.2 Starter Kit is an EDIMM 2.2 Form Factor Capacitive Evaluation Board from Engicam. PX30.Core needs to mount on top of this Evaluation board for creating complete PX30.Core EDIMM2.2 Starter Kit. Add support for it. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2020-10-30board: engicam: Attach i.MX6 common codeJagan Teki4-2/+17
The existing common code for Engicam boards uses i.MX6, so attach that into i.MX6 Engicam boards so-that adding new SoC variants of Engicam boards become meaningful. Add support for it. Cc: Stefano Babic <sbabic@denx.de> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2020-10-30rockchip: px30: Add EVB_PX30 Kconfig helpJagan Teki1-0/+5
TARGET_EVB_PX30 can be possible to use other px30 boards. Add the help text for existing EVB, so-that the new boards which are resuing this config option can mention their board help text. This would help to track which boards are using EVB_PX30 config. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-10-30arm64: dts: rockchip: Add Engicam PX30.Core SOMMichael Trimarchi1-0/+232
PX30.Core is an EDIMM SOM based on Rockchip PX30 from Engicam. General features: - Rockchip PX30 - Up to 2GB DDR4 - eMMC 4 GB expandible - rest of PX30 features PX30.Core needs to mount on top of Engicam baseboards for creating complete platform boards. Possible baseboards are, - EDIMM2.2 - C.TOUCH 2.0 Add support for it. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-10-30arm64: dts: rockchip: px30: Add Engicam EDIMM2.2 Starter KitJagan Teki2-0/+46
Engicam EDIMM2.2 Starter Kit is an EDIMM 2.2 Form Factor Capacitive Evaluation Board. Genaral features: - LCD 7" C.Touch - microSD slot - Ethernet 1Gb - Wifi/BT - 2x LVDS Full HD interfaces - 3x USB 2.0 - 1x USB 3.0 - HDMI Out - Mini PCIe - MIPI CSI - 2x CAN - Audio Out SOM's like PX30.Core needs to mount on top of this Evaluation board for creating complete PX30.Core EDIMM2.2 Starter Kit. Add support for it. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-10-30configs: meson64_android: don't show logo on ROM USB bootGuillaume La Roque1-4/+7
When booting from rom usb, skip the boot logo logic as it's possible that the partition containing the logo does not exist yet. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2020-10-30rockchip: mkimage: Remove host endianness dependencySamuel Holland1-14/+15
The Rockchip boot ROM expects little-endian values in the image header. When running mkimage on a big-endian machine, these values need to be byteswapped before writing or verifying the header. This change fixes cross-compiling U-Boot SPL for the RK3399 SoC from a big-endian ppc64 host machine. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2020-10-30rockchip: Enable Console MUX in ROCKPi N8Jagan Teki1-1/+0
Enable Console multiplexing in ROCKPi N8 which would is required to video out the console buffer. Enable it. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2020-10-30video: rockchip: Support 4K resolution for rk3288, HDMIJagan Teki1-2/+2
Like, rk3399 the rk3288 also supports 4K resolution. So, enable it for rk3288 with HDMI platforms. Right now, rockchip video drivers are supporting for rk3288, rk3399 SoC families, so mark the 4K resolution by default if it's an HDMI video out. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Cc: Anatolij Gustschin <agust@denx.de> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2020-10-30arm64: dts: rockchip: Add chosen node for ROCK-Pi N8Jagan Teki1-0/+6
Add chosen node in -u-boot.dtsi for ROCK-Pi N8 board. This will help to get serial out messages. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2020-10-30rockchip: Enable Console MUX in ROCKPi N10Jagan Teki1-1/+0
Enable Console multiplexing in ROCKPi N10 which would is required to video out the console buffer. Enable it. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2020-10-30doc: Update logging documentationSean Anderson1-114/+107
This updates logging documentation with some examples of the new commands added in the previous commits. It also removes some items from the to-do list which have been implemented. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30doc: Add log kerneldocs to documentationSean Anderson2-55/+100
The functions in log.h are already mostly documented, so add them to the generated documentation. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30test: Add a test for log filter-*Sean Anderson3-0/+110
This exercises a few success and failure modes of the log filter-* commands. log filter-list is not tested because it's purely informational. I don't think there's a good way to test it except by testing if the output of the command exactly matches a sample run. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30cmd: log: Add commands to manipulate filtersSean Anderson2-0/+242
This adds several commands to add, list, and remove log filters. Due to the complexity of adding a filter, `log filter-list` uses options instead of positional arguments. These commands have been added as subcommands to log by using a dash to join the subcommand and subsubcommand. This is stylistic, and they could be converted to proper subsubcommands if it is wished. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30test: Add a test for getoptSean Anderson2-0/+124
A few of these tests were inspired by those in glibc. The syntax for invoking test_getopt is a bit funky, but it's necessary so that the CPP can parse the arguments correctly. Signed-off-by: Sean Anderson <seanga2@gmail.com>
2020-10-30lib: Add getoptSean Anderson7-0/+271
Some commands can get very unweildy if they have too many positional arguments. Adding options makes them easier to read, remember, and understand. This implementation of getopt has been taken from barebox, which has had option support for quite a while. I have made a few modifications to their version, such as the removal of opterr in favor of a separate getopt_silent function. In addition, I have moved all global variables into struct getopt_context. The getopt from barebox also re-orders the arguments passed to it so that non-options are placed last. This allows users to specify options anywhere. For example, `ls -l foo/ -R` would be re-ordered to `ls -l -R foo/` as getopt parsed the options. However, this feature conflicts with the const argv in cmd_tbl->cmd. This was originally added in 54841ab50c ("Make sure that argv[] argument pointers are not modified."). The reason stated in that commit is that hush requires argv to stay unmodified. Has this situation changed? Barebox also uses hush, and does not have this problem. Perhaps we could use their fix? I have assigned maintenance of getopt to Simon Glass, as it is currently only used by the log command. I would also be fine maintaining it. Signed-off-by: Sean Anderson <seanga2@gmail.com>
2020-10-30cmd: log: Make "log level" print all log levelsSean Anderson1-3/+9
This makes the log level command print all valid log levels. The default log level is annotated. This provides an easy way to see which log levels are compiled-in. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30cmd: log: Add commands to list categories and driversSean Anderson2-2/+38
This allows users to query which categories and drivers are available on their system. This allows them to construct filter-add commands without (e.g.) adjusting the log format to show categories and drivers. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30cmd: log: Split off log level parsingSean Anderson1-6/+23
Move parsing of log level into its own function so it can be re-used. This also adds support for using log level names instead of just the integer equivalent. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30cmd: log: Use sub-commands for logSean Anderson1-27/+4
This reduces duplicate code, and makes adding new sub-commands easier. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30test: Add test for LOGFF_MINSean Anderson1-0/+23
This tests log filters matching on a minimum level. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30log: Add filter flag to match greater than a log levelSean Anderson2-7/+15
This is the complement of the existing behavior to match only messages with a log level less than a threshold. This is primarily useful in conjunction with LOGFF_DENY. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30test: Add tests for LOGFF_DENYSean Anderson1-0/+67
This adds some tests for log filters which deny if they match. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30test: log: Give tests names instead of numbersSean Anderson1-24/+24
Now that the log test command is no more, we can give the log tests proper names. Signed-off-by: Sean Anderson <seanga2@gmail.com>
2020-10-30test: log: Convert log_test from python to CSean Anderson5-297/+257
When rebasing this series I had to renumber all my log tests because someone made another log test in the meantime. This involved updaing a number in several places (C and python), and it wasn't checked by the compiler. So I though "how hard could it be to just rewrite in C?" And though it wasn't hard, it *was* tedious. Tests are numbered the same as before to allow for easier review. A note that if a test fails, everything after it will probably also fail. This is because that test won't clean up its filters. There's no easy way to do the cleanup, except perhaps removing all filters in a wrapper function. Signed-off-by: Sean Anderson <seanga2@gmail.com>
2020-10-30log: Add filter flag to deny on matchSean Anderson2-3/+20
Without this flag, log filters can only explicitly accept messages. Allowing denial makes it easier to filter certain subsystems. Unlike allow-ing filters, deny-ing filters are added to the beginning of the filter list. This should do the Right Thing most of the time, but it's less-universal than allowing filters to be inserted anywhere. If this becomes a problem, then perhaps log_filter_add* should take a filter number to insert before/after. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30log: Add function to create a filter with flagsSean Anderson2-4/+31
This function exposes a way to specify flags when creating a filter. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30log: Expose some helper functionsSean Anderson2-20/+34
These functions are required by "cmd: log: Add commands to manipulate filters" and "test: Add a test for log filter-*". Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30log: Use CONFIG_IS_ENABLED() for LOG_TESTSean Anderson1-2/+2
Checkpatch complains about using #ifdef for CONFIG variables. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30log: Add additional const qualifier to arraysSean Anderson1-2/+2
Both these arrays and their members are const. Fixes checkpatch complaint. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-30log: Fix incorrect documentation of log_filter.cat_listSean Anderson1-2/+2
Logging category lists are terminated by LOGC_END, not LOGC_NONE. Fixes: e9c8d49d54 ("log: Add an implementation of logging") Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>