]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
15 months agoboot: Move fdt_support to boot/
Simon Glass [Thu, 14 Sep 2023 16:55:45 +0000 (10:55 -0600)]
boot: Move fdt_support to boot/

This relates to booting since it fixes up the devicetree for the OS. Move
it into the boot/ directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
15 months agotest: Move POST under a renamed Testing section
Simon Glass [Thu, 14 Sep 2023 16:55:44 +0000 (10:55 -0600)]
test: Move POST under a renamed Testing section

Rename Unit tests to Testing, since it is a stretch to describe some of
the tests as unit tests. Move POST there as well, so it doesn't show up
by itself in the top-level menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
15 months agoFWU: Avoid showing an unselectable menu option
Simon Glass [Thu, 14 Sep 2023 16:55:43 +0000 (10:55 -0600)]
FWU: Avoid showing an unselectable menu option

Use a menuconfig to avoid showing a menu which cannot be selected in many
cases.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
15 months agovideo: Move the BMP options
Simon Glass [Thu, 14 Sep 2023 16:55:42 +0000 (10:55 -0600)]
video: Move the BMP options

These appear prominently in the main menu at present. Move them to the
video Kconfig where they belong.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
15 months agovideo: Move bmp code to drivers/video
Simon Glass [Thu, 14 Sep 2023 16:55:41 +0000 (10:55 -0600)]
video: Move bmp code to drivers/video

This relates to graphics which is only active when CONFIG_VIDEO is
enabled. Move it into that directory.

For most boards there is no harm in compiling it always, since it if not
used it will be dropped by the linker. But for the EFI app this is not
the case, so retain use of the BMP Kconfig.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
15 months agoKconfig: Move API into general setup
Simon Glass [Thu, 14 Sep 2023 16:55:40 +0000 (10:55 -0600)]
Kconfig: Move API into general setup

This is perhaps not a commonly used feature so should not have its own
option in the main menu. Move it under general setup.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
15 months agolib: rational: Move the Kconfigs into the correct place
Simon Glass [Thu, 14 Sep 2023 16:55:39 +0000 (10:55 -0600)]
lib: rational: Move the Kconfigs into the correct place

These should not be part of the 'system tables' menu. Move them outside
on their own.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 7d0f3fbb93c ("lib: rational: copy the rational fraction lib...")
Reviewed-by: Tom Rini <trini@konsulko.com>
15 months agoMerge branch '2023-09-18-assorted-TI-platform-updates' into next
Tom Rini [Tue, 19 Sep 2023 15:14:03 +0000 (11:14 -0400)]
Merge branch '2023-09-18-assorted-TI-platform-updates' into next

- A few assorted DT updates and minor fixes for TI platforms

15 months agoarm: dts: k3-am642: Sync with kernel v6.6-rc1
Nishanth Menon [Mon, 11 Sep 2023 14:44:01 +0000 (09:44 -0500)]
arm: dts: k3-am642: Sync with kernel v6.6-rc1

Sync device tree with v6.6-rc1

Signed-off-by: Nishanth Menon <nm@ti.com>
15 months agodt-bindings: ti-serdes: Deprecate header with constants with v6.6-rc1
Nishanth Menon [Mon, 11 Sep 2023 14:44:00 +0000 (09:44 -0500)]
dt-bindings: ti-serdes: Deprecate header with constants with v6.6-rc1

The constants to define the idle state of SERDES MUX were defined in
bindings header. They are used only in DTS and driver uses the dt property
to set the idle state making it unsuitable for bindings.
The constants are moved to header next to DTS ("arch/arm/boot/dts/")
and all the references to bindings header are removed.
So add a warning to mark this bindings header as deprecated.

We could probably drop this header, but let us wait for kernel to
cleanup.

Signed-off-by: Nishanth Menon <nm@ti.com>
15 months agoarm: dts: k3*: Use local header for SERDES MUX idle-state values
Nishanth Menon [Mon, 11 Sep 2023 14:43:59 +0000 (09:43 -0500)]
arm: dts: k3*: Use local header for SERDES MUX idle-state values

The DTS uses constants for SERDES MUX idle state values which were earlier
provided as bindings header. But they are unsuitable for bindings.
So move these constants in a header next to DTS.

