platform/kernel/u-boot.git
21 months agocmd: CONFIG_CMD_EFICONFIG requires CONFIG_MENU
Heinrich Schuchardt [Wed, 8 Feb 2023 12:56:33 +0000 (13:56 +0100)]
cmd: CONFIG_CMD_EFICONFIG requires CONFIG_MENU

The eficonfig command invokes functions implemented in common/menu.c like

* menu_default_set()
* menu_get_choice()
* menu_destroy()
* menu_item_add()

Fixes: 87d791423ac6 ("eficonfig: menu-driven addition of UEFI boot option")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
21 months agoefi_loader: update attribute check for QueryVariableInfo()
Masahisa Kojima [Thu, 2 Feb 2023 13:53:35 +0000 (22:53 +0900)]
efi_loader: update attribute check for QueryVariableInfo()

Current U-Boot supports two EFI variable service, U-Boot own
implementation and op-tee based StMM variable service.

With ACS Security Interface Extension(SIE) v22.10_SIE_REL1.1.0,
there are several failure items of QueryVariableInfo().

Current attribute check for QueryVariableInfo() was implemented
based on the Self Certification Test (SCT) II Case Specification,
June 2017, chapter 4.1.4 QueryVariableInfo().
This test case specification is outdated and don't align at all
with the SCT test case code, and UEFI specification v2.10 does
not clearly define the priority of the attribute check.

For U-Boot standard case that EFI variables are stored in a file
in the ESP, this commit modifies the attribute check to get align
to the EDK2 implementation.

For latter case(op-tee based StMM variable service), parameter check
should be delegated to StMM.

Now all ACS SIE QueryVariableInfo() test cases passed both EFI variable
storage implementations.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
21 months agoeficonfig: set EFICONFIG_ENTRY_NUM_MAX to INT_MAX - 1
Masahisa Kojima [Thu, 2 Feb 2023 09:24:45 +0000 (18:24 +0900)]
eficonfig: set EFICONFIG_ENTRY_NUM_MAX to INT_MAX - 1

eficonfig_append_menu_entryi() accepts the number of entries
less than or equal to EFICONFIG_ENTRY_NUM_MAX.
EFICONFIG_ENTRY_NUM_MAX is currently set as INT_MAX, so
the invalid menu count check(efi_menu->count > EFICONFIG_ENTRY_NUM_MAX)
in eficonfig_process_common() is always false.

This commit sets EFICONFIG_ENTRY_NUM_MAX to (INT_MAX - 1).

Reported-by: Coverity (CID 435659)
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
21 months agoeficonfig: CTRL+S to save the boot order
Masahisa Kojima [Thu, 2 Feb 2023 09:24:44 +0000 (18:24 +0900)]
eficonfig: CTRL+S to save the boot order

The change boot order menu in eficonfig can have at most INT_MAX lines
and it is troublesome to scroll down to the "Save" entry.

This commit assigns CTRL+S to save the boot order.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
21 months agomenu: remove CTRL+C to quit
Masahisa Kojima [Thu, 2 Feb 2023 09:24:43 +0000 (18:24 +0900)]
menu: remove CTRL+C to quit

On the sandbox called without "--terminal raw" CTRL+C leaves U-Boot,
"ESC/CTRL+C to quit" is misleading.

Let's remove CTRL+C to quit key handling from bootmenu and eficonfig menu.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
21 months agoefi: use 32-bit alignment for efi_guid_t
Masahisa Kojima [Sat, 28 Jan 2023 04:56:14 +0000 (13:56 +0900)]
efi: use 32-bit alignment for efi_guid_t

Current U-Boot implements 64-bit boundary for efi_guid_t structure.
It follows the UEFI specification, page 21 of the UEFI Specification v2.10
says about EFI_GUID:
  128-bit buffer containing a unique identifier value. Unless
  otherwise specified, aligned on a 64-bit boundary.

On the other hand, page 163 of the UEFI specification v2.10 and
EDK2 reference implementation both define EFI_GUID as
struct { u32 a; u16; b; u16 c; u8 d[8]; }; and so the implied
alignment is 32-bit not 64-bit like U-Boot efi_guid_t.

