]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
12 months agotest/py: Disable error E0611 in two cases for pylint
Tom Rini [Sat, 9 Dec 2023 19:52:46 +0000 (14:52 -0500)]
test/py: Disable error E0611 in two cases for pylint

Recently pylint has started to complain about:
No name 'fs_helper' in module 'tests' (no-name-in-module)

Due to:
from tests import fs_helper

However, we have:
test/py/tests/fs_helper.py

And since we do not want to add a dummy test/py/tests/__init__.py to
silence this warning we instead just disable it as needed.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoMerge patch series "cmd: bdinfo: Optionally use getopt and implement bdinfo -a"
Tom Rini [Sat, 9 Dec 2023 13:42:49 +0000 (08:42 -0500)]
Merge patch series "cmd: bdinfo: Optionally use getopt and implement bdinfo -a"

Clean up our bdinfo command a bit and introduce "bdinfo -a"

12 months agotest: bdinfo: Test bdinfo -e
Marek Vasut [Sat, 7 Oct 2023 21:41:06 +0000 (23:41 +0200)]
test: bdinfo: Test bdinfo -e

The bdinfo -e should print only the board ethernet settings.
Test the expected output.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
12 months agotest: bdinfo: Test bdinfo -m
Marek Vasut [Sat, 7 Oct 2023 21:41:05 +0000 (23:41 +0200)]
test: bdinfo: Test bdinfo -m

The bdinfo -m should print only the board memory layout.
Test the expected output.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agotest: bdinfo: Test bdinfo -h
Marek Vasut [Sat, 7 Oct 2023 21:41:04 +0000 (23:41 +0200)]
test: bdinfo: Test bdinfo -h

The bdinfo -h should print error message that -h is an unknown
parameter and then command help text. Test the expected output.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
12 months agotest: bdinfo: Test both bdinfo and bdinfo -a
Marek Vasut [Sat, 7 Oct 2023 21:41:03 +0000 (23:41 +0200)]
test: bdinfo: Test both bdinfo and bdinfo -a

Factor out the core of test for all bdinfo output into bdinfo_test_all()
and then reuse it to verify that both 'bdinfo' and 'bdinfo -a' print all
the bdinfo output.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
12 months agotest: bdinfo: Rename bdinfo_test_move() to bdinfo_test_full()
Marek Vasut [Sat, 7 Oct 2023 21:41:02 +0000 (23:41 +0200)]
test: bdinfo: Rename bdinfo_test_move() to bdinfo_test_full()

Rename bdinfo_test_move() to bdinfo_test_full(). The former is a
remnant of deriving this test from another test. No functional
change.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
12 months agoconfigs: sandbox: Enable GETOPT for sandbox and sandbox64 target
Marek Vasut [Sat, 7 Oct 2023 21:41:01 +0000 (23:41 +0200)]
configs: sandbox: Enable GETOPT for sandbox and sandbox64 target

Enable GETOPT so that 'bdinfo' command with getopt() support can be
tested in CI.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
12 months agocmd: bdinfo: Implement support for printing ethernet settings via bdinfo -e
Marek Vasut [Sat, 7 Oct 2023 21:41:00 +0000 (23:41 +0200)]
cmd: bdinfo: Implement support for printing ethernet settings via bdinfo -e

Add support for printing ethernet settings only via 'bdinfo -e' .

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
12 months agocmd: bdinfo: Implement support for printing memory layout via bdinfo -m
Marek Vasut [Sat, 7 Oct 2023 21:40:59 +0000 (23:40 +0200)]
cmd: bdinfo: Implement support for printing memory layout via bdinfo -m

Add support for printing memory layout only via 'bdinfo -m' .

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
12 months agocmd: bdinfo: Optionally use getopt and implement bdinfo -a
Marek Vasut [Sat, 7 Oct 2023 21:40:58 +0000 (23:40 +0200)]
cmd: bdinfo: Optionally use getopt and implement bdinfo -a

