platform/kernel/u-boot.git
4 years agoenv/sf.c: drop private CMD_SAVEENV logic
Rasmus Villemoes [Wed, 19 Feb 2020 09:47:43 +0000 (09:47 +0000)]
env/sf.c: drop private CMD_SAVEENV logic

Deciding whether to compile the env_sf_save() function based solely on
CONFIG_SPL_BUILD is wrong: For U-Boot proper, it leads to a build
warning in case CONFIG_CMD_SAVEENV=n (because the env_save_ptr() macro
causes the function to indeed not be referenced anywhere). And for
SPL, when one selects CONFIG_SPL_SAVEENV, one obviously expects to
actually be able to save the environment.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4 years agoenv/ext4.c: remove CONFIG_CMD_SAVEENV ifdef
Rasmus Villemoes [Wed, 19 Feb 2020 09:47:42 +0000 (09:47 +0000)]
env/ext4.c: remove CONFIG_CMD_SAVEENV ifdef

Removing this ifdef/endif pair yields a "defined but unused warning"
for CONFIG_CMD_SAVEENV=n, but that vanishes if we use the ENV_SAVE_PTR
macro instead. This gives slightly better compile testing, and
moreover, it's possible to have

  CONFIG_CMD_SAVEENV=n
  CONFIG_SPL_SAVEENV=y
  SPL_ENV_IS_IN_EXT4=y

in which case env_ext4_save would erroneously not be compiled in.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4 years agoenv/fat.c: remove private CMD_SAVEENV logic
Rasmus Villemoes [Wed, 19 Feb 2020 09:47:41 +0000 (09:47 +0000)]
env/fat.c: remove private CMD_SAVEENV logic

Always compile the env_fat_save() function, and let
CONFIG_IS_ENABLED(SAVEENV) (via the ENV_SAVE_PTR macro) decide whether
it actually ends up being compiled in.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4 years agoenv_internal.h: add alternative ENV_SAVE_PTR macro
Rasmus Villemoes [Wed, 19 Feb 2020 09:47:40 +0000 (09:47 +0000)]
env_internal.h: add alternative ENV_SAVE_PTR macro

The current definition of the env_save_ptr does not take SPL_SAVEENV
into account. Moreover, the way it is implemented means that drivers
need to guard the definitions of their _save methods with ifdefs to
avoid "defined but unused" warnings in case CMD_SAVEENV=n.

The ifdeffery can be avoided by using a "something ? x : NULL"
construction instead and still have the compiler elide the _save
method when it is not referenced. Unfortunately we can't just switch
the existing env_save_ptr macro, since that would give a lot of build
errors unless all the ifdeffery is removed at the same time.
Conversely, removing that ifdeffery first would merely lead to the
"defined but unused" warnings temporarily, but for some storage
drivers it requires a bit more work than just removing their private
CMD_SAVEENV logic.

So introduce an alternative to env_save_ptr, which for lack of a
better name is simply uppercased, allowing one to update storage
drivers piecemeal to both reduce their ifdeffery and honour
CONFIG_SPL_SAVEENV.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4 years agoenv: add SAVEENV as an alias of the CMD_SAVEENV symbol
Rasmus Villemoes [Wed, 19 Feb 2020 09:47:39 +0000 (09:47 +0000)]
env: add SAVEENV as an alias of the CMD_SAVEENV symbol

Currently, testing whether to compile in support for saving the
environment is a bit awkward when one needs to take SPL_SAVEENV into
account, and quite a few storage drivers currently do not honour
SPL_SAVEENV.

To make it a bit easier to decide whether environment saving should be
enabled, introduce SAVEENV as an alias for the CMD_SAVEENV
symbol. Then one can simply use

  CONFIG_IS_ENABLED(SAVEENV)

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4 years agobootcount_ext: Add flag to enable/disable bootcount
Frédéric Danis [Tue, 17 Mar 2020 16:59:09 +0000 (17:59 +0100)]
bootcount_ext: Add flag to enable/disable bootcount

After a successful upgrade, multiple problem during boot sequence may
trigger the altbootcmd process.
This patch adds a version and an upgrade_available entries to the
bootcount file to enable/disable the bootcount check.
When failing to read the bootcount file it will consider that bootcount is
enabled, acting as previously, and update the file accordingly.

The bootcount file is only saved when `upgrade_available` is true, this
allows to save writes to the filesystem.

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agomake env_entry::callback conditional on !CONFIG_SPL_BUILD
Rasmus Villemoes [Thu, 27 Feb 2020 13:56:12 +0000 (13:56 +0000)]
make env_entry::callback conditional on !CONFIG_SPL_BUILD

The callback member of struct env_entry is always NULL for an SPL
build. Removing it thus saves a bit of run-time memory in the
SPL (when CONFIG_SPL_ENV_SUPPORT=y) since struct env_entry is embedded
in struct env_entry_node - i.e. about 2KB for the normal case of
512+change hash table entries.

Two small fixups are needed for this, all other references to the
callback member are already under !CONFIG_SPL_BUILD: Don't initialize
.callback in set_flags() - hsearch_r doesn't use that value
anyway. And make env_callback_init() initialize ->callback to NULL for
a new entry instead of relying on an unused or deleted entry having
NULL in ->callback.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agolib/hashtable.c: don't test ->callback in SPL
Rasmus Villemoes [Thu, 27 Feb 2020 13:56:11 +0000 (13:56 +0000)]
lib/hashtable.c: don't test ->callback in SPL

