platform/kernel/u-boot.git
19 months agoMerge tag 'xilinx-for-v2023.01-rc3' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Tue, 22 Nov 2022 17:33:48 +0000 (12:33 -0500)]
Merge tag 'xilinx-for-v2023.01-rc3' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx changes for v2023.01-rc3

microblaze:
- Enable 32 bit addressing mode for SPIs

zynq:
- Minor DT fixes (PL clock enabling)

zynqmp:
- Disable watchdog by default
- Remove unused xlnx,eeprom chosen support
- Add missing symlink for vck190 SC revB
- Use mdio bus with ethernet-phy-id description

versal:
- Add mini qspi/ospi configuration

versal-net:
- Add soc driver
- Fix Kconfig entry for SOC
- Fix loading address location for MINI configuration
- Disable LMB for mini configuration

net:
- Fix ethernet-phy-id usage in the code

pinctrl:
- Revert high impedance/output enable support

timer:
- Fix timer relocation for Microblaze
- Fix timer wrap in 32bit Xilinx timer driver

19 months agoarm64: versal: Add octal spi flash mini u-boot configuration
Ashok Reddy Soma [Wed, 16 Nov 2022 14:11:55 +0000 (07:11 -0700)]
arm64: versal: Add octal spi flash mini u-boot configuration

Add configuration file for mini u-boot configuration which runs on a
smaller footprint from on chip memory(OCM). This configuration has
required CONFIG's enabled to support octal spi flash and uses DCC terminal
for console output. Add required dts for octal spi flash mini u-boot
configuration.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Link: https://lore.kernel.org/r/20221116141155.14788-4-ashok.reddy.soma@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agospi: cadence-qspi: Fix compilation error in mini u-boot flash reset
Ashok Reddy Soma [Wed, 16 Nov 2022 14:11:54 +0000 (07:11 -0700)]
spi: cadence-qspi: Fix compilation error in mini u-boot flash reset

When cadence_qspi_versal_flash_reset() function is called in mini
u-boot where there is no firmware support, it is missing defines for
macro's BOOT_MODE_POR_0 & BOOT_MODE_POR_1. Remove them and replace with
already define macro's which have same values as these.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Link: https://lore.kernel.org/r/20221116141155.14788-3-ashok.reddy.soma@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agoarm64: versal: Add qspi flash mini u-boot configuration
Ashok Reddy Soma [Wed, 16 Nov 2022 14:11:53 +0000 (07:11 -0700)]
arm64: versal: Add qspi flash mini u-boot configuration

Add configuration file for mini u-boot configuration which runs on a
smaller footprint from on chip memory(OCM). This configuration has
required CONFIG's enabled to support qspi flash and uses DCC terminal
for console output. Add required dts files for qspi mini configuration.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Link: https://lore.kernel.org/r/20221116141155.14788-2-ashok.reddy.soma@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agoqspi: versal-net: Add condition for tapdelay register
Ashok Reddy Soma [Wed, 16 Nov 2022 15:40:30 +0000 (16:40 +0100)]
qspi: versal-net: Add condition for tapdelay register

Add CONFIG_ARCH_VERSAL_NET to select tapdelay register for versal-net.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/2500dd688214e2ec2d54ed3fabbfee0b1ca861a6.1668613229.git.michal.simek@amd.com
19 months agosoc: xilinx: versal-net: Add soc_xilinx_versal_net driver
Michal Simek [Wed, 16 Nov 2022 15:36:35 +0000 (16:36 +0100)]
soc: xilinx: versal-net: Add soc_xilinx_versal_net driver

Add soc_xilinx_versal_net driver to identify the family & revision of
versal-net SoC. Add Kconfig option CONFIG_SOC_XILINX_VERSAL_NET to
enable/disable this driver. To enable this driver by default, add this
config to xilinx_versal_net_virt_defconfig file. This driver will be
probed using platdata U_BOOT_DEVICE structure which is specified in
mach-versal-net/cpu.c.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Link: https://lore.kernel.org/r/613d6bcffd9070f62cf348079ed16c120f8fc56f.1668612993.git.michal.simek@amd.com
19 months agoxilinx: versal-net: Disable LMB for mini configuration
Michal Simek [Wed, 16 Nov 2022 15:33:17 +0000 (16:33 +0100)]
xilinx: versal-net: Disable LMB for mini configuration

There is no reason to have LMB enabled on mini configuration because it is
only consuming space that's why disable it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/47067c87b6b2e7600d3c2808e7d0aa6fe82aa1fe.1668612795.git.michal.simek@amd.com
19 months agoarm64: zynqmp: Describe TI phy as ethernet-phy-id with reset on zcu106
Michal Simek [Wed, 16 Nov 2022 10:59:19 +0000 (11:59 +0100)]
arm64: zynqmp: Describe TI phy as ethernet-phy-id with reset on zcu106

zcu106 also connects ethernet phy reset via tca6416 chip as is done on
other evaluation boards. That's why describe this connection to make sure
that ethernet phy is reset before it's use.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/21ccd672b799b5858021f6059098a1247c311fae.1668596358.git.michal.simek@amd.com
19 months agoxilinx: versal-net: Fix SYS_LOAD_ADDR to point to OCM
Michal Simek [Sun, 6 Nov 2022 19:48:06 +0000 (11:48 -0800)]
xilinx: versal-net: Fix SYS_LOAD_ADDR to point to OCM

Versal NET mini U-Boot configuration is used for memory testing that's why
load address can't be really placed in memory which doesn't need to work
that's why move it to start of OCM which is the same memory which U-Boot is
running from.

Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agoxilinx: versal-net: Fix incorrect platform name in Kconfig
Michal Simek [Sun, 6 Nov 2022 01:21:27 +0000 (18:21 -0700)]
xilinx: versal-net: Fix incorrect platform name in Kconfig

Fix incorrect name used in entry description.

Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agoarm64: zynqmp: Create vck190 spl link for revB
Michal Simek [Wed, 26 Oct 2022 07:38:00 +0000 (09:38 +0200)]
arm64: zynqmp: Create vck190 spl link for revB

