platform/kernel/u-boot.git
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 8 Apr 2021 11:33:14 +0000 (07:33 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

- Watchdog, Unleashed and Icicle improvements

3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Thu, 8 Apr 2021 11:32:54 +0000 (07:32 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- Add Armada 38x RTC driver (Marek)
- turris_omnia: Misc updates (enable RTC and other cmds) (Marek)
- ds414: Misc updates (enable XHCI_PCI USB support etc) (Phil)
- Convert MVEBU MMC driver to DM (Harm)
- kirkwood: Misc updates and cleanups to some boards (Harm)

3 years agoriscv: dts: mpfs-icicle-kit: Drop 'clock-frequency' in the uart nodes
Bin Meng [Wed, 31 Mar 2021 07:24:50 +0000 (15:24 +0800)]
riscv: dts: mpfs-icicle-kit: Drop 'clock-frequency' in the uart nodes

The uart nodes already provide <clocks> property for the driver to
dynamically calculate the correct clock frequency. There is no need
to keep the hard-coded <clock-frequency> property.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
Tested-by: Padmarao Begari <padmarao.begari@microchip.com>
3 years agoclk: mpfs_clk: Enable DM_FLAG_PRE_RELOC flag
Bin Meng [Wed, 31 Mar 2021 07:24:49 +0000 (15:24 +0800)]
clk: mpfs_clk: Enable DM_FLAG_PRE_RELOC flag

This driver is needed in the pre-relocation phase as the serial
driver depends on it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
Tested-by: Padmarao Begari <padmarao.begari@microchip.com>
3 years agoriscv: mpfs-icicle-kit: Increase SYS_MALLOC_F_LEN
Bin Meng [Wed, 31 Mar 2021 07:24:48 +0000 (15:24 +0800)]
riscv: mpfs-icicle-kit: Increase SYS_MALLOC_F_LEN

The RISC-V architecture default value of CONFIG_SYS_MALLOC_F_LEN
(0x1000) would not provide enough memory for devices like mpfs
clock and ns16550 serial to bind well before relocation.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
Tested-by: Padmarao Begari <padmarao.begari@microchip.com>
3 years agotimer: sifive_clint: Support the official clint DT bindings
Bin Meng [Sat, 27 Mar 2021 11:57:35 +0000 (19:57 +0800)]
timer: sifive_clint: Support the official clint DT bindings

Linux kernel commit a2770b57d083 ("dt-bindings: timer: Add CLINT bindings")
adds the official DT bindings for CLINT, which uses "sifive,clint0"
as the compatible string. "riscv,clint0" is now legacy and has to
be kept for backward compatibility of legacy systems.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoriscv: assembler versions of memcpy, memmove, memset
Heinrich Schuchardt [Sat, 27 Mar 2021 11:37:04 +0000 (12:37 +0100)]
riscv: assembler versions of memcpy, memmove, memset

Provide optimized versions of memcpy(), memmove(), memset() copied from
the Linux kernel.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agotest: unit test for longjmp
Heinrich Schuchardt [Tue, 23 Mar 2021 18:11:27 +0000 (19:11 +0100)]
test: unit test for longjmp

Provide a unit test for the longjmp() library function

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Sean Anderson <seanga2@gmail.com>
3 years agoriscv: simplify longjmp
Heinrich Schuchardt [Tue, 23 Mar 2021 18:11:26 +0000 (19:11 +0100)]
riscv: simplify longjmp

The value returned by setjmp must be nonzero. If zero is passed as
parameter it must be replaced by 1.

This patch reduces the code size a bit.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoriscv: sifive: Rename fu540 board to unleashed
Bin Meng [Wed, 17 Mar 2021 03:10:58 +0000 (11:10 +0800)]
riscv: sifive: Rename fu540 board to unleashed

In preparation to add SiFive Unmatched board support, let's rename
the existing fu540 board to unleashed.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoconfigs: EXT4, FAT, hush shell, env on S-mode MAIX
Heinrich Schuchardt [Sat, 6 Mar 2021 08:20:32 +0000 (08:20 +0000)]
configs: EXT4, FAT, hush shell, env on S-mode MAIX

* enable storing the environment in the SPI flash
* enable EXT4 and FAT file system
* enable hush shell
* run k210_bootcmd as default boot command

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
3 years agoriscv: Remove unused define in maix header
Sean Anderson [Thu, 11 Mar 2021 01:51:31 +0000 (20:51 -0500)]
riscv: Remove unused define in maix header

This define was left over from a previous revision, and was never used.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
3 years agoriscv: Enable watchdog for the k210
Sean Anderson [Thu, 11 Mar 2021 02:02:22 +0000 (21:02 -0500)]
riscv: Enable watchdog for the k210

This enables the necessary config options.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoriscv: Add watchdog bindings for the k210
Sean Anderson [Thu, 11 Mar 2021 02:02:21 +0000 (21:02 -0500)]
riscv: Add watchdog bindings for the k210

This adds the necessary bindings. Most of them are already there.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Acked-by: Rick Chen <rick@andestech.com>
3 years agowdt: dw: Free the clock on error
Sean Anderson [Thu, 11 Mar 2021 02:02:20 +0000 (21:02 -0500)]
wdt: dw: Free the clock on error

The clock subsystem requires that clk_free be called on clocks obtained via
clk_get_*.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agowdt: dw: Enable the clock before using it
Sean Anderson [Thu, 11 Mar 2021 02:02:19 +0000 (21:02 -0500)]
wdt: dw: Enable the clock before using it

The watchdog won't work if the clock isn't enabled.

Fixes: cf89ef8d10f240554541c20b2e1bdcdd58d1d7e6
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agowdt: dw: Switch to if(CONFIG()) instead of using #if
Sean Anderson [Thu, 11 Mar 2021 02:02:18 +0000 (21:02 -0500)]
wdt: dw: Switch to if(CONFIG()) instead of using #if

This is preferred over #if because the compiler can check syntax even if
the feature is disabled. This cannot be used for CONFIG_CLK because
CONFIG_DW_WDT_CLOCK_KHZ is not defined on all platforms.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agowdt: dw: Switch to using fls for log2
Sean Anderson [Thu, 11 Mar 2021 02:02:17 +0000 (21:02 -0500)]
wdt: dw: Switch to using fls for log2

log_2_n_round_up is only found in arm. fls performs the same job and is
generic.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoconfigs: sheevaplug: enable driver-model based MMC
Harm Berntsen [Tue, 30 Mar 2021 08:19:42 +0000 (10:19 +0200)]
configs: sheevaplug: enable driver-model based MMC

The non-dm MMC driver has been converted to the driver model. The
sheevaplug was using the non-dm driver and this commit enables the new
driver.

Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
Reviewed-by: Stefan Roese <sr@denx.de>
CC: Prafulla Wadaskar <prafulla@marvell.com>
CC: Stefan Roese <sr@denx.de>
CC: Tom Rini <trini@konsulko.com>
3 years agommc: mvebu: convert to driver model
Harm Berntsen [Tue, 30 Mar 2021 08:19:41 +0000 (10:19 +0200)]
mmc: mvebu: convert to driver model

This is a straightforward conversion of the old, non-dm driver. It was
done in-place as the deadline for non-dm MMC has passed. Previous
commits ensured that no board depends on the old, non-dm variant. Tested
on a Kirkwood based board with eMMC.

Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
Tested-by: Harm Berntsen <harm.berntsen@nedap.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
CC: Pantelis Antoniou <panto@antoniou-consulting.com>
CC: Stefan Roese <sr@denx.de>
CC: Gerald Kerma <drEagle@doukki.net>
CC: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoconfigs: remove obsolete CONFIG_MVEBU_MMC
Harm Berntsen [Tue, 30 Mar 2021 08:19:40 +0000 (10:19 +0200)]
configs: remove obsolete CONFIG_MVEBU_MMC

All usages of this have been removed

Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
CC: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoconfigs: remove obsolete CONFIG_SYS_MMC_BASE
Harm Berntsen [Tue, 30 Mar 2021 08:19:39 +0000 (10:19 +0200)]
configs: remove obsolete CONFIG_SYS_MMC_BASE

All usages of this have been removed

Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
CC: Simon Glass <sjg@chromium.org>
3 years agoarm: kirkwood: remove non-dm MMC driver init
Harm Berntsen [Tue, 30 Mar 2021 08:19:38 +0000 (10:19 +0200)]
arm: kirkwood: remove non-dm MMC driver init

No board uses this driver any more: remove it.

Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
Reviewed-by: Stefan Roese <sr@denx.de>
CC: Gerald Kerma <drEagle@doukki.net>
CC: Stefan Roese <sr@denx.de>
CC: Pantelis Antoniou <panto@antoniou-consulting.com>
3 years agoconfigs: sheevaplug: remove non-dm MMC driver
Harm Berntsen [Tue, 30 Mar 2021 08:19:37 +0000 (10:19 +0200)]
configs: sheevaplug: remove non-dm MMC driver

This will be replaced with the driver model version

Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
Reviewed-by: Stefan Roese <sr@denx.de>
CC: Prafulla Wadaskar <prafulla@marvell.com>
CC: Stefan Roese <sr@denx.de>
CC: Tom Rini <trini@konsulko.com>
3 years agoconfigs: openrd: remove non-dm MMC driver
Harm Berntsen [Tue, 30 Mar 2021 08:19:36 +0000 (10:19 +0200)]
configs: openrd: remove non-dm MMC driver

Unfortunately this board has no DM support at all. We are also way past
the deadline for driver model support for various devices on this board.

Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
Reviewed-by: Stefan Roese <sr@denx.de>
CC: Stefan Roese <sr@denx.de>
3 years agoconfigs: remove unused CONFIG_SYS_MMC_BASE defs
Harm Berntsen [Tue, 30 Mar 2021 08:19:35 +0000 (10:19 +0200)]
configs: remove unused CONFIG_SYS_MMC_BASE defs

These boards use an MMC driver that does not use this definition

Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
Reviewed-by: Stefan Roese <sr@denx.de>
CC: Stefan Roese <sr@denx.de>
CC: Mario Six <mario.six@gdsys.cc>
CC: Dennis Gilmore <dgilmore@redhat.com>
3 years agoarm: mvebu: ds414: Add sample u-boot update command
Phil Sutter [Fri, 5 Mar 2021 20:05:45 +0000 (21:05 +0100)]
arm: mvebu: ds414: Add sample u-boot update command

Call 'run update_uboot' to fetch u-boot-spl.kwb via TFTP and write it
into the correct SPI flash location. The latter's size is defined in
DS414's DTB file, so hard-coding it should be acceptable here.

Take care to not append garbage from RAM to the written image and to
stay within assigned flash boundaries even if an oversized image was
fetched.

Signed-off-by: Phil Sutter <phil@nwl.cc>
3 years agoarm: mvebu: ds414: Auto-populate env if appropriate
Phil Sutter [Fri, 5 Mar 2021 20:05:11 +0000 (21:05 +0100)]
arm: mvebu: ds414: Auto-populate env if appropriate

Define a misc_init_r() which calls "syno populate_env" if the
environment seems incomplete (or default), indicated by missing
"ethaddr" variable. With this in place, no random MAC address fallback
is needed anymore.

Signed-off-by: Phil Sutter <phil@nwl.cc>
3 years agoarm: mvebu: board/Synology: Unify legacy kernel support
Phil Sutter [Sun, 7 Mar 2021 21:22:27 +0000 (22:22 +0100)]
arm: mvebu: board/Synology: Unify legacy kernel support

Move the relevant bits from ds109.{c,h} into common/ and adjust the code
to fit both DS109 and DS414. Moreover:

* Introduce syno_board_id() which translates CONFIG_MACH_TYPE into the
  expected board ID tag value.

* Properly initialize isusbhost, mac and mtu fields from env variables.

* Set the right bootargs/bootcmd to correctly boot legacy kernel out of
  the (DS414) box. Getting the ramdisk location right is a bit tedious.

Cc: Walter Schweizer <swwa@users.sourceforge.net>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: configs: ds414: Enable XHCI_PCI by default
Phil Sutter [Sun, 7 Mar 2021 21:21:23 +0000 (22:21 +0100)]
arm: mvebu: configs: ds414: Enable XHCI_PCI by default

With the recent fixes in pci_mvebu and xhci-pci drivers, the two rear
USB3 ports are finally usable and accessing them no longer hangs the
system.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: ds414: Add a Kconfig defining some strings
Phil Sutter [Wed, 3 Mar 2021 00:55:22 +0000 (01:55 +0100)]
arm: mvebu: ds414: Add a Kconfig defining some strings

A rather cosmetic change to conform with other board definitions.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_omnia: Enable CMD_FS_UUID
Marek Behún [Fri, 26 Feb 2021 09:30:22 +0000 (10:30 +0100)]
arm: mvebu: turris_omnia: Enable CMD_FS_UUID

This command can be useful for U-Boot scripts.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Pali Rohár <pali@kernel.org>
Acked-by: Pali Rohár <pali@kernel.org>
3 years agoarm: mvebu: turris_omnia: Enable CMD_WDT
Marek Behún [Fri, 26 Feb 2021 09:30:21 +0000 (10:30 +0100)]
arm: mvebu: turris_omnia: Enable CMD_WDT

This command can be sometimes used for debugging.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Pali Rohár <pali@kernel.org>
Acked-by: Pali Rohár <pali@kernel.org>
3 years agoarm: mvebu: turris_omnia: Enable DM_RTC and RTC_ARMADA38X
Marek Behún [Fri, 26 Feb 2021 09:30:20 +0000 (10:30 +0100)]
arm: mvebu: turris_omnia: Enable DM_RTC and RTC_ARMADA38X

With this the date command is available on Turris Omnia.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Pali Rohár <pali@kernel.org>
Acked-by: Pali Rohár <pali@kernel.org>
3 years agortc: add armada38x driver
Marek Behún [Fri, 26 Feb 2021 09:30:19 +0000 (10:30 +0100)]
rtc: add armada38x driver

Add RTC driver for Armada 38x, based on Linux' driver.
For now implement only `marvell,armada-380-rtc` compatible.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Pali Rohár <pali@kernel.org>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Chris Packham <judge.packham@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Pali Rohár <pali@kernel.org>
3 years agoMerge branch '2021-04-07-CI-improvements'
Tom Rini [Wed, 7 Apr 2021 19:54:07 +0000 (15:54 -0400)]
Merge branch '2021-04-07-CI-improvements'

- Assorted Azure/GitLab improvements
- Move the Dockerfile used for making containers in CI in to this
  repository.

3 years agotools: Integrate the Dockerfile used for CI
Tom Rini [Mon, 15 Mar 2021 17:19:01 +0000 (13:19 -0400)]
tools: Integrate the Dockerfile used for CI

Integrate the Dockerfile from
https://source.denx.de/u-boot/gitlab-ci-runner.git as of
commit bc6130d572f1 ("Dockerfile: Remove high UID/GID") and introduce a
short rST on how to build the container.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoAzure/GitLab: bump OpenSBI version to 0.9
Heinrich Schuchardt [Fri, 2 Apr 2021 09:42:01 +0000 (11:42 +0200)]
Azure/GitLab: bump OpenSBI version to 0.9

Version 0.9 of OpenSBI provides the system reset extension which allows us
to reset and power off boards without board specific code.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
3 years agoMerge branch '2021-04-07-fs-updates'
Tom Rini [Wed, 7 Apr 2021 15:14:13 +0000 (11:14 -0400)]
Merge branch '2021-04-07-fs-updates'

- JFFS2 updates

3 years agopytest: Lower pygit2 requirement
Tom Rini [Fri, 26 Feb 2021 12:52:28 +0000 (07:52 -0500)]
pytest: Lower pygit2 requirement

The latest versions of pygit2 are not available in practically any
distribution at this time.  Furthermore, we don't need the latest in
order to run all of our testsuites.  Reduce this version requirement to
something older that meets our needs while still supporting running our
tests on older hosts (and so, test labs).

Reported-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoGitLab: Remove "tags" stanzas
Tom Rini [Fri, 26 Feb 2021 12:52:27 +0000 (07:52 -0500)]
GitLab: Remove "tags" stanzas

Given the structure of our current GitLab tests, we don't make real use
of the tags.  Furthermore, these tags prevent the automatic usage of the
default GitLab runners.  Remove these tags.

Reported-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoAzure: Rework SH / Renesas job
Tom Rini [Mon, 15 Feb 2021 15:52:19 +0000 (10:52 -0500)]
Azure: Rework SH / Renesas job

Now that there is a single SuperH platform, rework the Azure job
slightly.  Azure build time limits mean that we need to split the world
build up still.  Make a single build job for the single Renesas SuperH
platform as well as all of the ARM platforms from Renesas.

Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoJFFS2: fix jffs2 summary datacrc status uninitialized
Wagner Popov dos Santos [Tue, 23 Feb 2021 03:49:00 +0000 (00:49 -0300)]
JFFS2: fix jffs2 summary datacrc status uninitialized

The function jffs2_1pass_read_inode() was discarding the summary
inodes and dirent because the value in datacrc flag wasn't
initialized in function jffs2_sum_process_sum_data().

This fix initializes the status of all summary records to indicate
that the CRC needs to be verified when they are loaded.

Before this fix, the behaviors produced by the undefined value of
datacrc was:
- Summary's registries were discarded when 'b->datacrc' is equal
  as 'CRC_BAD'.
- Summary's registries were not checked when b->datacrc differs of
  'CRC_BAD' and 'CRC_UNKNOWN'

So, almost all of the time the crc just isn't checked, and in some
cases the registries are discarded.

Signed-off-by: Wagner Popov dos Santos <wpopov@gmail.com>
3 years agoJFFS2: fix the reading address over nand's limit
Wagner Popov dos Santos [Tue, 23 Feb 2021 02:30:58 +0000 (23:30 -0300)]
JFFS2: fix the reading address over nand's limit

Fixes address violation in functions read_nand_cached() and
read_onenand_cached(). This happens because these functions
try to read a fixed amount
of data even when the offset+length
is above the nand's limit.

Signed-off-by: Wagner Popov dos Santos <wpopov@gmail.com>
3 years agoMerge tag 'mmc-2021-4-6' of https://source.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Wed, 7 Apr 2021 02:42:55 +0000 (22:42 -0400)]
Merge tag 'mmc-2021-4-6' of https://source.denx.de/u-boot/custodians/u-boot-mmc

Update hwpartition usage
Check bootbus's arguments
workaround for erratum A-011334 for fsl_esdhc driver
add pulse width detection workaround for fsl_esdhc driver
Use alias num before checking mmc index when creating device

3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Tue, 6 Apr 2021 18:11:21 +0000 (14:11 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-usb

- XHCI fixes

3 years agousb: xhci: Make debug output better readable and checkpatch clean
Stefan Roese [Tue, 6 Apr 2021 10:10:18 +0000 (12:10 +0200)]
usb: xhci: Make debug output better readable and checkpatch clean

This change makes debugging a bit easier as the output is better
readable with the added space. The explicit le16_to_cpu() is not
needed in the output. Also this patch moves the strings into one line
to make the patch checkpatch clean.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
3 years agousb: xhci: Add missing xhci_readl()
Aaron Williams [Tue, 6 Apr 2021 10:10:17 +0000 (12:10 +0200)]
usb: xhci: Add missing xhci_readl()

Accessing the xHCI controller registers should be done via the
xhci_readl/writel functions. This patch adds this to a few missing
places.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
3 years agousb: hub: Fix usb_get_port_status() for big-endian platforms
Aaron Williams [Tue, 6 Apr 2021 10:10:16 +0000 (12:10 +0200)]
usb: hub: Fix usb_get_port_status() for big-endian platforms

Add missing endianness conversions to usb_get_port_status(). This
(amongst others) is necessary to enable the use of USB 3 hubs on
big-endian platforms like MIPS Octeon.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
3 years agoMerge tag 'u-boot-amlogic-20210406' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Tue, 6 Apr 2021 12:37:28 +0000 (08:37 -0400)]
Merge tag 'u-boot-amlogic-20210406' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- Add MMIO MDIO mux driver
- Add Amlogic G12A MDIO mux driver
- Add DM_MDIO support for designware ethernet driver
- Add Amlogic Meson8b and later designware ethernet glue driver
- Switch all amlogic boards to Amlogic designware ethernet glue driver
- Switch all amlogic boards to DM_MDIO when necessary
- Remove all static ethernet setup code

3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Tue, 6 Apr 2021 12:37:06 +0000 (08:37 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- Enhance WDT handling (starting / stopping) and introduce
  CONFIG_WATCHDOG_AUTOSTART to allow disabling of autostart of
  the WDT (Pali)

3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-cfi-flash
Tom Rini [Tue, 6 Apr 2021 12:36:49 +0000 (08:36 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-cfi-flash

- Fix detection of 8-bit bus flash devices via address shift

3 years agoMerge tag 'dm-pull-6apr21' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Tue, 6 Apr 2021 12:36:11 +0000 (08:36 -0400)]
Merge tag 'dm-pull-6apr21' of https://source.denx.de/u-boot/custodians/u-boot-dm

ENOSYS clean-up
Minor dtoc improvements
Convert CONFIG_MISC_INIT_F to Kconfig
Allow unit tests to run on any board
pylibfdt build-rule fix

3 years agommc: mmc-uclass: Use dev_seq() to read aliases node's index
Aswath Govindraju [Thu, 25 Mar 2021 07:18:48 +0000 (12:48 +0530)]
mmc: mmc-uclass: Use dev_seq() to read aliases node's index

Use dev_seq() to read aliases node's index and pass it as device number
for creating bulk device.

Suggested-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agommc: Check for device with a seq number equal to num before checking against index
Aswath Govindraju [Thu, 25 Mar 2021 07:18:47 +0000 (12:48 +0530)]
mmc: Check for device with a seq number equal to num before checking against index

First check if there is an alias for the device tree node defined with the
given num before checking against device index.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoboard: sl28: enable HS400 mode again
Michael Walle [Wed, 17 Mar 2021 14:01:38 +0000 (15:01 +0100)]
board: sl28: enable HS400 mode again

Now that it is working reliable on the LS1028A SoC, reenable support for
it.

Signed-off-by: Michael Walle <michael@walle.cc>
3 years agommc: fsl_esdhc: add pulse width detection workaround
Michael Walle [Wed, 17 Mar 2021 14:01:37 +0000 (15:01 +0100)]
mmc: fsl_esdhc: add pulse width detection workaround

HS400 mode on the LS1028A SoC isn't reliable. The linux driver has a
workaroung for the pulse width detection. Apply this workaround in
u-boot, too.

This will make HS400 mode work reliably on the LS1028A SoC.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agommc: fsl_esdhc: add workaround for erratum A-011334
Michael Walle [Wed, 17 Mar 2021 14:01:36 +0000 (15:01 +0100)]
mmc: fsl_esdhc: add workaround for erratum A-011334

LS1028A SoCs are restricted in what divider values are allowed for HS400
mode. This is basically a port from the corresponding linux driver.

Signed-off-by: Michael Walle <michael@walle.cc>
3 years agocmd: mmc: check whether bootbus's arguments is valid or not
Jaehoon Chung [Fri, 26 Feb 2021 09:38:20 +0000 (18:38 +0900)]
cmd: mmc: check whether bootbus's arguments is valid or not

According to Specification, each bit have valid value.
But it doesn't check whether arguments is valid or not.
It has potential bug with arguments passed by wrong value.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agocmd: mmc: modify more readable about hwpartition usage
Jaehoon Chung [Fri, 26 Feb 2021 07:07:18 +0000 (16:07 +0900)]
cmd: mmc: modify more readable about hwpartition usage

Modified more readable about hwpartition usage.
Because it's difficult to understand how to use its command.
The arguments didn't optional.
mmc hwpartition needs to pass <USER> <GP> <MODE> as arguments.
Description about each arguments what is required is the below:
 USER - <user> <enh> <start> <cnt> <wrrel> <{on|off}>
 GP   - <{gp1|gp2|gp3|gp4}> <cnt> <enh> <wrrel> <{on|off}>
 MODE - <{check|set|complete}>

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoarm: meson: remove static ethernet link setup
Neil Armstrong [Thu, 25 Feb 2021 08:44:38 +0000 (09:44 +0100)]
arm: meson: remove static ethernet link setup

The static ethernet link type config code is no more needed because now handled by
the meson8b glue driver, delete it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
3 years agoarm: meson: remove static ethernet memory power domain enable
Neil Armstrong [Thu, 25 Feb 2021 08:44:37 +0000 (09:44 +0100)]
arm: meson: remove static ethernet memory power domain enable

The ethernet memory power domain is handled by the meson-ee-pwrc driver,
delete the static code.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
3 years agonet: designware: remove amlogic compatibles
Neil Armstrong [Thu, 25 Feb 2021 08:44:36 +0000 (09:44 +0100)]
net: designware: remove amlogic compatibles

These compatibles are now handled by the dwmac_meson8b glue driver.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
3 years agoconfigs: meson: use Designware glue driver for Amlogic Meson8b & later SoCs
Neil Armstrong [Thu, 25 Feb 2021 08:44:35 +0000 (09:44 +0100)]
configs: meson: use Designware glue driver for Amlogic Meson8b & later SoCs

Use the proper Synopsys DWMAC Meson8b glue to handle the ethernet link type.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
3 years agoarm: meson: remove static MDIO mux handling
Neil Armstrong [Thu, 25 Feb 2021 08:44:34 +0000 (09:44 +0100)]
arm: meson: remove static MDIO mux handling

The static MDIO mux handling in mach-meson is no more needed, delete it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
3 years agoconfigs: update Amlogic Meson G12A, G12B & SM1 configs for MDIO MUX
Neil Armstrong [Thu, 25 Feb 2021 08:44:33 +0000 (09:44 +0100)]
configs: update Amlogic Meson G12A, G12B & SM1 configs for MDIO MUX

Use DM_MDIO and the new G12A MDIO MUX driver for G12A, G12B & SM1 boards.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
3 years agoconfigs: update Amlogic Meson GXL & GXM config for MDIO MUX
Neil Armstrong [Thu, 25 Feb 2021 08:44:32 +0000 (09:44 +0100)]
configs: update Amlogic Meson GXL & GXM config for MDIO MUX

Use DM_MDIO and the new MMIOREG MDIO MUX driver for GXL & GXM board.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
3 years agonet: designware: add Amlogic Meson8b & later glue driver
Neil Armstrong [Wed, 24 Feb 2021 19:33:56 +0000 (20:33 +0100)]
net: designware: add Amlogic Meson8b & later glue driver

This adds a proper glue driver for the Designware DWMAC ethernet MAC IP
found in the Amlogic Meson8, GXBB, GXL, GXM, G12A, G12B & SM1 SoCs.

This is aimed to replace the static ethernet link setup found on the board
init code for the Amlogic SoC based boards.

Tested on a libretech-cc (S905x Internal RMII 10/100 PHY) and Khadas VIM3 (A113d
with external 10/100/1000 RGMII PHY) to cover the most extreme setups.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
3 years agonet: add Amlogic Meson G12A MDIO MUX driver
Neil Armstrong [Wed, 24 Feb 2021 16:31:53 +0000 (17:31 +0100)]
net: add Amlogic Meson G12A MDIO MUX driver

The Amlogic G12A & compatible SoCs embeds a mux to either communicate with
the external PHY or the internal 10/100 PHY.

This adds support for this mux as a MDIO MUX device.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agonet: designware: add DM_MDIO support
Neil Armstrong [Wed, 24 Feb 2021 14:02:39 +0000 (15:02 +0100)]
net: designware: add DM_MDIO support

Add support for DM_MDIO to connect to PHY and expose a MDIO device for the
internal MDIO bus in order to dynamically connect to MDIO PHYs with DT
with eventual MDIO muxes in between.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agonet: add MMIO Register MDIO MUX driver
Neil Armstrong [Wed, 24 Feb 2021 14:02:23 +0000 (15:02 +0100)]
net: add MMIO Register MDIO MUX driver

Add support for MMIO register MDIO muxes based on the Linux mdio-mux-mmioreg driver.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agoarm: mvebu: Espressobin: Enable watchdog support but do not start it
Pali Rohár [Tue, 9 Mar 2021 13:26:57 +0000 (14:26 +0100)]
arm: mvebu: Espressobin: Enable watchdog support but do not start it

Espressobin had disabled watchdog support (CONFIG_WDT) because older stable
Linux kernel versions (which are used by current stable OpenWRT and Debian
versions) do not have support for Armada 3700 watchdog driver. Therefore
they are not able to periodically kick watchdog so Espressobin enter into
boot loop.

This change enable CONFIG_WDT, CONFIG_WDT_ARMADA_37XX and CONFIG_CMD_WDT
options which add support for U-Boot 'wdt' command. And unset new
CONFIG_WATCHDOG_AUTOSTART option which cause that watchdog is not
automatically started by U-Boot during init phase, like when CONFIG_WDT
option is not set at all.

So with this change, U-Boot on Espressobin would have working 'wdt' command
which can be used from boot scripts (e.g. for enabling watchdog prior new
Linux booting kernel). But default behavior of watchdog status stays
unchanged, U-Boot does not start watchdog on Espressobin during its init
phase.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agowatchdog: Allow to use CONFIG_WDT without starting watchdog
Pali Rohár [Tue, 9 Mar 2021 13:26:56 +0000 (14:26 +0100)]
watchdog: Allow to use CONFIG_WDT without starting watchdog

In some cases it is useful to compile support for U-Boot command 'wdt'
without starting HW watchdog in early U-Boot phase. For example when the
user want to start the watchdog only on demand by some boot script.

This change adds a new compile option WATCHDOG_AUTOSTART to control whether
U-Boot should automatically start the watchdog during init phase or not.

This option is enabled by default as it was the default behavior prior
introducing this new change. When compiling U-Boot users can decide to turn
this option off.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agowatchdog: Show error message when initr_watchdog() cannot start watchdog
Pali Rohár [Tue, 9 Mar 2021 13:26:55 +0000 (14:26 +0100)]
watchdog: Show error message when initr_watchdog() cannot start watchdog

Function wdt_start() may fail. So in initr_watchdog() function check return
value of wdt_start() call and print error message when watchdog starting
failed.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agowatchdog: Set/unset GD_FLG_WDT_READY flag in wdt_start()/wdt_stop()
Pali Rohár [Tue, 9 Mar 2021 13:26:54 +0000 (14:26 +0100)]
watchdog: Set/unset GD_FLG_WDT_READY flag in wdt_start()/wdt_stop()

Watchdog is ready after successful call of ops->start() callback in
wdt_start() function. And is stopped after successful call of ops->stop()
callback in wdt_stop function.

So move setting of GD_FLG_WDT_READY flag from initr_watchdog() function to
wdt_start() and ensure that GD_FLG_WDT_READY flag is unset in wdt_stop()
function.

This change ensures that GD_FLG_WDT_READY flag is set only when watchdog is
running. And ensures that flag is also also when watchdog was started not
only by initr_watchdog() call (e.g. by U-Boot 'wdt' command).

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agocfi_flash: Fix detection of 8-bit bus flash devices via address shift
Jagannadha Sutradharudu Teki [Fri, 26 Feb 2021 07:51:49 +0000 (08:51 +0100)]
cfi_flash: Fix detection of 8-bit bus flash devices via address shift

We had a problem detecting 8/16bit flash devices connected only via
8bits to the SoC for quite a while. Commit 239cb9d9
[mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support] finally
fixed this 8-bit bus support. But also broke some other boards using
this cfi driver. So this patch had to be reverted.

I spotted a different, simpler approach for this 8-bit bus support
on the barebox mailing list posted by
Oleksij Rempel <bug-track@fisher-privat.net>:

http://www.spinics.net/lists/u-boot-v2/msg14687.html

Here the commit text:

"
Many cfi chips support 16 and 8 bit modes. Most important
difference is use of so called "Q15/A-1" pin. In 16bit mode this
pin is used for data IO. In 8bit mode, it is an address input
which add one more least significant bit (LSB). In this case
we should shift all adresses by one:
For example 0xaa << 1 = 0x154
"

This patch now is a port of this barebox patch to U-Boot.

Along with the change w.r.t from barebox,
Some flash chips can support multiple bus widths, override the
interface width and limit it to the port width.

Tested on 16-bit Spansion flash on sequoia.
Tested 8-bit flashes like 256M29EW, 512M29EW.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Cc: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: York Sun <york.sun@nxp.com>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
3 years agotest: Allow tests to run on any board
Simon Glass [Wed, 24 Mar 2021 21:44:33 +0000 (10:44 +1300)]
test: Allow tests to run on any board

Due to a recent change, tests are limited to running on sandbox only.
Correct this so that any architecture can run them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Sean Anderson <seanga2@gmail.com>
Fixes: c79705ea938 ("test: Move dm_test_init() into test-main.c")
Tested-by: Sean Anderson <seanga2@gmail.com>
3 years agosandbox: document parameters of os_realloc()
Heinrich Schuchardt [Sun, 28 Mar 2021 09:05:00 +0000 (11:05 +0200)]
sandbox: document parameters of os_realloc()

Avoid 'make htmldocs' build warnings:

    ./include/os.h:139: warning:
    Function parameter or member 'ptr' not described in 'os_realloc'
    ./include/os.h:139: warning:
    Function parameter or member 'length' not described in 'os_realloc'

Fixes: 14e46dfb176b ("sandbox: Add os_realloc()")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoConvert CONFIG_MISC_INIT_F to Kconfig
Simon Glass [Fri, 26 Mar 2021 03:17:30 +0000 (16:17 +1300)]
Convert CONFIG_MISC_INIT_F to Kconfig

This converts the following to Kconfig:
   CONFIG_MISC_INIT_F

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agomoveconfig: Handle binary files cleanly
Simon Glass [Fri, 26 Mar 2021 03:17:29 +0000 (16:17 +1300)]
moveconfig: Handle binary files cleanly

Some files are not actually source code and thus can produce unicode
errors. Report this and continue.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agolog: Fix up debug_cond() when LOG is enabled
Simon Glass [Fri, 26 Mar 2021 03:17:28 +0000 (16:17 +1300)]
log: Fix up debug_cond() when LOG is enabled

At present debug() statements can cause debuf output to appear when LOG is
enabled but DEBUG is not. This is not intended and it seems that the
condition is wrong.

Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Improve handling of reg properties
Simon Glass [Fri, 26 Mar 2021 03:17:27 +0000 (16:17 +1300)]
dtoc: Improve handling of reg properties

This existing code assumes that a reg property is larger than one cell,
but this is not always the case. Fix this assumption.

Also if a node's parent is missing the #address-cells and #size-cells
properties we use 2 as a default for each. But this should not happen in
practice. More likely the properties were removed for SPL due to there
being no 'u-boot,dm-pre-reloc' property, or similar. Add a warning for
this as the failure can be very confusing.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Adjust detection of 64-bit properties
Simon Glass [Fri, 26 Mar 2021 03:17:26 +0000 (16:17 +1300)]
dtoc: Adjust detection of 64-bit properties

At present an empty size is considered to be a 64-bit value. This does not
seem useful and wastes space. Limit the 64-bit detection to where one or
both of the addr/size is two cells or more.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Show driver warnings once at the end
Simon Glass [Fri, 26 Mar 2021 03:17:25 +0000 (16:17 +1300)]
dtoc: Show driver warnings once at the end

At present warnings are shown as soon as they are discovered in the
source scannner. But the function that detects them may be called multiple
times.

Collect all the warnings and show them at the end.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agobuildman: Add an encoding to the out-env file
Simon Glass [Fri, 26 Mar 2021 01:39:39 +0000 (14:39 +1300)]
buildman: Add an encoding to the out-env file

The environment may contain some unicode characters. At least that is what
seemed to happen on one commit:

Building current source for 1 boards (0 threads, 64 jobs per thread)
    0    0    0 /1       -1      (starting)
Traceback (most recent call last):
  File ".../tools/buildman/buildman", line 64, in <module>
    ret_code = control.DoBuildman(options, args)
  File "tools/buildman/control.py", line 372, in DoBuildman
    options.keep_outputs, options.verbose)
  File ".../tools/buildman/builder.py", line 1704, in BuildBoards
    results = self._single_builder.RunJob(job)
  File ".../tools/buildman/builderthread.py", line 526, in RunJob
    self._WriteResult(result, job.keep_outputs, job.work_in_output)
  File ".../tools//buildman/builderthread.py", line 349, in _WriteResult
    print('%s="%s"' % (var, env[var]), file=fd)
UnicodeEncodeError: 'ascii' codec can't encode characters in position
311-312: ordinal not in range(128)

The problem defies repetition with any change at all to buildman. But
let's set an encoding in any case.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agopinctrl: Return -ENOSYS when system call is not available
Simon Glass [Wed, 24 Mar 2021 21:26:11 +0000 (10:26 +1300)]
pinctrl: Return -ENOSYS when system call is not available

Update the code to use -ENOSYS, which is the correct error code for an
unimplemented system call in U-Boot.

Also we should not check for a missing operations array as this is not
permitted. For now this can be covered by an assert().

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agosimple-pm-bus: Use -ENOSYS for checking missing system call
Simon Glass [Wed, 24 Mar 2021 21:26:10 +0000 (10:26 +1300)]
simple-pm-bus: Use -ENOSYS for checking missing system call

We don't need to check -ENOTSUPP since this is not used for this purpose
in U-Boot. Update the code accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
3 years agoclk: Return -ENOSYS when system call is not available
Simon Glass [Wed, 24 Mar 2021 21:26:09 +0000 (10:26 +1300)]
clk: Return -ENOSYS when system call is not available

Update clk_composite_set_parent() to use -ENOSYS, which is the correct
error code for U-Boot. Also rearrange the code so that the error condition
is clearly indicated and the function runs to the end in the normal case,
since this is the common style in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
3 years agoclk: Update drivers to use -EINVAL
Simon Glass [Wed, 24 Mar 2021 21:26:08 +0000 (10:26 +1300)]
clk: Update drivers to use -EINVAL

At present some drivers use -ENOSUPP to indicate that an unknown or
unsupported clock is used. Most use -EINVAL, indicating an invalid value,
so convert everything to that.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agotlv_eeprom: Return -ENOSYS when system call is not available
Simon Glass [Wed, 24 Mar 2021 21:26:07 +0000 (10:26 +1300)]
tlv_eeprom: Return -ENOSYS when system call is not available

When CMD_TLV_EEPROM is not enabled, use -ENOSYS, which is the correct
error code for U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agospi: Return -ENOSYS when system call is not available
Simon Glass [Wed, 24 Mar 2021 21:26:06 +0000 (10:26 +1300)]
spi: Return -ENOSYS when system call is not available

Update spi_controller_dma_map_mem_op_data() to use -ENOSYS, which is the
correct error code for U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agousb: Return -ENOSYS when system call is not available
Simon Glass [Wed, 24 Mar 2021 21:26:05 +0000 (10:26 +1300)]
usb: Return -ENOSYS when system call is not available

Update usb_gadget_release() to use -ENOSYS, which is the correct error
code for U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: core: Use -ENOSPC in acpi_get_path()
Simon Glass [Wed, 24 Mar 2021 21:26:04 +0000 (10:26 +1300)]
dm: core: Use -ENOSPC in acpi_get_path()

Update this function to use -ENOSPC which is more commly used when a buffer
runs out of space.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: core: Document the common error codes
Simon Glass [Wed, 24 Mar 2021 21:26:03 +0000 (10:26 +1300)]
dm: core: Document the common error codes

Driver model uses quite strong conventions on error codes, but these are
currently not clearly documented. Add a description of the commonly used
errors.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
3 years agopatman: Continue on if warnings are found outside a commit
Simon Glass [Mon, 22 Mar 2021 05:01:42 +0000 (18:01 +1300)]
patman: Continue on if warnings are found outside a commit

While we cannot know which commit the warning relates to, this should not
be fatal. Print the warning and carry on.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtc: Update the build rule for pylibfdt
Simon Glass [Sat, 27 Mar 2021 22:27:18 +0000 (11:27 +1300)]
dtc: Update the build rule for pylibfdt

Some versions of make complain about using a grouped target without a
recipe:

.../pylibfdt/Makefile:36: *** grouped targets must provide a recipe.  Stop.

Fix this by adding a dummy recipe.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoMerge tag 'rockchip-for-v2021.07' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Tue, 6 Apr 2021 02:39:10 +0000 (22:39 -0400)]
Merge tag 'rockchip-for-v2021.07' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

- Fix rk3368 lion board support;
- Fix px30 odroid-go2 board support;
- Add rk3399 NanoPi R4s and NanoPi M4B board support;

3 years agoMerge branch 'next'
Tom Rini [Mon, 5 Apr 2021 15:29:57 +0000 (11:29 -0400)]
Merge branch 'next'

3 years agoPrepare v2021.04
Tom Rini [Mon, 5 Apr 2021 15:03:29 +0000 (11:03 -0400)]
Prepare v2021.04

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoimx8mn_ddr4_evk: Allow booting the kernel by default
Fabio Estevam [Thu, 4 Mar 2021 11:07:16 +0000 (08:07 -0300)]
imx8mn_ddr4_evk: Allow booting the kernel by default

Currently it is not possible to boot Linux from the SD card
by default.

Make the necessary adjustments to allow it.

Reported-by: Peter Bergin <peter@berginkonsult.se>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Andrey Zhizhikin <andrey.z@gmail.com> # imx8mn_ddr4_evk
Reviewed-by: Peng Fan <peng.fan@nxp.com>