In SPL, environment callbacks are not supported, so e->callback is
always NULL. Removing this makes the SPL a little smaller (about 400
bytes in my ppc build) with no functional change.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agolib/hashtable.c: create helper for calling env_entry::callback
Rasmus Villemoes [Thu, 27 Feb 2020 13:56:11 +0000 (13:56 +0000)]
lib/hashtable.c: create helper for calling env_entry::callback

This is preparation for compiling out the "call the callback" code and
associated error handling for SPL, where ->callback is always NULL.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoenv: remove callback.o for an SPL build
Rasmus Villemoes [Thu, 27 Feb 2020 13:56:10 +0000 (13:56 +0000)]
env: remove callback.o for an SPL build

env.h says this about about callback declarations (U_BOOT_ENV_CALLBACK):

 * For SPL these are silently dropped to reduce code size, since environment
 * callbacks are not supported with SPL.

So env_callback_init() does a lot of work to not find anything in the
guaranteed empty env_clbk list. Drop callback.o entirely from the link
and stub out the only public function defined in callback.o. This cuts
about 600 bytes from the SPL on my ppc build.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoeth: mtk-eth: add mt7531 switch support in mediatek eth driver
Landen Chao [Tue, 18 Feb 2020 08:49:37 +0000 (16:49 +0800)]
eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
4 years agowatchdog: mpc8xx_wdt: Allow selection of watchdog mode through environment
Charles Frey [Wed, 19 Feb 2020 16:50:15 +0000 (16:50 +0000)]
watchdog: mpc8xx_wdt: Allow selection of watchdog mode through environment

The mpc8xx watchdog can work either in 'reset mode' or 'NMI mode'.
The selection can be done at startup only.
It is desirable to select the mode without rebuilding U-boot.
It is also desirable to disable the watchdog without rebuilding.

At watchdog startup, check environment variable 'watchdog_mode'.
If it is 'off', the watchdog is not started. If it is 'nmi',
the watchdog is started in NMI mode. Otherwise, it is started
in reset mode which is the default mode.

Signed-off-by: Charles Frey <charles.frey@c-s.fr>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
4 years agodm: pinctrl: Use right device pointer for configuring pinctrl
Lokesh Vutla [Wed, 22 Apr 2020 17:25:31 +0000 (22:55 +0530)]
dm: pinctrl: Use right device pointer for configuring pinctrl

commit 719cab6d2e2bf ("dm: pinctrl: convert pinctrl-single to livetree")
converted pinctrl driver to livetree. In this conversion, the call to
read pinctrl-single,pins/bits property is provided with pinctrl device
pointer instead of pinctrl config pointer. Because of this none of the
pins gets configured. Fix it by passing the right udevice pointer.