Due to this alignment difference, EDK2 application "CapsuleApp.efi -P"
does not work as expected.
This calls EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImageInfo()
and dump the EFI_FIRMWARE_IMAGE_DESCRIPTOR structure,
offsetof(EFI_FIRMWARE_IMAGE_DESCRIPTOR, ImageTypeId) is different,
8 in U-Boot and 4 in EDK2(CapsuleApp.efi).
Here is the wrong EFI_GUID dump.
  wrong dump : ImageTypeId - 00000000-7D83-058B-D550-474CA19560D8
  expected   : ImageTypeId - 058B7D83-50D5-4C47-A195-60D86AD341C4

EFI_FIRMWARE_IMAGE_DESCRIPTOR structure is defined in UEFI specification:
  typedef struct {
          UINT8 ImageIndex;
          EFI_GUID ImageTypeId;
          UINT64 ImageId
          <snip>

  } EFI_FIRMWARE_IMAGE_DESCRIPTOR;

There was the relevant patch for linux kernel to use 32-bit alignment
for efi_guid_t [1].
U-Boot should get aligned to EDK2 reference implementation and
linux kernel.

Due to this alignment change, efi_hii_ref structure in include/efi_api.h
is affected, but it is not used in the current U-Boot code.

[1] https://lore.kernel.org/all/20190202094119.13230-5-ard.biesheuvel@linaro.org/

Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
21 months agodoc: Link to some useful talks
Simon Glass [Sun, 5 Feb 2023 22:30:52 +0000 (15:30 -0700)]
doc: Link to some useful talks

Talks are a great way to learn about U-Boot and have been lost now that
the Denx Wiki has gone away.

These are stored at elinux.org so link to that .

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
21 months agodoc: complete setexpr configuration information
Heinrich Schuchardt [Fri, 27 Jan 2023 21:00:30 +0000 (22:00 +0100)]
doc: complete setexpr configuration information

Add missing information to the configuration section of the setexpr
man-page.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agocmd: improve coninfo output formatting
Heinrich Schuchardt [Sat, 28 Jan 2023 00:11:56 +0000 (01:11 +0100)]
cmd: improve coninfo output formatting

Device name are typically longer than 8 characters. This leads to ragged
output.
Only the I and O bit of the device flags are of interest for the user.
Writing a hexadecimal number is just confusing.

Before the patch the output looked like this:

    => coninfo
    List of available devices:
    pl011@9000000 00000007 IO stdin stdout stderr
    serial   00000003 IO
    usbkbd   00000001 I.

With the patch the output looks like this:

    => coninfo
    List of available devices
    |-- pl011@9000000 (IO)
    |   |-- stdin
    |   |-- stdout
    |   |-- stderr
    |-- serial (IO)
    |-- usbkbd (I)

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agobuildman: invalid reference to README
Heinrich Schuchardt [Thu, 19 Jan 2023 15:22:10 +0000 (16:22 +0100)]
buildman: invalid reference to README

The readme file for buildman is called buildman.rst.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoMerge branch '2023-02-09-minor-updates'
Tom Rini [Thu, 9 Feb 2023 21:31:36 +0000 (16:31 -0500)]
Merge branch '2023-02-09-minor-updates'

- Update the socrates env to be plain text, and fix the issue of
  CONFIG_MMC_QUIRKS not being applied within SPL, leading to some boot
  failures.

21 months agopowerpc/mpc85xx: use board env file for socrates board
Heiko Schocher [Fri, 27 Jan 2023 05:50:52 +0000 (06:50 +0100)]
powerpc/mpc85xx: use board env file for socrates board

as Tom suggested get rid of CFG_EXTRA_ENV_SETTINGS and
enable CONFIG_ENV_SOURCE_FILE and use text file

board/socrates/socrates.env

which contains the default environment. While at it,
cleanup the default Environment.

Signed-off-by: Heiko Schocher <hs@denx.de>
Suggested-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
21 months agoCorrect SPL use of MMC_QUIRKS
Simon Glass [Sun, 5 Feb 2023 22:40:16 +0000 (15:40 -0700)]
Correct SPL use of MMC_QUIRKS

This converts 1 usage of this option to the non-SPL form, since there is
no SPL_MMC_QUIRKS defined in Kconfig

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
21 months agoMerge branch '2023-02-08-increase-default-LMB-regions'
Tom Rini [Wed, 8 Feb 2023 19:10:45 +0000 (14:10 -0500)]
Merge branch '2023-02-08-increase-default-LMB-regions'

- Correct my mistake with defaulting to not setting LMB_USE_MAX_REGIONS,
  and fix the lmb test to scale with more than 8 regions before setting
  the new default to 16 regions. This doesn't strictly fix all issues,
  but puts us ahead of where we were.