NOTE: sync with v6.6-rc1 will bring in this change naturally.

Signed-off-by: Nishanth Menon <nm@ti.com>
15 months agoarm: dts: Introduce k3-serdes.h from v6.6-rc1
Nishanth Menon [Mon, 11 Sep 2023 14:43:58 +0000 (09:43 -0500)]
arm: dts: Introduce k3-serdes.h from v6.6-rc1

Introduce the new serdes header from kernel v6.6-rc1

The DTS uses constants for SERDES MUX idle state values which were earlier
provided as bindings header. But they are unsuitable for bindings.
So move these constants in a header next to DTS.

Signed-off-by: Nishanth Menon <nm@ti.com>
15 months agoarm: dts: k3-am625: Sync with kernel v6.6-rc1
Nishanth Menon [Mon, 11 Sep 2023 14:02:56 +0000 (09:02 -0500)]
arm: dts: k3-am625: Sync with kernel v6.6-rc1

Sync device tree with v6.6-rc1

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
15 months agoarm: dts: k3-pinctrl: Sync with kernel v6.6-rc1
Nishanth Menon [Mon, 11 Sep 2023 14:02:55 +0000 (09:02 -0500)]
arm: dts: k3-pinctrl: Sync with kernel v6.6-rc1

Sync pinctrl header with v6.6-rc1

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
15 months agodrivers: misc: k3_avs: Add Linux compatibles to maintain sync
Reid Tonking [Thu, 7 Sep 2023 18:06:35 +0000 (13:06 -0500)]
drivers: misc: k3_avs: Add Linux compatibles to maintain sync

The ti,j7200-vtm and ti,j721e-vtm compatibles are used for voltage
and thermal monitoring (VTM) by (drivers/thermal/k3_j72xx_bandgap.c)
in Linux, but the same hardware is used for adaptive voltage scaling
(AVS) in u-boot, This brings both drivers in line with the same
compatibles.

Since the j7200 uses the config as the j721e, the data is inherited
from j721e vs creating a duplicate

Signed-off-by: Neha Francis <n-francis@ti.com>
Signed-off-by: Reid Tonking <reidt@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
15 months agotools: logos: Rename TI logo files
Nikhil M Jain [Fri, 1 Sep 2023 10:39:13 +0000 (16:09 +0530)]
tools: logos: Rename TI logo files

Change the file name from ti.gz and ti.bmp to ti_logos_414x97_32bpp to
help user understand the resolution and identify the logo files when
placed in the boot partition and update the splashfile name with the
same in .env file.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
15 months agoam33xx: ignore return value from usb_ether_init()
Trevor Woerner [Thu, 31 Aug 2023 02:49:50 +0000 (22:49 -0400)]
am33xx: ignore return value from usb_ether_init()

In 2cb43ef1c223 ("usb: ether: Fix error handling in usb_ether_init") the error
handling of usb_ether_init() was changed. Not a single other call site of this
function checks its return value, therefore follow suit in the am33xx code.

Do not cause the boot to halt if the usb gadget ethernet initialization fails:

initcall sequence 9ffdbd84 failed at call 808024b9 (err=-19)
### ERROR ### Please RESET the board ###

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Reviewed-by: Michal Suchánek <msuchanek@suse.de>
15 months agoMerge branch 'next' of git://source.denx.de/u-boot-usb into next
Tom Rini [Sat, 16 Sep 2023 16:14:08 +0000 (12:14 -0400)]
Merge branch 'next' of git://source.denx.de/u-boot-usb into next

- Rework gadget device handling

15 months agoboard: usb: Replace legacy usb_gadget_handle_interrupts()
Marek Vasut [Fri, 1 Sep 2023 09:50:03 +0000 (11:50 +0200)]
board: usb: Replace legacy usb_gadget_handle_interrupts()

The usb_gadget_handle_interrupts() is no longer used anywhere,
replace the remaining uses with dm_usb_gadget_handle_interrupts()
which takes udevice as a parameter.