vck190 system controller low level setup is the same for revB that's why
also create symlink to revA.

Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agonet: phy: Fix ethernet-phy-id <dot> in the code
Michal Simek [Tue, 1 Nov 2022 00:08:44 +0000 (17:08 -0700)]
net: phy: Fix ethernet-phy-id <dot> in the code

Use dot instead of comma. The fix doesn't affect anything but it is good to
be aligned with used pattern. The first is used only for string size
calculation and the second change is in the comment.

Fixes: db681d4929ca ("net: phy: Add new read ethernet phy id function")
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agoARM: zynq: DT: Enable all FCLKs by default
Christian Kohn [Wed, 12 Oct 2022 09:30:33 +0000 (11:30 +0200)]
ARM: zynq: DT: Enable all FCLKs by default

The fclk-enable property is set to 0 which disables all FCLKs.
Enable all FCLKs so they can be used as clock sources in the
programmable logic.

Signed-off-by: Christian Kohn <christian.kohn@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/b1308dc1f14f8eb24662019f7376c959e5e763b8.1665567031.git.michal.simek@amd.com
19 months agotimer: xilinx-timer: use timer_conv_64() to fix timer wrap around
Ovidiu Panait [Wed, 12 Oct 2022 05:36:56 +0000 (08:36 +0300)]
timer: xilinx-timer: use timer_conv_64() to fix timer wrap around

Current xilinx_timer_get_count() implementation does not take into account
the periodic 32-bit wrap arounds, as it directly returns the 32-bit counter
register value. The roll-overs cause problems in the upper timer layers, as
generic timer code expects an incrementing 64-bit value from get_count() to
work correctly.

Add the missing 64-bit up-conversion to fix random hangs/delays in
__udelay().

Fixes: a36d86720f ("microblaze: Convert axi timer to DM driver")
Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20221012053656.1492457-3-ovpanait@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agotimer-uclass: relocate ops pointers for CONFIG_NEEDS_MANUAL_RELOC
Ovidiu Panait [Wed, 12 Oct 2022 05:36:55 +0000 (08:36 +0300)]
timer-uclass: relocate ops pointers for CONFIG_NEEDS_MANUAL_RELOC

Relocate timer_ops pointers when CONFIG_NEEDS_MANUAL_RELOC is enabled.

The (gd->flags & GD_FLG_RELOC) check was added to make sure the reloc_done
logic works for drivers that use DM_FLAG_PRE_RELOC.

Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20221012053656.1492457-2-ovpanait@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agotimer-uclass: add timer_get_ops() macro
Ovidiu Panait [Wed, 12 Oct 2022 05:36:54 +0000 (08:36 +0300)]
timer-uclass: add timer_get_ops() macro

Align timer uclass with the other subsystems and provide a timer_get_ops()
convenience macro.

Using this instead of the generic device_get_ops() also prevents
-Wdiscarded-qualifiers warnings when used with non-const variables.

Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20221012053656.1492457-1-ovpanait@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agoxilinx: common: Remove zynq_board_read_rom_ethaddr()
Venkatesh Yadav Abbarapu [Mon, 17 Oct 2022 09:48:18 +0000 (15:18 +0530)]
xilinx: common: Remove zynq_board_read_rom_ethaddr()

Removing the zynq_board_read_rom_ethaddr() function as
xlnx,eeprom is not used anymore. As all board dts to use
nvmem alias instead of xlnx,eeprom.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20221017094818.17996-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
19 months agoRevert "pinctrl: zynqmp: Add support for output-enable and bias-high-impedance"
Michal Simek [Thu, 13 Oct 2022 11:05:39 +0000 (13:05 +0200)]
Revert "pinctrl: zynqmp: Add support for output-enable and bias-high-impedance"

This reverts commit 123462e5e534d6e17b1b7d2006734bbe54b03e0a.

On systems with older PMUFW using these pinctrl properties can cause system
hang because there is missing feature autodetection.
When it is implemented support for these two properties should go back.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/c2900319ea80484f21692997f296269aee701c1f.1665659138.git.michal.simek@amd.com
19 months agoarm64: zynqmp: Disable watchdog by default for virt platform
Michal Simek [Wed, 12 Oct 2022 09:35:30 +0000 (11:35 +0200)]
arm64: zynqmp: Disable watchdog by default for virt platform

Disable watchdog based on request in past that not all Linux rootfs have
proper utilities ready to service it. Enable it if your rootfs have proper
watchdog handling.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/62dfc08f32635abee42feab26aaa9efed52134c0.1665567328.git.michal.simek@amd.com
19 months agomicroblaze: Make extended addressing support default
T Karthik Reddy [Wed, 12 Oct 2022 09:03:45 +0000 (11:03 +0200)]
microblaze: Make extended addressing support default

Axi qspi controller supports 32-bit & 24-bit addressing modes
for micron, macronix & spansion flash parts. But for winbond
flashes it only supports 24-bit addressing mode.
Enable CONFIG_SPI_FLASH_BAR to use extended addressing mode
to make 32-bit addressing mode work on all flashes.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Acked-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/f3864966c8ddd766a1702ad61b0e008a1f57462f.1665565423.git.michal.simek@amd.com
19 months agoMerge tag 'efi-2023-01-rc2-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Tue, 22 Nov 2022 13:30:53 +0000 (08:30 -0500)]
Merge tag 'efi-2023-01-rc2-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2023-01-rc2-2

UEFI:

* add UEFI Secure Boot Key enrollment interface to eficonfig command
* fix buffer underflow in FatToStr() implementation

19 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-watchdog
Tom Rini [Tue, 22 Nov 2022 13:07:03 +0000 (08:07 -0500)]
Merge https://source.denx.de/u-boot/custodians/u-boot-watchdog

- watchdog: designware: make reset really optional (Quentin)
- watchdog: Drop GD_FLG_WDT_READY (Stefan)