21 months agoBump LMB_MAX_REGIONS default to 16
Sjoerd Simons [Thu, 19 Jan 2023 08:38:17 +0000 (09:38 +0100)]
Bump LMB_MAX_REGIONS default to 16

Since commit 06d514d77c37 ("lmb: consider EFI memory map") the EFI regions
are also pushed into the lmb if EFI_LOADER is enabled (which is by
default on most system). Which can cause the number of entries to go
over the maximum as it's default is only 8.

Specifically i ran into this case on an TI am62 which has an fdt with
4 reserved regions (in practice 3 lmb entries due to adjecent ranges).

As this is likely to impact more devices bump the default max
regions to 16 so there is a bit more slack.

Fixes: 06d514d77c ("lmb: consider EFI memory map")
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1207562
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
[trini: collect tags from the other equivalent patch]

21 months agotest: lmb: Rework lib_test_lmb_max_regions test to scale
Tom Rini [Wed, 8 Feb 2023 18:39:18 +0000 (13:39 -0500)]
test: lmb: Rework lib_test_lmb_max_regions test to scale

First, this test depends on CONFIG_LMB_USE_MAX_REGIONS, so add that as a
test before building. Second, instead of using a hard-coded value of 8,
which is the default of CONFIG_LMB_USE_MAX_REGIONS previously, use that
directly and update the comments. The only trick here is that one part
of the test itself also was written with the value of 8 itself in mind.
Rework the size of the lmb region we allocate to scale with the value of
CONFIG_LMB_USE_MAX_REGIONS.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoRevert "lmb: Default to not-LMB_USE_MAX_REGIONS"
Tom Rini [Wed, 8 Feb 2023 15:18:26 +0000 (10:18 -0500)]
Revert "lmb: Default to not-LMB_USE_MAX_REGIONS"

As explained by Philippe Schenker, I was misinterpreting what happened
in the case where we do not set LMB_USE_MAX_REGIONS and so had
re-introduced the problem I was attempting to more widely resolve.

This reverts commit 007ae5d108a37564905ea1588cb279f3a522cc3d.

Reported-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
21 months agoMerge branch '2023-02-07-Kconfig-cleanup-dead-code-removal'
Tom Rini [Wed, 8 Feb 2023 01:36:16 +0000 (20:36 -0500)]
Merge branch '2023-02-07-Kconfig-cleanup-dead-code-removal'

To quote the author:
This series adds source scanning to moveconfig.py so that it can look
for Kconfig options mentioned in the source which do not appear in
Kconfig, and vice versa.

This tool is then used to clean up the unused or obsolete options
mentioned in Makefiles, along with any attached source code.

21 months agofdt: Drop use of non-existent OF_PLATDATA option
Simon Glass [Wed, 1 Feb 2023 20:20:27 +0000 (13:20 -0700)]
fdt: Drop use of non-existent OF_PLATDATA option

These are only present in SPL. Drop the references to non-SPL versions.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agofreescale: Drop unused zm7300 driver
Simon Glass [Wed, 1 Feb 2023 20:20:26 +0000 (13:20 -0700)]
freescale: Drop unused zm7300 driver

This is not used anymore. Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agotools: Drop xway-swap-bytes tool
Simon Glass [Wed, 1 Feb 2023 20:20:25 +0000 (13:20 -0700)]
tools: Drop xway-swap-bytes tool

This is very old and does not appear to be used. The CONFIG option
enabling it is no-longer present. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agofreescale: Drop unused vsc3316_3308 driver
Simon Glass [Wed, 1 Feb 2023 20:20:24 +0000 (13:20 -0700)]
freescale: Drop unused vsc3316_3308 driver

This is not used. Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoimx: Drop CONFIG_USE_PLUGIN
Simon Glass [Wed, 1 Feb 2023 20:20:23 +0000 (13:20 -0700)]
imx: Drop CONFIG_USE_PLUGIN

This option is not defined anywhere. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agousb: Drop unused sl811-hcd driver
Simon Glass [Wed, 1 Feb 2023 20:20:22 +0000 (13:20 -0700)]
usb: Drop unused sl811-hcd driver

This is not used. Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agousb: Drop unused ehci-vct driver
Simon Glass [Wed, 1 Feb 2023 20:20:21 +0000 (13:20 -0700)]
usb: Drop unused ehci-vct driver