Some of the UDC drivers currently ignore the index parameter altogether,
those also ignore the udevice and have to be reworked. Other like the
dwc3_uboot_handle_interrupt() had to be switched from index to udevice
look up to avoid breakage.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on khadas vim3
Signed-off-by: Marek Vasut <marex@denx.de>
15 months agodm: usb: udc: Drop legacy udevice handler functions
Marek Vasut [Fri, 1 Sep 2023 09:50:02 +0000 (11:50 +0200)]
dm: usb: udc: Drop legacy udevice handler functions

Remove legacy functions limited by the dev_array array,
those are no longer used anywhere, all the code uses
plain udevice based access now.

The usb_gadget_handle_interrupts() is doing udevice look up
until all call sites use dm_usb_gadget_handle_interrupts().

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
15 months agousb: gadget: ether: Use plain udevice for UDC controller interaction
Marek Vasut [Fri, 1 Sep 2023 09:50:01 +0000 (11:50 +0200)]
usb: gadget: ether: Use plain udevice for UDC controller interaction

Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
15 months agousb: gadget: acm: Use plain udevice for UDC controller interaction
Marek Vasut [Fri, 1 Sep 2023 09:50:00 +0000 (11:50 +0200)]
usb: gadget: acm: Use plain udevice for UDC controller interaction

Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
15 months agothordown: Use plain udevice for UDC controller interaction
Marek Vasut [Fri, 1 Sep 2023 09:49:59 +0000 (11:49 +0200)]
thordown: Use plain udevice for UDC controller interaction

Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
15 months agosdp: Use plain udevice for UDC controller interaction
Marek Vasut [Fri, 1 Sep 2023 09:49:58 +0000 (11:49 +0200)]
sdp: Use plain udevice for UDC controller interaction

Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
15 months agospl: sdp: Detach the controller on error
Marek Vasut [Fri, 1 Sep 2023 09:49:57 +0000 (11:49 +0200)]
spl: sdp: Detach the controller on error

In case anything errors out during the SDP transfer, detach
the controller instead of bailing out right away. This way,
the controller can be reattached on next attempt.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
15 months agodfu: Use plain udevice for UDC controller interaction
Marek Vasut [Fri, 1 Sep 2023 09:49:56 +0000 (11:49 +0200)]
dfu: Use plain udevice for UDC controller interaction

Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
15 months agodfu: Detach the controller on error
Marek Vasut [Fri, 1 Sep 2023 09:49:55 +0000 (11:49 +0200)]
dfu: Detach the controller on error

In case anything errors out during the DFU registration, detach
the controller instead of bailing out right away. This way, the
controller can be reattached on next attempt.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
15 months agocmd: ums: Use plain udevice for UDC controller interaction
Marek Vasut [Fri, 1 Sep 2023 09:49:54 +0000 (11:49 +0200)]
cmd: ums: Use plain udevice for UDC controller interaction

Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on khadas vim3
Signed-off-by: Marek Vasut <marex@denx.de>
15 months agocmd: thordown: Reorder variable declaration
Marek Vasut [Fri, 1 Sep 2023 09:49:53 +0000 (11:49 +0200)]
cmd: thordown: Reorder variable declaration

Move the variable declaration around to improve code readability.
No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
15 months agocmd: sdp: Reorder variable declaration
Marek Vasut [Fri, 1 Sep 2023 09:49:52 +0000 (11:49 +0200)]
cmd: sdp: Reorder variable declaration

Move the variable declaration around to improve code readability.
No functional change.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
15 months agocmd: rockusb: Use plain udevice for UDC controller interaction
Marek Vasut [Fri, 1 Sep 2023 09:49:51 +0000 (11:49 +0200)]
cmd: rockusb: Use plain udevice for UDC controller interaction

Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
15 months agocmd: fastboot: Use plain udevice for UDC controller interaction
Marek Vasut [Fri, 1 Sep 2023 09:49:50 +0000 (11:49 +0200)]
cmd: fastboot: Use plain udevice for UDC controller interaction

Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on khadas vim3
Signed-off-by: Marek Vasut <marex@denx.de>
15 months agoconfigs: sandbox: Enable DM_USB_GADGET
Marek Vasut [Fri, 1 Sep 2023 09:49:49 +0000 (11:49 +0200)]
configs: sandbox: Enable DM_USB_GADGET