19 months agoeficonfig: add "Show Signature Database" menu entry
Masahisa Kojima [Sun, 20 Nov 2022 00:21:19 +0000 (09:21 +0900)]
eficonfig: add "Show Signature Database" menu entry

This commit adds the menu-driven interface to show the
signature list content.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
19 months agoeficonfig: add UEFI Secure Boot Key enrollment interface
Masahisa Kojima [Sun, 20 Nov 2022 00:21:18 +0000 (09:21 +0900)]
eficonfig: add UEFI Secure Boot Key enrollment interface

This commit adds the menu-driven UEFI Secure Boot Key
enrollment interface. User can enroll PK, KEK, db
and dbx by selecting file.
Only the signed EFI Signature List(s) with an authenticated
header, typically '.auth' file, is accepted.

To clear the PK, KEK, db and dbx, user needs to enroll the null key
signed by PK or KEK.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
19 months agoeficonfig: use protocol interface for file selection
Masahisa Kojima [Sun, 20 Nov 2022 00:21:17 +0000 (09:21 +0900)]
eficonfig: use protocol interface for file selection

EFI_SIMPLE_FILE_SYSTEM_PROTOCOL is not always provided
by U-Boot. Use protocol interface functions instead of
U-Boot internal functions.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
19 months agoeficonfig: expose eficonfig_create_device_path()
Masahisa Kojima [Sun, 20 Nov 2022 00:21:16 +0000 (09:21 +0900)]
eficonfig: expose eficonfig_create_device_path()

Following commits are adding support for UEFI variable management
via the eficonfig menu. Those functions needs to use
eficonfig_create_device_path() to construct the full device path
from device path of the volume and file path, so move it
out of their static declarations.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
19 months agoeficonfig: refactor change boot order implementation
Masahisa Kojima [Sun, 20 Nov 2022 00:21:15 +0000 (09:21 +0900)]
eficonfig: refactor change boot order implementation

All the eficonfig menus other than "Change Boot Order"
use 'eficonfig_entry' structure for each menu entry.
This commit refactors change boot order implementation
to use 'eficonfig_entry' structure same as other menus
to have consistent menu handling.

This commit also simplifies the data->active handling when
KEY_SPACE is pressed, and sizeof() parameter.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
19 months agoeficonfig: expose append entry function
Masahisa Kojima [Sun, 20 Nov 2022 00:21:14 +0000 (09:21 +0900)]
eficonfig: expose append entry function

Following commits are adding support for UEFI variable management
via the eficonfig menu. Those functions needs to use
append_entry() and append_quit_entry() to construct the
menu, so move them out of their static declarations.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
19 months agoeficonfig: refactor file selection handling
Masahisa Kojima [Sun, 20 Nov 2022 00:21:13 +0000 (09:21 +0900)]
eficonfig: refactor file selection handling

eficonfig_select_file_handler() is commonly used to select the
file. eficonfig_display_select_file_option() adds an additional
menu to clear the selected file.
eficonfig_display_select_file_option() is not always necessary
for the file selection process, so it must be outside of
eficonfig_select_file_handler().

This commit also renames the following functions to avoid confusion.
 eficonfig_select_file_handler() -> eficonfig_process_select_file()
 eficonfig_select_file() -> eficonfig_show_file_selection()
 eficonfig_display_select_file_option() -> eficonfig_process_show_file_option()

Finally, test_eficonfig.py need to be updated to get aligned with
the above modification.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
19 months agodoc: in cmp man-page replace 'tuples' by 'values'
Heinrich Schuchardt [Thu, 17 Nov 2022 12:42:04 +0000 (13:42 +0100)]
doc: in cmp man-page replace 'tuples' by 'values'

The word tuples might be misleading.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
19 months agoefi_selftest: Improve the FatToStr() unit test
Heinrich Schuchardt [Tue, 22 Nov 2022 10:34:25 +0000 (11:34 +0100)]
efi_selftest: Improve the FatToStr() unit test

Add a test with a character >= 0x80.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
19 months agoefi_selftest: unsigned char parameter for efi_st_strcmp_16_8()
Heinrich Schuchardt [Tue, 22 Nov 2022 10:32:36 +0000 (11:32 +0100)]
efi_selftest: unsigned char parameter for efi_st_strcmp_16_8()

Use unsigned char for the parameter of efi_st_strcmp_16_8. This allows
comparing characters 0x80 - 0xff.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
19 months agoefi_loader: Fix buffer underflow
Mikhail Ilin [Tue, 22 Nov 2022 07:33:24 +0000 (10:33 +0300)]
efi_loader: Fix buffer underflow

If the array index 'i' < 128, the 'codepage' array is accessed using
[-128...-1] in efi_unicode_collation.c:262. This can lead to a buffer
overflow.

    Negative index in efi_unicode_collation.c:262.

The index of the 'codepage' array should be c - 0x80 instead of i - 0x80.

Fixes: 0bc4b0da7b59 ("efi_loader: EFI_UNICODE_COLLATION_PROTOCOL")
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
19 months agowatchdog: Drop GD_FLG_WDT_READY as it's not used any more
Stefan Roese [Thu, 17 Nov 2022 08:20:34 +0000 (09:20 +0100)]
watchdog: Drop GD_FLG_WDT_READY as it's not used any more

Since commit c2fd0ca1a822
("watchdog: Integrate watchdog triggering into the cyclic framework")
GD_FLG_WDT_READY has become write-only. This patch now removes this
flag completely.

The vacant spot in gd_flags is filled with the newly introduced
GD_FLG_CYCLIC_RUNNING flag.

Suggested-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Stefan Roese <sr@denx.de>
19 months agowatchdog: designware: make reset really optional
Quentin Schulz [Tue, 15 Nov 2022 10:20:14 +0000 (11:20 +0100)]
watchdog: designware: make reset really optional