Add optional support for getopt() and in case this is enabled via
GETOPT configuration option, implement support for 'bdinfo -a'.
The 'bdinfo -a' behaves exactly like bdinfo and prints 'all' the
bdinfo information. This is implemented in preparation for other
more fine-grained options.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
12 months agoMerge tag 'v2024.01-rc4' into next
Tom Rini [Tue, 5 Dec 2023 02:39:57 +0000 (21:39 -0500)]
Merge tag 'v2024.01-rc4' into next

Prepare v2024.01-rc4

# -----BEGIN PGP SIGNATURE-----
#
# iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmVuHrwACgkQFHw5/5Y0
# tyy3Tgv+LB/X0ZR3IHnu1mvQ7kpOFvAjjKr0BUpcEEzsrDZeJnS6sy06m+REez2E
# UmuLeKFj5NUCYXNKtxn2+gVnJt8Tk6ftxhMTiZHmR4Y4NVc5aPtqYmVsv6Q29j0U
# mcg7AGcZTniu9/naNM+ZcDeHzLDAB0whmE9eVfixXVgyitILoLHNdFiQ7W4oR7Kh
# /mBgdMDBS3rqiRi6CuqKUnl4ADX8T3AXaSfi3hqOC5Pj+HPkZSUfyWx31mu9mN1D
# wXTHASZX06Dop25fm/ZSdWk1blBw29WqRiJBdwNatvyC5pqMsotTvAfH2AcHBEYg
# tpoper+WDOBAipt6b6Y1B7q4VPvJ97L9dFCAYqN0nGCe+rkdi+k+cly7M6Ye9xLt
# e7rVUfnKgIMP8jkLcVBYoWkFY5FiJ82O5qjoF5N3dAuHeWacDFsB5TugDTOQvblH
# LWCmcIyU1N9Ma/Ib0rTvNduvpBUYBKXYlD1+rjPZUbTUnfc79mf+ReFpcoW6Kxh+
# bkz81p8P
# =ebIZ
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 04 Dec 2023 01:47:24 PM EST
# gpg:                using RSA key 1A3C7F70E08FAB1707809BBF147C39FF9634B72C
# gpg: Good signature from "Thomas Rini <trini@konsulko.com>" [ultimate]

12 months agoPrepare v2024.01-rc4
Tom Rini [Mon, 4 Dec 2023 18:46:56 +0000 (13:46 -0500)]
Prepare v2024.01-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoefi_loader: generated SMBIOS table below 4 GiB
Heinrich Schuchardt [Mon, 20 Nov 2023 22:25:58 +0000 (23:25 +0100)]
efi_loader: generated SMBIOS table below 4 GiB

We currently use an outdated format 32-bit format for SMBIOS tables.
So we must allocate SMBIOS tables below 4 GiB.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
12 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-watchdog
Tom Rini [Mon, 4 Dec 2023 18:37:18 +0000 (13:37 -0500)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-watchdog

- Correct watchdog timeout print message (Chanho Park)

12 months agowatchdog: Correct watchdog timeout print message
Chanho Park [Sun, 3 Dec 2023 08:30:40 +0000 (17:30 +0900)]
watchdog: Correct watchdog timeout print message

The wdt_start function takes timeout_ms as a parameter and starts the
watchdog with this value. However, when you output the message, it shows
the default timeout value for the watchdog device.
So this patch fixes that part to output the correct timeout value.

Before -->
StarFive # wdt start 3000
WDT:   Started watchdog@13070000 without servicing  (60s timeout)

After -->
StarFive # wdt start 3000
WDT:   Started watchdog@13070000 without servicing  (3s timeout)

Fixes: c2fd0ca1a822 ("watchdog: Integrate watchdog triggering into the cyclic framework")
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Stefan Roese <sr@denx.de>
12 months agoMerge branch 'master-rpc-off' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sun, 3 Dec 2023 21:30:32 +0000 (16:30 -0500)]
Merge branch 'master-rpc-off' of https://source.denx.de/u-boot/custodians/u-boot-sh

12 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Sat, 2 Dec 2023 18:37:27 +0000 (13:37 -0500)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-usb

- USB XHCI fixes