This is not used. Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agormobile: Drop unused ehci-rmobile driver
Simon Glass [Wed, 1 Feb 2023 20:20:20 +0000 (13:20 -0700)]
rmobile: Drop unused ehci-rmobile driver

This is not used. Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agousb: Drop unused fotg210 gadget
Simon Glass [Wed, 1 Feb 2023 20:20:19 +0000 (13:20 -0700)]
usb: Drop unused fotg210 gadget

This is not used and appears to be associated with the faraday board which
has been removed. Drop the driver and Kconfig options.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agousb: Drop unused ehci-faraday driver
Simon Glass [Wed, 1 Feb 2023 20:20:18 +0000 (13:20 -0700)]
usb: Drop unused ehci-faraday driver

This is not used. Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoarmada: usb: net: Drop unused USB drivers
Simon Glass [Wed, 1 Feb 2023 20:20:17 +0000 (13:20 -0700)]
armada: usb: net: Drop unused USB drivers

These are not used. Drop the drivers and Kconfig option. Also drop an
old declaration in the netdev.h header.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoppc: Makefile: Drop unused ppc4xx code
Simon Glass [Wed, 1 Feb 2023 20:20:16 +0000 (13:20 -0700)]
ppc: Makefile: Drop unused ppc4xx code

CONFIG_UBOOT_PAD_TO is not defined anywhere. Drop this dead code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
21 months agofreescale: Drop CONFIG_TARGET_MPC8536DS et al
Simon Glass [Wed, 1 Feb 2023 20:20:14 +0000 (13:20 -0700)]
freescale: Drop CONFIG_TARGET_MPC8536DS et al

This option as well as CONFIG_TARGET_P1022DS and CONFIG_TARGET_P5020DS
are not defined anywhere. Drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agocompulab: Drop CONFIG_TARGET_MCM_IMX8M_MINI
Simon Glass [Wed, 1 Feb 2023 20:20:13 +0000 (13:20 -0700)]
compulab: Drop CONFIG_TARGET_MCM_IMX8M_MINI

This option is not defined anywhere. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agosh4: Drop unused kona_i2c driver
Simon Glass [Wed, 1 Feb 2023 20:20:12 +0000 (13:20 -0700)]
sh4: Drop unused kona_i2c driver

This is not used. Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
21 months agogdsys: Drop unused fpga file
Simon Glass [Wed, 1 Feb 2023 20:20:11 +0000 (13:20 -0700)]
gdsys: Drop unused fpga file

This is not used since CONFIG_SYS_FPGA_COMMON is not defined anywhere.
Drop the code and the Makefile rule.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agosysreset: at91: Correct Makefile rule for SYSRESET_AT91
Simon Glass [Wed, 1 Feb 2023 20:20:10 +0000 (13:20 -0700)]
sysreset: at91: Correct Makefile rule for SYSRESET_AT91

The SPL_TPL part is in the wrong place. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 71d4393f846 ("sysreset: Add Atmel/Microchip sysreset driver")
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
21 months agoDrop ubsha1 tool
Simon Glass [Wed, 1 Feb 2023 20:20:09 +0000 (13:20 -0700)]
Drop ubsha1 tool

This seems to have been used by ppc4xx which was removed a while back.
The Kconfig does not exist so it is never built. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agosh4: Drop unused pci_sh7780 driver
Simon Glass [Wed, 1 Feb 2023 20:20:08 +0000 (13:20 -0700)]
sh4: Drop unused pci_sh7780 driver

This is not used. Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agormobile: Drop CONFIG_SH73A0 and associated code
Simon Glass [Wed, 1 Feb 2023 20:20:07 +0000 (13:20 -0700)]
rmobile: Drop CONFIG_SH73A0 and associated code

This option does not exist, so the code attached to it is not used. Drop
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agomtd: Drop unused scf0403_lcd driver
Simon Glass [Wed, 1 Feb 2023 20:20:06 +0000 (13:20 -0700)]
mtd: Drop unused scf0403_lcd driver

This is not used since this commit:

   76386d6195a arm: Remove cm_t35 board

Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agomtd: Drop unused CONFIG_S32V234
Simon Glass [Wed, 1 Feb 2023 20:20:05 +0000 (13:20 -0700)]
mtd: Drop unused CONFIG_S32V234