Checking for DM_RESET is not enough since not all watchdog
implementations use a reset lane. Such is the case for Rockchip
implementation for example. Since reset_assert_bulk will only succeed if
the resets property exists in the watchdog DT node, it needs to be
called only if a reset property is present.

This adds a condition on the resets property presence in the watchdog DT
node before assuming a reset lane needs to be fetched with
reset_assert_bulk, by calling ofnode_read_prop.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
19 months agoPrepare v2023.01-rc2
Tom Rini [Mon, 21 Nov 2022 17:33:14 +0000 (12:33 -0500)]
Prepare v2023.01-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
19 months agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 21 Nov 2022 16:58:53 +0000 (11:58 -0500)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
19 months agoMerge branch '2022-11-21-important-fixes'
Tom Rini [Mon, 21 Nov 2022 16:54:58 +0000 (11:54 -0500)]
Merge branch '2022-11-21-important-fixes'

- Several important fixes for the Nokia RX51 platform, and a few other
  fixes while we're at it.

19 months agospl: Fix SPL_ATF and SPL_OPENSBI dependencies
Samuel Holland [Mon, 31 Oct 2022 04:26:19 +0000 (23:26 -0500)]
spl: Fix SPL_ATF and SPL_OPENSBI dependencies

The code for these two options depends on having the FIT loadables
recorded in the FDT. Thus, these options require the full version of
the SPL_LOAD_FIT code.

Signed-off-by: Samuel Holland <samuel@sholland.org>
19 months agoconfigs: mediatek: enable boot via extlinux
Alexandre Mergnat [Fri, 28 Oct 2022 08:28:27 +0000 (10:28 +0200)]
configs: mediatek: enable boot via extlinux

Enable FAT and SYSBOOT to use extlinux boot script

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: Julien STEPHAN <jstephan@baylibre.com>
19 months agousb: gadget: dfu: Fix the unchecked length field
Venkatesh Yadav Abbarapu [Thu, 3 Nov 2022 04:07:48 +0000 (09:37 +0530)]
usb: gadget: dfu: Fix the unchecked length field

DFU implementation does not bound the length field in USB
DFU download setup packets, and it does not verify that
the transfer direction. Fixing the length and transfer
direction.

CVE-2022-2347

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Reviewed-by: Marek Vasut <marex@denx.de>
19 months agoRevert "imx: imx8: apalis: switch to binman"
Stefano Babic [Tue, 15 Nov 2022 10:49:40 +0000 (11:49 +0100)]
Revert "imx: imx8: apalis: switch to binman"

This reverts commit b8072ae848b73e89a73ba5b535324e4dc2793f37.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
19 months agoRevert "cli_readline: Only insert printable chars"
Pali Rohár [Tue, 1 Nov 2022 23:40:46 +0000 (00:40 +0100)]
Revert "cli_readline: Only insert printable chars"

This reverts commit d2e64d29c44dee6d455f7705dd1cf1af8674ad9a.

This commit broke support for pound sign (£) and euro sign (€) keys on
Nokia N900 keypad.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
19 months agoNokia RX-51: Do not overwrite standard $loadaddr variable
Pali Rohár [Sun, 20 Nov 2022 16:56:28 +0000 (17:56 +0100)]
Nokia RX-51: Do not overwrite standard $loadaddr variable

Instead of overwriting $loadaddr variable, use custom temporary
$fileloadaddr variable. So scripts can access default/original address
stored in $loadaddr at build time.

Signed-off-by: Pali Rohár <pali@kernel.org>
19 months agoNokia RX-51: Document debugging options and compile command
Pali Rohár [Sun, 20 Nov 2022 16:56:27 +0000 (17:56 +0100)]
Nokia RX-51: Document debugging options and compile command

Add example command how to compile U-Boot and add new documentation section
describing how to enable early debug UART and verbose log output for N900.

Signed-off-by: Pali Rohár <pali@kernel.org>
19 months agoarm32: Fix relocation of env_addr if POSITION_INDEPENDENT=y
Pali Rohár [Sun, 20 Nov 2022 16:56:26 +0000 (17:56 +0100)]
arm32: Fix relocation of env_addr if POSITION_INDEPENDENT=y

