summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-16MAINTAINERS: add myself as reviewer for SquashFSThomas Petazzoni
As I have followed the development of the SquashFS support in U-Boot as part of Joao Marcos work, it makes sense to get Cc'ed on contributions/bug reports related to the squashfs support. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-09-16lib: fdt: Fix fdtdec_setup_mem..() conversion to livetree APIMarek Vasut
Repair incorrectly negated condition in the original patch which broke DT memory node parsing on everything which has more than one DT memory node, e.g. R-Car3. In case multiple valid memory nodes are present in the DT, the original patch would complete parsing cycle for the first memory node, then move on to the next one, identify it as a valid, and end the parsing. The fix is to invert the condition, to make the code behave as it did before the livetree conversion, so it would continue parsing the subsequent memory nodes as well. Fixes: c2f0950c33 ("lib: fdt: Convert fdtdes_setup_mem..() to livetree API") Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Tested-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
2020-09-16include: phy: fix NULL pointer check in phy_write()Thirupathaiah Annapureddy
phy_write() uses bus->write() instead of bus->read(). This means NULL pointer pre-check needs to happen on bus->write instead of bus->read. Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
2020-09-16MAINTAINERS: update clk entry git treeBaruch Siach
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2020-09-16Merge tag 'efi-2020-10-rc5' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-10-rc5 The following bugs are fixed: * unaligned access in br_i32_decode() * missing restore of global data pointer in UEFI selftest * missing restore of global data pointer on RISC-V in UEfI subsystem * efi_var_mem_notify_exit_boot_services() should not be __efi_runtime
2020-09-16Merge tag 'u-boot-rockchip-20200916' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip - Fix rv1108 grf access issue - make_fit_atf: ignore empty PT_LOAD segment
2020-09-16rockchip: make_fit_atf: ignore empty PT_LOAD segmentHeinrich Schuchardt
The linker sometimes creates PT_LOAD segments with length (p_filesz) zero as described in https://man7.org/linux/man-pages/man5/elf.5.html. This leads to build failures. We should ignore empty segments. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-09-16rockchip: rv1108: enable board early initKever Yang
Enable board early init callback to init board specific hardware. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2020-09-16rockchip: rv1108: Enable grf as pre-reloc nodeKever Yang
The grf node will be used before relocate, enable it in dts. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2020-09-16rockchip: rv1108: use correct API for board callbackKever Yang
Use board_early_init_f() instead of mach_cpu_init() for board, the board_early_init_f() is used for board init and after dm_initf, while the mach_cpu_init() is used for CPU/SOC and before dm_initf()(not able to use syscon API). Fixes: 9cec336708 ("rockchip: evb-rv1108: Use syscon API to get grf base") Fixes: 4aa33690fc {"rockchip: elgin-rv1108: Use syscon API to get grf base") Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2020-09-15Merge tag 'mmc-2020-9-15' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmcTom Rini
- Use mmc_of_parse for msm_sdhci - Add missing common host caps for xenon_sdhci.
2020-09-15Azure/GitLab/Travis: Add SH4 r2dplus machine with various PCI ethernet optionsMarek Vasut
Add SH4 R2Dplus machine configured to test various U-Boot PCI ethernet options -- RTL8139, EEPRO100, AMD PCnet, DEC Tulip. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-09-15mmc: xenon_sdhci: Add missing common host capabilitiesAndre Heider
Use mmc_of_parse() to set the common host properties. That includes "bus-width", so parsing it can be removed from the driver. But more importantly, "non-removable" is now respected, which fixes the usage of eMMC. Signed-off-by: Andre Heider <a.heider@gmail.com> Reviewed-by: Konstantin Porotchkin <kostap@marvell.com> Tested-by: Marek Behún <marek.behun@nic.cz>
2020-09-15mmc: msm_sdhci: Use mmc_of_parse for setting host_capsManivannan Sadhasivam
Since the introduction of 'get_cd' callback in sdhci core, dragonboard410c's MMC interface is broken. It turns out that 'get_cd' callback checks for the host_caps for validating the chip select. And since the msm_sdhci driver is not parsing the host_caps from DT, not all of the cababilities are parsed properly. This results in the MMC interfaces to be broken. Hence, fix this by adding a call to 'mmc_of_parse' during driver probe. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Tested-by: Aníbal Limón <anibal.limon@linaro.org> Reviewed-By: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-09-14efi_selftest: restore gd before do_reset()Heinrich Schuchardt
Before calling do_reset() in the EFI selftest we must restore the global data pointer. Fixes: fa63753f86cc ("efi_selftest: substitute ResetSystem() by do_reset()") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-14efi_loader: save global data pointer on RISC-VHeinrich Schuchardt
On RISC-V the global data pointer is stored in register gp. When a UEFI binary calls the EFI API we have to restore it. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-14riscv: define function set_gd()Heinrich Schuchardt
Function set_gd() is needed in the UEFI sub-system if the global data pointer is stored in a register. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-14efi_loader: efi_var_mem_notify_exit_boot_servicesHeinrich Schuchardt
efi_var_mem_notify_exit_boot_services() is invoked when ExitBootServices() is called by the UEFI payload. efi_var_mem_notify_exit_boot_services() should not be defined as __efi_runtime as it is invoking EFI_ENTRY() and EFI_EXIT() which themselves are not __efi_runtime. Fixes: f1f990a8c958 ("efi_loader: memory buffer for variables") Fixes: e01aed47d6a0 ("efi_loader: Enable run-time variable support for tee based variables") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2020-09-14rsa: crash in br_i32_decode() called from rsa_gen_key_prop()Robert Reither
Fixes problem for unaligned 32bit big-endian access in lib/rsa/rsa-keyprop.c. Exchanges br_i32_decode() with get_unaligned_be32(). This will keep the unaligned access for architectures capable and will do some byte-shift magic for the not so capable ones. Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-by: Robert Reither <robert.reither@external.thalesgroup.com> Remove unused include. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-14Merge branch '2020-09-12-assorted-bugfixes'Tom Rini
- A large assortment of minor fixes - Documentation improvements
2020-09-12test: do no assume hush parser in validate_empty()Heinrich Schuchardt
The environment variable test uses function validate_empty() to check that a variable is not defined. If the hush parser is not enabled, we cannot refer to a variable by $var_name but only by ${var_name}. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Stephen Warren <swarren@nvidia.com>
2020-09-12Makefile: mrproper shall delete doc/output/Heinrich Schuchardt
HTML documentation is generated in doc/output/. This directory shall be deleted by 'make mrproper' Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-09-12doc: describe building with GCCHeinrich Schuchardt
Provide a description of the U-Boot build process with GCC in the HTML documentation. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-12doc: describe source repositoryHeinrich Schuchardt
Add a chapter to the HTML documentation describing how to retrieve the U-Boot sources. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-12ARM: MediaTek: amend IC description for MediaTek MT8512Mingming Lee
The description for MT8512 has some mistake, so correct it. Signed-off-by: Mingming Lee <Mingming.Lee@mediatek.com>
2020-09-11Fix data abort caused by mis-aligning FIT dataReuben Dowle
Attempting to place device tree immediately after an image in memory can lead to mis-aligned data accesses if that image size is not divisible by the alignment requirements of the architecture. Data aborts caused by this were observed on a custom Marvel A388 based system, where the image was a uboot FIT file. The total size varies depending on the uboot device tree size, which does not always lead to correct alignment. The minimum alignment specified for ARM [1] and ARM64 [2] linux booting has been used [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/booting.rst#n126 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm64/booting.rst#n45 Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
2020-09-11mtd: nand: Fix nand write error with bad block addresses above 32-bitT Karthik Reddy
Nand writes should skip the bad blocks with "nand write" command. In case of bad blocks with above 32-bit address, nand_block_isbad() returns false due to truncated bad block address. In below code segment, if (nand_block_isbad(mtd, offset & ~(mtd->erasesize - 1))) offset is 64-bit and mtd->erasesize is 32-bit, hence the truncation is happening. Cast 'mtd->erasesize' with loff_t to fix this issue. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-09-11env: Crash in 'env import' when using checksum and a specific sizePedro Aguilar
This patch adds a sanity check that avoids 'size' to overflow and crash when importing an environment that contains a checksum. Example with the wrong size that causes the crash: => env import -c 0x4100000 3 v1 This assumes that v1 has already been successfully exported with 'env export -c -s 0x100 0x4100000 v1' Signed-off-by: Pedro Aguilar <pedro.aguilar@vimar.com>
2020-09-11bootm: update image OS image size when decompressingHeinrich Schuchardt
In bootm_load_os() the OS image is decompressed. In later stages of the boot process we need the decompressed size of the image. Update images->os.image_len after decompression. Passing the correct size is necessary if we want to check loaded EFI binararies for file truncation by comparing the loaded size to the header field SizeOfImage. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-09-11common: Kconfig: Add dependency for default variables stringsMichal Simek
Kconfig provides several config options for setting up default variables but these are unused when variables are passed to U-Boot via file. That's why cover this dependency in Kconfig. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-09-10PCI: mediatek: Release the resource when PCIe enable port failChuanjia Liu
On the mt7623 platform, if one port enable fail and other port enable succeed. It will hang on when using pci enum because the resource was not released correctly. Signed-off-by: Chuanjia Liu <Chuanjia.Liu@mediatek.com> Tested-by: Frank Wunderlich <frank-w@public-files.de>
2020-09-10Merge tag 'u-boot-amlogic-20200910' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic - enables HDMI output & USB keyboard for Odroid-N2 - setups HDMI output background & enables USB keyboard
2020-09-10configs: odroid-c4: update for HDMI output background & USB keyboardAnand Moon
Enable options SYS_WHITE_ON_BLACK to permit HDMI background screen from white to back, also enable USB_KEYBOARD. Signed-off-by: Anand Moon <linux.amoon@gmail.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-09-10configs: odroid-n2: update for HDMI output & USB keyboardAnand Moon
Enable options to permit HDMI output on Odroid-N2 G12B boards. Enable VPU Power Domain. Enable USB_KEYBOARD. Signed-off-by: Anand Moon <linux.amoon@gmail.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-09-09Merge tag 'u-boot-stm32-20200909' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-stm - fixes on AV96 board: pull up on UART4 RX and adjust PLL4
2020-09-09ARM: dts: stm32: Adjust PLL4 settings on AV96 againMarek Vasut
PLL4Q is supplying both FDCAN and LTDC. In case HDMI is in use, the 50 MHz generated from PLL4Q cannot be divided well enough to produce accurate clock for HDMI pixel clock. Adjust it to generate 74.25 MHz instead. The PLL4P/PLL4R are generating 99 MHz instead of 100 MHz, which is in tolerance for the SDMMC. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Gerald Baeza <gerald.baeza@st.com> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-09-09ARM: dts: stm32: Pull UART4 RX high on AV96Marek Vasut
There is no dedicated pull resistor on the AV96 UART4 (console UART) pin. In case there is no UART adapter installed on the AV96, the line is floating and can trigger reception of garbage characters, which in turn can abort U-Boot autoboot. Add default pull up to mitigate this problem. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-09-09arm: stm32mp: cleanup test on eth_env_set_enetaddr resultPatrick Delaunay
Remove the unnecessary inversion on the eth_env_set_enetaddr() result which only make complex the code of setup_mac_address() and display an invalid value in the associated pr_err. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Marek Vasut <marex@denx.de>
2020-09-09Merge tag 'rpi-next-2020.10.2' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-raspberrypi - fixes for bcmgenet - enable USB keyboard for RPi4 32 bit
2020-09-08config: Enable USB Keyboard suuport on RPi4 32 bitMatthias Brugger
Supporting USB keyboards out of the box is both handy for development and production. Notably if u-boot is used to boot into GRUB. This patch adds USB keyboard support for 32 bit RPi4 config. Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2020-09-08bcmgenet: Add support for rgmii-rxidJason Wessel
The commit 57805f2270c4 ("net: bcmgenet: Don't set ID_MODE_DIS when not using RGMII") needed to be extended for the case of using the rgmii-rxid. The latest version of the Rasbperry Pi4 dtb files for the 5.4 now specify the rgmii-rxid. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Tested-by: Petr Tesarik <ptesarik@suse.com> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2020-09-08bcmgenet: fix DMA buffer managementJason Wessel
This commit fixes a serious issue occurring when several network commands are run on a raspberry pi 4 board: for instance a "dhcp" command and then one or several "tftp" commands. In this case, packet recv callbacks were called several times on the same packets, and send function was failing most of the time. note: if the boot procedure is made of a single network command, the issue is not visible. The issue is related to management of the packet ring buffers (producer / consumer) and DMA. Each time a packet is received, the ethernet device stores it in the buffer and increments an index called RDMA_PROD_INDEX. Each time the driver outputs a received packet, it increments another index called RDMA_CONS_INDEX. Between each pair of network commands, as part of the driver 'start' function, previous code tried to reset both RDMA_CONS_INDEX and RDMA_PROD_INDEX to 0. But RDMA_PROD_INDEX cannot be written from driver side, thus its value was actually not updated, and only RDMA_CONS_INDEX was reset to 0. This was resulting in a major synchronization issue between the driver and the device. Most visible behavior was that the driver seemed to receive again the packets from the previous commands (e.g. DHCP response packets "received" again when performing the first TFTP command). This fix consists in setting RDMA_CONS_INDEX to the same value as RDMA_PROD_INDEX, when resetting the driver. The same kind of fix was needed on the TX side, and a few variables had to be reset accordingly (c_index, tx_index, rx_index). The rx_index and tx_index have only 256 entries so the bottom 8 bits must be masked off. Originated-by: Etienne Dublé <etienne.duble@imag.fr> Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Tested-by: Petr Tesarik <ptesarik@suse.com> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2020-09-07Prepare v2020.10-rc4Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2020-09-07configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2020-09-07Merge tag 'efi-2020-10-rc4' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-10-rc4 Bug fixes are provided in the following areas: * convert file system debug and print messages go log messages * convert UEFI booting messages to log messages * UEFI related code clean up and simplification
2020-09-06efi_selftest: simplify MakefileHeinrich Schuchardt
CONFIG_EFI_LOADER cannot be selected for ARMv7-M CPUs. So don't check it in the Makefile. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-06efi_loader: remove duplicate image size checkHeinrich Schuchardt
The image size is checked in efi_load_pe(). Avoid checking it twice. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-06efi: clean up efi commandHeinrich Schuchardt
* Eliminate superfluous enum value EFI_TABLE_END. * Use correct variable type for the memory type. * Check validity of memory type. * Make efi_build_mem_table static. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-06efi_loader: error message if image not authenticatedHeinrich Schuchardt
Currently if the bootefi command fails due to missing authentication, the user gets no feedback. Write a log message 'Image not authenticated' if LoadImage() fails due to missing authentication. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-06efi_loader: log function in image loaderHeinrich Schuchardt
Use log_err() for error messages. Replace debug() by EFI_PRINT(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>