12 months agoARM: dts: renesas: Disable RPC driver on R8A779G0 V4H White Hawk board
Cong Dang [Mon, 19 Jun 2023 22:41:50 +0000 (00:41 +0200)]
ARM: dts: renesas: Disable RPC driver on R8A779G0 V4H White Hawk board

As requirement of CR side, QSPI Flash usage via RPC driver shall
be disabled and leaving the control of this module to CR side.
Perform DT modification to disable the RPC SPI.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Cong Dang <cong.dang.xn@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Do not modify defconfig, modify the DT instead, this way
        the RPC SPI can be enabled without recompiling the U-Boot
itself. Update commit message accordingly.]

12 months agoARM: dts: renesas: Clean up R8A779G0 V4H RPC SPI DT node
Marek Vasut [Mon, 19 Jun 2023 22:41:49 +0000 (00:41 +0200)]
ARM: dts: renesas: Clean up R8A779G0 V4H RPC SPI DT node

Use the phandle reference to &rpc node in arch/arm/dts/r8a779g0.dtsi
and remove properties which are already in arch/arm/dts/r8a779g0.dtsi.
No functional change and no resulting DT change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
12 months agousb: USB_XHCI_PCI depends on PCI
Heinrich Schuchardt [Mon, 20 Nov 2023 14:56:36 +0000 (15:56 +0100)]
usb: USB_XHCI_PCI depends on PCI