This option does not exist, so the Makefile rule does nothing. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agortc: Drop old and unused drivers
Simon Glass [Wed, 1 Feb 2023 20:20:04 +0000 (13:20 -0700)]
rtc: Drop old and unused drivers

These drivers are not used and have not been converted to driver model.
Drop them and references to the non-existent CONFIG options they use.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agormobile: Drop CONFIG_RMOBILE
Simon Glass [Wed, 1 Feb 2023 20:20:03 +0000 (13:20 -0700)]
rmobile: Drop CONFIG_RMOBILE

This has been renamed to CONFIG_ARCH_RMOBILE but this one was left behind.
It doesn't point to a directory that exists, so just drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agofreescale: Drop unused pq-mds-pib driver
Simon Glass [Wed, 1 Feb 2023 20:20:02 +0000 (13:20 -0700)]
freescale: Drop unused pq-mds-pib driver

This is not used. Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agopower: Drop unused muic_max8997 driver
Simon Glass [Wed, 1 Feb 2023 20:20:01 +0000 (13:20 -0700)]
power: Drop unused muic_max8997 driver

This is not used. Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agopower: Drop unused muic_max77693 driver and mfd code
Simon Glass [Wed, 1 Feb 2023 20:20:00 +0000 (13:20 -0700)]
power: Drop unused muic_max77693 driver and mfd code

This driver is not used and has lain unconverted since:

   fc47cf9d054 arm: exynos: i2c: Convert exynos boards to use DM_I2C

Drop it and the entire mfd directory, since there is nothing left.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agopower: Drop unused fg_max17042 driver and fuel gauge code
Simon Glass [Wed, 1 Feb 2023 20:19:59 +0000 (13:19 -0700)]
power: Drop unused fg_max17042 driver and fuel gauge code

This driver is not used. Drop it and the entire fuel_gauge directory,
since there is nothing left.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agopower: Drop unused bat_trats driver and battery code
Simon Glass [Wed, 1 Feb 2023 20:19:58 +0000 (13:19 -0700)]
power: Drop unused bat_trats driver and battery code

This driver and bat_trats2 are not used. Drop them and the entire battery
directory, since there is nothing left.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agogpio: Drop unused pca9698 driver
Simon Glass [Wed, 1 Feb 2023 20:19:56 +0000 (13:19 -0700)]
gpio: Drop unused pca9698 driver

This is not used. Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoppc: Drop unused CONFIG_P2020DS
Simon Glass [Wed, 1 Feb 2023 20:19:55 +0000 (13:19 -0700)]
ppc: Drop unused CONFIG_P2020DS

This option does not exist, so the Makefile rule does nothing. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoomap: Drop unused CONFIG_OMAP_USB_PHY
Simon Glass [Wed, 1 Feb 2023 20:19:53 +0000 (13:19 -0700)]
omap: Drop unused CONFIG_OMAP_USB_PHY

This option does not exist, so the Makefile rule does nothing. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
21 months agoMakefile: Drop CONFIG_OF_EARLY_FLATTREE
Simon Glass [Wed, 1 Feb 2023 20:19:52 +0000 (13:19 -0700)]
Makefile: Drop CONFIG_OF_EARLY_FLATTREE

This option does not exist, so drop the dead code.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agomtd: Drop unused nand_plat driver
Simon Glass [Wed, 1 Feb 2023 20:19:51 +0000 (13:19 -0700)]
mtd: Drop unused nand_plat driver

This is not used since this commit:

   936478e797a SPARC: Remove

Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agomtd: Drop unused fsmc_nand driver
Simon Glass [Wed, 1 Feb 2023 20:19:49 +0000 (13:19 -0700)]
mtd: Drop unused fsmc_nand driver

This is not used since this commit:

   570c3dcfc15 arm: Remove spear600 boards and the rest of SPEAr support

Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
21 months agomtd: Drop unused fsl_upm driver
Simon Glass [Wed, 1 Feb 2023 20:19:48 +0000 (13:19 -0700)]
mtd: Drop unused fsl_upm driver

This is not used since this commit:

   8d1e3cb1400 powerpc: mpc83xx: remove MPC8360ERDK, EMPC8360EMDS support

Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com>
21 months agonand: Drop unused actl_nand driver
Simon Glass [Wed, 1 Feb 2023 20:19:47 +0000 (13:19 -0700)]
nand: Drop unused actl_nand driver

