summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-02-11mkimage: Improve documentation of algo-name parameterJan Kiszka2-2/+4
Addresses the feedback provided on 5902a397d029 ("mkimage: Allow to specify the signature algorithm on the command line") which raced with the merge. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-11Replace echo -n's used in environment processing with touchqthedev1-2/+2
echo -n does not give the intended effect when invoked in macOS through /bin/sh, which is the shell make uses by default, see "https://stackoverflow.com/questions/11675070/makefile-echo-n-not-working" for a detailed explanation. In this case, it resulted in "-n" being written to env.txt and env.in even though they should be empty, which caused compilation to fail with "Your board uses a text-file environment, so must not define CONFIG_EXTRA_ENV_SETTINGS". This patch prevents the error by replacing echo -n's with touch, as they are used to create empty files in these cases.
2022-02-11cmd: wrong printf() code in do_test_stackprot_fail()Heinrich Schuchardt1-1/+2
strlen() returns size_t. So we should use %zu to print it. This avoids incorrect output on 32bit systems. Fixes: 2fc62f299174 ("stackprot: Make our test a bit more complex") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-02-11test/py: Add test case for mkimage -o argumentJan Kiszka4-17/+102
Stress the '-o algo_name' argument of mkimage by expanding the vboot test. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Update scripts/pylint.base]
2022-02-11malloc_simple: Remove usage of unsupported %zx format stringPali Rohár1-1/+1
Replace %zx by %lx and cast size_t to ulong. U-Boot currently prints garbage debug output: size=x, ptr=18, limit=18: 4002a000 With this change it prints correct debug data: size=18, ptr=18, limit=2000: 4002a000 Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-11common: fdt_support: add support for "partitions" subnode to ↵Matthias Schiffer1-2/+7
fdt_fixup_mtdparts() Listing MTD partitions directly in the flash mode has been deprecated for a while for kernel Device Trees. Look for a node "partitions" in the found flash nodes and use it instead of the flash node itself for the partition list when it exists, so Device Trees following the current best practices can be fixed up. Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-11button: adc: set state to pressed when the voltage is closest to nominalPeter Cai1-5/+16
In the Linux implementation of adc-keys (drivers/input/keyboard/adc-keys.c), `press-threshold-microvolt` is not really interpreted as a threshold, but rather as the "nominal voltage" of the button. When the voltage read from the ADC is closest to a button's `press-threshold-microvolt`, the button is considered pressed. This patch reconciles the behavior of button-adc with Linux's adc-keys such that device trees can be synchronized with minimal modifications. Signed-off-by: Peter Cai <peter@typeblog.net>
2022-02-11cmd: pxe_utils: sysboot: add kaslr-seed generation supportZhang Ning3-0/+79
this will add kaslrseed keyword to sysboot lable, when it set, it will request to genarate random number from hwrng as kaslr-seed. with this patch exlinux.conf label looks like label l0 menu testing linux /boot/vmlinuz-5.15.16-arm initrd /boot/initramfs-5.15.16-arm.img fdtdir /boot/dtbs/5.15.16-arm/ kaslrseed append root=UUID=92ae1e50-eeeb-4c5b-8939-7e1cd6cfb059 ro Tested on Khadas VIM with kernel 5.16.0-rc5-arm64, Debian 11. Signed-off-by: Zhang Ning <zhangn1985@qq.com>
2022-02-11Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini4-12/+50
2022-02-11usb: gadget: ci: Avoid null pointer dereferenceMarek Vasut1-1/+4
The ci_req->hw_buf can be NULL, test whether it is and if so, avoid accessing it. Else, the system may crash. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Peter Chen <peter.chen@nxp.com> Cc: Li Jun <jun.li@nxp.com> Cc: Peng Fan <peng.fan@nxp.com>
2022-02-11console: usb: kbd: Limit poll frequency to improve performanceThomas Watson1-5/+26
Using the XHCI driver, the function `usb_kbd_poll_for_event` takes 30-40ms to run. The exact time is dependent on the polling interval the keyboard requests in its descriptor, and likely cannot be significantly reduced without major rework to the XHCI driver. The U-Boot EFI console service sets a timer to poll the keyboard every 5 microseconds, and this timer is checked every time a block is read off disk. The net effect is that, on my system, loading a ~40MiB kernel and initrd takes about 62 seconds with a slower keyboard and 53 seconds with a faster one, with the vast majority of the time spent polling the keyboard. To solve this problem, this patch adds a 20ms delay between consecutive calls to `usb_kbd_poll_for_event`. This is sufficient to reduce the total loading time to under half a second for both keyboards, and does not impact the perceived keystroke latency. Signed-off-by: Thomas Watson <twatson52@icloud.com>
2022-02-11usb: ehci-mx6: Enable OTG detection on imx8mm and imx8mnAdam Ford2-6/+20
The imx8mm and imx8mn appear compatible with imx7d-usb flags in the OTG driver. If the dr_mode is defined as host or peripheral, the device appears to operate correctly, however the auto host/peripheral detection results in an error. The solution isn't just adding checks for imx8mm and imx8mn to the check for imx7, because the USB clock needs to be running to read from the USBNC_PHY_STATUS_OFFSET register or it will hang. Marek requested that I not enable the clocks in ehci_usb_of_to_plat, so I modified that function to return an unknown state if the device tree does not explicitly state whether it is a host or a peripheral. When the driver probes, it looks to see if it's in the unknown state, and only then will it read the register to auto-detect. Signed-off-by: Adam Ford <aford173@gmail.com> Tested-by: Tim Harvey <tharvey@gateworks.com>
2022-02-11Merge branch '2022-02-10-platform-updates'Tom Rini172-249/+1592
- Assorted Apple M1 platform updates - Drop CONFIG_SYS_RESET_ADDR, update k3-am64-sk memory values in dts
2022-02-11arm:dts:k3-am64-sk: EMIF tool update to 0.8.0 with 1333MTs for lpddr4Sinthu Raja1-14/+14
EMIF tool for AM64 SK is now updated to 0.8.0 that includes * disabled Write DQ training * improve CA ODT to 60 ohms The lpddr4 enabled with periodic WDQ training is causing periodic 26us stall. This makes the SoC stall without doing anything which leads to R5 interrupt latency in TCM memory. Due to this periodic training there are some outstanding CPU transactions waiting for the lpddr4 to complete. Hence, disable the periodic write DQ training during the non-initialization stage of lpddr4 which results in an approximate 1us stall. Also, update the lpddr4 config to improve CA ODT by 60 ohms The rationales are as follows: - PI_WDQLVL_EN: 2 Bits register field to support write DQ leveling, disable bit 1 that supports Write DQ during non-initialization to avoid ~26us stall during code execution. - MR11_DATA_F1/F2_x register fields value changed to 0x66 that changes the CA ODT from 48ohm to 60ohm to improve the eye margin on CA bus by increasing the signal swing. Signed-off-by: James Doublesin <doublesin@ti.com> Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2022-02-11apple: Fix debug uart clock rateMark Kettenis1-1/+1
The clock rate for the serial console on Apple M1 systems is 24 MHz instead of 240 kHz. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2022-02-11common: drop CONFIG_SYS_RESET_ADDROvidiu Panait3-19/+0
There are no boards that define CONFIG_SYS_RESET_ADDR, so drop the remaining comments referencing it and also the config_whitelist.txt entry. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: thomas@wytron.com.tw
2022-02-11powerpc: mpc8xx: drop CONFIG_SYS_RESET_ADDRESSOvidiu Panait2-10/+2
There are no boards that define CONFIG_SYS_RESET_ADDRESS, so drop the associated mpc8xx code that checks for it. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2022-02-11input: apple: Add support for Apple SPI keyboardMark Kettenis5-1/+282
This driver adds support for the keyboard on Apple Silicon laptops. The controller for this keyboard sits on an SPI bus and uses an Apple-specific HID over SPI protocol. The packets sent by this controller for key presses and key releases are fairly simple and are decoded directly by the code in this driver and converted into standard Linux keycodes. The same controller handles the touchpad found on these laptops. Packets for touchpad events are simply ignored. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested on: Macbook Air M1 Tested-by: Simon Glass <sjg@chromium.org>
2022-02-11spi: apple: Add driver for Apple SPI controllerMark Kettenis4-0/+295
Add a driver for the SPI controller integrated on Apple SoCs. This is necessary to support the keyboard on Apple Silicon laopts since their keyboard uses an Apple-specific HID over SPI protocol. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested on: Macbook Air M1 Tested-by: Simon Glass <sjg@chromium.org>
2022-02-11configs: apple: Add NVMe boot targetMark Kettenis1-0/+7
Add a boot target for NVMe such that we can boot from NVMe. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2022-02-11nvme: apple: Add driver for Apple NVMe storage controllerMark Kettenis4-0/+253
Add a driver for the NVMe storage controller integrated on Apple SoCs. This NVMe controller isn't PCI based and deviates from the NVMe standard in its implementation of the command submission queue and the integration of an NVMMU that needs to be managed. This commit tweaks the core NVMe code to support the linear command submission queue implemented by this controller. But setting up the submission queue and managing the NVMMU controller is handled by implementing the driver ops that were added in an earlier commit. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Tested-on: firefly-rk3399 Tested-by: Mark Kettenis <kettenis@openbsd.org> Tested on: Macbook Air M1 Tested-by: Simon Glass <sjg@chromium.org>
2022-02-11power: domain: apple: Add reset supportMark Kettenis2-1/+73
The power management controller found on Apple SoCs als provides a way to reset all devices within a power domain. This is needed to cleanly shutdown the NVMe controller before we hand over control to the OS. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested on: Macbook Air M1 Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-02-11nvme: Add shutdown functionMark Kettenis2-0/+19
Add a function to disable the NVMe controller. This will be used to let the driver for the NVMe storage integrated on Apple SoCs shutdown the NVMe controller such we can shutdown the NVMe IOP controller in a clean way afterwards before handing control to the OS. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested on: Macbook Air M1 Tested-by: Simon Glass <sjg@chromium.org>
2022-02-11nvme: Introduce driver opsMark Kettenis2-27/+73
The NVMe storage controller integrated on Apple SoCs deviates from the NVMe standard in two aspects. It uses a "linear" submission queue and it integrates an NVMMU that needs to be programmed for each NVMe command. Introduce driver ops such that we can set up the linear submission queue and program the NVMMU in the driver for this strange beast. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested on: Macbook Air M1 Tested-by: Simon Glass <sjg@chromium.org>
2022-02-11arm: apple: Add RTKit supportMark Kettenis3-0/+243
Most Apple IOPs run a firmware that is based on what Apple calls RTKit. RTKit implements a common mailbox protocol. This code provides an implementation of the AP side of this protocol, providing a function to initialize RTKit-based firmwares as well as a function to do a clean shutdown of this firmware. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested on: Macbook Air M1 Tested-by: Simon Glass <sjg@chromium.org>
2022-02-11arm: apple: Change SoC name from "m1" into "apple"Mark Kettenis2-1/+1
U-Boot is expected to support multiple generations of Apple SoCs in a single binary with a single defconfig. Therefore it makes more sense to set SYS_SOC to "apple". Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-11mailbox: apple: Add driver for Apple IOP mailboxMark Kettenis5-0/+124
This mailbox driver provides a communication channel with the Apple IOP controllers found on Apple SoCs. These IOP controllers are used to implement various functions such as the System Manegement Controller (SMC) and NVMe storage. It allows sending and receiving a 96-bit message over a single channel. The header file with the struct used for mailbox messages is taken straight from Linux. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Sven Peter <sven@svenpeter.dev> Reviewed-by: Simon Glass <sjg@chromium.org> Tested on: Macbook Air M1 Tested-by: Simon Glass <sjg@chromium.org>
2022-02-11nvme: Split out PCI supportMark Kettenis147-177/+207
Apple SoCs have an integrated NVMe controller that isn't connected over a PCIe bus. In preparation for adding support for this NVMe controller, split out the PCI support into its own file. This file is selected through a new CONFIG_NVME_PCI Kconfig option, so do a wholesale replacement of CONFIG_NVME with CONFIG_NVME_PCI. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested on: Macbook Air M1 Tested-by: Simon Glass <sjg@chromium.org>
2022-02-10Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini6-16/+232
2022-02-10Merge tag 'dm-pull-8feb22-take3' of ↵Tom Rini102-1158/+1290
https://gitlab.denx.de/u-boot/custodians/u-boot-dm patman snake-case conversion binman fit improvements ACPI fixes and making MCFG available to ARM [trini: Update scripts/pylint.base] Signed-off-by: Tom Rini <trini@konsulko.com>
2022-02-10Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellTom Rini19-332/+120
- kwboot: Misc improvements and fixes (Pali) - Kirkwood: Move to DM ethernet support for some boards (Tony) - Minor misc stuff
2022-02-10arm: kirkwood: Pogoplug E02 : Convert Ethernet to Driver ModelTony Dinh4-77/+22
The Pogoplug E02 board has the network chip Marvell 88E1116R. Convert to Driver Model and use uclass mvgbe and the compatible driver M88E1118R to bring up Ethernet. - Add board_eth_init(), CONFIG_DM_ETH, and CONFIG_PHY_MARVELL to bring up Ethernet. - Currently, CONFIG_RESET_PHY_R symbol is used in arch/arm/mach-kirkwood/include/mach/config.h for all Kirkwood boards with mv8831116 PHY, with each board defines the function reset_phy(). Undefine it for this board. - As the result of the migration to Driver Model, this u-boot image has grown substantially (about 100K, give or take). The old envs location at 0x60000 (384k) is no longer possible. Move it to 0xC0000 (768K). - Miscellaneous changes: Move constants to .c file and remove header file board/cloudengines/pogo_e02/pogo_e02.h, use CONFIG_SYS_THUMB_BUILD to keep u-boot image under 512K, use BIT macro, and cleanup comments. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-02-10tools: kwboot: Allow to use -b without image path as the last getopt() optionPali Rohár1-1/+1
Currently it is possible to call "kwboot -b -t /dev/ttyUSB0" but not to call "kwboot -b /dev/ttyUSB0". Fix it by not trying to process the last argv[], which is non-getopt() option (tty path) as the image path for -b. Fixes: c513fe47dca2 ("tools: kwboot: Allow to use option -b without image path") Reported-by: Marcel Ziswiler <marcel@ziswiler.com> Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marcel Ziswiler <marcel@ziswiler.com> Tested-by: Marcel Ziswiler <marcel@ziswiler.com>
2022-02-10arm: kirkwood: Dockstar : Add DM EthernetTony Dinh4-84/+30
The Dockstar board has the network chip Marvell 88E1116R. Convert to Ethernet driver model, and use uclass mvgbe and the compatible driver M88E1118R to bring up Ethernet. - Add CONFIG_DM_ETH and associated configs. - Add board_eth_init() to use uclass mvgbe to bring up the network. And remove ad-hoc code. - Add CONFIG_PHY_MARVELL to properly configure the network. - Currently, CONFIG_RESET_PHY_R symbol is used in arch/arm/mach-kirkwood/include/mach/config.h for all Kirkwood boards with mv8831116 PHY, with each board defines the function reset_phy(). Undefine it for this board. - Miscellaneous changes: Move constants to .c file and remove header file board/Seagate/dockstar/dockstar.h, use CONFIG_SYS_THUMB_BUILD to keep u-boot image under 512K, add CONFIG_HUSH_PARSER, use BIT macro, and cleanup comments. - Note: This patch is a RESEND for a previous patch: https://patchwork.ozlabs.org/project/uboot/patch/20210812051854.1340-2-mibodhi@gmail.com/ Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-02-10MAINTAINERS: Update list of Armada 385 and Armada 3720 driversPali Rohár1-0/+9
Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-02-10tools: kwboot: Fix detection of quit esc sequencePali Rohár1-8/+11
Quit esc sequence may be also in the middle of the read buffer. Fix the detection for that case. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-02-10arm: kirkwood: iConnect : Add Ethernet supportTony Dinh4-42/+26
- Currently, CONFIG_RESET_PHY_R symbol is used in arch/arm/mach-kirkwood/include/mach/config.h for all Kirkwood boards with mv8831116 PHY, with each board defines the function reset_phy(). Undefine it for this board. - Add board_eth_init(), CONFIG_DM_ETH, and CONFIG_PHY_MARVELL to bring up Ethernet. - Miscellaneous changes: Move constants to .c file and remove header file board/iomega/iconnect/iconnect.h. Add CONFIG_HUSH_PARSER, use BIT macro, and cleanup comments. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-02-10arm: kirkwood: Dreamplug : Use Marvell uclass mvgbe and PHY driver for EthernetTony Dinh5-120/+21
The Globalscale Technologies Dreamplug board has the network chip Marvell 88E1116R. Use uclass mvgbe and the compatible driver M88E1310 driver to bring up Ethernet. - Currently, CONFIG_RESET_PHY_R symbol is used in arch/arm/mach-kirkwood/include/mach/config.h for all Kirkwood boards with mv8831116 PHY, with each board defines the function reset_phy(). Undefine it for this board. - Add board_eth_init() to use uclass mvgbe to bring up both network port 0 and 1. And remove ad-hoc code. - Enable CONFIG_PHY_MARVELL to properly configure the network. - Add myself as maintainer (this board seems to be orphaned, could not contact Jason Cooper using current email). - Miscellaneous changes: Move constants to .c file and remove header file board/Marvell/dreamplug/dreamplug.h, cleanup comments. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Pali Rohár <pali@kernel.org>
2022-02-10doc: qemu-riscv: Update documentation for QEMU spike machineAnup Patel1-16/+32
We can now use same U-Boot images on both QEMU virt machine and QEMU spike machine so let's update the QEMU RISC-V documentation. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2022-02-10riscv: qemu: Implement is_flash_available() for MTD NORAnup Patel1-0/+12
Currently, if MTD NOR is enabled then U-Boot tries to issue flash commands even when CFI flash DT node is not present. This causes access fault on RISC-V emulators or ISS which do not emulate CFI flash. To handle this issue, we implement is_flash_available() for qemu-riscv board which will return 1 only if CFI flash DT node is present. Fixes: d248627f9d42 ("riscv: qemu: Enable MTD NOR flash support") Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2022-02-10riscv: qemu: Enable HTIF console supportAnup Patel1-0/+1
Enable support for HTIF console so that we can use QEMU RISC-V U-Boot on RISC-V emulators and ISS having it. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@vrull.eu> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2022-02-10serial: Add RISC-V HTIF console driverAnup Patel3-0/+187
Quite a few RISC-V emulators and ISS (including Spike) have host transfer interface (HTIF) based console. This patch adds HTIF based console driver for RISC-V platforms which depends totally on DT node for HTIF register base address. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@vrull.eu> Reviewed-by: Rick Chen <rick@andestech.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2022-02-09binman: Convert FIT entry type to a subclass of Section entry typeAlper Nebi Yasak2-51/+30
The binman FIT entry type shares some code with the Section entry type. This shared code is bound to grow, since FIT entries are conceptually a variation of Section entries. Make FIT entry type a subclass of Section entry type, simplifying it a bit and providing us the features that Section implements. Also fix the subentry alignment test which now attempts to write symbols to a nonexistent SPL ELF test file by creating it first. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Avoid AddMissingProperties() and SetCalculatedProperties() with FIT: Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-09binman: Check missing bintools of Section subclassesAlper Nebi Yasak1-0/+1
Binman can check for missing binary tools and prints warnings if anything required for an image is missing. The implementation of this for the Section entry only checks the subentries, presumably because Section does not use any binary tools itself. However, this means the check is also skipped for subclasses of Section which might need binary tools. Make sure missing binary tools are checked for subclasses of the Section entry type as well, by calling the parent class' implementation in the relevant Section method. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-09binman: Register and check bintools from FIT subentriesAlper Nebi Yasak3-0/+78
Binman keeps track of binary tools each entry wants to use. The implementation of this for the FIT entry only adds "mkimage", but not the tools that would be used by its subentries. Register the binary tools that FIT subentries will use in addition to the one FIT itself uses, and check their existence by copying the appropriate method from Section entry type. Also add tests that check if these subentries can use and warn about binary tools. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-09binman: Fix subentry expansion for FIT entry typeAlper Nebi Yasak2-9/+29
Binman tries to expand some entries into parts that make it up, e.g. 'u-boot' into a 'u-boot-expanded' section that contains 'u-boot-nodtb' and 'u-boot-dtb'. Entries with child entries must call ExpandEntries() on them to build a correct image, as it's possible that unexpanded child entries have no data of their own. The FIT entry type doesn't currently do this, which means putting a "u-boot" entry inside it doesn't work as expected. Implement ExpandEntries() for FIT and add a copy of a simple FIT image test that checks subentry expansion in FIT entries. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-09acpi: Move MCFG implementation to common libMoritz Fischer6-65/+81
MCFG tables are used on multiple arches. Move to common ACPI lib. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Moritz Fischer <moritzf@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> Use sizeof(*mcfg) instead of sizeof(*header) Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-09arch: x86: lib: acpi_table: Fix MCFG entriesMoritz Fischer1-0/+2
Commit d953137526cc ("x86: Move SSDT table to a writer function") introduced a bug where the actual MCFG entries are no longer generated. Cc: Simon Glass <sjg@chromium.org> Fixes: d953137526cc ("x86: Move SSDT table to a writer function") Signed-off-by: Moritz Fischer <moritzf@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2022-02-09serial-uclass: fix build warningHeiko Schocher1-1/+1
if CONFIG_DM_STDIO is defined but SERIAL_PRESENT not, gcc drops warnings for serial_stub_* functions that they are defined but not used. Fix it. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-09serial: remove nulldev_serial_inputHeiko Schocher1-5/+0
nulldev_serial_input is static and not used in this file, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>