summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-08-25expo: cedit: Support writing settings to environment varsSimon Glass
Add a command to write cedit settings to environment variables so that they can be stored with 'saveenv'. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: cedit: Support reading settings from a fileSimon Glass
Add a command to read cedit settings from a devicetree file. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: cedit: Support writing settings to a fileSimon Glass
Support writing settings from an expo into a file in FDT format. It consists of a single node with a two properties for each sceneitem, one with tag ID chosen by the user and another for its text value. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Export scene_menuitem_find() for use in internal codeSimon Glass
Make this function available to other expo code so we can use it to look up a menu item. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25doc: Expand documentation for the cedit commandSimon Glass
Add a little information about each subcommand. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Move cedit theme under bootstdSimon Glass
This is related to standard boot, so put it under the same node. This may simplify schema upstreaming later. Mention themes in the documentation while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Add documentation for the configuration editorSimon Glass
This is mentioned in passing in the 'cedit' command. Its file format is described under `expo`. But it would be better if it had its own entry in the documentation. Add a new 'cedit' entry with a few details about this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Tidy up the expo.py tool and usageSimon Glass
Tidy up this tool a little: - define which arguments are needed - split the enum values out into a header file - warn if no enum values are found - display the dtc error if something goes wrong - avoid a Python traceback on error Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Add a function to prepare a ceditSimon Glass
Split out the code which prepares the cedit for use, so we can call it from a test. Add a log category while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Move cedit test into its own file and tidySimon Glass
Move this test out so it can have its own file. Rename the test to use a cedit_ prefix. This allows us to drop the check for CONFIG_CMD_CEDIT in the test. Also we don't need driver model objects for this test, so drop them. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Split out cedit into its own headerSimon Glass
Before adding more functions to this interface, create a new header for the configuration editor. Fix up the expo header guard while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Refactor menu_build() to return the object createdSimon Glass
The caller reads the ID but menu_build() does this again. Add the ID as a parameter to avoid this. Return the object created so that the caller can adjust it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Provide a way to iterate through all scene objectsSimon Glass
For some operations it is necessary to process all objects in an expo. Provide an iterator to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25abuf: Allow incrementing the sizeSimon Glass
Provide a convenience function to increment the size of the abuf. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Make scene_obj_find() take a const sceneSimon Glass
This does not change the scene, so mark the pointer const. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-24Merge branch '2023-08-24-enable-more-features-in-qemu-arm' into nextTom Rini
To quote the author: Now that the driver for the Bochs VGA card emulated by QEMU is no longer limited to x86 architectures, this series enables it on arm and arm64 virtual machines to provide a graphical interface. In line with that series this also enables console buffering and USB keyboard. Tested with the Debian 12 installer using GRUB EFI: $ tools/buildman/buildman -o build/qemu_arm64 --boards=qemu_arm64 -w $ cd build/qemu_arm64 $ curl -L -o debian.img \ https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-12.0.0-arm64-netinst.iso $ qemu-system-aarch64 \ -machine virt -cpu cortex-a53 -m 4G -smp 4 \ -bios u-boot.bin \ -serial stdio -device VGA \ -nic user,model=virtio-net-pci \ -device virtio-rng-pci \ -device qemu-xhci,id=xhci -device usb-kbd -device usb-tablet \ -drive if=virtio,file=debian.img,format=raw,readonly=on,media=cdrom And with one using extlinux.conf: $ [...] $ curl -L -o head.img.gz \ https://deb.debian.org/debian/dists/bookworm/main/installer-arm64/current/images/netboot/SD-card-images/gtk/firmware.none.img.gz $ curl -L -o partition.img.gz \ https://deb.debian.org/debian/dists/bookworm/main/installer-arm64/current/images/netboot/SD-card-images/gtk/partition.img.gz $ zcat head.img.gz partition.img.gz >debian.img $ [...] Both can get to a graphical installer just fine, in addition to U-Boot video console showing up in a GTK window.
2023-08-24doc: qemu: arm: Add a section on booting Linux distrosAlper Nebi Yasak
Add an example qemu-system-aarch64 command that can make U-Boot on QEMU boot into the Debian Installer, along with resulting console messages from U-Boot, based on the existing documentation section for the x86 version. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2023-08-24arm: qemu: Enable usb keyboard as an input deviceAlper Nebi Yasak
Commit 02be57caf730 ("riscv: qemu: Enable usb keyboard as an input device") adds PCI xHCI support to QEMU RISC-V virtual machines and enables using a USB keyboard as one of the input devices. Similarly, enable those for ARM virtual machines as well. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng@tinylab.org>
2023-08-24arm: qemu: Enable PRE_CONSOLE_BUFFERAlper Nebi Yasak
Commit 608b80b5b855 ("riscv: qemu: Enable PRE_CONSOLE_BUFFER") enables buffering console messages for QEMU RISC-V virtual machines so those printed before the video console is available will still show up on the display. Similarly, enable it for ARM virtual machines as well. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng@tinylab.org>
2023-08-24arm: qemu: Enable Bochs video supportAlper Nebi Yasak
Commit 716161663ec49 ("riscv: qemu: Enable Bochs video support") enables a video console for QEMU RISC-V virtual machines using an emulated Bochs VGA card. Similarly, enable it for ARM virtual machines as well. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Bin Meng <bmeng@tinylab.org>
2023-08-24Merge branch '2023-08-24-further-ufs-updates' into nextTom Rini
- Cleanup and improve the UFS subsystem slightly, in preparation for supporting more platforms.
2023-08-24ufs: Implement cache managementMarek Vasut
Add function to flush and invalidate cache over request and response queue entries, and perform flush and optional invalidate over block layer data that are passed into the UFS layer. This makes it possible to use UFS with caches enabled. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Tested-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
2023-08-24ufs: Use utp_transfer_req_desc pointer in ufshcd_get_tr_ocsMarek Vasut
Use utp_transfer_req_desc pointer to reference to utrdl queue instead of referencing the queue directly. This makes the code more consistent. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Tested-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
2023-08-24ufs: Pass hba pointer to ufshcd_prepare_req_desc_hdr()Marek Vasut
Pass the hba pointer itself to ufshcd_prepare_req_desc_hdr() instead of duplicating utp_transfer_req_desc access at each call site. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Tested-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
2023-08-24ufs: Handle UFS 3.0 controllersMarek Vasut
Extend the version check to handle UFS 3.0 controllers as well. Tested on R-Car S4 UFS 3.0 controller. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Tested-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
2023-08-24ufs: Add UFSHCD_QUIRK_HIBERN_FASTAUTOMarek Vasut
Add UFSHCD_QUIRK_HIBERN_FASTAUTO quirk for host controllers which supports auto-hibernate the capability but only FASTAUTO mode. Ported from Linux kernel commit 2f11bbc2c7f3 ("scsi: ufs: core: Add UFSHCD_QUIRK_HIBERN_FASTAUTO") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Tested-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
2023-08-24ufs: Add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESSMarek Vasut
Add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS for host controllers which do not support 64-bit addressing. Ported from Linux kernel commit 6554400d6f66 ("scsi: ufs: core: Add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS") with ufs_scsi_buffer_aligned() based on U-Boot generic bounce buffer. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Tested-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
2023-08-24ufs: Convert quirks to BIT() macroMarek Vasut
Use BIT() macro for quirks, no functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
2023-08-23Merge branch '2023-08-22-assorted-code-cleanups' into nextTom Rini
- Assorted cleanups and fixes for a few tests, how we handle disks/partitions and bounce buffers.
2023-08-22net: Fix the displayed value of bytes transferredSiddharth Vadapalli
In the case of NETLOOP_SUCCESS, the decimal value of the u32 variable "net_boot_file_size" is printed using "%d", resulting in negative values being reported for large file sizes. Fix this by using "%u" to print the decimal value corresponding to the bytes transferred. Fixes: 1411157d8578 ("net: cosmetic: Fixup var names related to boot file") Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-08-22scsi: Add buffer_aligned check pass-throughMarek Vasut
Some devices have limited DMA capabilities and require that the buffers passed to them fit specific properties. Add new optional callback which can be used at driver level to indicate whether a buffer alignment is suitable for the device DMA or not. This is a pass-through callback from block uclass to drivers. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22blk: Add bounce buffer support to read/write operationsMarek Vasut
Some devices have limited DMA capabilities and require that the buffers passed to them fit specific properties. Add new optional callback which can be used at driver level to indicate whether a buffer alignment is suitable for the device DMA or not, and trigger use of generic bounce buffer implementation to help use of unsuitable buffers at the expense of performance degradation. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22disk: dos: Infer MBR partition sector size from underlying drive sector sizeMarek Vasut
Block devices with 4k sectors imply the MBR sectors are also 4k instead of regular 512B. Avoid hard-coding the 512B sector size and isntead read the current block device sector size from it, and if the sector size is larger than 512B, use the block device sector size. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-22common: bouncebuf: Add missing cast to dma_addr_tMarek Vasut
Fix the following warning produced on qemu-x86_64_defconfig: " common/bouncebuf.c: In function ‘bounce_buffer_stop’: common/bouncebuf.c:82:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 82 | dma_unmap_single((dma_addr_t)state->bounce_buffer, | ^ " The warning is valid, the pointer has to be up-cast first. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Andrew Davis <afd@ti.com>
2023-08-22disk: Make blk_get_ops() internal to blk uclassMarek Vasut
Move the macro into blk-uclass.c , since it is only used there. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-22disk: Move part_create_block_devices() to blk uclassMarek Vasut
Move part_create_block_devices() to blk uclass and unexpose the function. This can now be internal to the block uclass. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22disk: Switch part_blk_*() functions to disk_blk_*()Marek Vasut
The behavior of the part_blk_*() functions is now identical to disk_blk_*() functions, switch the former to the later. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22disk: Extend disk_blk_part_validate() with range checkingMarek Vasut
Check whether access is out of bounds of the partition and return an error. This way there is no danger of esp. write or erase outside of the confines of partition. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22disk: Handle partition to block device offset conversionMarek Vasut
Convert the read/write/erase offset from one within a partition to one within a block device, to correctly access the data on the block device for both write and erase operations. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22disk: Simplify disk_blk_{write, erase}() using blk_{write, erase}()Marek Vasut
These two functions are basically identical, just call the blk_*() functions from disk_blk_*() functions. The only difference is that the disk_blk_*() functions have to use parent block device as the udevice implementing block device operations. Add documentation on what those functions really do. The documentation is not wrong even though it likely does look that way. The write/erase functions really do not take into account the partition offset. This will be fixed in the next patch. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22disk: Simplify disk_blk_read() using blk_read()Marek Vasut
The disk_blk_read() can be simplified using blk_read(), the only things which needs to be handled are the read offset based on the partition properties, and the block device ops which are coming from the parent udevice, not the partition udevice. The later is currently not implemented correctly as far as I can tell, since the current code extracts block device descriptor from the parent udevice which is OK, but extracts block device operations from the partition udevice, which does not seem OK. Switching to the blk_read() fixes that too. The dev_get_blk() usage is simplified using UCLASS_PARTITION check. Add non-confusing documentation what this really does. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22disk: Drop always true conditional checkMarek Vasut
if (device_get_uclass_id(dev) == UCLASS_PARTITION) is always true, because this disk_blk_read() function calls dev_get_blk() above and checks its return value for non-NULL. The dev_get_blk() performs the same device_get_uclass_id(dev) check and returns NULL if not UCLASS_PARTITION. Drop the duplicate check. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-08-22test: acpi: Handle both 32bit and 64bit ACPI tablesMarek Vasut
Handle both 32bit and 64bit systems, i.e. sandbox and sandbox64 the same way drivers/cpu/cpu_sandbox.c sets those ACPI tables up. This fixes "$ ./u-boot -Tc 'ut dm dm_test_acpi_write_tables'" test failure on sandbox64. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-22test: Fix the help for the ut commandMarek Vasut
Drop the 'ut' prefix, this is superfluous and not present in any of the other ut tests. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-21Merge tag 'v2023.10-rc3' into nextTom Rini
Prepare v2023.10-rc3 Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-21Prepare v2023.10-rc3v2023.10-rc3Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-21Merge tag 'dm-pull-20aug23' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dm sandbox64 fixes
2023-08-20test: cpu: Handle both 32bit and 64bit CPUsMarek Vasut
Handle both 32bit and 64bit systems, i.e. sandbox and sandbox64 the same way drivers/cpu/cpu_sandbox.c does, that is in case CONFIG_PHYS_64BIT is enabled, assume 64bit address width, else assume 32bit address width. This fixes ut_dm_dm_test_cpu test failure on sandbox64. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-20configs: sandbox64: Enable PCI register multi-entry supportMarek Vasut
Align the sandbox64 defconfig with sandbox defconfig. Enable missing PCI register multi-entry support. This fixes ut_dm_dm_test_pci_bus_to_phys test . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-20configs: sandbox64: Enable clock CCF driverMarek Vasut
Align the sandbox64 defconfig with sandbox defconfig. Enable missing CCF and Sandbox CCF drivers. This fixes ut_dm_dm_test_clk_ccf test . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>