Switch sandbox to DM_USB_GADGET, DM is the future.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
15 months agousb: sandbox: Add DM_USB_GADGET support
Marek Vasut [Fri, 1 Sep 2023 09:49:48 +0000 (11:49 +0200)]
usb: sandbox: Add DM_USB_GADGET support

Remove local usb_gadget_register_driver()/usb_gadget_unregister_driver()
implementation which is implemented in udc-core.c instead if DM_USB_GADGET
is enabled. Add no-op dm_usb_gadget_handle_interrupts() implementation.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
15 months agodm: usb: udc: Factor out plain udevice handler functions
Marek Vasut [Fri, 1 Sep 2023 09:49:47 +0000 (11:49 +0200)]
dm: usb: udc: Factor out plain udevice handler functions

Pull the functionality of UDC uclass that operates on plain udevice
and does not use this dev_array array into separate functions and
expose those functions, so that as much code as possible can be
switched over to these functions and the dev_array can be dropped.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
15 months agoMerge branch '2023-09-14-remove-NEEDS_MANUAL_RELOC' into next
Tom Rini [Thu, 14 Sep 2023 20:23:49 +0000 (16:23 -0400)]
Merge branch '2023-09-14-remove-NEEDS_MANUAL_RELOC' into next

To quote the author:

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

This is a follow up on way over decade old commit
2e5167ccad93 ("Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC")
"
By now, the majority of architectures have working relocation
support, so the few remaining architectures have become exceptions.
To make this more obvious, we make working relocation now the default
case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC.
"
It took a bit longer than expected, but now we can really sunset
CONFIG_NEEDS_MANUAL_RELOC.

Make it so.

15 months agopost: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:15 +0000 (23:30 +0200)]
post: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agowdt: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:14 +0000 (23:30 +0200)]
wdt: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agotimer: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:13 +0000 (23:30 +0200)]
timer: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agosysreset: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:12 +0000 (23:30 +0200)]
sysreset: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agospi: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:11 +0000 (23:30 +0200)]
spi: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agoserial: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:10 +0000 (23:30 +0200)]
serial: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agonet: phy: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:09 +0000 (23:30 +0200)]
net: phy: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agonet: miiphybb: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:08 +0000 (23:30 +0200)]
net: miiphybb: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agonet: eth: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:07 +0000 (23:30 +0200)]
net: eth: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agomtd: ubifs: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:06 +0000 (23:30 +0200)]
mtd: ubifs: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agosf: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:05 +0000 (23:30 +0200)]
sf: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agohwspinlock: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:04 +0000 (23:30 +0200)]
hwspinlock: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agogpio: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:03 +0000 (23:30 +0200)]
gpio: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocrypto: rsa: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:02 +0000 (23:30 +0200)]
crypto: rsa: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocpu: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:01 +0000 (23:30 +0200)]
cpu: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agofs: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:30:00 +0000 (23:30 +0200)]
fs: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agoimage: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:59 +0000 (23:29 +0200)]
image: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agoinitcall: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:58 +0000 (23:29 +0200)]
initcall: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agoenv: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:57 +0000 (23:29 +0200)]
env: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agodm: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:56 +0000 (23:29 +0200)]
dm: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocmd: pxe: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:55 +0000 (23:29 +0200)]
cmd: pxe: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocmd: onenand: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:54 +0000 (23:29 +0200)]
cmd: onenand: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocmd: nvedit: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:53 +0000 (23:29 +0200)]
cmd: nvedit: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocmd: i2c: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:52 +0000 (23:29 +0200)]
cmd: i2c: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocmd: date: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:51 +0000 (23:29 +0200)]
cmd: date: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocmd: bmp: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:50 +0000 (23:29 +0200)]
cmd: bmp: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocommon: stdio: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:49 +0000 (23:29 +0200)]
common: stdio: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocommon: hash: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:48 +0000 (23:29 +0200)]
common: hash: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocommon: event: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:47 +0000 (23:29 +0200)]
common: event: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocommon: malloc: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:46 +0000 (23:29 +0200)]
common: malloc: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocommon: hush: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:45 +0000 (23:29 +0200)]
common: hush: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocommon: board_r: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:44 +0000 (23:29 +0200)]
common: board_r: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agocommand: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:43 +0000 (23:29 +0200)]
command: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agoblkcache: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:42 +0000 (23:29 +0200)]
blkcache: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agoboot: Remove unused NEEDS_MANUAL_RELOC code bits
Marek Vasut [Wed, 6 Sep 2023 21:29:41 +0000 (23:29 +0200)]
boot: Remove unused NEEDS_MANUAL_RELOC code bits