This is not used since this commit:

   ed7fe2bee12 ppc: Remove xpedite boards

Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoimx: Rename CONFIG_MXS to CFG_MXS
Simon Glass [Wed, 1 Feb 2023 20:19:46 +0000 (13:19 -0700)]
imx: Rename CONFIG_MXS to CFG_MXS

This is not a Kconfig option so we should not be setting it in the
Makefile. Rename it to use a CFS_ prefix, since this is still used in
mxsimage.c

In general tools should support all the features without reference to
CONFIG options, but this is left to the maintainer to look at.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agogpio: Drop unused mpc83xx_gpio driver
Simon Glass [Wed, 1 Feb 2023 20:19:45 +0000 (13:19 -0700)]
gpio: Drop unused mpc83xx_gpio driver

This is not used since this commit:

   7458f18e5c2 ppc: Remove MPC8313ERDB boards

Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoarc: Drop CONFIG_MMU
Simon Glass [Wed, 1 Feb 2023 20:19:44 +0000 (13:19 -0700)]
arc: Drop CONFIG_MMU

This option is set in the Makefile but has no effect in the assembly
code, i.e. the #ifdef branch is never used. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoarm: Drop CONFIG_MMU
Simon Glass [Wed, 1 Feb 2023 20:19:43 +0000 (13:19 -0700)]
arm: Drop CONFIG_MMU

This option does not exist, so the #ifdefs do nothing. Drop this code.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agom68k: Drop unused CONFIG_MACH_DAVINCI_DA830_EVM
Simon Glass [Wed, 1 Feb 2023 20:19:42 +0000 (13:19 -0700)]
m68k: Drop unused CONFIG_MACH_DAVINCI_DA830_EVM

This option does not exist, so the Makefile rule does nothing. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agom68k: Drop unused CONFIG_M52277
Simon Glass [Wed, 1 Feb 2023 20:19:41 +0000 (13:19 -0700)]
m68k: Drop unused CONFIG_M52277

This option does not exist, so the Makefile rule does nothing. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agovideo: Drop unused lg4573 driver
Simon Glass [Wed, 1 Feb 2023 20:19:40 +0000 (13:19 -0700)]
video: Drop unused lg4573 driver

This is not used since this commit:

   3cf02f5ffa4 imx6: remove not longer supported aristainetos boards

Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoarm: Drop old kona code
Simon Glass [Wed, 1 Feb 2023 20:19:39 +0000 (13:19 -0700)]
arm: Drop old kona code

The KONA and KONA_GPIO options don't exist anymore, since this commit:

   0f6807e77b0 arm: Remove bcm28155_ap board

Drop the dead code.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoimx: Drop unused CONFIG_IMX
Simon Glass [Wed, 1 Feb 2023 20:19:38 +0000 (13:19 -0700)]
imx: Drop unused CONFIG_IMX

This option does not exist, so the Makefile rule does nothing. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agorcar: Drop timer
Simon Glass [Wed, 1 Feb 2023 20:19:37 +0000 (13:19 -0700)]
rcar: Drop timer

Drop this unused driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agofreescale: Drop unused ftpmu010 driver
Simon Glass [Wed, 1 Feb 2023 20:19:36 +0000 (13:19 -0700)]
freescale: Drop unused ftpmu010 driver

Drop this unused code.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agofreescale: Drop unused pixis code
Simon Glass [Wed, 1 Feb 2023 20:19:35 +0000 (13:19 -0700)]
freescale: Drop unused pixis code

Drop this unused code.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agomisc: Drop mc9sdz60 driver
Simon Glass [Wed, 1 Feb 2023 20:19:34 +0000 (13:19 -0700)]
misc: Drop mc9sdz60 driver

Drop this unused driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agofpga: Add a FPGA_STRATIX_II option
Simon Glass [Wed, 1 Feb 2023 20:19:33 +0000 (13:19 -0700)]
fpga: Add a FPGA_STRATIX_II option

There is no Kconfig option for this code, but it seems to be useful. Add
one.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agofpga: Add a LATTICE option
Simon Glass [Wed, 1 Feb 2023 20:19:32 +0000 (13:19 -0700)]
fpga: Add a LATTICE option

There is no Kconfig option for this code, but it seems to be useful. Add
one.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agosamsung: Drop CONFIG_EXYNOS_PWM_BL
Simon Glass [Wed, 1 Feb 2023 20:19:31 +0000 (13:19 -0700)]
samsung: Drop CONFIG_EXYNOS_PWM_BL