Apply commit 534f0fbd6520 ("arm64: Fix relocation of env_addr if
POSITION_INDEPENDENT=y") also for 32-bit ARM.

This change fixes crashing of U-Boot on ARMv7 (Omap3 / Cortex-A8) Nokia N900
phone (real HW). Note that qemu emulator of this board with same u-boot.bin
binary has not triggered this crash.

Crash happened after U-Boot printed following debug lines to serial console:

    initcall: 0001ea8c (relocated to 8fe0aa8c)
    Loading Environment from <NULL>... Using default environment
    Destroy Hash Table: 8fe25a98 table = 00000000
    Create Hash Table: N=387

Signed-off-by: Pali Rohár <pali@kernel.org>
19 months agoFix usage of CONFIG_PREBOOT
Pali Rohár [Sun, 10 Jul 2022 11:42:55 +0000 (13:42 +0200)]
Fix usage of CONFIG_PREBOOT

Due to usage of PREBOOT in Kconfig, macro CONFIG_PREBOOT is always defined
when CONFIG_USE_PREBOOT is enabled. In case CONFIG_PREBOOT is not
explicitly enabled it is set to empty C string and therefore
'#ifdef CONFIG_PREBOOT' guard does not work. Fix this issue by introducing
a new Kconfig symbol PREBOOT_DEFINED which cause to define new C macro
CONFIG_PREBOOT_DEFINED only when CONFIG_PREBOOT is really defined.

Change usage of '#ifdef CONFIG_PREBOOT' by '#ifdef CONFIG_USE_PREBOOT' for
code which checks if preboot code would be called and by
'#ifdef CONFIG_PREBOOT_DEFINED' for defining preboot code.

Signed-off-by: Pali Rohár <pali@kernel.org>
20 months agoMerge tag 'efi-2023-01-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Wed, 16 Nov 2022 16:08:51 +0000 (11:08 -0500)]
Merge tag 'efi-2023-01-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2023-01-rc2

Documentation:

* fix building with Sphinx 5.0+
* man-pages for cmp and bootd commands

UEFI:

* Avoid unaligned access in efi_file_from_path()
* More bug fixes

20 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Wed, 16 Nov 2022 16:08:28 +0000 (11:08 -0500)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

- Fix and improve microchip's clock driver to allow sync'ing DTS with linux
- Improve the help message in "SBI_V02" Kconfig
- Improve DTS property "isa-string" parsing rule

20 months agoefi_loader: replace a u16_strdup with alloc + memcpy
Ilias Apalodimas [Fri, 11 Nov 2022 18:04:31 +0000 (20:04 +0200)]
efi_loader: replace a u16_strdup with alloc + memcpy

Heinrich reports that on RISC-V unaligned access is emulated by OpenSBI
which is very slow.  Performance wise it's better if we skip the calls
to u16_strdup() -- which in turn calls u16_strsize() and just allocate/copy the
memory directly.  The access to dp.length may still be unaligned, but that's
way less than what u16_strsize() would do

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Use malloc() instead of calloc().
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
20 months agoefi_loader: add missing EFI_CALL when closing a file
Ilias Apalodimas [Fri, 11 Nov 2022 16:20:37 +0000 (18:20 +0200)]
efi_loader: add missing EFI_CALL when closing a file

Closing the files uses the EFI protocol and specifically it's .close
callback.  This needs to be wrapped on an EFI_CALL()

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
20 months agoefi_loader: add comments on efi_file_from_path() regarding alignment
Ilias Apalodimas [Thu, 10 Nov 2022 13:31:30 +0000 (15:31 +0200)]
efi_loader: add comments on efi_file_from_path() regarding alignment

UEFI specification requires pointers that are passed to protocol member
functions to be aligned.  There's a u16_strdup in that function which
doesn't make sense otherwise  Add a comment so no one removes it
accidentally

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
20 months agoeficonfig: fix missing variable initialization
Masahisa Kojima [Mon, 14 Nov 2022 10:00:47 +0000 (19:00 +0900)]
eficonfig: fix missing variable initialization

The 'ret' variable must be initialized before use
in eficonfig_delete_invalid_boot_option().

Fixes: c416f1c0bc ("bootmenu: add removable media entries")
Addresses-Coverity: 376207 ("Uninitialized variables")
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
20 months agoefi_loader: improve description of efi_file_from_path()
Heinrich Schuchardt [Thu, 10 Nov 2022 13:14:06 +0000 (14:14 +0100)]
efi_loader: improve description of efi_file_from_path()

Provide a description of the function's logic.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
20 months agocmd: remove superfluous if in eficonfig_edit_boot_option
Heinrich Schuchardt [Thu, 10 Nov 2022 11:19:30 +0000 (12:19 +0100)]
cmd: remove superfluous if in eficonfig_edit_boot_option

Goto for an immediately succeeding label is superfluous.

Fixes: 87d791423ac6 ("eficonfig: menu-driven addition of UEFI boot option")
Addresses-Coverity: 376202 ("Identical code for different branches")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
20 months agoMAINTAINERS: add UEFI commands to EFI PAYLOAD
Heinrich Schuchardt [Thu, 10 Nov 2022 11:23:35 +0000 (12:23 +0100)]
MAINTAINERS: add UEFI commands to EFI PAYLOAD

Add the following files to EFI PAYLOAD:

- cmd/bootefi.c
- cmd/efidebug.c
- cmd/eficonfig.c
- cmd/nvedit_efi.c

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
20 months agoefi_loader: initialize return values in efi_uninstall_multiple_protocol_interfaces_int()
Ilias Apalodimas [Thu, 10 Nov 2022 08:21:24 +0000 (10:21 +0200)]
efi_loader: initialize return values in efi_uninstall_multiple_protocol_interfaces_int()

If the va_list we got handed over contains no protocols we must return
EFI_SUCCESS.  However in that case the current code just returns
an unintialized value.
Fix that by setting the return value in the variable definition

Addresses-Coverity: CID 376195:  ("Uninitialized variables  (UNINIT)")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
20 months agodoc: fix build with sphinx 5.0 and later.
Quentin Schulz [Mon, 7 Nov 2022 13:49:31 +0000 (14:49 +0100)]
doc: fix build with sphinx 5.0 and later.

Sphinx 5.0 and later fails to build when language is set to None:
Warning, treated as error:
Invalid configuration value found: 'language = None'. Update your configuration to a valid langauge code. Falling back to 'en' (English)

Let's set the language to English since it is the language used for the
documentation.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
20 months agodoc: add man-page for cmp command
Heinrich Schuchardt [Sun, 13 Nov 2022 12:27:32 +0000 (13:27 +0100)]
doc: add man-page for cmp command

Provide a man-page for the cmp command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
20 months agoDocumentation: man-page for command bootd
Heinrich Schuchardt [Mon, 14 Nov 2022 09:30:58 +0000 (10:30 +0100)]
Documentation: man-page for command bootd

Provide a man-page for the bootd command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agosandbox: fix documentation of struct host_ops
Heinrich Schuchardt [Mon, 14 Nov 2022 09:16:02 +0000 (10:16 +0100)]
sandbox: fix documentation of struct host_ops

The documentation of struct host_ops should be Sphinx compliant.

Fixes: 9bd1aa8af2ed ("dm: sandbox: Create a new HOST uclass")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
20 months agodoc: fix documentation of enum gd_flags
Heinrich Schuchardt [Mon, 14 Nov 2022 09:25:04 +0000 (10:25 +0100)]
doc: fix documentation of enum gd_flags

Correct GD_FLG_CYCLIC_RUNNING documentation to match Sphinx style.

Fixes: d7de5ef62935 ("cyclic: use a flag in gd->flags for recursion protection")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
20 months agoriscv: enable reset via SBI on PolarFire Icicle Kit
Heinrich Schuchardt [Mon, 7 Nov 2022 09:55:46 +0000 (10:55 +0100)]
riscv: enable reset via SBI on PolarFire Icicle Kit

HSS 2022.10 provides support for resetting the board.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
Tested-by: Padmarao Begari <padmarao.begari@microchip.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
20 months agoriscv: clarify meaning of CONFIG_SBI_V02
Heinrich Schuchardt [Tue, 8 Nov 2022 14:53:12 +0000 (15:53 +0100)]
riscv: clarify meaning of CONFIG_SBI_V02

Describe that CONFIG_SBI_V02=y does not mean SBI specification v0.2
but v0.2 or later.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Rick Chen <rick@andestech.com>
20 months agoriscv: Fix detecting FPU support in standard extension
Yu Chien Peter Lin [Sat, 5 Nov 2022 06:02:14 +0000 (14:02 +0800)]
riscv: Fix detecting FPU support in standard extension

We should check the string until it hits underscore, in case it
searches multi-letter extensions. For example, "rv64imac_xandes"
will be treated as D extension support since there is a "d" in
"andes", resulting illegal instruction caused by initializing FCSR.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
20 months agoriscv: dts: fix the mpfs's reference clock frequency
Conor Dooley [Tue, 25 Oct 2022 07:58:49 +0000 (08:58 +0100)]
riscv: dts: fix the mpfs's reference clock frequency

The initial devicetree for PolarFire SoC incorrectly created a fixed
frequency clock in the devicetree to represent the msspll, but the
msspll is not a fixed frequency clock. The actual reference clock on a
board is either 125 or 100 MHz, 125 MHz in the case of the icicle kit.
Swap the incorrect representation of the msspll out for the actual
reference clock.

Fixes: dd4ee416a6 ("riscv: dts: Add device tree for Microchip Icicle Kit")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
20 months agoclk: microchip: mpfs: fix criticality of peripheral clocks
Conor Dooley [Tue, 25 Oct 2022 07:58:48 +0000 (08:58 +0100)]
clk: microchip: mpfs: fix criticality of peripheral clocks

Sync the critical clocks in the U-Boot driver with those marked as
critical in Linux. The Linux driver has an explanation of why each clock
is considered to be critical, so import that too.

Fixes: 2f27c9219e ("clk: Add Microchip PolarFire SoC clock driver")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
20 months agoclk: microchip: mpfs: fix periph clk parentage
Conor Dooley [Tue, 25 Oct 2022 07:58:47 +0000 (08:58 +0100)]
clk: microchip: mpfs: fix periph clk parentage

Not all "periph" clocks are children of the AHB clock, some have the AXI
clock as their parent & the mtimer clock is derived from the external
reference clock directly. Stop assuming the AHB clock to be the parent
of all "periph" clocks and define their correct parents instead.

Fixes: 2f27c9219e ("clk: Add Microchip PolarFire SoC clock driver")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
Tested-by: Padmarao Begari <padmarao.begari@microchip.com>
20 months agoclk: microchip: mpfs: fix reference clock handling
Conor Dooley [Tue, 25 Oct 2022 07:58:46 +0000 (08:58 +0100)]
clk: microchip: mpfs: fix reference clock handling

The original devicetrees for PolarFire SoC messed up & defined the
msspll's output as a fixed-frequency, 600 MHz clock & used that as the
input for the clock controller node. The msspll is not a fixed
frequency clock and later devicetrees handled this properly. Check the
devicetree & if it is one of the fixed ones, register the msspll.
Otherwise, skip registering it & pass the reference clock directly to
the cfg clock registration function so that existing devicetrees are
not broken by this change.

As the MSS PLL is not a "cfg" or a "periph" clock, add a new driver for
it, based on the one in Linux.

Fixes: 2f27c9219e ("clk: Add Microchip PolarFire SoC clock driver")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
Tested-by: Padmarao Begari <padmarao.begari@microchip.com>
20 months agoclk: microchip: mpfs: convert parent rate acquistion to get_get_rate()
Conor Dooley [Tue, 25 Oct 2022 07:58:45 +0000 (08:58 +0100)]
clk: microchip: mpfs: convert parent rate acquistion to get_get_rate()

Currently the clock driver for PolarFire SoC takes a very naive approach
to the relationship between clocks. It reads the dt to get an input
clock, assumes that that is fixed frequency, reads the "clock-frequency"
property & uses that to set up both the "cfg" and "periph" clocks.

Simplifying for the sake of incremental fixes, the "correct" parentage for
the clocks currently supported in U-Boot is that the "cfg" clocks should
be children of the fixed frequency clock in the dt. The AHB clock is one
of these "cfg" clocks and is the parent of the "periph" clocks.

Instead of passing the clock rate of the fixed-frequency clock to the
"cfg" and "periph" registration functions and the name of the parents,
pass their actual parents & use clk_get_rate() to determine their parents
rates.

The "periph" clocks are purely gate clocks and should not be reading the
AHB clocks registers to determine their rates, as they can simply report
the output of clk_get_rate() on their parent.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
20 months agodt-bindings: clk: add missing clk ids for microchip mpfs
Conor Dooley [Tue, 25 Oct 2022 07:58:44 +0000 (08:58 +0100)]
dt-bindings: clk: add missing clk ids for microchip mpfs

When this binding header was initally upstreamed, the PLL clocking the
microprocessor subsystem (MSS) and the RTC reference clocks were
omitted. Add them now, matching the IDs used in Linux.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
20 months agoMerge tag 'u-boot-imx-20221114' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Mon, 14 Nov 2022 12:29:51 +0000 (07:29 -0500)]
Merge tag 'u-boot-imx-20221114' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