The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agoMerge branch '2023-09-13-phy-improvements' into next
Tom Rini [Wed, 13 Sep 2023 22:02:28 +0000 (18:02 -0400)]
Merge branch '2023-09-13-phy-improvements' into next

- YT8511 and BCM54210E PHY support, cleanup and then use
  generic_phy_valid more, and then further clean up
  generic_{setup,shutdown}_phy()

15 months agophy: Refactor generic_{setup, shutdown}_phy() to reduce complexity
Jonas Karlman [Thu, 31 Aug 2023 23:07:11 +0000 (23:07 +0000)]
phy: Refactor generic_{setup, shutdown}_phy() to reduce complexity

Refactor generic_{setup,shutdown}_phy() to reduce complexity and
indentation. This have no intended functional change.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
15 months agophy: Return success from generic_setup_phy() when phy is not found
Jonas Karlman [Thu, 31 Aug 2023 23:07:10 +0000 (23:07 +0000)]
phy: Return success from generic_setup_phy() when phy is not found

Restore the old behavior of ehci_setup_phy() and ohci_setup_phy() to
return success when generic_phy_get_by_index() return -ENOENT.

Fixes: 84e561407a5f ("phy: Add generic_{setup,shutdown}_phy() helpers")
Fixes: 10005004db73 ("usb: ohci: Make usage of generic_{setup,shutdown}_phy() helpers")
Fixes: 083f8aa978a8 ("usb: ehci: Make usage of generic_{setup,shutdown}_phy() helpers")
Fixes: 75341e9c16aa ("usb: ehci: Remove unused ehci_{setup,shutdown}_phy() helpers")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
15 months agophy: Fix generic_setup_phy() return value on power on failure
Jonas Karlman [Thu, 31 Aug 2023 23:07:08 +0000 (23:07 +0000)]
phy: Fix generic_setup_phy() return value on power on failure

generic_phy_exit() typically return 0 for a struct phy that has been
initialized with a generic_phy_init() call.

generic_setup_phy() returns the value from a generic_phy_exit() call
when generic_phy_power_on() fails. This hides the failed state of the
power_on ops from the caller of generic_setup_phy().

Fix this by ignoring the return value of the generic_phy_exit() call and
return the value from the generic_phy_power_on() call.

Fixes: 84e561407a5f ("phy: Add generic_{setup,shutdown}_phy() helpers")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
15 months agovideo: rockchip: dw_mipi_dsi: Use generic_phy_valid() helper
Jonas Karlman [Thu, 31 Aug 2023 22:16:40 +0000 (22:16 +0000)]
video: rockchip: dw_mipi_dsi: Use generic_phy_valid() helper

The documentation for struct phy state that "The content of the
structure is managed solely by the PHY API and PHY drivers".

Change to use the generic_phy_valid() helper to check if phy is valid.

Fixes: b7d8d40346f2 ("video: rockchip: dw_mipi_dsi: Fix external phy existence check")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agonet: zynq: Use generic_phy_valid() helper
Jonas Karlman [Thu, 31 Aug 2023 22:16:38 +0000 (22:16 +0000)]
net: zynq: Use generic_phy_valid() helper

The documentation for struct phy state that "The content of the
structure is managed solely by the PHY API and PHY drivers".

Change to use the generic_phy_valid() helper to check if phy is valid.

Fixes: 10c50b1facbf ("net: zynq: Add support for PHY configuration in SGMII mode")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
15 months agoscsi: ceva: Use generic_phy_valid() helper
Jonas Karlman [Thu, 31 Aug 2023 22:16:37 +0000 (22:16 +0000)]
scsi: ceva: Use generic_phy_valid() helper