This is not defined anywhere. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
21 months agoenv: Drop ENV_IS_IN_SATA
Simon Glass [Wed, 1 Feb 2023 20:19:30 +0000 (13:19 -0700)]
env: Drop ENV_IS_IN_SATA

This is not used anywhere, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoMakefile: Avoid use of invalid CONFIG_ option
Simon Glass [Wed, 1 Feb 2023 20:19:29 +0000 (13:19 -0700)]
Makefile: Avoid use of invalid CONFIG_ option

This appears in a comment but is not a real option. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoDrop CONFIG_DM644X_GPIO
Simon Glass [Wed, 1 Feb 2023 20:19:28 +0000 (13:19 -0700)]
Drop CONFIG_DM644X_GPIO

Drop this unused option.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoDrop dataflash_mmc_mux command
Simon Glass [Wed, 1 Feb 2023 20:19:27 +0000 (13:19 -0700)]
Drop dataflash_mmc_mux command

This is not used. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
21 months agoCorrect CONFIG_CONTROLCENTERDC
Simon Glass [Wed, 1 Feb 2023 20:19:26 +0000 (13:19 -0700)]
Correct CONFIG_CONTROLCENTERDC

This option does not exist but presumably means to point to
CONFIG_TARGET_CONTROLCENTERDC. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agocmd: Drop mfsl command
Simon Glass [Wed, 1 Feb 2023 20:19:25 +0000 (13:19 -0700)]
cmd: Drop mfsl command

This is not used anywhere. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agocmd: Add an option to enable the ini command
Simon Glass [Wed, 1 Feb 2023 20:19:24 +0000 (13:19 -0700)]
cmd: Add an option to enable the ini command

This command has no Kconfig option at present, but seems useful enough to
keep around. Add one.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agorockchip: Correct a reference to CONFIG_BOOT_MODE_REG
Simon Glass [Wed, 1 Feb 2023 20:19:23 +0000 (13:19 -0700)]
rockchip: Correct a reference to CONFIG_BOOT_MODE_REG

This option does not exist and should refer to
CONFIG_ROCKCHIP_BOOT_MODE_REG instead. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoppc: Drop bat_rw
Simon Glass [Wed, 1 Feb 2023 20:19:22 +0000 (13:19 -0700)]
ppc: Drop bat_rw

Drop this unused driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoarm: mvebu: Drop reference to CONFIG_ARMADA_39X
Simon Glass [Wed, 1 Feb 2023 20:19:21 +0000 (13:19 -0700)]
arm: mvebu: Drop reference to CONFIG_ARMADA_39X

This is not defined anywhere. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
21 months agoarm: mvebu: Remove reference to ARMADA_370
Simon Glass [Wed, 1 Feb 2023 20:19:20 +0000 (13:19 -0700)]
arm: mvebu: Remove reference to ARMADA_370

Drop this as it is not referenced anywhere else in the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agosandbox: Drop reference to CONFIG_ARCH_DEVICE_TREE
Simon Glass [Wed, 1 Feb 2023 20:19:19 +0000 (13:19 -0700)]
sandbox: Drop reference to CONFIG_ARCH_DEVICE_TREE

This is not used anywhere. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agomisc: Drop ali512x
Simon Glass [Wed, 1 Feb 2023 20:19:18 +0000 (13:19 -0700)]
misc: Drop ali512x

Drop this unused driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoMakefile: Drop CONFIG_AIS_CONFIG_FILE
Simon Glass [Wed, 1 Feb 2023 20:19:17 +0000 (13:19 -0700)]
Makefile: Drop CONFIG_AIS_CONFIG_FILE

This is not defined anywhere. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agogpio: Drop adi_gpio2
Simon Glass [Wed, 1 Feb 2023 20:19:16 +0000 (13:19 -0700)]
gpio: Drop adi_gpio2

Drop this unused driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agopower: Drop pmic_max77693.c
Simon Glass [Wed, 1 Feb 2023 20:19:15 +0000 (13:19 -0700)]
power: Drop pmic_max77693.c

Drop this driver and the associated CONFIG option, as it is not used.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agonand: Drop CONFIG_NAND_SPEAR
Simon Glass [Wed, 1 Feb 2023 20:19:14 +0000 (13:19 -0700)]
nand: Drop CONFIG_NAND_SPEAR

