summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* common: rename getc() to getchar()Heinrich Schuchardt2020-10-2217-58/+58
| | | | | | | | | | | | | | | | | | | The sandbox is built with the SDL2 library with invokes the X11 library which in turn calls getc(). But getc() in glibc is defined as int getc(FILE *) This does not match our definition. int getc(void) The sandbox crashes when called with parameter -l. Rename our library symbol getc() to getchar(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cli_hush.c: remove broken sanity checkRasmus Villemoes2020-10-221-8/+0
| | | | | | | | | | | | | | | | | | | | This code is intended do prevent one from setting a shell variable abc by doing abc=123 if an environment variable named abc already exists. However, the check is broken, since the env_get is done before the split on =, so we look up whether an environment variable "abc=123" exists, which is obviously never the case. One could move the code to below the split on =, but instead, just remove it, saving a little .text: The check has never worked as intended (it goes all the way back to the initial git commit), and it would anyway not guard against one first setting the shell variable, then doing 'env set abc xyz'. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
* common, autoboot: sync functionality with Kconfig descriptionHeiko Schocher2020-10-221-1/+2
| | | | | | | | | | | | add back again special case: -2 autoboot with no delay and no check for abort as described in Kconfig option, see common/Kconfig help text for option BOOTDELAY. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cosmetic: image: Fix comments and the order of definitionsNaoki Hayama2020-10-222-10/+11
| | | | | | | | | Fix some comments about functions. Move genimg_get_comp_name() above genimg_get_short_name() because genimg_get_comp_name() is related to get_table_entry_name(). Signed-off-by: Naoki Hayama <naoki.hayama@lineo.co.jp> Reviewed-by: Simon Glass <sjg@chromium.org>
* mkimage: Skip adding non-existent IDs to a listNaoki Hayama2020-10-221-2/+7
| | | | | | | | | | | In show_valid_options(), this patch introduces checking whether a category has an entry ID. If not, adding it to a list for output is skipped before calling qsort(). This patch will affect all kinds of image header categories (-A, -C, -O and -T flags). Signed-off-by: Naoki Hayama <naoki.hayama@lineo.co.jp> Reviewed-by: Simon Glass <sjg@chromium.org>
* image: Add a function to modify category informationNaoki Hayama2020-10-222-0/+27
| | | | | | | | Add a generic function which can check whether a category has an entry ID. Signed-off-by: Naoki Hayama <naoki.hayama@lineo.co.jp> Reviewed-by: Simon Glass <sjg@chromium.org>
* Kconfig: Use hex values for CONFIG_{SPL,TPL}_SIZE_LIMITOvidiu Panait2020-10-226-10/+10
| | | | | | | | | | | | | | | | | | CONFIG_{SPL,TPL}_SIZE_LIMIT are defined as hex (SPL_SIZE_LIMIT was converted in b51882d0 ("spl: Convert CONFIG_SPL_SIZE_LIMIT to hex"), but there are still places that reference integer values. Change those to hex as well. Also, update the Makefile to check for 0x0 instead of 0. This also fixes the following build error when CONFIG_SPL_SIZE_LIMIT is set by menuconfig to 0x0: ... spl/u-boot-spl.bin exceeds file size limit: limit: 0 bytes actual: 0x80f0 bytes excess: 0x80f0 bytes Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* tpm: cr50: Correct logging statementsSimon Glass2020-10-221-5/+5
| | | | | | | Fix up some logging statements in this file. Most of them should use log_debug(), apart from one error. Signed-off-by: Simon Glass <sjg@chromium.org>
* i2c: designware: Use log_debug() for debuggingSimon Glass2020-10-221-2/+2
| | | | | | | We don't want the debug output to be visible in a normal boot. Silence it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher<hs@denx.de>
* board: Show memory for frame buffersSimon Glass2020-10-221-0/+2
| | | | | | | When debugging is enabled, show the memory allocated to video frame buffers. Signed-off-by: Simon Glass <sjg@chromium.org>
* bloblist: Place on a 4KB boundarySimon Glass2020-10-221-1/+3
| | | | | | | It is much easier to read the bloblist addresses if it starts on a 4KB boundary. Update it to align it accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
* syscon: Drop the logging in syscon_get_by_driver_data()Simon Glass2020-10-221-1/+1
| | | | | | | | | | This function can be called when it is not known whether it will find anything. This results in confusing log messages if the device is not found. It is better for the caller to log the failure, if necessary. Drop the logging from this function. Signed-off-by: Simon Glass <sjg@chromium.org>
* log: Add missing category namesSimon Glass2020-10-222-1/+8
| | | | | | | Add some category names that were missed in recent changes. Update the comment as a reminder. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge tag 'u-boot-stm32-20201021' of ↵Tom Rini2020-10-2213-101/+66
|\ | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-stm - Activate CMD_EXPORTENV/CMD_IMPORTENV/CMD_ELF for STM32MP15 defconfig - Fix stm32prog command: parsing of FlashLayout without partition - Update MAINTAINERS for ARM STM STM32MP - Manage eth1addr on dh board with KS8851 - Limit size of cacheable DDR in pre-reloc stage in stm32mp1 - Use mmc_of_parse() to read host capabilities in mmc:sdmmc2 driver
| * stm32mp: stm32prog: accept device without partitionPatrick Delaunay2020-10-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When partitions are not available on a device the command stm32prog raises an error but a device can have no partition to check in init_device() and the command need to continue to the next part_id. This patch correct an issue for ram0 target, when block_dev and mtd are NULL. For example with the simple flashlayout file: Opt Part Name Type Device Offset Binary - 0x01 fsbl Binary none 0x0 tf-a-serialboot.stm32 - 0x03 ssbl Binary none 0x0 u-boot.stm32 P 0x10 kernel System ram0 0xC2000000 uImage.bin P 0x11 dtb FileSytem ram0 0xC4000000 stm32mp157f-ev1.dtb Fixes: ffc405e63b94 ("stm32mp: stm32prog: add upport of partial update") Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
| * configs: stm32mp15: activate CMD_ELFPatrick Delaunay2020-10-212-2/+0
| | | | | | | | | | | | | | | | | | | | Activate CONFIG_CMD_ELF to accept the command "bootelf". This patch simplifies the file stm32mp defconfig, as we have no reason to deactivate this command. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
| * configs: stm32mp15: activate CMD_EXPORTENVPatrick Delaunay2020-10-212-2/+0
| | | | | | | | | | | | | | Activate CONFIG_CMD_EXPORTENV to accept the command "env export". Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
| * configs: stm32mp15: activate CMD_IMPORTENVPatrick Delaunay2020-10-212-2/+0
| | | | | | | | | | | | | | | | Activate CONFIG_CMD_IMPORTENV to accept the command "env import". This command is useful in script to include some variable. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
| * MAINTAINERS: Add STM32MP1 RNG driver in stm32mp platformPatrick Delaunay2020-10-211-0/+1
| | | | | | | | | | | | | | | | Add the STM32MP1 RNG driver in the list of drivers supported by the STMicroelectronics STM32MP15x series. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
| * MAINTAINERS: Add stm32 and stm regexp for ARM STM STM32MP platformPatrick Delaunay2020-10-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Add files and directories regex "stm32" and "stm" in "ARM STM STM32MP" platform to avoid missing files or drivers supported by the STMicroelectronics series STM32MP15x. This patch adds the rules already used in Linux kernel for ARM/STM32 ARCHITECTURE. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
| * arm: stm32: cleanup arch gpio.hPatrick Delaunay2020-10-213-70/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cosmetic update of gpio.h: - remove enumerate: stm32_gpio_port, stm32_gpio_pin because STM32_GPIO_XXX values are unused - move STM32_GPIOS_PER_BANK in stm32_gpio.c as its value is IP dependent and not arch dependent No functional change as number of banks and number of gpio by banks is managed by device tree since since DM migration and commit 8f651ca60ba1 ("pinctrl: stm32: Add get_pins_count() ops"). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
| * ARM: dts: stm32: Do not set eth1addr if KS8851 has EEPROMMarek Vasut2020-10-211-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | In case the KS8851 has external EEPROM attached to it, do not set eth1addr at all. The network stack will read the MAC out of the KS8851 and set eth1addr accordingly. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
| * stm32mp: limit size of cacheable DDR in pre-reloc stagePatrick Delaunay2020-10-213-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In pre-reloc stage, U-Boot marks cacheable the DDR limited by the new config CONFIG_DDR_CACHEABLE_SIZE. This patch allows to avoid any speculative access to DDR protected by firewall and used by OP-TEE; the "no-map" reserved memory node in DT are assumed after this limit: STM32_DDR_BASE + DDR_CACHEABLE_SIZE. Without security, in basic boot, the value is equal to STM32_DDR_SIZE. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
| * mmc: stm32_sdmmc2: Use mmc_of_parse() to read host capabilitiesAlexandru Gagniuc2020-10-211-16/+2
| | | | | | | | | | | | | | | | | | | | | | mmc_of_parse() can populate the 'f_max' and 'host_caps' fields of struct mmc_config from devicetree. The same logic is duplicated in stm32_sdmmc2_probe(). Use mmc_of_parse(), which is more generic. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| * mmc: mmc_of_parse: Enable 52 MHz support with "cap-mmc-highspeed"Alexandru Gagniuc2020-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "cap-mmc-highspeed" enables support for 26 MHz MMC, but there is no additional flag to enable 52 MHz MMC. In Linux. "cap-mmc-highspeed" is used for MMC HS at both 26MHz and 52MHz. Use the same approach and enable MMC_CAP(MMC_HS_52) host capability when "cap-mmc-highspeed" is found in the devicetree. In the event an MMC card doesn't support 52 MHz, it will be clocked at a speed based on its EXT CSD, even on 52 MHz host controllers Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com> Tested-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
* | Merge branch '2021.01-rc' of https://github.com/lftan/u-bootTom Rini2020-10-221-2/+2
|\ \ | | | | | | | | | - fix Gen5 enable of EMAC via FPGA
| * | arm: socfpga: fix Gen5 enable of EMAC via FPGARalph Siemsen2020-10-211-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | An earlier conversion from struct to defines introduced two errors, both related to setup of EMAC routed via the FPGA. One of the offsets was incorrect, and the EMAC0/EMAC1 were swapped. The effect of this was rather odd: both ports could operate at gigabit, but one of them would fail to transmit when operating at 100Mbit. Fixes: db5741f7a85ec3ee79b64496172afaa7dc2cb225 ("arm: socfpga: Convert system manager from struct to defines") Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
* | Merge tag 'efi-2021-01-rc1-2' of ↵WIP/21Oct2020Tom Rini2020-10-213-24/+73
|\ \ | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2021-01-rc1 (2) A use after free in the UEFI network stack is fixed.
| * | efi_loader: fix use after free in receive pathPatrick Wildt2020-10-191-23/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With DM enabled the ethernet code will receive a packet, call the push method that's set by the EFI network implementation and then free the packet. Unfortunately the push methods only sets a flag that the packet needs to be handled, but the code that provides the packet to an EFI application runs after the packet has already been freed. To rectify this issue, adjust the push method to accept the packet and store it in a temporary buffer. The EFI application then gets the data copied from that buffer. This way the packet is cached until is is needed. The DM Ethernet stack tries to receive 32 packets at once, thus we better allocate as many buffers as the stack. Signed-off-by: Patrick Wildt <patrick@blueri.se> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | net: add a define for the number of packets received as batchPatrick Wildt2020-10-192-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | With a define for the magic number of packets received as batch we can make sure that the EFI network stack caches the same amount of packets. Signed-off-by: Patrick Wildt <patrick@blueri.se> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | | Revert "Fix data abort caused by mis-aligning FIT data"Marek Vasut2020-10-211-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit eb39d8ba5f0d1468b01b89a2a464d18612d3ea76. The commit breaks booting of fitImage by SPL, the system simply hangs. This is because on arm32, the fitImage and all of its content can be aligned to 4 bytes and U-Boot expects just that. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Reuben Dowle <reuben.dowle@4rf.com> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Marek Vasut <marex@denx.de>
* | | Merge https://gitlab.denx.de/u-boot/custodians/u-boot-shWIP/20Oct2020Tom Rini2020-10-2012-29/+3118
|\ \ \ | | | | | | | | | | | | - Assorted R-Car Gen3 updates
| * | | pinctrl: renesas: pfc-r8a77990: Sync PFC tables with Linux 5.9Lad Prabhakar2020-10-201-27/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync the R8A77990 SoC PFC tables with Linux 5.9 , commit bbf5c979011a. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
| * | | clk: renesas: Import R8A774C0 clock tables from Linux 5.9Lad Prabhakar2020-10-204-0/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import RZ/G2E (R8A774C0) clock tables from Linux 5.9 commit bbf5c979011a ("Linux 5.9"). Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
| * | | clk: renesas: Add R8A774E1 clock tablesBiju Das2020-10-204-0/+366
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This sync's the RZ/G2H clock tables with mainline linux 5.9 commit bbf5c979011a ("Linux 5.9"). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
| * | | clk: renesas: Add R8A774B1 clock tablesBiju Das2020-10-204-0/+344
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This sync's the RZ/G2N clock tables with mainline linux 5.9 commit bbf5c979011a ("Linux 5.9"). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
| * | | arm: dts: r8a774c0: Import DTS from Linux 5.9Lad Prabhakar2020-10-203-0/+2046
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import R8A774C0 (RZ/G2E) SoC DTSI and headers from Linux 5.9 commit bbf5c979011a ("Linux 5.9"). Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
| * | | arm: renesas: Add config option for R8A774C0 SoCLad Prabhakar2020-10-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add config support for RZ/G2E (a.k.a R8A774C0) SoC. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
| * | | arm: renesas: Add config option for R8A774E1 SoCBiju Das2020-10-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add config support for RZ/G2H(a.k.a R8A774E1) SoC. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
| * | | arm: renesas: Add config option for R8A774B1 SoCBiju Das2020-10-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add config support for RZ/G2N(a.k.a R8A774B1) SoC. Also fixed the alignment issue on R8A774A1 config. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
| * | | clk: renesas: r8a774a1-cpg-mssr: Add R8A774A1 RPC clockBiju Das2020-10-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add RPC entry into the R8A774A1 clock driver tables. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
| * | | spi: renesas_rpc_spi: Add R-Car Gen3 and RZ/G2 fallback compatibility stringBiju Das2020-10-201-1/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | Add fallback compatibility string for R-Car Gen3 and RZ/G2. Also sorted the compatible string as per SoC ID. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
* | | Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usbTom Rini2020-10-2026-21/+4819
|\ \ \ | |/ / |/| | | | | - MediaTek USB host support
| * | MAINTAINERS: add USB driver to ARM MEDIATEKChunfeng Yun2020-10-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add MediaTek USB3 Dual-Role controller driver to ARM MEDIATEK, and add myself as a maintainer for it. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | configs: mt8512: enable fastboot and USB host related configsChunfeng Yun2020-10-201-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable mtu3, xhci, tphy drivers. Device mode: enable fastboot; Host mode: enable USB, FAT commands, and fixed regulator, mass storage drivers; Due to device mode is enabled by default, comment out the host mode config here. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | arm: dts: mt8512: add usb related nodesChunfeng Yun2020-10-202-1/+82
| | | | | | | | | | | | | | | | | | | | | Add usb, usb phy, and fixed regulators nodes Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Acked-by: Bin Meng <bmeng.cn@gmail.com>
| * | usb: gadget: Add bcdDevice for the MTU3 USB Gadget ControllerChunfeng Yun2020-10-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Add an entry in usb_gadget_controller_number() for the MTU3 gadget controller. It is used to bind the USB Ethernet driver. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | usb: add MediaTek USB3 DRD driverChunfeng Yun2020-10-2014-0/+4558
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the MediaTek USB3 DRD controller, its host side is based on xHCI, this driver supports device mode and host mode. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Acked-by: Bin Meng <bmeng.cn@gmail.com>
| * | usb: common: add define of usb_speed_string()Chunfeng Yun2020-10-202-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | There is only declaration of usb_speed_string(), but no definition, so add it to avoid build error when call it. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | usb: add USB_SPEED_SUPER_PLUSChunfeng Yun2020-10-202-0/+2
| | | | | | | | | | | | | | | | | | | | | Add enum USB_SPEED_SUPER_PLUS for USB3.1 Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>