The documentation for struct phy state that "The content of the
structure is managed solely by the PHY API and PHY drivers".

Change to use the generic_phy_valid() helper to check if phy is valid.

Fixes: f6f5451d469b ("scsi: ceva: Enable PHY and reset support")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
15 months agousb: dwc3: Use generic_phy_valid() helper
Jonas Karlman [Thu, 31 Aug 2023 22:16:36 +0000 (22:16 +0000)]
usb: dwc3: Use generic_phy_valid() helper

The documentation for struct phy state that "The content of the
structure is managed solely by the PHY API and PHY drivers".

Change to use the generic_phy_valid() helper to check if phy is valid.
Also remove setting phy->dev to NULL now that generic_phy_get_by_name()
properly initialize phy->dev to NULL.

Fixes: 142d50fbce7c ("usb: dwc3: Add support for usb3-phy PHY configuration")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
15 months agophy: Set phy->dev to NULL when generic_phy_get_by_index_nodev() fails
Jonas Karlman [Thu, 31 Aug 2023 22:16:35 +0000 (22:16 +0000)]
phy: Set phy->dev to NULL when generic_phy_get_by_index_nodev() fails

Generic phy helpers typically use generic_phy_valid() to determine if
the helper should perform its function on a passed struct phy.
generic_phy_valid() treat any struct phy having phy->dev set as valid.

With generic_phy_get_by_index_nodev() setting phy->dev to a valid struct
udevice early, there can be situations where the struct phy is returned
as valid when initialization in fact failed and returned an error.

Fix this by setting phy->dev back to NULL when any of the calls to
of_xlate ops, device_get_supply_regulator or phy_alloc_counts fail. Also
extend the dm_test_phy_base test with a test where of_xlate ops fail.

Fixes: 72e5016f878d ("drivers: phy: add generic PHY framework")
Fixes: b9688df3cbf4 ("drivers: phy: Set phy->dev to NULL when generic_phy_get_by_index() fails")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
15 months agophy: Set phy->dev to NULL when generic_phy_get_by_name() fails
Jonas Karlman [Thu, 31 Aug 2023 22:16:33 +0000 (22:16 +0000)]
phy: Set phy->dev to NULL when generic_phy_get_by_name() fails

generic_phy_get_by_name() does not initialize phy->dev to NULL before
returning when dev_read_stringlist_search() fails. This can lead to an
uninitialized or reused struct phy erroneously be report as valid by
generic_phy_valid().

Fix this issue by initializing phy->dev to NULL, also extend the
dm_test_phy_base test with calls to generic_phy_valid().

Fixes: b9688df3cbf4 ("drivers: phy: Set phy->dev to NULL when generic_phy_get_by_index() fails")
Fixes: 868d58f69c7c ("usb: dwc3: Fix non-usb3 configurations")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
15 months agonet: phy: broadcom: add support for BCM54210E
Marek Vasut [Sat, 5 Aug 2023 14:10:08 +0000 (16:10 +0200)]
net: phy: broadcom: add support for BCM54210E

It's Broadcom PHY simply described as single-port
RGMII 10/100/1000BASE-T PHY. It requires disabling
delay skew and GTXCLK bits.

BCM54210E support ported from Linux kernel commit
0fc9ae1076697 ("net: phy: broadcom: add support for BCM54210E")
AUX/SHD/bcm54xx_config_clock_delay update ported from Linux 6.5-rc4 commit
28e219aea0b9e ("net: phy: broadcom: drop brcm_phy_setbits() and use phy_set_bits() instead")

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Rafał Miłecki <rafal@milecki.pl>
15 months agonet: phy: motorcomm: Add support for YT8511 PHY
Nicolas Frattaroli [Sat, 5 Aug 2023 10:35:01 +0000 (12:35 +0200)]
net: phy: motorcomm: Add support for YT8511 PHY

The YT8511 ethernet PHYs can be found on e.g. the SOQuartz or
the Quartz64. Add rudimentary support for them.

Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
15 months agoMerge branch '2023-09-12-gpt-improvements' into next
Tom Rini [Tue, 12 Sep 2023 15:13:17 +0000 (11:13 -0400)]
Merge branch '2023-09-12-gpt-improvements' into next