For 2022.01
-----------

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/14083

- Fix UART
- moved to binman (MX8 boards)
- Toradex: sync DTS with Linux
- Gateworks: fixes
- New boards : MSC SM2S iMX8MP

20 months agoMerge tag 'for-v2023.01-rc2' of https://source.denx.de/u-boot/custodians/u-boot-i2c
Tom Rini [Mon, 14 Nov 2022 12:29:30 +0000 (07:29 -0500)]
Merge tag 'for-v2023.01-rc2' of https://source.denx.de/u-boot/custodians/u-boot-i2c

i2c Fixes for v2023.01-rc2

- i2c-gpio: add a missing new line in printed string
  detected and fixed by Sergei

- microchip i2c driver fixes from Conor
  - fix erroneous late ack send
  - fix ack sending logic

20 months agoi2c: i2c-gpio: add newline
Sergei Antonov [Thu, 20 Oct 2022 14:28:14 +0000 (17:28 +0300)]
i2c: i2c-gpio: add newline

Add newline at the end of the printed string.

Signed-off-by: Sergei Antonov <saproj@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
20 months agoi2c: microchip: fix erroneous late ack send
Conor Dooley [Wed, 26 Oct 2022 07:49:19 +0000 (08:49 +0100)]
i2c: microchip: fix erroneous late ack send

