aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-11-29ARM: keystone2: Remove unneeded inclusions of common.hWIP/2023-11-29-assorted-platform-updatesAndrew Davis11-11/+3
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-29configs: keystone2: Do not include hardware.hAndrew Davis3-1/+2
This is a hacky way to have this file included in all source files that include common.h, instead just include from the files that need it. Signed-off-by: Andrew Davis <afd@ti.com>
2023-11-29configs: keystone2: Remove unused SPL_MALLOC_F_SIZE and KEYSTONE_SPL_STACK_SIZEAndrew Davis1-22/+0
These are leftover definitions. While here cleanup some leftover comments. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-29Fix stack-protector for powerpcChristophe Leroy2-0/+6
On powerpc, stack protector expects a function called __stack_chk_fail_local() instead of __stack_chk_fail() And some versions of GCC for powerpc default to TLS canary instead of global canary, so always force GCC to use global canary with -mstack-protector-guard=global Cc: Joel Peshkin <joel.peshkin@broadcom.com> Fixes: 4e9bce12432 ("Add support for stack-protector") Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-11-29xen: pvblock: fix the maximum io size in one operationAKASHI Takahiro1-1/+2
The current implementation may cause BUG_ON() in blkfront_aio() BUG_ON(n > BLKIF_MAX_SEGMENTS_PER_REQUEST); In pvblock_iop(), a read/write operation will be split into smaller chunks of data so that the size in one access (aio_nbytes) is limited to, at the maximum, BLKIF_MAX_SEGMENTS_PER_REQUEST * PAGE_SIZE But this works only if when the *buffer* passed in to pvblock_io() is page-aligned. If not, the given data region may stand across (BLKIF_MAX_SEGMENTS_PER_REQUEST + 1) pages. See the logic in blkfront_aio(): start = (uintptr_t)aiocbp->aio_buf & PAGE_MASK; end = ((uintptr_t)aiocbp->aio_buf + aiocbp->aio_nbytes + PAGE_SIZE - 1) & PAGE_MASK; Then this will lead to BUG_ON() above. This can be fixed by decreasing the maximum size of aio_nbytes. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Fixes: commit 3a739cc6c948 ("xen: pvblock: Implement front-back protocol and do IO")
2023-11-29timer-uclass: Always use "clock-frequency" property as fallbackAlex Bee1-6/+6
Currently the "clock-frequency" DT property is only being considered as an fallback if either there is no clock driver, the clock driver implements the request-op correctly or there is no clock defined for the timer at all. This patch makes "clock-frequency" also being picked as a fallback if getting the clock-rate fails, since clk_get(_by_index) will return no error, if a clock driver does not implement the request-op and does also not support getting the rate of the clock in question. timer_post_probe will take care if the property does not exist in the DT or is defined as 0. Signed-off-by: Alex Bee <knaerzche@gmail.com>
2023-11-29lib/slre: Fix memory leak if regex compilation failsFrancois Berder1-0/+1
Signed-off-by: Francois Berder <fberder@outlook.fr>
2023-11-29test/py: net: Add a TFTP put testLove Kumar1-0/+71
Execute tftpput command for uploading files to a server and validate its size & CRC32. Signed-off-by: Love Kumar <love.kumar@amd.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-11-28Merge patch series "cmd: add scmi command"Tom Rini9-37/+686
To quote the author: "Scmi" command will be re-introduced per Michal's request. The functionality is the same as I put it in my patch set of adding SCMI base protocol support, but made some tweak to make UT, "ut dm scmi_cmd," more flexible and tolerable when enabling/disabling a specific SCMI protocol for test purpose. Each commit may have some change history inherited from the preceding patch series. Test ==== The patch series was tested on the following platforms: * sandbox
2023-11-28test: dm: add scmi command testAKASHI Takahiro2-0/+82
In this test, "scmi" command is tested against different sub-commands. Please note that scmi command is for debug purpose and is not intended in production system. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
2023-11-28doc: cmd: add documentation for scmiAKASHI Takahiro2-0/+127
This is a help text for scmi command. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
2023-11-28cmd: add scmi command for SCMI firmwareAKASHI Takahiro3-0/+394
This command, "scmi", may provide a command line interface to various SCMI protocols. It supports at least initially SCMI base protocol and is intended mainly for debug purpose. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
2023-11-28firmware: scmi: support protocols on sandbox only if enabledAKASHI Takahiro2-37/+71
This change will be useful when we manually test SCMI on sandbox by enabling/disabling a specific SCMI protocol. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-28test: dm: skip scmi tests against disabled protocolsAKASHI Takahiro1-0/+12
This is a precautionary change to make scmi tests workable whether or not a specific protocol be enabled. If a given protocol is not configured, we skip the test by returning -EAGAIN. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-28Merge patch series "fs: fat: calculate FAT type based on cluster count"Tom Rini6-41/+170
To quote the author: This series fixes an issue where the FAT type (FAT12, FAT16) is not correctly detected, e.g. when the BPB field BS_FilSysType contains the valid value "FAT ". This issue occures, for example, if a partition is formatted by swupdate using its diskformat handler. swupdate uses the FAT library from http://elm-chan.org/fsw/ff/ internally. See https://groups.google.com/g/swupdate/c/7Yc3NupjXx8 for a discussion in the swupdate mailing list. Please refer to the commit messages for more details. 1. Added bootsector checks Most tests from https://www.win.tue.nl/~aeb/linux/fs/fat/fat-2.html are added in the commit 'fs: fat: add bootsector validity check'. Only the tests VIII, IX and X are not implemented. I also checked the Linux kernel code (v6.6) and did not find any checks on 'vistart->fs_type'. This is the reason why is skipped them here. See section '2. Size comparisons' for the impact on the binary size. 2. Size comparisons I executed bloat-o-meter from the Linux kernel for an arm64 target (config xilinx_zynqmp_mini_emmc0_defconfig): Comparison of the binary spl/u-boot-spl between master (rev e17d174773e9ba9447596708e702b7382e47a6cf) and this patch series (including the added validity checks of the boot sector): add/remove: 0/0 grow/shrink: 1/1 up/down: 100/-12 (88) Function old new delta read_bootsectandvi 308 408 +100 fat_itr_root 444 432 -12 Total: Before=67977, After=68065, chg +0.13% When compare the size of the binary spl/u-boot-spl between master this series without the the validity checks of the boot sector: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-24 (-24) Function old new delta read_bootsectandvi 308 296 -12 fat_itr_root 444 432 -12 Total: Before=67977, After=67953, chg -0.04% So the size of the spl on this arm64 target increases by 88 bytes for this series. When i remove the validity check the size decreases by 24 bytes.
2023-11-28test: fs: Add test to detect fat typeChristian Taedcke2-0/+72
Ensure that a large FAT12 filesystem and a small FAT16 filesystem are detected correctly. Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28test: Add size granularity parameter to mk_fsChristian Taedcke1-3/+4
Without this commit it is only possible to create filesystem images with a size granularity of 1MB. This commit adds the option to create file systems with different sizes, e.g 8.5MB. Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28test: fs: Add fat12 to supported fs of some testsChristian Taedcke1-3/+3
The tests fs_ext, fs_mkdir and fs_unlink support fat12 without modifications. The fs_basic test uses a partition that is too large for fat12, so it is omitted here. Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28test: Add support to create a fat12 fsChristian Taedcke1-1/+3
This enables to implement tests for fat12 filesystem. Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28fs: fat: add bootsector validity checkChristian Taedcke1-0/+53
The performed checks are similar to the checks performed by the Linux kernel in the function fat_read_bpb() in the file fs/fat/inode.c. Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28fs: fat: simplify gotos from read_bootsectandviChristian Taedcke1-5/+4
This simplifies the code a little bit. Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28fs: fat: calculate FAT type based on cluster countChristian Taedcke2-26/+28
This fixes an issue where the FAT type (FAT12, FAT16) is not correctly detected, e.g. when the BPB field BS_FilSysType contains the valid value "FAT ". According to the FAT spec the field BS_FilSysType has only informational character and does not determine the FAT type. The logic of this code is based on the linux kernel implementation from the file fs/fat/inode.c function fat_fill_super(). For details about FAT see http://elm-chan.org/docs/fat_e.html Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28test: spl: Remove usage of FAT32_SIGNChristian Taedcke1-1/+1
FAT32_SIGN is removed in the following commits. Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28fs: fat: use get_unaligned_le16 to convert u8[2] to u16Christian Taedcke1-4/+4
This reduces code duplications. Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28Merge patch series "Import "string" I/O functions from Linux"Tom Rini16-118/+450
To quote the author: This series imports generic versions of ioread_rep/iowrite_rep and reads/writes from Linux. Some cleanup is done to make sure that all platforms have proper defines for implemented functions and there are no redefinitions.
2023-11-28musb-new: Remove implementation of io.h functionsIgor Prusov1-24/+0
Since {read,write}s{l, w, b}() functions are now supported in linux/io.h there is no need to add custom implementation to driver. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-28treewide: Include linux/io.h instead of asm-generic/io.hIgor Prusov4-4/+3
Directly including asm-generic/io.h may break build because it will cause redefenition of generic io macros if linux/io.h gets included later, hence replace it with direct include of linux/io.h Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-28spi: meson_spifc_a1: Switch to io{read,write}32_rep()Igor Prusov1-2/+2
Use io{read,write}32_rep() functions to sync code with Linux version. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-28asm-generic: Import functions from LinuxIgor Prusov3-67/+348
Currently {read,write}s{b,w,lq}() functions are available only on some architectures, and there are no io{read,write}{8,16,32,64}_rep() functions in u-boot. This patch adds generic versions that may be used without arch-specific implementation. Since some of added functions were already added locally in some files, remove them to avoid redeclaration errors. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-28xtensa: io.h: Add defines for ins/outs functionsIgor Prusov1-0/+6
Add defines for {in,out}s{b,w,l}() functions to make asm-generic/io.h aware of them. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-28powerpc: io.h: Add defines for __raw_{read, write} functionsIgor Prusov1-0/+11
Add defines for __raw_{read,write}{b,w,l}() functions to make make asm-generic/io.h aware of them. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-28nios2: io.h: Add defines for ins/outs functionsIgor Prusov1-0/+6
Add defines for {in,out}s{b,w,l} functions to make asm-generic/io.h aware of them. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-28riscv: io.h: Fix signatures of reads/writes functionsIgor Prusov1-6/+12
Change type of address parameter from int* to volatile void* for {read,write}s{b,w,l}() functions and add const qualifier for reads. This is done to keep function signatures in sync with asm-generic/io.h and other platforms. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-28riscv: io.h: Add defines for reads/writes functionsIgor Prusov1-0/+8
Add defines for {read,write}s{b,w,l} functions to make asm-generic/io.h aware of them. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-28mips: io.h: Add defines for read/write/in/out functionsIgor Prusov1-0/+32
Add defines for {read,write}{b,w,l,q}(), {read,write}s{b,w,l,q}() and {in,out}s{b,w,l,q}() functions to make asm-generic/io.h aware of them. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-28mips: io.h: Add const to reads functions paramsIgor Prusov1-1/+2
Currently reads{b,w,l}() functions don't have const qualifier for their address parameter. Since asm-generic/io.h in Linux has const for all read functions, add it here as well to keep signatures in sync. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-28x86: Add defines for ins/outs functionsIgor Prusov1-0/+6
Add defines for {in,out}s{b,w,l}() functions to make sure that they will be used by asm-generic/io.h Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2023-11-28sandbox: move asm-generic include to the end of fileIgor Prusov1-14/+14
Generic version of io.h should be included at the end of architecture-specific ones to make sure that arch implementations are used and to avoid redefinitions. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-28Merge patch series "sysinfo: Expand sysinfo with some more banner information"Tom Rini27-94/+189
To quote the author: The show_board_info() function was adjusted to weak so that it could be entirely replaced with a board-specific implementation. The intended way for boards to provide their own information is via a sysinfo driver. But currently there is no way to show anything other than the model name. This series adds support for showing a few more items, in a way that is easy for boards to extend. Since there is already a weak checkboard() function, we don't need to have two levels of weak function here. So this series drops the weak attribute from show_board_info() Existing boards will see a slight change in output, in that the model name will appear first, before any custom output. If that is a problem, then the solution is to implement a sysinfo driver for the board.
2023-11-28x86: coreboot: Add a sysinfo driverSimon Glass5-44/+96
Create a sysinfo driver to avoid needing a custom checkboard() function. With this the following information is printed when booting from coreboot under QEMU: Model: Standard PC (i440FX + PIIX, 1996) Manufacturer: QEMU Prior-stage version: 4.21-885-g2a87ef1eca56 Prior-stage date: 11/11/2023 Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-28sysinfo: Allow displaying more info on startupSimon Glass3-21/+61
At present only the model name is shown on start. Some boards want to display more information. Add some more options to allow display of the manufacturer as well as the version and date of any prior-stage firmware. This is useful for coreboot, at least. If other boards have more information to display, it is easy to add it, now. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-28Revert "generic-board: make show_board_info a weak function"Simon Glass1-1/+1
We already have: - a sysinfo driver-interface which can obtain the model - a weak function called checkboard() for showing board info The current implementation has a weak function on top of a weak function. Now that all boards have been updated to use checkboard() instead, drop the __weak on show_board_info() This reverts commit f7637cc01414b9c87b6b0f861f34d83c19bfaaaf. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-11-28udoo: Use checkboard() instead of show_board_info()Simon Glass1-1/+1
Boards can use a sysinfo driver if a particular model name is needed. Update this board to use checkboard() directly, rather than having a weak function laid on top of a weak function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-28toradex: Use checkboard() instead of show_board_info()Simon Glass13-12/+15
Boards can use a sysinfo driver if a particular model name is needed. Update this board to use checkboard() directly, rather than having a weak function laid on top of a weak function. Make all the checkboard() functions call the new tdx_checkboard() so that the same information is displayed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-28solidrun: Use checkboard() instead of show_board_info()Simon Glass1-6/+1
Boards can use a sysinfo driver if a particular model name is needed. Update this board to use checkboard() directly, rather than having a weak function laid on top of a weak function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-28turris: Use checkboard() instead of show_board_info()Simon Glass2-2/+2
Boards can use a sysinfo driver if a particular model name is needed. Update this board to use checkboard() directly, rather than having a weak function laid on top of a weak function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-28meson: Use checkboard() instead of show_board_info()Simon Glass1-1/+1
Boards can use a sysinfo driver if a particular model name is needed. Update this board to use checkboard() directly, rather than having a weak function laid on top of a weak function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-11-28board: Move show_board_info() comment to header fileSimon Glass2-6/+11
Move this comment to its prototype and tidy it up a bit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-11-27Merge patch series "ufs: Add a PCI UFS controller support"WIP/27Nov2023-nextTom Rini11-15/+97
To quote the author: This adds a PCI UFS controller support and enables the support on QEMU RISC-V for testing. Requiring QEMU v8.2+.
2023-11-27qemu: riscv: Enable UFS supportBin Meng2-1/+9
This enables UFS support for QEMU RISC-V 'virt' machine. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>