Bring in two series to improve GPT support.  For the first series from
Joshua:
Adds several improvements and additions to the gpt command processing,
specifically (although not exclusively) for the purpose of supporting
"ping-pong" booting when doing A/B boot partitions with u-boot itself.

In this mechanism, u-boot must boot up, and then check if the correct
boot partition is active, and if not switch the GPT partition table to
the other boot partition and reboot to activate the other u-boot.

In order to facilitate this, the gpt command needs to be better at
preserving entry attributes when manipulating the partition table. It
also learns two new commands, one which can swap the order of partitions
in the table, and another that lets it change which partitions have the
bootable flag.

For the second series from Heinrich:

To partition a block device the partition type GUIDs are needed but
'gpt read' does not provide these. Add the missing parts.

There is some overlap in these two series but I believe I have merged
things correctly.

15 months agocmd: gpt: fix gpt read
Heinrich Schuchardt [Sat, 2 Sep 2023 07:35:24 +0000 (09:35 +0200)]
cmd: gpt: fix gpt read

To partition a block device the partition type GUIDs are needed but
'gpt read' does not provide these. Add the missing parts.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agocmd: gpt: fix calc_parts_list_len()
Heinrich Schuchardt [Sat, 2 Sep 2023 07:35:23 +0000 (09:35 +0200)]
cmd: gpt: fix calc_parts_list_len()

* Avoid incrementing by moving comma into strlen("uuid_disk=,") and
  considering NUL byte.
* Appending a UUID only adds UUID_STR_LEN bytes.
  Don't count the terminating NUL.
* The length of the hexadecimal representation of lba_int is
  2 * sizeof(lba_int).
* We don't use a 'MiB' postfix but a '0x' prefix.
* The uuid field is only needed if configured.

Fixes: 2fcaa413b3f6 ("gpt: harden set_gpt_info() against non NULL-terminated strings")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agocmd: gpt: use UUID accessor more consistently
Heinrich Schuchardt [Sat, 2 Sep 2023 07:35:22 +0000 (09:35 +0200)]
cmd: gpt: use UUID accessor more consistently

disk_partition_uuid() and disk_partition_set_uuid() were introduced to let
us avoid the usage of #ifdef when dealing with the field uuid of
struct disk_partition.

