aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-29dm: pci: Fix doc typo first -> nextMichal Suchanek
pci_find_first_device description says it can be used for iteration with itself but it should really be with pci_find_next_device Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2022-10-29fdt_support: cosmetic: remove fdt_fixup_nor_flash_size prototypePatrick Delaunay
Remove prototype for the removed function fdt_fixup_nor_flash_size. This patch has no impact as the function is never used. Fixes: 98f705c9cefd ("powerpc: remove 4xx support") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-29dm: doc: Fix serial howto u-boot,dm-pre-reloc typoMichal Suchanek
In a couple of places the document says u-boot,pre-reloc but all examples show u-boot,dm-pre-reloc, use the latter consistently. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-27lib: fix buggy strcmp and strncmpRasmus Villemoes
There are two problems with both strcmp and strncmp: (1) The C standard is clear that the contents should be compared as "unsigned char": The sign of a nonzero value returned by the comparison functions memcmp, strcmp, and strncmp is determined by the sign of the difference between the values of the first pair of characters (both interpreted as unsigned char) that differ in the objects being compared. (2) The difference between two char (or unsigned char) values can range from -255 to +255; so that's (due to integer promotion) the range of values we could get in the *cs-*ct expressions, but when that is then shoe-horned into an 8-bit quantity the sign may of course change. The impact is somewhat limited by the way these functions are used in practice: - Most of the time, one is only interested in equality (or for strncmp, "starts with"), and the existing functions do correctly return 0 if and only if the strings are equal [for strncmp, up to the given bound]. - Also most of the time, the strings being compared only consist of ASCII characters, i.e. have values in the range [0, 127], and in that case it doesn't matter if they are interpreted as signed or unsigned char, and the possible difference range is bounded to [-127, 127] which does fit the signed char. For size, one could implement strcmp() in terms of strncmp() - just make it "return strncmp(a, b, (size_t)-1);". However, performance of strcmp() does matter somewhat, since it is used all over when parsing and matching DT nodes and properties, so let's find some other place to save those ~30 bytes. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2022-10-26Merge branch '2022-10-26-assorted-fixes-and-updates'Tom Rini
- Reduce memory usage in SPL in some cases, clarify some standalone API license issues, fix a Kconfig dependency, pin to a specific version of python setuptools for now, fix a signing problem in mkimage and add a memory uclass.
2022-10-26memory: Add TI GPMC driverRoger Quadros
The GPMC is a unified memory controller dedicated for interfacing with external memory devices like - Asynchronous SRAM-like memories and ASICs - Asynchronous, synchronous, and page mode burst NOR flash - NAND flash - Pseudo-SRAM devices This driver will take care of setting up the GPMC based on the settings specified in the Device tree and then probe its children. Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-10-26dt/bindings: memory: Add bindings for TI GPMC driverRoger Quadros
GPMC stands for General Purpose Memory Controller and it is present on many Texas Instruments SoCs. It supports a number of Asynchronous and Synchronous interfaces and has various settings to configure the bus interface. The DT bindings define all the various GPMC settings. As the GPMC supports multiple devices on the bus, each device is represented as a child and the respective GPMC settings are situated there. (see ti,gpmc-child.yaml) These binding docs are picked up from the Linux kernel. Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-10-26scripts: Makefile.spl: Enable memory drivers to be built for SPLRoger Quadros
Introduce CONFIG_SPL_MEMORY to allow Memory drivers to be built for SPL. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-26dm: memory: Introduce new uclassRoger Quadros
Introduce UCLASS_MEMORY for future Memory Controller device drivers. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-26test: Move to a working version of setuptoolsSimon Glass
The version used on Ubuntu 2022.04 produces a number of warnings: /usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.16.0-unknown is an invalid version and will not be supported in a future release Same with: 0.1.43ubuntu1 11.4.1ubuntu1 2.22.1ubuntu1 1.1build1 According to [1] this is a bug in setuptools. Employ the workaround for now. [1] https://askubuntu.com/questions/1406952/what-is-the-meaning-of-this- pkgresourcesdeprecationwarning-warning-from-pipenv Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-26examples: hello_world: Drop inclusion of common headerPaul Barker
The "common.h" header is not covered by the licensing exception for standalone applications. Let's drop inclusion of this header from the hello_world example to prove that a standalone app can be built without it. Signed-off-by: Paul Barker <paul.barker@sancloud.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-10-26Licenses: Clarify exceptions for standalone appsPaul Barker
On 2010-01-27, an email [1] was sent to the mailing list by Wolfgang Denk which clarified the intended licensing exceptions for standalone applications. As the "export.h" header and the "stubs.c" source files are required to implement a standalone application, the intention was that these files be covered by the licensing exception. This is made clear in the following quotes from that email: "exports.h" should be added to the "allowed" file list; there should be no need to include "common.h". Eventually this needs fixing. Patches are welcome. "examples/standalone/stubs.c" should be added to the "allowed" file list (the ppc_*jmp.S files are LGPLed). There should be no doubts - the intention is clear, the current state may need improvement. Help (read: patches) welcome. [1]: https://lists.denx.de/pipermail/u-boot/2010-January/067174.html Signed-off-by: Paul Barker <paul.barker@sancloud.com> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Wolfgang Denk <wd@denx.de>
2022-10-26crypto: hash: sw: fix Kconfig dependenciesBenjamin Bara
Fix SHA512 config name and add missing SHA384 config. Signed-off-by: Benjamin Bara <Benjamin.Bara@skidata.com>
2022-10-26spl: spl_legacy: Fix NAND boot on OMAP3 BeagleBoardRoger Quadros
OMAP3 BeagleBoard NAND boot hangs when spl_load_legacy_img() tries to read the header into 'struct hdr' which is allocated on the stack. As the header has already been read once before by spl_nand.c, we can avoid the extra header allocation and read here by simply passing around the pointer to the header. This fixes NAND boot on OMAP3 BeagleBoard. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com>
2022-10-26mkimage: fit: Fix signing of configs with external dataSean Anderson
Just like we exclude data-size, data-position, and data-offset from fit_config_check_sig, we must exclude them while signing as well. While we're at it, use the FIT_DATA_* defines for fit_config_check_sig as welll. Fixes: 8edecd3110e ("fit: Fix verification of images with external data") Fixes: c522949a29d ("rsa: sig: fix config signature check for fit with padding") Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-26Merge https://source.denx.de/u-boot/custodians/u-boot-pmicTom Rini
2022-10-26Merge https://source.denx.de/u-boot/custodians/u-boot-watchdogTom Rini
- nuvoton: add expire function for generic reset (Jim) - handle watchdogs during keyed autoboot (Rasmus) - cyclic: Don't disable cylic function upon exceeding CPU time (Stefan) - ulp wdog: Updates to support iMX93 and DM (Alice)
2022-10-26power: fan53555: Fix missing newline in error messageMichal Suchanek
Avoid concatenation with following message. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-10-26power: regulator: fix autoset error handlingJohn Keeping
If a regulator does not support .set_suspend_enable or .set_suspend_value then ret is set to ENOSYS early in the function. The most serious impact of this is that when no automatic setting of voltage is needed then the final regulator_set_enable() is skipped because ret has not been cleared. It seems that the error handling for regulator_set_suspend_value() is also wrong as if this succeeds then the normal boot-on checks are still required, and again ENOSYS needs special treatment here. Fixes: 11406b8f7e ("dm: regulator: support regulator more state") Signed-off-by: John Keeping <john@metanate.com>
2022-10-25Merge https://source.denx.de/u-boot/custodians/u-boot-spiTom Rini
- Add s28hl512t, s28hl01gt (Takahiro) - Rework s25hx_t_post_bfpt_fixup() (Takahiro)
2022-10-25cmd: sf: Handle unaligned 'update' start offsetMarek Vasut
Currently the 'sf update' command fails in case the 'start' offset is not aligned to SPI NOR erase block size. Add the missing alignment calculation. In case the start offset is in the middle of erase block, round start address down to the nearest aligned one, compare only the updated data between what is in the SPI NOR and what is being written, copy new data at offset of the compare buffer, and write back the entire erase block. This is useful e.g. on i.MX6Q where the u-boot-with-spl.imx is at offset 0x400 in the SPI NOR, while the SPI NOR may have erase block size e.g. 0x1000 bytes. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2022-10-24Merge tag 'fsl-qoriq-2022-10-18' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq Layerscape update - support sysreset, - de-select FSL_IFC when booting from SD - disable unused parts of ICID tables - reduce ns_dev size for csu - enable dma snooping for ls104x - nand driver fixups for ls1043ardb rev 7.0 boards.
2022-10-24Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmcTom Rini
2022-10-24Merge tag 'u-boot-imx-20221024' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20221024 ------------------- CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/13916 - for 2022.01 - rework Kontron boards (mx6 and mx8) - fixes for Toradex - fixes (SPI, CAAM, ) - sync DT with Linux - fixes for Gateworks GW7903 and GW7904 PMIC - Engicam i.Core MX8M Plus EDIMM2.2
2022-10-24configs: verdin-imx8mp: enable caamAndrejs Cainikovs
This change enables Cryptographic Accelerator and Assurance Module. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2022-10-24configs: colibri-imx7: Enable bootd commandFrancesco Dolcini
Enable boot/bootd command in toradex colibri-imx7 defconfig, it's just convenient to have it in and every other toradex board already includes it. Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx28: avoid num_cs and spi_max_frequency build errorsMarcel Ziswiler
Avoid the following build errors after the device tree sync: drivers/spi/mxs_spi.c: In function ‘mxs_spi_probe’: drivers/spi/mxs_spi.c:327:25: error: ‘struct dtd_fsl_imx23_spi’ has no member named ‘spi_max_frequency’ 327 | priv->max_freq = dtplat->spi_max_frequency; | ^~ drivers/spi/mxs_spi.c:328:23: error: ‘struct dtd_fsl_imx23_spi’ has no member named ‘num_cs’ 328 | plat->num_cs = dtplat->num_cs; | ^~ Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx23: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx28: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx51: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx53: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx6qdl: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx6qp: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx6sl: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx6sll: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx6sx: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx6ulz: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx6ull: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx6ul: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx7d: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24imx7ulp: synchronise device tree with linuxMarcel Ziswiler
Synchronise device tree with linux v6.0-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-10-24arm: dts: imx8mn-venice: Consolidate with imx8mn-u-bootAdam Ford
Now that a unified imx8mn-u-boot is available, remove duplicated code for generating flash.bin and other common imx8mn peripherals. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-10-24arm: dts: imx8mn-var-som-symphony: Consolidate with imx8mn-u-bootAdam Ford
Now that a unified imx8mn-u-boot is available, remove duplicated code for generating flash.bin and other common imx8mn peripherals. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-10-24arm: dts: imx8mn-evk: Consolidate with imx8mn-u-bootAdam Ford
Now that a unified imx8mn-u-boot is available, remove duplicated code for generating flash.bin and other common imx8mn peripherals. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-10-24arm: dts: imx8mn-ddr4-evk: Consolidate with imx8mn-u-bootAdam Ford
Now that a unified imx8mn-u-boot is available, remove duplicated code for generating flash.bin and other common imx8mn peripherals. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-10-24arm: dts: imx8mn-bsh-smm-s2: Consolidate with imx8mn-u-bootAdam Ford
Now that a unified imx8mn-u-boot is available, remove duplicated code for generating flash.bin and other common imx8mn peripherals. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-10-24arm: dts: imx8mn-beacon-kit: Consolidate with imx8mn-u-bootAdam Ford
Now that a unified imx8mn-u-boot is available, remove duplicated code for generating flash.bin and other common imx8mn peripherals. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-10-24arm: dts: imx8mn-u-boot: Create common imx8mn-u-boot.dtsiAdam Ford
Multiple boards create duplicate entries in their respective -u-boot.dtsi files which all basically do the same thing. To consolidate these and make it easier to make improvements going forward, consolidate them all into one place. This file creates a flash.bin image using binman, and supports LPDDR4, DDR4 and DDR3. Since individual boards use different peripherals and different UART ports, those entries were kept in their respective board files, but the spba1 node was addded which contains all UART1-3 to help facilitate SPL_DM_SERIAL. Individual users will still need to include their respective UART and pinctrl nodes for those UARTS. This consolidated file also supports generating a flash.bin file which can boot from flexSPI if CONFIG_FSPI_CONF_HEADER is enabled. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-10-24imx8m: fix reading of DDR4 MR registers [again]Rasmus Villemoes
Commit 290ffe5788 (imx8m: fix reading of DDR4 MR registers) lifted a private definition of lpddr4_mr_read() from imx8mm-cl-iot-gate board code to drivers/ddr/imx/imx8m/ddrphy_utils.c, because that version actually seems to work in practice. However, commit 99c7cc58e1 (ddr: imx: Add i.MX9 DDR controller driver) reintroduced the broken version in drivers/ddr/imx/imx8m/ddr_init.c, copied most of the rest of ddrphy_utils.c to drivers/ddr/imx/phy/ddrphy_utils.c, and stopped building drivers/ddr/imx/imx8m/ddrphy_utils.c [and that file was then finally completely removed with 7e9bd84883 (imx8m: ddrphy_utils: Remove unused file)]. I assume this must have broken the imx8mm-cl-iot-gate board, at least those that have not had their eeprom programmed with the proper information. It certainly did break our out-of-tree board which always reads back the ID register and uses that for a sanity check. So apply the fix from 290ffe5788 once again. Fixes: 99c7cc58e1 (ddr: imx: Add i.MX9 DDR controller driver) Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-10-24verdin-imx8mp: spl: initialize caamAndrejs Cainikovs
This change initializes Cryptographic Accelerator and Assurance Module. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>