summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2021-10-09lz4: Use a private header for U-BootSimon Glass
At present U-Boot has a header file called lz4.h for its own use. If the host has its own lz4 header file installed (e.g. from the 'liblz4-dev' package) then host builds will use that instead. Move the U-Boot file into its own directory, as is done with various other headers with the same problem. Signed-off-by: Simon Glass <[email protected]>
2021-10-09video: Add 30bpp supportMark Kettenis
Add support for 30bpp mode where pixels are picked in 32-bit integers but use 10 bits instead of 8 bits for each component. Signed-off-by: Mark Kettenis <[email protected]>
2021-10-08image: Drop most #ifdefs in image-board.cSimon Glass
Remove ifdefs in this file, so far as possible without too much refactoring. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Drop unnecessary #ifdefs from image.hSimon Glass
This file has a lot of conditional code and much of it is unnecessary. Clean this up to reduce the number of build combinations. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Tidy up fit_unsupported_reset()Simon Glass
This function is only used in one place and does not need to use the preprocessor. Move it to the C file and convert it to a normal function. Drop fit_unsupported() since it is not used. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Drop IMAGE_ENABLE_IGNORESimon Glass
We can use the new host_build() function for this, so drop it. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08image: Drop IMAGE_OF_SYSTEM_SETUPSimon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08image: Drop IMAGE_OF_BOARD_SETUPSimon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08image: Drop IMAGE_BOOT_GET_CMDLINESimon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough and the board code is now in a separate file. Update the only place where this is used and drop it. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08image: Use Kconfig to enable FIT_RSASSA_PSS on hostSimon Glass
Add a host Kconfig for FIT_RSASSA_PSS. With this we can use CONFIG_IS_ENABLED(FIT_RSASSA_PSS) directly in the host build, so drop the forcing of this in the image.h header. Drop the #ifdef around padding_pss_verify() too since it is not needed. Use the compiler to check the config where possible, instead of the preprocessor. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08image: Use Kconfig to enable CONFIG_FIT_VERBOSE on hostSimon Glass
Add a host Kconfig for FIT_VERBOSE. With this we can use CONFIG_IS_ENABLED(FIT_VERBOSE) directly in the tools build, so drop the forcing of this in the image.h header. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08image: Drop IMAGE_ENABLE_OF_LIBFDTSimon Glass
Add a host Kconfig for OF_LIBFDT. With this we can use CONFIG_IS_ENABLED(OF_LIBFDT) directly in the tools build, so drop the unnecessary indirection. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08image: Drop IMAGE_ENABLE_FITSimon Glass
Make use of the host Kconfig for FIT. With this we can use CONFIG_IS_ENABLED(FIT) directly in the host build, so drop the unnecessary indirection. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08hash: Use Kconfig to enable hashing in host tools and SPLSimon Glass
At present when building host tools, we force CONFIG_SHAxxx to be enabled regardless of the board Kconfig setting. This is done in the image.h header file. For SPL we currently just assume the algorithm is desired if U-Boot proper enables it. Clean this up by adding new Kconfig options to enable hashing on the host, relying on CONFIG_IS_ENABLED() to deal with the different builds. Add new SPL Kconfigs for hardware-accelerated hashing, to maintain the current settings. This allows us to drop the image.h code and the I_WANT_MD5 hack. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08kconfig: Add tools support to CONFIG_IS_ENABLED()Simon Glass
At present we must separately test for the host build for many options, since we force them to be enabled. For example, CONFIG_FIT is always enabled in the host tools, even if CONFIG_FIT is not enabled by the board itself. It would be more convenient if we could use, for example, CONFIG_IS_ENABLED(FIT) and get CONFIG_HOST_FIT, when building for the host. Add support for this. With this and the tools_build() function, we should be able to remove all the #ifdefs currently needed in code that is build by tools and targets. This will be even nicer when we move to using CONFIG(xxx) everywhere, since all the #ifdef and IS_ENABLED/CONFIG_IS_ENABLED stuff will go away. Signed-off-by: Simon Glass <[email protected]> Suggested-by: Rasmus Villemoes <[email protected]> # b4f73886 Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08compiler: Rename host_build() to tools_build()Simon Glass
With the new TOOLS_LIBCRYPTO and some other changes, it seems that we are heading towards calling this a tools build rather than a host build, although of course it does happen on the host. I cannot think of anything built by the host which cannot be described as a tool, so rename this function. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-08image: Avoid #ifdefs for manual relocationSimon Glass
Add a macro to handle manually relocating a pointer. Update the iamge code to use this to avoid needing #ifdefs. This also fixes a bug where the 'done' flag was not set. Signed-off-by: Simon Glass <[email protected]>
2021-10-08image: Create a function to do manual relocationSimon Glass
Rather than adding an #ifdef and open-coding this calculation, add a helper function to handle it. Use this in the image code. Signed-off-by: Simon Glass <[email protected]>
2021-10-08gzip: Avoid use of u64Simon Glass
The gzip API uses the u64 type in it, which is not available in the host build. This makes it impossible to include the header file. We could make this type available, but it seems unnecessary. Limiting the compression size to that of the 'unsigned long' type seems good enough. On 32-bit machines the limit then becomes 4GB, which likely exceeds available RAM anyway, therefore it should be sufficient. On 64-bit machines this is effectively u64 anyway. Update the header file and implementation to use 'ulong' instead of 'u64'. Add a definition of u32 for the cases that seem to need exactly that length. This should be safe enough. Signed-off-by: Simon Glass <[email protected]>
2021-10-08zstd: Create a function for use from U-BootSimon Glass
The existing zstd API requires the same sequence of calls to perform its task. Create a helper for U-Boot, to avoid code duplication, as is done with other compression algorithms. Make use of of this from the image code. Note that the zstd code lacks a test in test/compression.c and this should be added by the maintainer. Signed-off-by: Simon Glass <[email protected]>
2021-10-08compiler: Add a comment to host_build()Simon Glass
This function should have a comment explaining what it does. Add one. Signed-off-by: Simon Glass <[email protected]>
2021-10-08Add support for an owned bufferSimon Glass
When passing a data buffer back from a function, it is not always clear who owns the buffer, i.e. who is responsible for freeing the memory used. An example of this is where multiple files are decompressed from the firmware image, using a temporary buffer for reading (since the compressed data has to live somewhere) and producing a temporary or permanent buffer with the resuilts. Where the firmware image can be memory-mapped, as on x86, the compressed data does not need to be buffered, but the complexity of having a buffer which is either allocated or not, makes the code hard to understand. Introduce a new 'abuf' which supports simple buffer operations: - encapsulating a buffer and its size - either allocated with malloc() or not - able to be reliably freed if necessary - able to be converted to an allocated buffer if needed This simple API makes it easier to deal with allocated and memory-mapped buffers. Signed-off-by: Simon Glass <[email protected]>
2021-10-08lib: Add memdup()Simon Glass
Add a function to duplicate a memory region, a little like strdup(). Signed-off-by: Simon Glass <[email protected]>
2021-10-08arm: a37xx: pci: Handle propagation of CRSSVE bit from PCIe Root PortPali Rohár
Now that PCI Bridge (PCIe Root Port) for Aardvark is emulated in U-Boot, add support for handling and propagation of CRSSVE bit. When CRSSVE bit is unset (default), driver has to reissue config read/write request on CRS response. CRSSVE bit is supported only when CRSVIS bit is provided in read-only Root Capabilities register. So manually inject this CRSVIS bit into read response for that register. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2021-10-08pm9263: Remove unused CONFIG_USER_LOWLEVEL_INITPatrick Delaunay
Remove the latest reference of CONFIG_USER_LOWLEVEL_INIT in code Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2021-10-08stm32f429: move CONFIG_BOOTCOMMAND in defconfigPatrick Delaunay
Move CONFIG_BOOTCOMMAND defined in Kconfig in the board defconfig. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2021-10-08configs: Move some usb config in defconfigPatrick Delaunay
Using the tools moveconfig.py to move the following config in the defconfig files: CONFIG_USB_HOST_ETHER CONFIG_USB_ETHER_ASIX CONFIG_USB_ETHER_MCS7830 CONFIG_USB_ETHER_SMSC95XX These option are already migrated since the commit f58ad98a621c ("usb: net: migrate USB Ethernet adapters to Kconfig") and the commit ae3584498bf8 ("usb: net: migrate CONFIG_USB_HOST_ETHER to Kconfig"). Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Mark Kettenis <[email protected]> Reviewed-by: Ian Ray <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2021-10-08Convert CONFIG_STM32_FLASH to KconfigPatrick Delaunay
This converts the CONFIG_STM32_FLASH to Kconfig by using tools/moveconfig.py Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2021-10-08Revert "configs: stm32mp1: only support SD card after NOR in bootcmd_stm32mp"Marek Vasut
This reverts commit d5d726d3cc47691ace3c68fa31147ad104aaf579, which breaks boards which ship with multiple SD/eMMC sockets. This stm32mp1.h config is not used only by the ST reference boards, but all the other STM32MP1 based boards in U-Boot, so changes to this stm32mp1.h cannot break the other boards. Signed-off-by: Marek Vasut <[email protected]> Cc: Patrice Chotard <[email protected]> Cc: Patrick Delaunay <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2021-10-08arm: stm32: Disable ATAGs supportPatrick Delaunay
These platforms never had to support an ATAGs-based Linux Kernel, so remove the options. Cc: Marek Vasut <[email protected]> Signed-off-by: Tom Rini <[email protected]> Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]> Tested-by: Patrice Chotard <[email protected]> Reviewed-by: Alexandru Gagniuc <[email protected]>
2021-10-07mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULPOleksandr Suvorov
Import HS400 support for iMX7ULP B0 from the Linux kernel: 2eaf5a533afd ("mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP") According to IC suggest, need to clear the STROBE_DLL_CTRL_RESET before any setting of STROBE_DLL_CTRL register. USDHC has register bits(bit[27~20] of register STROBE_DLL_CTRL) for slave sel value. If this register bits value is 0, it needs 256 ref_clk cycles to update slave sel value. IC suggest to set bit[27~20] to 0x4, it only need 4 ref_clk cycle to update slave sel value. This will short the lock time of slave. i.MX7ULP B0 will need more time to lock the REF and SLV, so change to add 5us delay. Signed-off-by: Oleksandr Suvorov <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]> Reviewed-by: Igor Opaniuk <[email protected]>
2021-10-07smegw01: Pass 'mmcpart' to the kernel command lineFabio Estevam
When using SWUpdate, it is necessary to toggle between partitions. Use the 'mmcpart' environment variable to accomplish that. Signed-off-by: Fabio Estevam <[email protected]>
2021-10-07imx: imx8mm: Add support for Kontron Electronics SL/BL i.MX8M-Mini boards ↵Frieder Schrempf
(N801x) The Kontron SoM-Line i.MX8MM (N801x) by Kontron Electronics GmbH is a SoM module with an i.MX8M-Mini SoC, 1/2/4 GB LPDDR4 RAM, SPI NOR, eMMC and PMIC. The matching evaluation boards (Board-Line) have 2 Ethernets, USB 2.0, HDMI/LVDS, SD card, CAN, RS485 and much more. Signed-off-by: Frieder Schrempf <[email protected]> Reviewed-by: Stefano Babic <[email protected]> Tested-by: Heiko Thiery <[email protected]>
2021-10-07imx: ventana: fix splash logo drawingTim Harvey
After mxc_ipuv3 DM_VIDEO conversion showing splash image doesn't work. Fix this by adding new requirements: - splashimage env variable. - CONFIG_SPLASH_SCREEN - CONFIG_CMD_BMP Signed-off-by: Tim Harvey <[email protected]>
2021-10-07imx: imx6ul: Add support for Kontron Electronics SL/BL i.MX6UL/ULL boards ↵Frieder Schrempf
(N63xx/N64xx) This adds support for i.MX6UL/ULL-based evaluation kits with SoMs by Kontron Electronics GmbH. Currently there are the following SoM flavors (SoM-Line): * N6310: SOM with i.MX6UL-2, 256MB RAM, 256MB SPI NAND * N6311: SOM with i.MX6UL-2, 512MB RAM, 512MB SPI NAND * N6411: SOM with i.MX6ULL, 512MB RAM, 512MB SPI NAND And the according evaluation boards (Board-Line): * N6310-S: Baseboard with SOM N6310, eMMC, display (optional), ... * N6311-S: Baseboard with SOM N6311, eMMC, display (optional), ... * N6411-S: Baseboard with SOM N6411, eMMC, display (optional), ... Currently U-Boot describes i.MX6UL and i.MX6ULL through separate config options at compile-time. Though the differences are so minor, that for the scope of these SoMs we just use a single defconfig that is compatible with both SoCs. Signed-off-by: Frieder Schrempf <[email protected]> Reviewed-by: Stefano Babic <[email protected]>
2021-10-07imx: mx7: spl: fix CONFIG_SPL_MAX_SIZE definitionMatthias Schiffer
The CONFIG_SPL_MAX_SIZE definition did not account for all areas that are used by the boot ROM according to the manual, causing boot failures due to truncated SPL images when actually hitting this limit. Signed-off-by: Matthias Schiffer <[email protected]>
2021-10-07imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MBOleksandr Suvorov
The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover Signed-off-by: Oleksandr Suvorov <[email protected]>
2021-10-07imx8mq_evk: Increase CONFIG_SYS_BOOTM_LEN to 64MBOleksandr Suvorov
The BSP platform LmP supports the board NXP iMX8M Plus EVK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover Signed-off-by: Oleksandr Suvorov <[email protected]>
2021-10-07imx8mm_evk: Increase CONFIG_SYS_BOOTM_LEN to 64MBOleksandr Suvorov
The BSP platform LmP supports the board NXP iMX8M Mini EVK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover Signed-off-by: Oleksandr Suvorov <[email protected]>
2021-10-07spl_fit. add hook to make fixes after fit header is loadedHeiko Schocher
add hook function spl_load_simple_fit_fix_load() which is called after fit image header is loaded. Signed-off-by: Heiko Schocher <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-10-07ARM: amlogic: add JetHub common config headerVyacheslav Bocharov
JetHub devices uses its own boot sequence with "rescue" button Signed-off-by: Vyacheslav Bocharov <[email protected]> Signed-off-by: Neil Armstrong <[email protected]>
2021-10-07distro_bootcmd: run pci enum for scsi_boot just like it is done for nvme_bootNeil Armstrong
The SCSI device can be a PCIe adapter, so run pcie enum if enabled. Signed-off-by: Mark Kettenis <[email protected]> Signed-off-by: Neil Armstrong <[email protected]>
2021-10-07configs: meson64: add SCSI boot targetNeil Armstrong
Add SCSI target to be able to boot from the SATA disks on the Odroid HC4 using an on-board AHCI PCIe controller. Signed-off-by: Neil Armstrong <[email protected]> Signed-off-by: Mark Kettenis <[email protected]>
2021-10-07ARM: meson: Sync Amlogic DT from Linux 5.14Neil Armstrong
Import Amlogic DT changes from Linux commit 7d2a07b76933 ("Linux 5.14"), dt-bindings clock changes and new meson-g12b-gsking-x.dts, meson-sm1-bananapi-m5 & odroid-hc4 boards. Signed-off-by: Neil Armstrong <[email protected]>
2021-10-06Convert CONFIG_NAND_OMAP_ECCSCHEME to KconfigTom Rini
The values of CONFIG_NAND_OMAP_ECCSCHEME map to the enum in include/linux/mtd/omap_gpmc.h for valid ECC schemes. Make which one we will use be a choice statement, enumerating the ones which we have implemented. Signed-off-by: Tom Rini <[email protected]>
2021-10-06Convert CONFIG_SYS_NAND_U_BOOT_LOCATIONS et al to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SYS_NAND_U_BOOT_LOCATIONS CONFIG_SYS_NAND_U_BOOT_OFFS Signed-off-by: Tom Rini <[email protected]>
2021-10-06Convert CONFIG_NAND_FSL_ELBC et al to KconfigTom Rini
This converts the following to Kconfig: CONFIG_NAND_FSL_ELBC CONFIG_NAND_FSL_IFC Note that a number of PowerPC platforms had previously enabled CONFIG_NAND_FSL_ELBC without CONFIG_MTD_RAW_NAND, and now they no longer enable the option, reducing the size of a few functions. Signed-off-by: Tom Rini <[email protected]>
2021-10-06Convert CONFIG_SYS_NAND_MAX_CHIPS to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SYS_NAND_MAX_CHIPS Signed-off-by: Tom Rini <[email protected]>
2021-10-06nand.h: Cleanup linux/mtd/rawnand.h usageTom Rini
We only include <linux/mtd/rawnand.h> in <nand.h> for the forward declaration of struct nand_chip, so do that directly. Then, include <linux/mtd/rawnand.h> where required directly. Signed-off-by: Tom Rini <[email protected]>
2021-10-06Convert CONFIG_SYS_NAND_ONFI_DETECTION to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SYS_NAND_ONFI_DETECTION Signed-off-by: Tom Rini <[email protected]>