In allocate_disk_part() commit c5f1d005f517 ("part: Add accessors for
struct disk_partition uuid") missed to use the setter.

print_gpt_info() and create_gpt_partitions_list() are further functions
where we should use the getter.

Fixes: c5f1d005f517 ("part: Add accessors for struct disk_partition uuid")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agopart: rename disk_partition_type_uuid()
Heinrich Schuchardt [Sat, 2 Sep 2023 07:35:21 +0000 (09:35 +0200)]
part: rename disk_partition_type_uuid()

Rename disk_partition_type_uuid to disk_partition_type_guid.

Provide function descriptions for the getter and setter.

Fixes: bcd645428c34 ("part: Add accessors for struct disk_partition type_uuid")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agocmd: gpt: Add command to swap partition order
Joshua Watt [Thu, 31 Aug 2023 16:51:41 +0000 (10:51 -0600)]
cmd: gpt: Add command to swap partition order

Adds a command called "gpt transpose" which will swap the order two
partition table entries in the GPT partition table (but leaves them
pointing to the same locations on disk).

This can be useful for swapping bootloaders in systems that use an A/B
partitioning scheme where the bootrom is hard coded to look for the
bootloader in a specific index in the GPT partition table.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
15 months agocmd: gpt: Preserve bootable flag
Joshua Watt [Thu, 31 Aug 2023 16:51:40 +0000 (10:51 -0600)]
cmd: gpt: Preserve bootable flag

Sets the bootable flag when constructing the partition string from the
current partition configuration. This ensures that when the partitions
are written back (for example, when renaming a partition), the flag is
preserved.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
15 months agocmd: gpt: Preserve type GUID if enabled
Joshua Watt [Thu, 31 Aug 2023 16:51:39 +0000 (10:51 -0600)]
cmd: gpt: Preserve type GUID if enabled

If CONFIG_PARTITION_TYPE_GUID is enabled, the type GUID will be
preserved when writing out the partition string. It was already
respected when writing out partitions; this ensures that if you capture
the current partition layout and write it back (such as when renaming),
the type GUIDs are preserved.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
15 months agocmd: gpt: Add command to set bootable flags
Joshua Watt [Thu, 31 Aug 2023 16:51:38 +0000 (10:51 -0600)]
cmd: gpt: Add command to set bootable flags

Adds a command that can be used to modify the GPT partition table to
indicate which partitions should have the bootable flag set

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
15 months agocmd: gpt: Add gpt_partition_bootable variable
Joshua Watt [Thu, 31 Aug 2023 16:51:37 +0000 (10:51 -0600)]
cmd: gpt: Add gpt_partition_bootable variable

Adds an additional variable called gpt_partition_bootable that indicates
if the given partition is bootable or not.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
15 months agotests: gpt: Remove test order dependency
Joshua Watt [Thu, 31 Aug 2023 16:51:36 +0000 (10:51 -0600)]
tests: gpt: Remove test order dependency

Re-create a clean disk image for each test to prevent modifications from
one test affecting another

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
15 months agoMerge branch 'next_ufs' of https://source.denx.de/u-boot/custodians/u-boot-sh into...
Tom Rini [Sat, 9 Sep 2023 14:12:40 +0000 (10:12 -0400)]
Merge branch 'next_ufs' of https://source.denx.de/u-boot/custodians/u-boot-sh into next

- UFS support and GPIO clock driver

15 months agoufs: ufs-renesas: Drop include common.h
Marek Vasut [Sat, 9 Sep 2023 02:54:35 +0000 (04:54 +0200)]
ufs: ufs-renesas: Drop include common.h

The "#include <common.h>" is being phased out in favor of more fine
grained header management, i.e. ideally include a subset of headers
that are really needed. Remove it from this driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
15 months agoARM: renesas: Enable UFS on R8A779F0 S4 Spider
Marek Vasut [Tue, 22 Aug 2023 01:47:56 +0000 (03:47 +0200)]
ARM: renesas: Enable UFS on R8A779F0 S4 Spider

Enable UFS controller driver and matching UFS and SCSI commands. The
former is used to initialize the device, the later is used to perform
low level access to the SCSI interface of the UFS device.

Enable R8A779F0 S4 Spider specific dependencies, the PCA953x driver
and GPIO clock gate driver. This setup is used to toggle 38.4 MHz
clock for the UFS controller.

Enable support for 48bit LBA in block layer to address disks larger
than 512*2^32 ~= 144 PiB. Enable use of 64bit LBA variables in the
rest of U-Boot, instead of the default 32bit ones.

Increase FAT cluster size to 128k as that is what is used by the
filesystem that is populated on the UFS device.

Use 'ufs init && scsi scan' to start the UFS device from U-Boot prompt.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agoufs: ufs-renesas: Add support for Renesas R-Car UFS controller
Marek Vasut [Tue, 22 Aug 2023 01:47:13 +0000 (03:47 +0200)]
ufs: ufs-renesas: Add support for Renesas R-Car UFS controller

Add support for Renesas R-Car UFS controller which needs vendor-specific
initialization.

Ported from Linux kernel as of commit
c2ab666072bc ("scsi: ufs: Explicitly include correct DT includes")

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
15 months agoclk: Add GPIO-controlled clock gate driver
Marek Vasut [Sun, 13 Aug 2023 23:51:27 +0000 (01:51 +0200)]
clk: Add GPIO-controlled clock gate driver

Add driver which implements GPIO-controlled clock. The GPIO is used
as a gate to enable/disable the clock. This matches linux clk-gpio.c
driver, however this does not implement the GPIO mux part, which in
U-Boot DM would be better fit in separate driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
15 months agoMerge branch '2023-09-08-assorted-TI-platform-updates' into next
Tom Rini [Sat, 9 Sep 2023 02:44:00 +0000 (22:44 -0400)]
Merge branch '2023-09-08-assorted-TI-platform-updates' into next

- Add TI BeaglePlay support, verdin-am62 cleanups, K3-J7 DDR timing
  updates, IOT2050 DTS update for watchdog