Compiling with CONFIG_USB_XHCI_PCI and CONFIG_PCI=n results in

    usb/host/xhci-pci.c:48:(.text.xhci_pci_probe+0x44):
    undefined reference to `dm_pci_write_config32

Add the missing Kconfig dependency.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Marek Vasut <marex@denx.de>
12 months agousb: dwc3-generic: Use combined glue and ctrl node for RK3588
Jonas Karlman [Sun, 12 Nov 2023 15:25:25 +0000 (15:25 +0000)]
usb: dwc3-generic: Use combined glue and ctrl node for RK3588

Like Rockchip RK3328 and RK3568, the RK3588 also have a single node to
represent the glue and ctrl for USB 3.0.

Use rk_ops as driver data to select correct ctrl node for RK3588 DWC3.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Marek Vasut <marex@denx.de>
12 months agousb: storage: Use the correct CBW lengths
Hector Martin [Sun, 29 Oct 2023 07:23:30 +0000 (16:23 +0900)]
usb: storage: Use the correct CBW lengths

USB UFI uses fixed 12-byte commands (as does RBC, which is not
supported), but SCSI does not have this limitation. Use the correct
command block lengths depending on the subclass.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
12 months agousb: hub: Add missing reset recovery delay
Hector Martin [Sun, 29 Oct 2023 07:09:09 +0000 (16:09 +0900)]
usb: hub: Add missing reset recovery delay

Some devices like YubiKeys need more time before SET_ADDRESS. The spec
says we need to wait 10ms.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
12 months agousb: xhci: Fix DMA address calculation in queue_trb
Hector Martin [Sun, 29 Oct 2023 06:37:44 +0000 (15:37 +0900)]
usb: xhci: Fix DMA address calculation in queue_trb

We need to get the DMA address before incrementing the pointer, as that
might move us onto another segment.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
12 months agousb: xhci: Do not panic on event timeouts
Hector Martin [Sun, 29 Oct 2023 06:37:43 +0000 (15:37 +0900)]
usb: xhci: Do not panic on event timeouts

Now that we always check the return value, just return NULL on timeouts.
We can still log the error since this is a problem, but it's not reason
to panic.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
12 months agousb: xhci: Fail on attempt to queue TRBs to a halted endpoint
Hector Martin [Sun, 29 Oct 2023 06:37:42 +0000 (15:37 +0900)]
usb: xhci: Fail on attempt to queue TRBs to a halted endpoint

This isn't going to work, don't pretend it will and then end up timing
out.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
12 months agousb: xhci: Recover from halted bulk endpoints
Hector Martin [Sun, 29 Oct 2023 06:37:41 +0000 (15:37 +0900)]
usb: xhci: Recover from halted bulk endpoints

There is currently no codepath to recover from this case. In principle
we could require that the upper layer do this explicitly, but let's just
do it in xHCI when the next bulk transfer is started, since that
reasonably implies whatever caused the problem has been dealt with.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
12 months agousb: xhci: Allow context state errors when halting an endpoint
Hector Martin [Sun, 29 Oct 2023 06:37:40 +0000 (15:37 +0900)]
usb: xhci: Allow context state errors when halting an endpoint

There is a race where an endpoint may halt by itself while we are trying
to halt it, which results in a context state error. See xHCI 4.6.9 which
mentions this case.

This also avoids BUGging when we attempt to stop an endpoint which was
already stopped to begin with, which is probably a bug elsewhere but
not a good reason to crash.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
12 months agousb: xhci: Better error handling in abort_td()
Hector Martin [Sun, 29 Oct 2023 06:37:39 +0000 (15:37 +0900)]
usb: xhci: Better error handling in abort_td()

If the xHC has a problem with our STOP ENDPOINT command, it is likely to
return a completion directly instead of first a transfer event for the
in-progress transfer. Handle that more gracefully.

We still BUG() on the error code, but at least we don't end up timing
out on the event and ending up with unexpected event errors.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
12 months agousb: xhci: Guard all calls to xhci_wait_for_event
Hector Martin [Sun, 29 Oct 2023 06:37:38 +0000 (15:37 +0900)]
usb: xhci: Guard all calls to xhci_wait_for_event

xhci_wait_for_event returns NULL on timeout, so the caller always has to
check for that. This addresses immediate explosions in this part
of the code when timeouts happen, but not the root cause for the
timeout.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
12 months agoMerge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra into...
Tom Rini [Thu, 30 Nov 2023 14:33:31 +0000 (09:33 -0500)]
Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra into next

Device tree improvents for Paz00 and DM PMIC convertion of recently
merged Tegra boards.

13 months agoMerge branch '2023-11-29-assorted-platform-updates' into next
Tom Rini [Wed, 29 Nov 2023 16:16:13 +0000 (11:16 -0500)]
Merge branch '2023-11-29-assorted-platform-updates' into next

- Add a TFTP put test, a few TI Keystone 2 updates, fix stack-protector
  for PowerPC, fixes in lib/slre, timer-uclass and pvblock.

13 months agoARM: keystone2: Remove unneeded inclusions of common.h
Andrew Davis [Fri, 17 Nov 2023 22:38:29 +0000 (16:38 -0600)]
ARM: keystone2: Remove unneeded inclusions of common.h

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
13 months agoconfigs: keystone2: Do not include hardware.h
Andrew Davis [Fri, 17 Nov 2023 22:38:28 +0000 (16:38 -0600)]
configs: keystone2: Do not include hardware.h

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>
13 months agoconfigs: keystone2: Remove unused SPL_MALLOC_F_SIZE and KEYSTONE_SPL_STACK_SIZE
Andrew Davis [Fri, 17 Nov 2023 22:38:27 +0000 (16:38 -0600)]
configs: keystone2: Remove unused SPL_MALLOC_F_SIZE and KEYSTONE_SPL_STACK_SIZE

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>
13 months agoFix stack-protector for powerpc
Christophe Leroy [Wed, 15 Nov 2023 18:36:36 +0000 (19:36 +0100)]
Fix stack-protector for powerpc

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>
13 months agoxen: pvblock: fix the maximum io size in one operation
AKASHI Takahiro [Wed, 15 Nov 2023 01:53:45 +0000 (10:53 +0900)]
xen: pvblock: fix the maximum io size in one operation

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")
13 months agotimer-uclass: Always use "clock-frequency" property as fallback
Alex Bee [Tue, 14 Nov 2023 21:11:27 +0000 (22:11 +0100)]
timer-uclass: Always use "clock-frequency" property as fallback

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>
13 months agolib/slre: Fix memory leak if regex compilation fails
Francois Berder [Sun, 12 Nov 2023 19:16:50 +0000 (20:16 +0100)]
lib/slre: Fix memory leak if regex compilation fails

Signed-off-by: Francois Berder <fberder@outlook.fr>
13 months agotest/py: net: Add a TFTP put test
Love Kumar [Wed, 8 Nov 2023 07:10:31 +0000 (12:40 +0530)]
test/py: net: Add a TFTP put test

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>
13 months agoMerge patch series "cmd: add scmi command"
Tom Rini [Wed, 29 Nov 2023 03:31:09 +0000 (22:31 -0500)]
Merge patch series "cmd: add scmi command"

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

13 months agotest: dm: add scmi command test
AKASHI Takahiro [Tue, 14 Nov 2023 02:14:28 +0000 (11:14 +0900)]
test: dm: add scmi command test

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>
13 months agodoc: cmd: add documentation for scmi
AKASHI Takahiro [Tue, 14 Nov 2023 02:14:27 +0000 (11:14 +0900)]
doc: cmd: add documentation for scmi

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>
13 months agocmd: add scmi command for SCMI firmware
AKASHI Takahiro [Tue, 14 Nov 2023 02:14:26 +0000 (11:14 +0900)]
cmd: add scmi command for SCMI firmware

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>
13 months agofirmware: scmi: support protocols on sandbox only if enabled
AKASHI Takahiro [Tue, 14 Nov 2023 02:14:25 +0000 (11:14 +0900)]
firmware: scmi: support protocols on sandbox only if enabled

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>
13 months agotest: dm: skip scmi tests against disabled protocols
AKASHI Takahiro [Tue, 14 Nov 2023 02:14:24 +0000 (11:14 +0900)]
test: dm: skip scmi tests against disabled protocols

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>
13 months agoMerge patch series "fs: fat: calculate FAT type based on cluster count"
Tom Rini [Wed, 29 Nov 2023 01:10:36 +0000 (20:10 -0500)]
Merge patch series "fs: fat: calculate FAT type based on cluster count"

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.

13 months agotest: fs: Add test to detect fat type
Christian Taedcke [Wed, 15 Nov 2023 12:44:24 +0000 (13:44 +0100)]
test: fs: Add test to detect fat type

Ensure that a large FAT12 filesystem and a small FAT16 filesystem are
detected correctly.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
13 months agotest: Add size granularity parameter to mk_fs
Christian Taedcke [Wed, 15 Nov 2023 12:44:23 +0000 (13:44 +0100)]
test: Add size granularity parameter to mk_fs

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>
13 months agotest: fs: Add fat12 to supported fs of some tests
Christian Taedcke [Wed, 15 Nov 2023 12:44:22 +0000 (13:44 +0100)]
test: fs: Add fat12 to supported fs of some tests

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>
13 months agotest: Add support to create a fat12 fs
Christian Taedcke [Wed, 15 Nov 2023 12:44:21 +0000 (13:44 +0100)]
test: Add support to create a fat12 fs

This enables to implement tests for fat12 filesystem.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
13 months agofs: fat: add bootsector validity check
Christian Taedcke [Wed, 15 Nov 2023 12:44:20 +0000 (13:44 +0100)]
fs: fat: add bootsector validity check

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>
13 months agofs: fat: simplify gotos from read_bootsectandvi
Christian Taedcke [Wed, 15 Nov 2023 12:44:19 +0000 (13:44 +0100)]
fs: fat: simplify gotos from read_bootsectandvi

This simplifies the code a little bit.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
13 months agofs: fat: calculate FAT type based on cluster count
Christian Taedcke [Wed, 15 Nov 2023 12:44:18 +0000 (13:44 +0100)]
fs: fat: calculate FAT type based on cluster count

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>
13 months agotest: spl: Remove usage of FAT32_SIGN
Christian Taedcke [Wed, 15 Nov 2023 12:44:17 +0000 (13:44 +0100)]
test: spl: Remove usage of FAT32_SIGN

FAT32_SIGN is removed in the following commits.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
13 months agofs: fat: use get_unaligned_le16 to convert u8[2] to u16
Christian Taedcke [Wed, 15 Nov 2023 12:44:16 +0000 (13:44 +0100)]
fs: fat: use get_unaligned_le16 to convert u8[2] to u16

This reduces code duplications.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
13 months agoMerge patch series "Import "string" I/O functions from Linux"
Tom Rini [Tue, 28 Nov 2023 21:19:19 +0000 (16:19 -0500)]
Merge patch series "Import "string" I/O functions from Linux"

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.

13 months agomusb-new: Remove implementation of io.h functions
Igor Prusov [Tue, 14 Nov 2023 11:02:57 +0000 (14:02 +0300)]
musb-new: Remove implementation of io.h functions

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>
13 months agotreewide: Include linux/io.h instead of asm-generic/io.h
Igor Prusov [Tue, 14 Nov 2023 11:02:56 +0000 (14:02 +0300)]
treewide: Include linux/io.h instead of asm-generic/io.h

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>
13 months agospi: meson_spifc_a1: Switch to io{read,write}32_rep()
Igor Prusov [Tue, 14 Nov 2023 11:02:55 +0000 (14:02 +0300)]
spi: meson_spifc_a1: Switch to io{read,write}32_rep()

Use io{read,write}32_rep() functions to sync code with Linux version.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
13 months agoasm-generic: Import functions from Linux
Igor Prusov [Tue, 14 Nov 2023 11:02:54 +0000 (14:02 +0300)]
asm-generic: Import functions from Linux

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>
13 months agoxtensa: io.h: Add defines for ins/outs functions
Igor Prusov [Tue, 14 Nov 2023 11:02:53 +0000 (14:02 +0300)]
xtensa: io.h: Add defines for ins/outs functions

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>
13 months agopowerpc: io.h: Add defines for __raw_{read, write} functions
Igor Prusov [Tue, 14 Nov 2023 11:02:52 +0000 (14:02 +0300)]
powerpc: io.h: Add defines for __raw_{read, write} functions

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>
13 months agonios2: io.h: Add defines for ins/outs functions
Igor Prusov [Tue, 14 Nov 2023 11:02:51 +0000 (14:02 +0300)]
nios2: io.h: Add defines for ins/outs functions

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>
13 months agoriscv: io.h: Fix signatures of reads/writes functions
Igor Prusov [Tue, 14 Nov 2023 11:02:50 +0000 (14:02 +0300)]
riscv: io.h: Fix signatures of reads/writes functions

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>
13 months agoriscv: io.h: Add defines for reads/writes functions
Igor Prusov [Tue, 14 Nov 2023 11:02:49 +0000 (14:02 +0300)]
riscv: io.h: Add defines for reads/writes functions

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>
13 months agomips: io.h: Add defines for read/write/in/out functions
Igor Prusov [Tue, 14 Nov 2023 11:02:48 +0000 (14:02 +0300)]
mips: io.h: Add defines for read/write/in/out functions

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>
13 months agomips: io.h: Add const to reads functions params
Igor Prusov [Tue, 14 Nov 2023 11:02:47 +0000 (14:02 +0300)]
mips: io.h: Add const to reads functions params

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>
13 months agox86: Add defines for ins/outs functions
Igor Prusov [Tue, 14 Nov 2023 11:02:46 +0000 (14:02 +0300)]
x86: Add defines for ins/outs functions

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>
13 months agosandbox: move asm-generic include to the end of file
Igor Prusov [Tue, 14 Nov 2023 11:02:45 +0000 (14:02 +0300)]
sandbox: move asm-generic include to the end of file

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>
13 months agoMerge patch series "sysinfo: Expand sysinfo with some more banner information"
Tom Rini [Tue, 28 Nov 2023 17:53:14 +0000 (12:53 -0500)]
Merge patch series "sysinfo: Expand sysinfo with some more banner information"

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.

13 months agox86: coreboot: Add a sysinfo driver
Simon Glass [Mon, 13 Nov 2023 02:58:29 +0000 (19:58 -0700)]
x86: coreboot: Add a sysinfo driver

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>
13 months agosysinfo: Allow displaying more info on startup
Simon Glass [Mon, 13 Nov 2023 02:58:28 +0000 (19:58 -0700)]
sysinfo: Allow displaying more info on startup

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>
13 months agoRevert "generic-board: make show_board_info a weak function"
Simon Glass [Mon, 13 Nov 2023 02:58:27 +0000 (19:58 -0700)]
Revert "generic-board: make show_board_info a weak function"

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>
13 months agoudoo: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:26 +0000 (19:58 -0700)]
udoo: Use checkboard() instead of show_board_info()

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>
13 months agotoradex: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:25 +0000 (19:58 -0700)]
toradex: Use checkboard() instead of show_board_info()

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>
13 months agosolidrun: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:24 +0000 (19:58 -0700)]
solidrun: Use checkboard() instead of show_board_info()

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>
13 months agoturris: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:23 +0000 (19:58 -0700)]
turris: Use checkboard() instead of show_board_info()

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>
13 months agomeson: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:22 +0000 (19:58 -0700)]
meson: Use checkboard() instead of show_board_info()

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>
13 months agoboard: Move show_board_info() comment to header file
Simon Glass [Mon, 13 Nov 2023 02:58:21 +0000 (19:58 -0700)]
board: Move show_board_info() comment to header file

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>
13 months agoMAINTAINERS: Step up as co-maintainer of Tegra SOC platform
Svyatoslav Ryhel [Tue, 31 Oct 2023 18:46:50 +0000 (20:46 +0200)]
MAINTAINERS: Step up as co-maintainer of Tegra SOC platform

Update maintainers for Tegra SoC platform. Include device trees
and drivers which contain tegra in the name.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
13 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-samsung
Tom Rini [Tue, 28 Nov 2023 15:05:25 +0000 (10:05 -0500)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-samsung

13 months agoARM: dts: tegra30: enable USB PHY node on some devices
Svyatoslav Ryhel [Fri, 25 Aug 2023 17:23:14 +0000 (20:23 +0300)]
ARM: dts: tegra30: enable USB PHY node on some devices

Enable USB PHY nodes on ASUS Transformers, Grouper, Enadevoru
and LG X3. This is not mandatory since driver will use default
values but preferable for new devices.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
13 months agoboard: grouper: convert ASUS Google Nexus 7 (2012) to use DM PMIC
Svyatoslav Ryhel [Sat, 26 Aug 2023 15:46:27 +0000 (18:46 +0300)]
board: grouper: convert ASUS Google Nexus 7 (2012) to use DM PMIC

Since required drivers were merged, we can safely clean up the
board and switch to DM based driver with device tree support.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
13 months agoboard: transformer-t30: convert ASUS Transformers to use DM PMIC
Svyatoslav Ryhel [Sat, 26 Aug 2023 15:39:29 +0000 (18:39 +0300)]
board: transformer-t30: convert ASUS Transformers to use DM PMIC

Since required drivers were merged, we can safely clean up the
board and switch to DM based driver with device tree support.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
13 months agoboard: endeavoru: convert HTC One X to use DM PMIC
Svyatoslav Ryhel [Sat, 26 Aug 2023 15:35:35 +0000 (18:35 +0300)]
board: endeavoru: convert HTC One X to use DM PMIC

Since required drivers were merged, we can safely clean up the
board and switch to DM based driver with device tree support.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
13 months agoboard: lg-x3: convert LG Optimus 4X and Vu to use DM PMIC
Svyatoslav Ryhel [Sat, 26 Aug 2023 15:32:55 +0000 (18:32 +0300)]
board: lg-x3: convert LG Optimus 4X and Vu to use DM PMIC

Since required drivers were merged, we can safely clean up the
board and switch to DM based driver with device tree support.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
13 months agoARM: tegra: call regulators_enable_boot_on on board init
Svyatoslav Ryhel [Tue, 28 Nov 2023 07:09:41 +0000 (09:09 +0200)]
ARM: tegra: call regulators_enable_boot_on on board init

Call regulators_enable_boot_on on board init to set all regulators
with boot-on property in device tree. If regulator is not used by
any device in the device tree but is essential for the device to
work a regression will occur.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
13 months agoARM: dts: Reuse I2C3 for NVEC
Thierry Reding [Mon, 10 Jul 2023 09:22:18 +0000 (11:22 +0200)]
ARM: dts: Reuse I2C3 for NVEC

Instead of duplicating the I2C3 node and adding NVEC specific
properties, reuse the I2C3 node, extend it with NVEC specific properties
and drop properties that are not needed by NVEC. This results in a DTB
that is a bit cleaner and avoids accidentally using I2C3 and NVEC which
would have them fight over the same hardware resources.

Signed-off-by: Thierry Reding <treding@nvidia.com>
13 months agoi2c: Bugfix in i2c_get_chip_by_phandle()
Philip Oberfichtner [Fri, 24 Nov 2023 14:04:01 +0000 (15:04 +0100)]
i2c: Bugfix in i2c_get_chip_by_phandle()

The "i2cbcdev" sneaked in when implementing this function for the
bootcounter use case. Obviously the intention was to use prop_name
instead.

Fixes: b483552773 (i2c: Implement i2c_get_chip_by_phandle())
Signed-off-by: Philip Oberfichtner <pro@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
13 months agoMerge patch series "ufs: Add a PCI UFS controller support"
Tom Rini [Mon, 27 Nov 2023 21:19:09 +0000 (16:19 -0500)]
Merge patch series "ufs: Add a PCI UFS controller support"

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+.

13 months agoqemu: riscv: Enable UFS support
Bin Meng [Wed, 11 Oct 2023 13:15:52 +0000 (21:15 +0800)]
qemu: riscv: Enable UFS support

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>
13 months agoufs: Handle UFS 3.1 controllers
Bin Meng [Wed, 11 Oct 2023 13:15:51 +0000 (21:15 +0800)]
ufs: Handle UFS 3.1 controllers

Extend the version check to handle UFS 3.1 controllers as well.
Tested on QEMU emulated UFS 3.1 controller.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
13 months agoufs: Add a PCI based UFS controller driver
Bin Meng [Wed, 11 Oct 2023 13:15:50 +0000 (21:15 +0800)]
ufs: Add a PCI based UFS controller driver

This adds a simple PCI based UFS controller driver with a QEMU
emulated UFS controller on the PCI bus.

Requiring QEMU v8.2+.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
13 months agoufs: Allow mmio registers on the PCI bus
Bin Meng [Wed, 11 Oct 2023 13:15:49 +0000 (21:15 +0800)]
ufs: Allow mmio registers on the PCI bus

Check if the UFS controller is on the PCI bus, and get its register
base address accordingly.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
13 months agopci_ids: Add Red Hat vendor and device IDs
Bin Meng [Wed, 11 Oct 2023 13:15:48 +0000 (21:15 +0800)]
pci_ids: Add Red Hat vendor and device IDs

Red Hat, Inc. donates a part of its device ID range [1] to QEMU,
to be used for virtual devices. This commit adds several typical
devices that are useful in U-Boot.

[1] https://www.qemu.org/docs/master/specs/pci-ids.html

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
13 months agocmd: ufs: Correct the help text
Bin Meng [Wed, 11 Oct 2023 13:15:47 +0000 (21:15 +0800)]
cmd: ufs: Correct the help text

Remove the additional space and use "sub-system" for consistency
with other commands like "scsi" and "usb".

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
13 months agocmd: kconfig: Make ufs prompt look similar to other commands
Bin Meng [Wed, 11 Oct 2023 13:15:46 +0000 (21:15 +0800)]
cmd: kconfig: Make ufs prompt look similar to other commands

At present the 'ufs' command prompt does not look similar like other
commands. Update it.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
13 months agoufs: Add a line feed to the end of some dev_xxx() messages
Bin Meng [Wed, 11 Oct 2023 13:15:45 +0000 (21:15 +0800)]
ufs: Add a line feed to the end of some dev_xxx() messages

Add a line feed to improve readability of some dev_xxx() messages.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>