aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-06-03bootstd: Make BOOTSTD_FULL depend on BOOTSTDCHECK/bootstd-fullSimon Glass1-13/+13
Move BOOTSTD_FULL down in the file so that it can be enabled only when BOOTSTD is enabled. This prevents a build error if BOOTSTD is disabled but BOOTSTD_FULL is enabled. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-06-03configs: Resync with savedefconfigTom Rini1-1/+1
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2023-06-01Merge branch '2023-06-01-assorted-platform-updates' into nextTom Rini29-90/+598
- Assorted updates for TI, nuvoton, sandbox and Xen platforms
2023-06-01arm: mach-k3: am625_init: Add Erratum WA for RTC startupWIP/2023-06-01-assorted-platform-updatesNishanth Menon1-0/+46
In the first silicon revision of the am62x family of SoCs, the hardware wakeup event cannot be used if software is unable to unlock the RTC device within one second after boot. To work around this limitation unlock RTC as soon as possible in the boot flow to maximize our chance of linux being able to use this device. Add the erratum i2327 workaround to initialize the RTC. Signed-off-by: Nishanth Menon <nm@ti.com> [bb@ti.com: rebased from 2021.01 and expanded commit and code messages] Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-06-01arm: baltos: switch to CONFIG_DM_I2CYegor Yefremov2-29/+23
Also use the TPS65910 driver directly. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2023-06-01phy: ti: phy-j721e-wiz: Add j721s2-wiz-10g module supportRavi Gunasekaran1-1/+20
Add support for j721s2-wiz-10g device to use clock-names interface instead of explicitly defining clock nodes within device tree node. Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
2023-06-01arm: mach-k3: arm64-mmu: do not map ATF and OPTEE regions in A53 MMUKamlesh Gurudasani1-5/+59
ATF and OPTEE regions may be firewalled from non-secure entities. If we still map them for non-secure A53, speculative access may happen, which will not cause any faults and related error response will be ignored, but it's better to not to map those regions for non-secure A53 as there will be no actual access at all. Create separate table as ATF region is at different locations for am64 and am62/am62a. Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com>
2023-06-01arm: mach-k3: j7200: clk-data.c: Add main_uart1 clock dataBhavya Kapoor1-2/+5
Add main_uart1 clocks in clk-data.c for J7200. Now, main_uart1 clocks will be set up while booting the J7200 SoC. Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com>
2023-06-01arm: mach-k3: j7200: dev-data.c: Add main_uart1 device dataBhavya Kapoor1-1/+2
Add device data for main_uart1 in dev-data.c for J7200. Now, main_uart1 will be powered on while booting the J7200 SoC. Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com>
2023-06-01arch: arm: mach-k3: j721e: add support for UDA FSUdit Kumar1-1/+1
When selecting UDA partition for booting. MMC read mode was selected as RAW. Due to growing/changing size of u-boot and tispl images. It will be better change to FS in case of UDA FS instead of adjusting offsets with new change. Signed-off-by: Udit Kumar <u-kumar1@ti.com>
2023-06-01configs: j7200: correct mmc offsetUdit Kumar4-4/+4
This patch corrects the MMC raw mode sector offset. Current allocated size for tiboot3 is 1MB and 2MB for tispl. Without this correct offset eMMC boot will fail. Fixes: f8c1e893c82 (configs: j7200_evm_a72: Add Initial suppot) Fixes: 02dff65efe7 (configs: j7200_evm_r5: Add initial support) Fixes: 360c7f46f39 (configs: Add configs for J7200 High Security EVM) Way to test with eMMC boot from boot0/1 partition Boot with SD card, copy images to eMMC boot0 or boot1 partition => mmc dev 0 (1 or 2) => fatload mmc 1 ${loadaddr} tiboot3.bin => mmc write ${loadaddr} 0x0 0x800 => fatload mmc 1 ${loadaddr} tispl.bin => mmc write ${loadaddr} 0x800 0x1000 => fatload mmc 1 ${loadaddr} u-boot.img => mmc write ${loadaddr} 0x1800 0x2000 => mmc partconf 0 1 (1 or 2) 1 => mmc bootbus 0 2 0 0 Cc: Bhavya Kapoor <b-kapoor@ti.com> Cc: Diwakar Dhyani <d-dhyani@ti.com> Cc: KEERTHY <j-keerthy@ti.com> Signed-off-by: Udit Kumar <u-kumar1@ti.com>
2023-06-01doc: board: ti: add documenation for j7200Udit Kumar2-0/+333
This patch adds documentation for j7200. TRM link https://www.ti.com/lit/pdf/spruiu1 Signed-off-by: Udit Kumar <u-kumar1@ti.com> Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-06-01arm: mach-k3: j721s2: clk-data.c: Add main_uart5 clock dataBhavya Kapoor1-2/+5
Add main_uart5 clocks in clk-data.c for J721S2. Now, main_uart5 clocks will be set up while booting the J721S2 SoC. Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com> Reviewed-by: Bryan Brattlof <bb@ti.com>
2023-06-01arm: mach-k3: j721s2: dev-data.c: Add main_uart5 device dataBhavya Kapoor1-1/+2
Add device data for main_uart5 in dev-data.c for J721S2. Now, main_uart5 will be powered on while booting the J721S2 SoC. Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com> Reviewed-by: Bryan Brattlof <bb@ti.com>
2023-06-01arm: mach-k3: j721e: clk-data.c: Add main_uart2 clock dataBhavya Kapoor1-2/+5
Add main_uart2 clocks in clk-data.c for J721E. Now, main_uart2 clocks will be set up while booting the J721E SoC. Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com>
2023-06-01arm: mach-k3: j721e: dev-data.c: Add main_uart2 device dataBhavya Kapoor1-1/+2
Add device data for main_uart2 in dev-data.c for J721E. Now, main_uart2 will be powered on while booting the J721E SoC. Signed-off-by: Bhavya Kapoor <b-kapoor@ti.com>
2023-06-01axi: fix definition of axi_sandbox_get_emul()Heinrich Schuchardt2-5/+5
Compiling with gcc 13 results in an error: drivers/axi/axi-emul-uclass.c:16:5: warning: conflicting types for ‘axi_sandbox_get_emul’ due to enum/integer mismatch; have ‘int(struct udevice *, ulong, enum axi_size_t, struct udevice **)’ {aka ‘int(struct udevice *, long unsigned int, enum axi_size_t, struct udevice **)’} [-Wenum-int-mismatch] 16 | int axi_sandbox_get_emul(struct udevice *bus, ulong address, | ^~~~~~~~~~~~~~~~~~~~ In file included from drivers/axi/axi-emul-uclass.c:14: ./arch/sandbox/include/asm/axi.h:48:5: note: previous declaration of ‘axi_sandbox_get_emul’ with type ‘int(struct udevice *, ulong, uint, struct udevice **)’ {aka ‘int(struct udevice *, long unsigned int, unsigned int, struct udevice **)’} 48 | int axi_sandbox_get_emul(struct udevice *bus, ulong address, uint length, | ^~~~~~~~~~~~~~~~~~~~ Adjust the header definition to match the implementation. Define the size parameter as constant. Fixes: 9a8bcabd8ada ("axi: Add AXI sandbox driver and simple emulator") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-06-01firmware: ti_sci: Add missing LF in error messageAndreas Dannenberg1-1/+1
The "Message not acknowledged" error message is missing a line feed, leading to the console log getting garbled and joined together with whatever the next output is in case this error happens: "ti_sci system-controller@44043000: Message not acknowledgedAuthentication failed!" Fix ths by adding the missing linefeed character. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Acked-by: Andrew Davis <afd@ti.com>
2023-06-01pinctrl: nuvoton: set output state before enabling the outputJim Liu3-7/+7
The default output state may be different to request, change the configuration sequence to avoid glitch. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-06-01configs: am62ax_evm_a53_defconfig: Enable YMODEM support at A53 SPLVignesh Raghavendra1-0/+1
This is required for UART boot flow where u-boot.img needs to be downloaded via YMODEM. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Bryan Brattlof <bb@ti.com>
2023-06-01arm: mach-k3: common: reorder removal of firewallsManorit Chawdhry2-20/+42
K3 devices have some firewalls set up by ROM that we usually remove so that the development is easy in HS devices. While removing the firewalls disabling a background region before disabling the foreground regions keeps the firewall in a state where all the transactions will be blacklisted until all the regions are disabled. This causes a race for some other entity trying to access that memory region before all the firewalls are disabled and causes an exception. Since there is no guarantee on where the background regions lie based on ROM configurations or no guarantee if the background regions will allow all transactions across the memory spaces, iterate the loop twice removing the foregrounds first and then backgrounds. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-06-01Revert "arm: mach-k3: common: don't reconfigure background firewalls"Manorit Chawdhry2-8/+1
This reverts commit b8ebf24e7f4afb5093a31bdf122e1ed0781e5c3c. This patch seems to be fundamentally wrong and requires a different way on how the background firewalls should be configured so revert the patch Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-06-01doc: Add info for building Xen target with ClangLeo Yan1-0/+36
When build Xen target with Clang, the linker reports failure. This patch adds the related info in the documentation as a known issue and gives details for how to dismiss the building failure with Clang. Signed-off-by: Leo Yan <leo.yan@linaro.org>
2023-06-01arm64: Remove duplicated symbolsLeo Yan1-2/+0
When build U-boot with clang with using commands: $ make HOSTCC=clang xenguest_arm64_defconfig $ make HOSTCC=clang CROSS_COMPILE=aarch64-linux-gnu- \ CC="clang -target aarch64-linux-gnueabi" -j8 The compiler reports error: /tmp/start-acdf31.s:330:1: error: symbol '_start' is already defined _start: ^ Because the symbol '_start' has been defined twice, one is defined in arch/arm/cpu/armv8/start.S, another is defined in the header boot0-linux-kernel-header.h. To fix building failure, this patch removes the symbol '_start' from boot0-linux-kernel-header.h. Signed-off-by: Leo Yan <leo.yan@linaro.org>
2023-06-01Merge branch '2023-05-31-assorted-fixes-and-improvements' into nextTom Rini18-28/+48
- Makefile logic fixes, address some issues that clang uncovers on ARM, assorted code cleanups
2023-05-31mmc: fix improper use of memsetWIP/2023-05-31-assorted-fixes-and-improvementsSam Edwards1-1/+1
Buffers created through DEFINE_(CACHE_)ALIGN_BUFFER are actually pointers to the real underlying buffer. Using sizeof(...) is not appropriate in this case. Signed-off-by: Sam Edwards <CFSworks@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-05-31common: dfu: Remove leading space charactersRavi Gunasekaran1-0/+2
As per [1], dfu_alt_info is mentioned to be as semicolon separated string of information on each alternate and the parsing logic in the dfu.c is based on this. Typically, the dfu_alt_info_* is defined in .h files as preprocessor macros with 'alt' info separated by semicolon. But when dfu_alt_info_* is added in the environment files(.env) the script at "scripts/env2string.awk" converts a newline to space. Thus adding a space character after semicolon. This results in incorrect parsing in dfu.c which is based on the information that 'alt' info are only semicolon separated. One option is to add dfu_alt_info_* variable in .env in single line. But there is possiblity for it to exceed the line length limit. So update the parsing logic to remove leading space characters before adding to the dfu list. [1]: https://u-boot.readthedocs.io/en/latest/usage/dfu.html Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
2023-05-31cmd: sf/nand: Print and return failure when 0 length is passedAshok Reddy Soma2-0/+10
For sf commands, when '0' length is passed for erase, update, write or read, there might be undesired results. Ideally '0' length means nothing to do. So print 'ERROR: Invalid size 0' and return cmd failure when length '0' is passed to sf commands. Same thing applies for nand commands also. Example: ZynqMP> sf erase 0 0 ERROR: Invalid size 0 ZynqMP> sf write 10000 0 0 ERROR: Invalid size 0 ZynqMP> sf read 10000 0 0 ERROR: Invalid size 0 ZynqMP> sf update 1000 10000 0 ERROR: Invalid size 0 ZynqMP> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
2023-05-31scripts/Makefile.lib: change spelling of $(srctree)/arch/$(ARCH)/dts in ↵Rasmus Villemoes1-1/+1
dtc_cpp_flags Currently, all in-tree .dts files (apart from some under test/ and tools/), reside in arch/$ARCH/dts. However, in the linux kernel tree, dts files for arm64 boards, and probably in the not too distant future [1], arm boards as well, live in subdirectories of that. For private forks, using a vendor or project subdirectory is also more convenient to clearly separate private code from upstream - in the same way that code under board/ is also split and easy to maintain. In order to prepare for us to follow suit and do the splitting of the in-tree .dts files, and to make life a little easier for private forks that already place dts files not directly in arch/$ARCH/dts, change the $(srctree)/arch/$(ARCH)/dts path to instead refer to the directory of the .dts file being compiled. This should be a no-op for all existing cases. [1] https://lore.kernel.org/lkml/20220328000915.15041-1-ansuelsmth@gmail.com/ Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-05-31semihosting: create file in smh_fs_write_at()Heinrich Schuchardt1-0/+4
If a file does not exist, it should be created. Fixes: f676b45151c3 ("fs: Add semihosting filesystem") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-05-31arm: set alignment properly for asm funcsSam Edwards1-2/+2
ARM requires a 4-byte alignment on all ARM code (though this requirement is relaxed to 2-byte for some THUMB code) and we should be explicit about that here. GAS has its own fix for this[1] that forces proper alignment on any section containing assembled instructions, but this is not universal: Clang's and other gaslike assemblers lack this implicit alignment. Whether or not this is considered a bug in those assemblers, it is better to ask directly for what we want. [1]: https://sourceware.org/bugzilla/show_bug.cgi?id=12931 Signed-off-by: Sam Edwards <CFSworks@gmail.com>
2023-05-31cmd: fs: document where 'size' stores its resultBaruch Siach1-1/+1
Make it a little bit easier for the user to utilize the 'size' command. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-31cli: avoid buffer overrunHeinrich Schuchardt1-1/+1
Invoking the sandbox with /u-boot -c ⧵0xef⧵0xbf⧵0xbd results in a segmentation fault. Function b_getch() retrieves a character from the input stream. This character may be > 0x7f. If type char is signed, static_get() will return a negative number and in parse_stream() we will use that negative number as an index for array map[] resulting in a buffer overflow. Reported-by: Harry Lockyer <harry_lockyer@tutanota.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-31spl: Correct checking of configuration nodeBin Meng1-1/+1
Per the fit_conf_get_node() API doc, it returns configuration node offset when found (>=0). Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-31cmd: fdt: Correct checking of configuration nodeBin Meng1-1/+1
fit_conf_get_node() returns a negative value on error. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-31efi: Correct .efi rulesSimon Glass1-0/+3
These files should have both 'always' and 'targets' so that dependencies are detected correctly. When only 'always' is used, the target is built every time, although I am not quite sure why. Make sure each has both 'always' and 'targets' to avoid this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-05-31acpi: Put the version numbers in a central placeSimon Glass4-17/+18
At present two acpi files are built every time since they use a version number from version.h This is not necessary. Make use of the same technique as for the version string, so that they are build only when they change. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-05-31Makefile: Fix incorrect FORCE deps on env rulesSimon Glass1-2/+2
These rules run on every build even if nothing has changed. The FORCE dependency is only needed for if_changed, not for cmd. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-05-31fastboot: Only call the bootm command if it is enabledSamuel Holland1-1/+1
This fixes an error with trying to link against do_bootm() when CONFIG_CMD_BOOTM is disabled. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-05-31Merge branch '2023-05-31-cleanup-unaligned-access-macros' into nextTom Rini8-175/+83
To quote the author: There are two versions of get/set_unaligned, get_unaligned_be64, put_unaligned_le64 etc in U-Boot causing confusion (and bugs). In this patch-set, I'm trying to fix that with a single unified version of the access macros to be used across all archs. This work is inspired by similar changes in this Linux kernel by Arnd Bergman, https://lore.kernel.org/lkml/20210514100106.3404011-1-arnd@kernel.org/
2023-05-31asm-generic: simplify unaligned.hWIP/2023-05-31-cleanup-unaligned-access-macrosJens Wiklander1-16/+73
The get_unaligned()/put_unaligned() implementations are more complex than necessary. Move everything into one file and use a more compact implementation based on packed struct access and byte swapping macros. This patch is based on the Linux kernel commit 803f4e1eab7a ("asm-generic: simplify asm/unaligned.h") by Arnd Bergmann. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-05-31linux/unaligned: remove unused access_ok.hJens Wiklander1-66/+0
linux/unaligned/access_ok.h is unused, so remove it. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-05-31fs/btrfs: use asm/unaligned.hJens Wiklander1-1/+1
Use asm/unaligned.h instead of linux/unaligned/access_ok.h for unaligned access. This is needed on architectures that doesn't handle unaligned accesses directly. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-05-31powerpc: use asm-generic/unaligned.hJens Wiklander1-16/+2
Powerpc configurations are apparently able to do unaligned accesses. But in an attempt to clean up and handle unaligned accesses in the same way we ignore that and use the common asm-generic/unaligned.h directly instead. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-05-31m68k: use asm-generic/unaligned.hJens Wiklander1-15/+2
M68k essentially duplicates the content of asm-generic/unaligned.h, with an exception for non-Coldfire configurations. Coldfire configurations are apparently able to do unaligned accesses. But in an attempt to clean up and handle unaligned accesses in the same way we ignore that and use the common asm-generic/unaligned.h directly instead. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Angelo Dureghello <angelo@kernel-space.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-05-31mips: use asm-generic/unaligned.hJens Wiklander1-22/+1
Mips essentially duplicates the content of asm-generic/unaligned.h, so use that file directly instead. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-05-31sh: use asm-generic/unaligned.hJens Wiklander1-20/+2
Sh essentially duplicates the content of asm-generic/unaligned.h, so use that file directly instead. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-05-31arm: use asm-generic/unaligned.hJens Wiklander1-19/+2
Arm duplicates the content of asm-generic/unaligned.h, so use that file directly instead. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-05-31Merge branch '2023-05-31-code-cleanups' into nextTom Rini88-8046/+12
- Correct some header double-inclusion guards and remove some dead (or in the case of ti816x, unmaintained) code.
2023-05-31include: Remove unused header filesTom Rini49-5488/+0
As part of various code clean-ups we have on occasion missed removing unused header files. None of these files are referenced anywhere else at this point. Signed-off-by: Tom Rini <trini@konsulko.com>