A late ack is currently being sent at the end of a transfer due to
incorrect logic in mchp_corei2c_empty_rx(). Currently the Assert Ack
bit is being written to the controller's control reg after the last
byte has been received, causing it to sent another byte with the ack.
Instead, the AA flag should be written to the control register when
the penultimate byte is read so it is sent out for the last byte.

Reported-by: Andreas Buerkler <andreas.buerkler@enclustra.com>
Fixes: 0dc0d1e094 ("i2c: Add Microchip PolarFire SoC I2C driver")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Removed Tag by hs: Fixes: 0190d48488 ("i2c: microchip: fix ack sending logic")

20 months agoi2c: microchip: fix ack sending logic
Conor Dooley [Wed, 26 Oct 2022 07:49:18 +0000 (08:49 +0100)]
i2c: microchip: fix ack sending logic

"Master receive mode" was not correctly sending ACKs/NACKs in the
interrupt handler. Bring the handling of M_SLAR_ACK, M_RX_DATA_ACKED &
M_RX_DATA_NACKED in line with the Linux driver.

Fixes: 0dc0d1e094 ("i2c: Add Microchip PolarFire SoC I2C driver")
Reported-by: Shravan Chippa <shravan.chippa@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
20 months agoRevert "serial: mxc: have putc use the TXFIFO"
Fabio Estevam [Tue, 8 Nov 2022 11:39:33 +0000 (08:39 -0300)]
Revert "serial: mxc: have putc use the TXFIFO"

This reverts commit c7878a0483c59c48a730123bc0f4659fd40921bf.

Since commit c7878a0483c5 ("serial: mxc: have putc use the TXFIFO"),
serial console corruption can be seen when priting inside board_init().

Revert it to avoid the regression.

Reported-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Tim Harvey <tharvey@gateworks.com>
20 months agoimx8-u-boot: Fix SPL guard option
Fabio Estevam [Fri, 11 Nov 2022 18:46:42 +0000 (15:46 -0300)]
imx8-u-boot: Fix SPL guard option

We should guard the SPL nodes against CONFIG_SPL_BUILD to fix
the following build error when the blobs are absent:

binman: Fail open first container file mx8qm-ahab-container.img

Signed-off-by: Fabio Estevam <festevam@denx.de>
20 months agoMerge branch '2022-11-10-symbol-migrations'
Tom Rini [Thu, 10 Nov 2022 15:09:02 +0000 (10:09 -0500)]
Merge branch '2022-11-10-symbol-migrations'

- Migrate a number of CONFIG symbols to Kconfig and start migrating some
  symbol families from CONFIG to the CFG namespace.

20 months agoglobal: Migrate CONFIG_HPS* symbols to the CFG namespace
Tom Rini [Sat, 29 Oct 2022 00:27:14 +0000 (20:27 -0400)]
global: Migrate CONFIG_HPS* symbols to the CFG namespace

Migrate all of CONFIG_HPS* to the CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoglobal: Migrate CONFIG_SYS_FSL* symbols to the CFG_SYS namespace
Tom Rini [Sat, 29 Oct 2022 00:27:13 +0000 (20:27 -0400)]
global: Migrate CONFIG_SYS_FSL* symbols to the CFG_SYS namespace

Migrate all of COFIG_SYS_FSL* to the CFG_SYS namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoglobal: Migrate CONFIG_SYS_MPC8* symbols to the CFG_SYS namespace
Tom Rini [Sat, 29 Oct 2022 00:27:12 +0000 (20:27 -0400)]
global: Migrate CONFIG_SYS_MPC8* symbols to the CFG_SYS namespace

Migrate all of COFIG_SYS_MPC* to the CFG_SYS namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
20 months agoConvert CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST to Kconfig
Tom Rini [Sat, 29 Oct 2022 00:27:11 +0000 (20:27 -0400)]
Convert CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoConvert CONFIG_SYS_NONCACHED_MEMORY to Kconfig
Tom Rini [Sat, 29 Oct 2022 00:27:10 +0000 (20:27 -0400)]
Convert CONFIG_SYS_NONCACHED_MEMORY to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_NONCACHED_MEMORY

To do this we introduce CONFIG_SYS_HAS_NONCACHED_MEMORY as a bool to
gate if we are going to have noncached_... functions available and then
continue to use CONFIG_SYS_NONCACHED_MEMORY to store the size of said
cache. We make this new option depend on both the architectures which
implement support and the drivers which make use of it.

Cc: Tom Warren <twarren@nvidia.com>
Cc: Mingming lee <mingming.lee@mediatek.com>
Cc: "Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org>
Cc: Alban Bedel <alban.bedel@avionic-design.de>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoSYS_NONCACHED_MEMORY: Correct comment in common/board_f.c
Tom Rini [Sat, 29 Oct 2022 00:27:09 +0000 (20:27 -0400)]
SYS_NONCACHED_MEMORY: Correct comment in common/board_f.c