Fixes: 719cab6d2e2bf ("dm: pinctrl: convert pinctrl-single to livetree")
Reported-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 23 Apr 2020 12:24:47 +0000 (08:24 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-riscv

- Adds few DT related fixes required for Linux EFI stub to work on
  RISC-V.
- Makes SBI v0.2 the default SBI version to work with OpenSBI v0.7.
- Revert "riscv: qemu: clear kernel-start/-end in device tree as
  workaround for BBL"
- Remove unnecessary CONFIG_IS_ENABLED().

4 years agoriscv: Move all fdt fixups together
Atish Patra [Tue, 21 Apr 2020 18:15:04 +0000 (11:15 -0700)]
riscv: Move all fdt fixups together

Keep all the fdt fixups together for better code management.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoriscv: Copy the reserved-memory nodes to final DT
Atish Patra [Tue, 21 Apr 2020 18:15:03 +0000 (11:15 -0700)]
riscv: Copy the reserved-memory nodes to final DT

The DT used by U-Boot may be different from the DT being passed to
the OS if the DT is loaded from external media such as network or
mmc. In that case, the reserved-memory node needs to be copied to
the DT passed to the OS.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoriscv: Setup reserved-memory node for FU540
Atish Patra [Tue, 21 Apr 2020 18:15:02 +0000 (11:15 -0700)]
riscv: Setup reserved-memory node for FU540

FU540 uses OF_SEPARATE instead of OF_PRIOR_STAGE.

Enable OF_BOARD_FIXUP to update the DT with reserved-memory node.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoriscv: Provide a mechanism to fix DT for reserved memory
Atish Patra [Tue, 21 Apr 2020 18:15:01 +0000 (11:15 -0700)]
riscv: Provide a mechanism to fix DT for reserved memory

In RISC-V, M-mode software can reserve physical memory regions
by setting appropriate physical memory protection (PMP) csr. As the
PMP csr are accessible only in M-mode, S-mode U-Boot can not read
this configuration directly. However, M-mode software can pass this
information via reserved-memory node in device tree so that S-mode
software can access this information.

This patch provides a framework to copy to the reserved-memory node
from one DT to another. This will be used to update the DT used by
U-Boot and the DT passed to the next stage OS.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agofdtdec: Fix boundary check
Atish Patra [Tue, 21 Apr 2020 18:15:00 +0000 (11:15 -0700)]
fdtdec: Fix boundary check

In U-Boot, the reserved memory end address is considered as a inclusive
address. This notion is followed while adding a reserved memory node to
the DT.

For example:
end_address = start_address + size - 1

Follow the same notion and fix the end address computation while checking
for existing nodes.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoriscv: Add boot hartid to device tree
Atish Patra [Tue, 21 Apr 2020 18:14:59 +0000 (11:14 -0700)]
riscv: Add boot hartid to device tree

Linux booting protocol mandates that register "a0" contains the hartid.
However, U-Boot can not pass the hartid via a0 during standard UEFI
protocol. DT nodes are commonly used to pass such information to the OS.

Add a DT node under chosen node to indicate the boot hartid. EFI stub
in Linux kernel will parse this node and pass it to the real kernel
in "a0" before jumping to it.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoriscv: Make SBI v0.2 the default SBI version
Bin Meng [Thu, 16 Apr 2020 15:09:33 +0000 (08:09 -0700)]
riscv: Make SBI v0.2 the default SBI version

To work with latest OpenSBI release (v0.7 or above) that has the HSM
extension support, select the SBI v0.2 support by default.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
4 years agoriscv: Add Kconfig option for SBI v0.2
Bin Meng [Thu, 16 Apr 2020 15:09:32 +0000 (08:09 -0700)]
riscv: Add Kconfig option for SBI v0.2

SBI v0.2 is more scalable and extendable to handle future needs
for RISC-V supervisor interfaces. For example, with SBI v0.2 HSM
extension, only a single hart need to boot and enter operating
system. The booting hart can bring up secondary harts one by one
afterwards.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
4 years agoriscv: Add SMP Kconfig option dependency for U-Boot proper
Bin Meng [Thu, 16 Apr 2020 15:09:31 +0000 (08:09 -0700)]
riscv: Add SMP Kconfig option dependency for U-Boot proper

U-Boot proper running in S-mode only need SMP support when using
SBI v0.1. With SBI v0.2 HSM extension, it does not need implement
multicore boot in U-Boot proper.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
4 years agoriscv: Introduce SPL_SMP Kconfig option for U-Boot SPL
Bin Meng [Thu, 16 Apr 2020 15:09:30 +0000 (08:09 -0700)]
riscv: Introduce SPL_SMP Kconfig option for U-Boot SPL

With SBI v0.2 HSM extension, only a single hart need to boot and
enter operating system. The booting hart can bring up secondary
harts one by one afterwards.

For U-Boot running in SPL, SMP can be turned on, while in U-Boot
proper, SMP can be optionally turned off if using SBI v0.2 HSM.

Introduce a new SPL_SMP Kconfig option to support this.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
4 years agoriscv: Merge unnecessary SMP ifdefs in start.S
Bin Meng [Thu, 16 Apr 2020 15:09:29 +0000 (08:09 -0700)]
riscv: Merge unnecessary SMP ifdefs in start.S

Two consecutive SMP ifdefs blocks can be combined into one.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
4 years agoriscv: qemu: Remove the simple-bus driver for the SoC node
Bin Meng [Thu, 16 Apr 2020 15:09:28 +0000 (08:09 -0700)]
riscv: qemu: Remove the simple-bus driver for the SoC node

Prior to QEMU v3.1.0, QEMU generated the 'virt' SoC node with a
"riscv-virtio-soc" compatible string, and a "simple-bus" driver
was created to accommodate that special case in U-Boot.

Starting from QEMU v3.1.0, the SoC node was set as a "simple-bus",
hence the special simple-bus driver is no longer needed.

Update the doc to mention the latest tested QEMU version 4.2.0.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoRevert "riscv: qemu: clear kernel-start/-end in device tree as workaround for BBL"
Lukas Auer [Tue, 14 Apr 2020 21:24:46 +0000 (23:24 +0200)]
Revert "riscv: qemu: clear kernel-start/-end in device tree as workaround for BBL"

The commit was added as a workaround required in QEMU when using BBL as
the supervisor binary interface (SBI) for Linux. We are now using
OpenSBI to provide the SBI, the workaround is therefore not required
anymore and can be removed.

This reverts commit 897206c5cc5c6ac0dc2ab851044e42baada3785b.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoriscv: ax25: cache: Remove SPL_RISCV_MMODE config check
Pragnesh Patel [Sat, 14 Mar 2020 13:42:28 +0000 (19:12 +0530)]
riscv: ax25: cache: Remove SPL_RISCV_MMODE config check

CONFIG_IS_ENABLED(FOO) will check FOO config option for U-Boot,
SPL and TPL, so remove unnecessary CONFIG_IS_ENABLED()

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Wed, 22 Apr 2020 17:00:21 +0000 (13:00 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- mvebu bubt cmd: Add A38x support (Joel)
- Clearfog: Fix SCSI boot duplication (Joel)
- Armada-37xx: Fix DDR PHY clock divider values (Marek)

4 years agoMerge tag 'mmc-2020-4-22' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Wed, 22 Apr 2020 12:58:41 +0000 (08:58 -0400)]
Merge tag 'mmc-2020-4-22' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc

- iproc_sdhci memory leak fix and enable R1B resp quirk
- more mmc cmds and several mmc updates from Heinirich
- Use bounce buffer for tmio sdhci
- Alignment check for tmio sdhci

4 years agodrivers: mmc: rpmb: do not build for SPL
Heinrich Schuchardt [Wed, 15 Apr 2020 16:28:09 +0000 (18:28 +0200)]
drivers: mmc: rpmb: do not build for SPL

RPMB support is used by the 'mmc rpmb' command and by the OP-TEE support.
We do not need it in SPL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agospl: mmc: Rename spl_boot_partition() to spl_mmc_boot_partition()
Harald Seiler [Wed, 15 Apr 2020 09:33:31 +0000 (11:33 +0200)]
spl: mmc: Rename spl_boot_partition() to spl_mmc_boot_partition()

This function is only relevant to the MMC driver so calling it
spl_boot_partition() might be confusing.  Rename it to
spl_mmc_boot_partition() to make its purpose more clear (and bring
it in line with spl_mmc_boot_mode()).

Signed-off-by: Harald Seiler <hws@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agospl: mmc: Rename spl_boot_mode() to spl_mmc_boot_mode()
Harald Seiler [Wed, 15 Apr 2020 09:33:30 +0000 (11:33 +0200)]
spl: mmc: Rename spl_boot_mode() to spl_mmc_boot_mode()

The function's name is misleading as one might think it is used
generally to select the boot-mode when in reality it is only used by the
MMC driver to find out in what way it should try reading U-Boot Proper
from a device (either using a filesystem, a raw sector/partition, or an
eMMC boot partition).

Rename it to spl_mmc_boot_mode() to make it more obvious what this
function is about.

Link: https://lists.denx.de/pipermail/u-boot/2020-April/405979.html
Signed-off-by: Harald Seiler <hws@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agommc: tmio: sdhi: Implement get_b_max function
Marek Vasut [Sat, 4 Apr 2020 10:45:06 +0000 (12:45 +0200)]
mmc: tmio: sdhi: Implement get_b_max function

Implement get_b_max() for the Renesas R-Car SDHI controller driver, limit
the b_max per hardware capabilities such that select Gen2 controllers have
16bit block transfer limit, the rest has 32bit block transfer limit and on
Gen3, the block transfer limit on addresses above the 32bit boundary is set
to 1/4 of the malloc area.

Originally, on Gen3, the block transfers above the 32bit area were limited
to PIO only, which resulted in (R8A7795 Salvator-X , HS200 eMMC):
  => time mmc read 0x0000000700000000 0 0x10000
  time: 0.151 seconds
  => time mmc read 0x0000000700000000 0 0x100000
  time: 11.090 seconds
with bounce buffer in place and b_max adjustment in place:
  => time mmc read 0x0000000700000000 0 0x10000
  time: 0.156 seconds
  => time mmc read 0x0000000700000000 0 0x100000
  time: 2.349 seconds

Note that the bounce buffer does mallocate and free the bounce buffer
for every transfer. Experiment which removes this results in further
increase of read speed, from 2.349s to 2.156s per 512 MiB of data,
which is not such a significant improvement anymore. It might however
be interesting to have bounce buffer directly in the MMC core or even
block core.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
4 years agommc: Add option to adjust b_max before long read
Marek Vasut [Sat, 4 Apr 2020 10:45:05 +0000 (12:45 +0200)]
mmc: Add option to adjust b_max before long read

Add getter function which permits adjusting the maximum number of
blocks that could be read in a single sustained read transfer based
on the location of the source/target buffer and length, before such
transfer starts.

This is mainly useful on systems which have various DMA restrictions
for different memory locations, e.g. DMA limited to 32bit addresses,
and where a bounce buffer is used to work around such restrictions.
Since the U-Boot bounce buffer is mallocated, it's size is limited
by the malloc area size, and the read transfer to such a buffer must
also be limited. However, as not all areas are limited equally, the
b_max should be adjusted accordinly as needed to avoid degrading
performance unnecessarily.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
4 years agommc: tmio: sdhi: Use bounce buffer to avoid DMA limitations
Marek Vasut [Sat, 4 Apr 2020 10:45:04 +0000 (12:45 +0200)]
mmc: tmio: sdhi: Use bounce buffer to avoid DMA limitations

The R-Car SDHI DMA controller has various restrictions. To work around
those restrictions without falling back to PIO, implement bounce buffer
with custom alignment check function which tests for those limitations.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
4 years agoARM: rmobile: Increase malloc area size
Marek Vasut [Sat, 4 Apr 2020 10:45:03 +0000 (12:45 +0200)]
ARM: rmobile: Increase malloc area size

Increase the malloc area size significantly to cater for bounce buffer
used by the SDHI driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
4 years agocommon: bouncebuf: Permit passing custom alignment check function
Marek Vasut [Sat, 4 Apr 2020 10:45:02 +0000 (12:45 +0200)]
common: bouncebuf: Permit passing custom alignment check function

Add extended version of the bounce_buffer_start(), which permits passing in
a custom alignment checker function for the buffer. This is useful e.g. on
systems with various DMA restrictions and where the checker function might
be more complex than a simple CPU cache alignment check.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
4 years agommc: adjust Kconfig for mmc sub-commands
Heinrich Schuchardt [Tue, 31 Mar 2020 17:39:28 +0000 (17:39 +0000)]
mmc: adjust Kconfig for mmc sub-commands

All sub-commands of the mmc command should be shown in the Kconfig menu
next to the mmc command. This includes:

* mmc bkops
* mmc rpmb
* mmc swrite

The mmc rpmb sub-command is not usable without CONFIG_SUPPORT_EMMC_RPMB.
Add the missing dependency.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agodrivers: mmc: iproc_sdhci: move host.mmc init before sdhci_setup_cfg
Rayagonda Kokatanur [Tue, 31 Mar 2020 05:34:06 +0000 (11:04 +0530)]
drivers: mmc: iproc_sdhci: move host.mmc init before sdhci_setup_cfg

move host.mmc before sdhci_setup_cfg

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
4 years agodrivers: mmc: iproc_sdhci: fix compilation warning
Rayagonda Kokatanur [Tue, 31 Mar 2020 05:34:05 +0000 (11:04 +0530)]
drivers: mmc: iproc_sdhci: fix compilation warning

set_ios_post return type changed from void to int, correcting
the same to fix compilation warning.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
4 years agodrivers: mmc: iproc_sdhci: enable broken R1B response quirk
Bharat Kumar Reddy Gooty [Tue, 31 Mar 2020 05:34:04 +0000 (11:04 +0530)]
drivers: mmc: iproc_sdhci: enable broken R1B response quirk

Enable SDHCI_QUIRK_BROKEN_R1B quirk.

Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
4 years agodrivers: mmc: iproc_sdhci: fix possible memory leak
Bharat Kumar Reddy Gooty [Tue, 31 Mar 2020 05:34:03 +0000 (11:04 +0530)]
drivers: mmc: iproc_sdhci: fix possible memory leak

Free the pointer variable 'iproc_sdhci' upon failure to fix
possible memory leak.

Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
4 years agocmd: mmc: provide boot area protection command
Heinrich Schuchardt [Mon, 30 Mar 2020 05:24:19 +0000 (07:24 +0200)]
cmd: mmc: provide boot area protection command

Provide command 'mmc wp' to power on write protect boot areas on eMMC
devices.

The B_PWR_WP_EN bit in the extended CSD register BOOT_WP is set. The boot
area are write protected until the next power cycle occurs.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agocmd: mmc: display write protect state of boot partition
Heinrich Schuchardt [Mon, 30 Mar 2020 05:24:18 +0000 (07:24 +0200)]
cmd: mmc: display write protect state of boot partition

Boot partitions of eMMC devices can be power on or permanently write
protected. Let the 'mmc info' command display the protection state.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agommc: export mmc_send_ext_csd()
Heinrich Schuchardt [Mon, 30 Mar 2020 05:24:17 +0000 (07:24 +0200)]
mmc: export mmc_send_ext_csd()

Export function mmc_send_ext_csd() for reading the extended CSD register.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agommc: EXT_CSD registers for write protection
Heinrich Schuchardt [Mon, 30 Mar 2020 05:24:16 +0000 (07:24 +0200)]
mmc: EXT_CSD registers for write protection

Add the EXT_CSD register definition related to write protection.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agocmd: mvebu: bubt: show image boot device
Joel Johnson [Fri, 17 Apr 2020 15:38:08 +0000 (09:38 -0600)]
cmd: mvebu: bubt: show image boot device

When a mismatch is found trying to write an image for one boot method
to a different boot device, print an error message including the image
header marked target boot device type.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: clearfog: enable bubt command
Joel Johnson [Fri, 17 Apr 2020 15:38:07 +0000 (09:38 -0600)]
arm: mvebu: clearfog: enable bubt command

With support added for Armada 38x, include the bubt command in
ClearFog defconfig.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agocmd: mvebu: bubt: verify A38x target device type
Joel Johnson [Fri, 17 Apr 2020 15:38:06 +0000 (09:38 -0600)]
cmd: mvebu: bubt: verify A38x target device type

Ensure that the device to which an image is being written includes
header information indicating boot support for the destination
device.

This is derived from the support in the SolidRun master-a38x vendor
fork.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agocmd: mvebu: bubt: correct U-Boot spelling
Joel Johnson [Fri, 17 Apr 2020 15:38:05 +0000 (09:38 -0600)]
cmd: mvebu: bubt: correct U-Boot spelling

Replace "U-BOOT" text with correct spelling

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agocmd: mvebu: bubt: add A38x support
Joel Johnson [Fri, 17 Apr 2020 15:38:04 +0000 (09:38 -0600)]
cmd: mvebu: bubt: add A38x support

Add support for Armada 38x devices in bubt flashing utility.
This is based on (and streamlined from) the support in the SolidRun
master-a38x vendor fork.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: correct SPL boot configs for SPI/MMC
Joel Johnson [Fri, 17 Apr 2020 07:19:05 +0000 (01:19 -0600)]
arm: mvebu: correct SPL boot configs for SPI/MMC

Update mvebu SPL boot selection mechanism for the move to driver model
usage by ensuring that the required driver support for SPI and MMC
booting is available in SPL when the respective boot method is
selected.

Previously, all mvebu boards selected a boot method (implicitly
MVEBU_SPL_BOOT_DEVICE_SPI for many) even if SPL booting wasn't used.
This changes mvebu boot method selection to depend on SPL usage which
resolves the issue with aarch64 boards which don't use SPL getting an
implicit boot device selection resulting in unmet dependencies. The
32-bit arm boards do use SPL, but I'm led to conclude that most aren't
intentionally using the MVEBU_SPL_BOOT_DEVICE selection since none have
SPL_DM_SPI enabled in their defconfig even though they still implicitly
select the SPI boot method.

This also results in the new addition of SPL_GPIO_SUPPORT to helios4.
The mainline dts for helios4 includes the cd-gpios entry for sdhci with
identical addresses as the clearfog dts. I don't have a helios4 board
to confirm, but based on the current source conclude that the board
itself is either wired to pull the signal low for eMMC, or the default
MMC boot isn't fully functional in mainline. In either case, as far as
I can tell, including the GPIO support will at least cause no
regression.

Tested on SolidRun ClearFog devices.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: clearfog: adjust SCSI boot duplication
Joel Johnson [Fri, 17 Apr 2020 07:06:53 +0000 (01:06 -0600)]
arm: mvebu: clearfog: adjust SCSI boot duplication

Fix duplication resulting from merging of multiple related series.
Commits cecf38a75bd02fd29f, and 201a500de added or adjusted SCSI
boot support for ClearFog, but in slightly different locations which
didn't result in a merge conflict.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoclk: armada-37xx-periph: fix DDR PHY clock divider values
Marek Behún [Tue, 14 Apr 2020 22:59:18 +0000 (00:59 +0200)]
clk: armada-37xx-periph: fix DDR PHY clock divider values

Register value table for DDR PHY clock divider are wrong. They should be
0 or 1 for divide-by-2 or divide-by-4, respectively. Not 1 or 2. Current
values do not make sense, since 2 cannot be achieved, because the
register is only 1 bit long (mask is set to 1).

This fixes clk dump reporting DDR PHY clock rate differently from Linux.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoMerge tag 'dm-pull-21apr20' of git://git.denx.de/u-boot-dm
Tom Rini [Tue, 21 Apr 2020 21:53:23 +0000 (17:53 -0400)]
Merge tag 'dm-pull-21apr20' of git://git.denx.de/u-boot-dm

Various improvements to buildman summary output

4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
Tom Rini [Tue, 21 Apr 2020 19:20:42 +0000 (15:20 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq

- Backplane support and bug fixes

4 years agobuildman: Change the exit codes
Simon Glass [Thu, 9 Apr 2020 16:49:45 +0000 (10:49 -0600)]
buildman: Change the exit codes

The current exit codes of 128 and 129 are useful in that they do not
conflict with those returned by tools, but they are not actually valid.
It seems better to pick some codes which work with 'bit bisect run'.

Update them to 100 (for errors) and 101 (for warnings).

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Update the TODO items
Simon Glass [Thu, 9 Apr 2020 21:08:54 +0000 (15:08 -0600)]
buildman: Update the TODO items

A few of these have been done. Drop those and add some new ideas.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Add an option to ignore migration warnings
Simon Glass [Thu, 9 Apr 2020 21:08:53 +0000 (15:08 -0600)]
buildman: Add an option to ignore migration warnings

These are becoming more common now. They cause boards to show warnings
which can be mistaking for compiler warnings.

Add a buildman option to ignore them. This option works only with the
summary option (-s). It does not affect the build process.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Add an option to ignore device-tree warnings
Simon Glass [Thu, 9 Apr 2020 21:08:52 +0000 (15:08 -0600)]
buildman: Add an option to ignore device-tree warnings

Unfortunately the plague of device-tree warnings has not lifted. These
warnings infiltrate almost every build, adding noise and confusion.

Add a buildman option to ignore them. This option works only with the
summary option (-s). It does not affect the build process.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Make -I the default
Simon Glass [Thu, 9 Apr 2020 21:08:51 +0000 (15:08 -0600)]
buildman: Make -I the default

At present buildman defaults to running 'mrproper' on every thread before
it starts building commits for each board. This can add a delay of about 5
seconds to the start of the process, since the tools and other invariants
must be rebuilt.

In particular, a build without '-b', to build current source, runs much
slower without -I, since any existing build is removed, thus losing the
possibility of an incremental build.

Partly this behaviour was to avoid strange build-system problems caused by
running 'make defconfig' for one board and then one with a different
architecture. But these problems were fixed quite a while ago.

The -I option (which disabled mrproper) was introduced four years ago and
does not seem to cause any problems with builds.

So make -I the default and deprecate the option. To allow use of
'mrproper', add a new -m flag.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Update workflow documentation with more detail
Simon Glass [Thu, 9 Apr 2020 21:08:50 +0000 (15:08 -0600)]
buildman: Update workflow documentation with more detail

Make a few additions and change some wording in the workflow
documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Add the abbreviation for --boards
Simon Glass [Thu, 9 Apr 2020 21:08:49 +0000 (15:08 -0600)]
buildman: Add the abbreviation for --boards

This option may be frequency used, so mention that it can be abbreviated
to --bo

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Update the 'theory of operation' a little
Simon Glass [Thu, 9 Apr 2020 21:08:48 +0000 (15:08 -0600)]
buildman: Update the 'theory of operation' a little

Make a few updates to this important section of the documentation, to
make things clearer.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Show a summary of the build result
Simon Glass [Thu, 9 Apr 2020 21:08:47 +0000 (15:08 -0600)]
buildman: Show a summary of the build result

When buildman finishes it leaves the last summary line visible, which
shows the number of successful builds, builds with warnings and builds
with errors.

It is useful also to see how many builds were done in total along with
the time taken. Show these on a separate line before buildman finishes.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Limit the length of progress messages
Simon Glass [Thu, 9 Apr 2020 21:08:46 +0000 (15:08 -0600)]
buildman: Limit the length of progress messages

If a progress message is longer than the terminal line it will scroll the
terminal. Limit the messages to the terminal width.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Show the number of builds remaining
Simon Glass [Thu, 9 Apr 2020 21:08:45 +0000 (15:08 -0600)]
buildman: Show the number of builds remaining

It is nice to see the actual number of builds remaining to complete. Add
this in the progress message, using a different colour.

Drop the unnecessary 'name' variable while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Drop unused output code
Simon Glass [Thu, 9 Apr 2020 21:08:44 +0000 (15:08 -0600)]
buildman: Drop unused output code

The commit counter is a hangover from when buildman processed each board
for a commit. Now buildman processes each commit for a board, so this
output is never triggered.

Delete it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Show a message when fetching a repo
Simon Glass [Thu, 9 Apr 2020 21:08:43 +0000 (15:08 -0600)]
buildman: Show a message when fetching a repo

Fetching updated versions of a repo can take time. At present buildman
gives no indication that it is doing this.

Add a message to explain the delay.

Tidy up a few other messages while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Drop the line-clearing code in Builder
Simon Glass [Thu, 9 Apr 2020 21:08:42 +0000 (15:08 -0600)]
buildman: Drop the line-clearing code in Builder

The new feature in terminal can be used by buildman. Update the Builder
class accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agopatman: Support limiting output to a single line
Simon Glass [Thu, 9 Apr 2020 21:08:41 +0000 (15:08 -0600)]
patman: Support limiting output to a single line

When outputing a progress line we don't want it to go past the end of the
current terminal line, or it will not be possible to erase it. Add an
option to Print() which allows limiting the output to the terminal width.

Since ANSI sequences do not take up space on the terminal, these are
removed.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agopatman: Support erasing a previously unfinished text line
Simon Glass [Thu, 9 Apr 2020 21:08:40 +0000 (15:08 -0600)]
patman: Support erasing a previously unfinished text line

When printing progress it is useful to print a message and leave the
cursor at the end of the line until the operation is finished. When it is
finished, the line needs to be erased so a new line can start in its place.

Add a function to handle clearing a line previously written by
terminal.Print()

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agopatman: Update flushing Print() for Python 3
Simon Glass [Thu, 9 Apr 2020 21:08:39 +0000 (15:08 -0600)]
patman: Update flushing Print() for Python 3

This does not seem to work on Python 3. Update the code to use the
built-in support.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Use spaces in the board list
Simon Glass [Thu, 9 Apr 2020 21:08:38 +0000 (15:08 -0600)]
buildman: Use spaces in the board list

At present the board names shown with -l are separated by commas. This
makes it hard to double-click to select a particular board. Also it is not
possible to select all boards and paste them as arguments to a subsequent
buildman run, since buildman requires spaces to separate the list on the
command line, not commas.

Change the output format to use spaces instead of commas.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Show the list of boards in magenta
Simon Glass [Thu, 9 Apr 2020 21:08:37 +0000 (15:08 -0600)]
buildman: Show the list of boards in magenta

It is quite hard to see the list of board for each error line since the
colour is the same as the actual error line. Show the board list in
magenta so that it is easier to distinguish them.

There is no point in checking the colour of the overall line, since there
are now multiple colours. So drop those tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Use an object to hold error lines
Simon Glass [Thu, 9 Apr 2020 21:08:36 +0000 (15:08 -0600)]
buildman: Use an object to hold error lines

At present the string for each error line is created in _CalcErrorDelta()
and used to create the summary output. This is inflexible since all the
information (error/warning character, error line, list of boards with that
error line) is munged together in a string.

Create an object to hold this information and only convert it to a string
when printing the actual output.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Use yellow consistently for warning lines
Simon Glass [Thu, 9 Apr 2020 21:08:35 +0000 (15:08 -0600)]
buildman: Use yellow consistently for warning lines

At present warnings are shown in yellow in the summary (-s) but magenta in
the detail listing (-e). Use yellow in both.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Test the output with --list-error-boards
Simon Glass [Thu, 9 Apr 2020 21:08:34 +0000 (15:08 -0600)]
buildman: Test the output with --list-error-boards

Add a test to cover this flag, which adds the name of each board to each
error/warning line.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Add a test helper for creating a line prefix
Simon Glass [Thu, 9 Apr 2020 21:08:33 +0000 (15:08 -0600)]
buildman: Add a test helper for creating a line prefix

The split/join code is repeated in a lot of places. Add a function to
handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Split out testOutput() into separate functions
Simon Glass [Thu, 9 Apr 2020 21:08:32 +0000 (15:08 -0600)]
buildman: Split out testOutput() into separate functions

We want to add a few more tests similar to testOutput(). Split its logic
into a function which runs buildman to get the output and another which
checks the output. This will make it easier to reuse the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Create temp directory in test setup
Simon Glass [Thu, 9 Apr 2020 21:08:31 +0000 (15:08 -0600)]
buildman: Create temp directory in test setup

Rather than having a few tests handle this themselves, create the
temporary directory in the setUp() method and remove it in tearDown().
This will make it easier to add more tests.

Only testOutput and testGit() actually need it, but it doesn't add to the
test time noticeably to do this for all tests in this file.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Use an iterator to check test output
Simon Glass [Thu, 9 Apr 2020 21:08:30 +0000 (15:08 -0600)]
buildman: Use an iterator to check test output

Rather than using the absolute array index, use an interator to work
through the expected output lines. This is easier to follow.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Add test coverage for error/warning colour
Simon Glass [Thu, 9 Apr 2020 21:08:29 +0000 (15:08 -0600)]
buildman: Add test coverage for error/warning colour

Buildman should output the right colours for each error/warning line. Some
of these checks are missing. Add them.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Refactor error-line output int a function
Simon Glass [Thu, 9 Apr 2020 21:08:28 +0000 (15:08 -0600)]
buildman: Refactor error-line output int a function

Reduce the amount of repeated code by creating an _OutputErrLines()
function to hold this code.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoMerge tag 'for-v2020.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c
Tom Rini [Tue, 21 Apr 2020 12:28:13 +0000 (08:28 -0400)]
Merge tag 'for-v2020.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c

i2c changes for 2020.07
- add new i2c driver for Broadcom iproc-based socs
- fix cmd: eeprom: Staticize eeprom_i2c_bus
- i2c: muxes: pca954x: add PCA9546 variant

4 years agoMerge tag 'for-v2020.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-ubi
Tom Rini [Tue, 21 Apr 2020 12:27:56 +0000 (08:27 -0400)]
Merge tag 'for-v2020.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-ubi

new ubi command for renaming an UBI volume

4 years agommc: tmio: sdhi: Add DMA transfer address alignment check at writing
Hiroyuki Yokoyama [Sat, 7 Mar 2020 16:32:59 +0000 (17:32 +0100)]
mmc: tmio: sdhi: Add DMA transfer address alignment check at writing

In R-Car Gen 3, there is a DMA controller restriction of SDHI.
When the transfer exceeding the 4 kByte boundary is performed while
the DRAM address is not 128 byte aligned, the bus is occupied.
This patch avoids this.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
4 years agoMerge branch '2020-04-17-master-imports'
Tom Rini [Mon, 20 Apr 2020 21:22:47 +0000 (17:22 -0400)]
Merge branch '2020-04-17-master-imports'

- Further cleanups for 'make refcheckdocs'
- Another BTRFS fix.
- Support for automatic decompression of images with booti as well as
  unlz4 command for manual decompression.

4 years agoMerge tag 'u-boot-amlogic-20200420' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Mon, 20 Apr 2020 17:44:27 +0000 (13:44 -0400)]
Merge tag 'u-boot-amlogic-20200420' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic

- enable DM_RNG on meson boards
- fix SMBIOS info on Odroid-C2
- Fix video output on GXBB/GXL/GXM boards
- add USB gadget support for GXL/GXM boards

4 years agofs: btrfs: support sparse extents
Marek Behún [Mon, 30 Mar 2020 16:48:42 +0000 (18:48 +0200)]
fs: btrfs: support sparse extents

When logical address of a regular extent is 0, the extent is sparse and
consists of all zeros.

Without this when sparse extents are used in a file reading fails with
  Cannot map logical address 0 to physical

Signed-off-by: Marek Behún <marek.behun@nic.cz>
4 years agoMerge tag 'ti-v2020.07-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
Tom Rini [Mon, 20 Apr 2020 15:14:22 +0000 (11:14 -0400)]
Merge tag 'ti-v2020.07-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti

- Fix boot on am335x guardian board
- Increase OPSI speed on AM65x and J721E devices
- Use JTAD register for identifying K3 devices.
- Update TI entry in MAINTAINERS file.

4 years agoMerge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Mon, 20 Apr 2020 12:45:27 +0000 (08:45 -0400)]
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

4 years agoconfigs: libretech-s912-pc: Enable USB gadget with Mass Storage function
Neil Armstrong [Mon, 30 Mar 2020 09:27:32 +0000 (11:27 +0200)]
configs: libretech-s912-pc: Enable USB gadget with Mass Storage function

Enable configs to support USB gadget and Mass Storage

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoconfigs: libretech-s905d-pc: Enable USB gadget with Mass Storage function
Neil Armstrong [Mon, 30 Mar 2020 09:27:31 +0000 (11:27 +0200)]
configs: libretech-s905d-pc: Enable USB gadget with Mass Storage function

Enable configs to support USB gadget and Mass Storage

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoconfigs: khadas-vim: Enable USB gadget with Mass Storage function
Neil Armstrong [Mon, 30 Mar 2020 09:27:30 +0000 (11:27 +0200)]
configs: khadas-vim: Enable USB gadget with Mass Storage function

Enable configs to support USB gadget and Mass Storage

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoconfigs: khadas-vim2: Enable USB gadget with Mass Storage function
Neil Armstrong [Mon, 30 Mar 2020 09:27:29 +0000 (11:27 +0200)]
configs: khadas-vim2: Enable USB gadget with Mass Storage function

Enable configs to support USB gadget and Mass Storage

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoconfigs: libretech-ac: Enable USB gadget with Mass Storage function
Neil Armstrong [Mon, 30 Mar 2020 09:27:28 +0000 (11:27 +0200)]
configs: libretech-ac: Enable USB gadget with Mass Storage function

Enable configs to support USB gadget and Mass Storage

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoconfigs: libretech-cc: Enable USB gadget with Mass Storage function
Neil Armstrong [Mon, 30 Mar 2020 09:27:27 +0000 (11:27 +0200)]
configs: libretech-cc: Enable USB gadget with Mass Storage function

Enable configs to support USB gadget and Mass Storage

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoarm: dts: meson-gxl: Add USB Gadget nodes for U-Boot
Neil Armstrong [Mon, 30 Mar 2020 09:27:26 +0000 (11:27 +0200)]
arm: dts: meson-gxl: Add USB Gadget nodes for U-Boot

Add the USB DWC2 node to u-boot specific dtsi files since Gadget
support is not (yet) available in upstream Linux yet.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>