This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
21 months agopower: Drop fg_max77693
Simon Glass [Wed, 1 Feb 2023 20:19:13 +0000 (13:19 -0700)]
power: Drop fg_max77693

This is not used in U-Boot. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agomoveconfig: Add an option to compare Kconfig against source
Simon Glass [Wed, 1 Feb 2023 20:19:12 +0000 (13:19 -0700)]
moveconfig: Add an option to compare Kconfig against source

Sometimes the Makefile rules or source code refers to Kconfig options
which don't exist. Update the moveconfig tool to check this and produce
a series of reports about inconsistencies.

This can then be used to generate patches to correct the problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
21 months agoMerge branch '2023-02-07-assorted-updates'
Tom Rini [Tue, 7 Feb 2023 16:42:26 +0000 (11:42 -0500)]
Merge branch '2023-02-07-assorted-updates'

- Default to dynamic LMB allocation, and fix an issue with the EFI one,
  assorted TI platform updates, socrates platform updates, switch
  qemu-arm to using bootstd, imagetool fixes, macOS host build fixes,
  keymile platform upates, spl FPGA load fix, MMC env bugfix, add seama
  command, usb bootdev test bugfix.

21 months agocmd: Add a SEAMA image load command
Linus Walleij [Tue, 31 Jan 2023 23:16:13 +0000 (00:16 +0100)]
cmd: Add a SEAMA image load command

Add a command to load SEAMA (Seattle Image), a NAND flash
on-flash storage format.

This type of flash image is found in some D-Link routers such
as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L, DIR890L and
DCH-M225, as well as in WD and NEC routers on the ath79
(MIPS), Broadcom BCM53xx, and RAMIPS platforms.

This U-Boot command will read and decode a SEAMA image from
raw NAND flash on any platform. As it is always using big endian
format for the data decoding is always necessary on platforms
such as ARM.

The command is needed to read a SEAMA-encoded boot image on the
D-Link DIR-890L router for boot from NAND flash in an upcoming
port of U-Boot to the Broadcom Northstar (BCM4709, BCM53xx)
architecture.

A basic test and documentation is added as well. The test must
be run on a target with NAND flash support and at least one
resident SEAMA image in flash.

Cc: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
21 months agoenv: mmc: Fix offset issue for env save
Ye Li [Tue, 31 Jan 2023 06:41:58 +0000 (14:41 +0800)]
env: mmc: Fix offset issue for env save

Fix the issue in commit 46c9016 ("env: mcc: Drop unnecessary #ifdefs")
If CONFIG_SYS_REDUNDAND_ENVIRONMENT is not defined, the offset value
becomes undetermined, so write env to unexpected offset.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
21 months agoMAINTAINERS: m68k: Change Angelo's email address
Angelo Dureghello [Mon, 30 Jan 2023 19:54:50 +0000 (20:54 +0100)]
MAINTAINERS: m68k: Change Angelo's email address

Set my new current personal email.

Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
21 months agotools: default_image: Accept images with padding
Pali Rohár [Sun, 29 Jan 2023 16:44:11 +0000 (17:44 +0100)]
tools: default_image: Accept images with padding

If image file is stored on flash partition then it contains padding, which
is not part of the image itself. Image data size is stored in the image
header. So use image size from the header instead of expecting that total
image file size is size of the header plus size of the image data. This
allows dumpimage to parse image files with padding (e.g. dumped from flash
partition).

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agotools: default_image: Verify header size
Pali Rohár [Sun, 29 Jan 2023 16:44:10 +0000 (17:44 +0100)]
tools: default_image: Verify header size

Before reading image header, verify that image size is at least size of
the image header.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agotools: imagetool: Skip autodetection of gpimage type
Pali Rohár [Sun, 29 Jan 2023 16:45:55 +0000 (17:45 +0100)]
tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agotools: imagetool: Show error message when detecting image type failed
Pali Rohár [Sun, 29 Jan 2023 16:45:54 +0000 (17:45 +0100)]
tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>
21 months agotools: imagetool: Fix error message when verify_header is undefined
Pali Rohár [Sun, 29 Jan 2023 16:45:53 +0000 (17:45 +0100)]
tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>
21 months agoarm: qemu: Move GUIDs to the C file
Simon Glass [Sat, 28 Jan 2023 22:00:28 +0000 (15:00 -0700)]
arm: qemu: Move GUIDs to the C file

These are only used in one place, so move them there.

Signed-off-by: Simon Glass <sjg@chromium.org>