The comment block in reserve_noncached has a typo in one filename and
an incorrect filename in another function reference. Correct both of
these.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agomediatek: Include <linux/sizes.h> where needed
Tom Rini [Sat, 29 Oct 2022 00:27:08 +0000 (20:27 -0400)]
mediatek: Include <linux/sizes.h> where needed

These files reference SZ_ macros without including <linux/sizes.h>,
correct this.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoConvert CONFIG_SYS_MONITOR_LEN to Kconfig
Tom Rini [Sat, 29 Oct 2022 00:27:07 +0000 (20:27 -0400)]
Convert CONFIG_SYS_MONITOR_LEN to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_MONITOR_LEN

To do this, we set a default of 0 for everyone because there are a
number of cases where we define CONFIG_SYS_MONITOR_LEN but the only
impact is that we set TOTAL_MALLOC_LEN to be CONFIG_SYS_MALLOC_LEN +
CONFIG_ENV_SIZE, so we must continue to allow all boards to set this
value. Update the SPL code to use 200 KB as the default raw U-Boot size
directly, if we don't have a real CONFIG_SYS_MONITOR_LEN value.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoConvert CONFIG_SYS_MMC_MAX_DEVICE to Kconfig
Tom Rini [Sat, 29 Oct 2022 00:27:06 +0000 (20:27 -0400)]
Convert CONFIG_SYS_MMC_MAX_DEVICE to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_MMC_MAX_DEVICE

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
20 months agoConvert CONFIG_SYS_MMC_MAX_BLK_COUNT to Kconfig
Tom Rini [Sat, 29 Oct 2022 00:27:05 +0000 (20:27 -0400)]
Convert CONFIG_SYS_MMC_MAX_BLK_COUNT to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_MMC_MAX_BLK_COUNT

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
20 months agoConvert CONFIG_SYS_MAX_NAND_DEVICE to Kconfig
Tom Rini [Sat, 29 Oct 2022 00:27:04 +0000 (20:27 -0400)]
Convert CONFIG_SYS_MAX_NAND_DEVICE to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_MAX_NAND_DEVICE

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agortc: Remove unused drivers
Tom Rini [Sat, 29 Oct 2022 00:27:03 +0000 (20:27 -0400)]
rtc: Remove unused drivers

These drivers are not enabled anywhere, remove them.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoConvert CONFIG_SYS_LOADS_BAUD_CHANGE et al to Kconfig
Tom Rini [Sat, 29 Oct 2022 00:27:02 +0000 (20:27 -0400)]
Convert CONFIG_SYS_LOADS_BAUD_CHANGE et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_LOADS_BAUD_CHANGE
   CONFIG_LOADS_ECHO

As part of this, we move CMD_SAVES to be after CMD_LOADS as they are
logically related (load or save an s-record format file) and this makes
grouping of CONFIG_SYS_LOADS_BAUD_CHANGE easier.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agopowerpc: Migrate SYS_L3_SIZE to Kconfig
Tom Rini [Sat, 29 Oct 2022 00:27:01 +0000 (20:27 -0400)]
powerpc: Migrate SYS_L3_SIZE to Kconfig

Introduce three options, one for each observed L3 cache size, and have
the size select'd as needed.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agopowerpc: Migrate SYS_L2_SIZE to Kconfig
Tom Rini [Sat, 29 Oct 2022 00:27:00 +0000 (20:27 -0400)]
powerpc: Migrate SYS_L2_SIZE to Kconfig

Introduce two options, one for each observed L2 cache size, and have the
size select'd as needed.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agofs: jffs2: Move SYS_JFFS2_SORT_FRAGMENTS to Kconfig
Tom Rini [Sat, 29 Oct 2022 00:26:59 +0000 (20:26 -0400)]
fs: jffs2: Move SYS_JFFS2_SORT_FRAGMENTS to Kconfig

Move the symbol SYS_JFFS2_SORT_FRAGMENTS to Kconfig and use the only
remaining part of doc/README.JFFS2 that is still relevant and useful to
the help for this option.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoRemove unused symbols CONFIG_SYS_JFFS2_FIRST_BANK et al
Tom Rini [Sat, 29 Oct 2022 00:26:58 +0000 (20:26 -0400)]
Remove unused symbols CONFIG_SYS_JFFS2_FIRST_BANK et al

This removes the following symbols:
   CONFIG_RTC_MCFRRTC
   CONFIG_SYS_JFFS2_FIRST_BANK
   CONFIG_SYS_JFFS2_FIRST_SECTOR
   CONFIG_SYS_JFFS2_NUM_BANKS
   CONFIG_SYS_LBC_CACHE_BASE
   CONFIG_SYS_LIME_SIZE
   CONFIG_SYS_MAMR
   CONFIG_SYS_MCFRRTC_BASE
   CONFIG_SYS_MONITOR_SEC

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoConvert CONFIG_SYS_INTERLAKEN et al to Kconfig
Tom Rini [Sat, 29 Oct 2022 00:26:57 +0000 (20:26 -0400)]
Convert CONFIG_SYS_INTERLAKEN et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_INTERLAKEN
   CONFIG_SYS_ISA_IO
   CONFIG_SYS_ISA_IO_BASE_ADDRESS

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoRemove dead code
Tom Rini [Sat, 29 Oct 2022 00:26:56 +0000 (20:26 -0400)]
Remove dead code

This header is unreferenced, remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoConvert CONFIG_SYS_INIT_RAM_LOCK to Kconfig
Tom Rini [Sat, 29 Oct 2022 00:26:55 +0000 (20:26 -0400)]
Convert CONFIG_SYS_INIT_RAM_LOCK to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_INIT_RAM_LOCK

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 months agoConvert CONFIG_SYS_I2C_INIT_BOARD to Kconfig
Tom Rini [Sat, 29 Oct 2022 00:26:54 +0000 (20:26 -0400)]
Convert CONFIG_SYS_I2C_INIT_BOARD to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_I2C_INIT_BOARD

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>