oweals/u-boot.git
5 years agospi: mpc8xxx: Rename variable
Mario Six [Sun, 28 Apr 2019 20:28:48 +0000 (01:58 +0530)]
spi: mpc8xxx: Rename variable

The variable "char_size" holds the number of bits to be transferred in
the current loop iteration. A better name would be "xfer_bitlen", which
we rename this variable to.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Make code more readable
Mario Six [Sun, 28 Apr 2019 20:28:47 +0000 (01:58 +0530)]
spi: mpc8xxx: Make code more readable

Introduce the to_prescale_mod and set_char_len inline functions to make
the code more readable.

Note that the added "if (bitlen > 16)" check does not change the
semantics of the current code, and hence only preserves the current
error (this will be fixed in a later patch in the series).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Reduce scope of loop variables
Mario Six [Sun, 28 Apr 2019 20:28:46 +0000 (01:58 +0530)]
spi: mpc8xxx: Reduce scope of loop variables

The transmission loop starts with setting some variables, which are only
used inside the loop. Reduce the scope to the loop to make the
declaration and initialization of these variables coincide.

In the case of char_size this also always initializes the variable
immediately with the final value actually used in the loop (instead of
the placeholder value 32).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Simplify logic a bit
Mario Six [Sun, 28 Apr 2019 20:28:45 +0000 (01:58 +0530)]
spi: mpc8xxx: Simplify logic a bit

We do nothing in the loop if the "not empty" event was not detected. To
simplify the logic, check if this is the case, and skip the execution of
the loop early to reduce the nesting level and flag checking.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Get rid of is_read
Mario Six [Sun, 28 Apr 2019 20:28:44 +0000 (01:58 +0530)]
spi: mpc8xxx: Get rid of is_read

Get rid of the is_read variable, and just keep the state of the "not
empty" and "not full" events in two boolean variables within the loop
body.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Simplify if
Mario Six [Sun, 28 Apr 2019 20:28:43 +0000 (01:58 +0530)]
spi: mpc8xxx: Simplify if

Instead of having a nested if block, just have two branches within the
overarching if block to eliminate one nesting level.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Use IO accessors
Mario Six [Sun, 28 Apr 2019 20:28:42 +0000 (01:58 +0530)]
spi: mpc8xxx: Use IO accessors

Accesses to the register map are currently done by directly reading and
writing the structure.

Switch to the appropriate IO accessors instead.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Replace defines with enums
Mario Six [Sun, 28 Apr 2019 20:28:41 +0000 (01:58 +0530)]
spi: mpc8xxx: Replace defines with enums

Replace pre-processor defines with proper enums, and use the BIT macro
where applicable.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Fix function names in strings
Mario Six [Sun, 28 Apr 2019 20:28:40 +0000 (01:58 +0530)]
spi: mpc8xxx: Fix function names in strings

Replace the function name with a "%s" format string and the __func__
variable in debug statements (as proposed by checkpatch).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Fix space after cast
Mario Six [Sun, 28 Apr 2019 20:28:39 +0000 (01:58 +0530)]
spi: mpc8xxx: Fix space after cast

Fix all "superfluous space after case" style errors.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Rename camel-case variables
Mario Six [Sun, 28 Apr 2019 20:28:38 +0000 (01:58 +0530)]
spi: mpc8xxx: Rename camel-case variables

There are three variables that have camel-case names, which is not the
preferred naming style.

Give those variables more compliant names instead.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Fix comments
Mario Six [Sun, 28 Apr 2019 20:28:37 +0000 (01:58 +0530)]
spi: mpc8xxx: Fix comments

There are some comments on the same line as the code they document. Put
comments above the code lines they document, so the line length is not
unnecessarily increased.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Use short type names
Mario Six [Sun, 28 Apr 2019 20:28:36 +0000 (01:58 +0530)]
spi: mpc8xxx: Use short type names

The function signatures in the driver are quite long as is. Use short
type names (uint etc.) to make them more readable.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoids8313: Disable SPI
Mario Six [Fri, 7 Jun 2019 09:35:51 +0000 (11:35 +0200)]
ids8313: Disable SPI

With the recent SPI changes, the ids8313 board won't compile anymore.

Until further information from the manufacturer, disable SPI support, so
that the board will at least compile again.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoRevert "Makefile: Prioritize external dtb if defined"
Tom Rini [Sun, 19 May 2019 22:09:05 +0000 (18:09 -0400)]
Revert "Makefile: Prioritize external dtb if defined"

This is causing unexpected size growth in the normal case and is likely
to have been mis-applied by myself.

This reverts commit 3eaf6dcd9362b56e3217559401287dd8fa35b5b2.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge tag 'efi-2019-07-rc3-2' of git://git.denx.de/u-boot-efi
Tom Rini [Sun, 19 May 2019 20:46:24 +0000 (16:46 -0400)]
Merge tag 'efi-2019-07-rc3-2' of git://git.denx.de/u-boot-efi

Pull request for UEFI sub-system for v2019.07-rc3 (2)

Minor patches to improve UEFI specification compliance are provided.

To allow running the UEFI self compliance tests an outdated version of
the Unicode collation protocol has been added as a configuration option
(disabled by default).

5 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Sun, 19 May 2019 13:42:19 +0000 (09:42 -0400)]
Merge git://git.denx.de/u-boot-x86

- Allow coreboot to process unhandled tags
- Enable NVMe on QEMU x86_64 target

5 years agoMerge branch '2019-05-19-master-imports'
Tom Rini [Sun, 19 May 2019 13:36:48 +0000 (09:36 -0400)]
Merge branch '2019-05-19-master-imports'

- Convert SYS_[DI]CACHE_OFF to Kconfig, introduce SPL variant.
- Various bcm96* fixes.
- Import include/android_bootloader_message.h from AOSP
- Assorted other small fixes.

5 years agox86: qemu-x86_64: Enable NVMe
Bin Meng [Wed, 15 May 2019 15:51:51 +0000 (08:51 -0700)]
x86: qemu-x86_64: Enable NVMe

NVMe was turned on in qemu-x86 but somehow we missed it for 64-bit.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agonvme: Fix warning of cast from pointer to integer of different size
Bin Meng [Wed, 15 May 2019 15:37:56 +0000 (08:37 -0700)]
nvme: Fix warning of cast from pointer to integer of different size

When dma_addr_t is u32 in 64-bit, there are some warnings when
building NVME driver. Fix it by doing an additional (long) cast.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
5 years agox86: coreboot: make it possible to process unhandled tags
Christian Gmeiner [Wed, 17 Apr 2019 12:42:05 +0000 (14:42 +0200)]
x86: coreboot: make it possible to process unhandled tags

coreboot makes it possible to add own entries into coreboot's
table at a per mainboard basis. As there might be some custom
ones it makes sense to provide a way to process them.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoefi_loader: parameter check OutputString
Heinrich Schuchardt [Sat, 18 May 2019 16:11:54 +0000 (18:11 +0200)]
efi_loader: parameter check OutputString

Check the parameters against NULL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.SetState() correct parameter
Heinrich Schuchardt [Sat, 18 May 2019 15:07:52 +0000 (17:07 +0200)]
efi_loader: EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.SetState() correct parameter

KeyToggleState is a pointer according to UEFI spec 2.8.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: GetNextMonotonicCount() check parameter
Heinrich Schuchardt [Fri, 17 May 2019 10:47:17 +0000 (12:47 +0200)]
efi_loader: GetNextMonotonicCount() check parameter

Do not write to address indicated by NULL pointer.

UEFI SCT II 2.6 (2017), 3.6.5 GetNextMonotonicCount(), 5.1.5.5.1

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: parameter checks CalculateCrc32()
Heinrich Schuchardt [Thu, 16 May 2019 21:31:29 +0000 (23:31 +0200)]
efi_loader: parameter checks CalculateCrc32()

Not checking the parameters may lead reading or writing from NULL.
Implement the parameter checks prescribed in the UEFI spec.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: check device path in InstallMultipleProtocolInterfaces
Heinrich Schuchardt [Thu, 16 May 2019 19:54:04 +0000 (21:54 +0200)]
efi_loader: check device path in InstallMultipleProtocolInterfaces

According to the UEFI spec InstallMultipleProtocolInterfaces() must check
if a device path has already been installed. In this case it must return
EFI_ALREADY_STARTED.

Cf. UEFI SCT II 2.6 A (2017),
3.3.16 InstallMultipleProtocolInterfaces(), 5.1.3.16.1.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: implement deprecated Unicode collation protocol
Heinrich Schuchardt [Thu, 16 May 2019 16:19:00 +0000 (18:19 +0200)]
efi_loader: implement deprecated Unicode collation protocol

In EFI 1.10 a version of the Unicode collation protocol using ISO 639-2
language codes existed. This protocol is not part of the UEFI specification
any longer. Unfortunately it is required to run the UEFI Self Certification
Test (SCT) II, version 2.6, 2017. So we implement it here for the sole
purpose of running the SCT. It can be removed once a compliant SCT is
available.

The configuration option defaults to no.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Most of Rob's original patch is already merged. Only the deprecated
protocol is missing. Rebase it and make it configurable.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: rename Unicode collation protocol 2 variables
Heinrich Schuchardt [Thu, 16 May 2019 05:52:58 +0000 (07:52 +0200)]
efi_loader: rename Unicode collation protocol 2 variables

Rename variables to make it clear they refer to the Unicode collation
protocol identified by the EFI_UNICODE_PROTOCOL2_GUID.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: merge adjacent sprintf()
Heinrich Schuchardt [Thu, 16 May 2019 05:37:22 +0000 (07:37 +0200)]
efi_loader: merge adjacent sprintf()

In the implementation of the device path to text protocol join adjacent
sprintf() statements.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: parameter checks simple network protocol
Heinrich Schuchardt [Wed, 15 May 2019 21:27:43 +0000 (23:27 +0200)]
efi_loader: parameter checks simple network protocol

Check buffer pointers are not NULL as required by the UEFI 2.7 spec.

Return EFI_UNSUPPORTED instead of EFI_INVALID_PARAMETER when trying to
transmit with non-zero header_size.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: GetVariable set attributes for EFI_BUFFER_TOO_SMALL
Heinrich Schuchardt [Wed, 15 May 2019 17:32:43 +0000 (19:32 +0200)]
efi_loader: GetVariable set attributes for EFI_BUFFER_TOO_SMALL

UEFI spec 2.7 erratum A leaves it undefined if Attributes should be set if
GetVariable() returns EFI_BUFFER_TOO_SMALL.

UEFI spec 2.8 defines that Attributes should be set if the return value is
either EFI_SUCCESS or EFI_BUFFER_TOO_SMALL.

Set Attributes if the return value is EFI_BUFFER_TOO_SMALL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoARM: da850evm: Enable block cache during SPL
Adam Ford [Wed, 15 May 2019 21:18:35 +0000 (16:18 -0500)]
ARM: da850evm: Enable block cache during SPL

There appears to be enough RAM to support cache in SPL.
This pach enables block cache in SPL.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoKconfig: fix FIT offset prompt text
Ibai Erkiaga [Wed, 15 May 2019 21:10:04 +0000 (22:10 +0100)]
Kconfig: fix FIT offset prompt text

The current prompt text for FIT external offset is identical to
SYS_TEXT_BASE which might confuse the users. Provided more accurate
description for the prompt text.

Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com>
Reviewed-by: Marek Vasut <marex@denx.de>
5 years agoARM: omap3_logic/omap35_logic: Enable GPIO in SPL
Adam Ford [Wed, 15 May 2019 13:37:52 +0000 (08:37 -0500)]
ARM: omap3_logic/omap35_logic: Enable GPIO in SPL

The MMC controller enabled card detect, so this patch enables
the GPIO driver in SPL to support it.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoImport include/android_bootloader_message.h from AOSP
Alex Deymo [Tue, 14 May 2019 19:05:26 +0000 (21:05 +0200)]
Import include/android_bootloader_message.h from AOSP

This takes the latest changes from AOSP from the file
bootloader_message/include/bootloader_message/bootloader_message.h
in the repository
https://android.googlesource.com/platform/bootable/recovery
and re-licensed them to BSD-3 for U-Boot.

Minimum local changes have been applied (convert C++ to C comments and
adding #ifndef __UBOOT__ block to skip all the function declarations).

Signed-off-by: Alex Deymo <deymo@google.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
5 years agotools: use read-only mmap in fit_check_sign
Luca Boccassi [Tue, 14 May 2019 18:35:02 +0000 (19:35 +0100)]
tools: use read-only mmap in fit_check_sign

Add an option to open files in read-only mode in mmap_fdt so
that fit_check_sign can be used to inspect files on read-only
filesystems.
For example, this is useful when a key is shipped in a read-only
rootfs or squashfs.

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
5 years agoata: ahci: drop read-only ahci_ioports members
Christian Gmeiner [Tue, 14 May 2019 08:33:41 +0000 (10:33 +0200)]
ata: ahci: drop read-only ahci_ioports members

Also get rid of ahci_setup_port(..).

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
5 years agoconfigs: bcm968580 disable CONFIG_CMD_BOOTEFI_SELFTEST
Heinrich Schuchardt [Thu, 9 May 2019 15:35:12 +0000 (17:35 +0200)]
configs: bcm968580 disable CONFIG_CMD_BOOTEFI_SELFTEST

Configuration option CONFIG_CMD_BOOTEFI_SELFTEST is useful for the
development of the UEFI sub-system. For production it is not needed.

Remove CONFIG_CMD_BOOTEFI_SELFTEST from bcm968580xref_ram_defconfig.

Suggested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoconfigs: bcm963158 disable CONFIG_CMD_BOOTEFI_SELFTEST
Heinrich Schuchardt [Thu, 9 May 2019 15:34:15 +0000 (17:34 +0200)]
configs: bcm963158 disable CONFIG_CMD_BOOTEFI_SELFTEST

Configuration option CONFIG_CMD_BOOTEFI_SELFTEST is useful for the
development of the UEFI sub-system. For production it is not needed.

Remove CONFIG_CMD_BOOTEFI_SELFTEST from bcm963158_ram_defconfig.

Suggested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agospl: Set spl_image->fdt_addr pointer for full fitImage configuration
Marek Vasut [Tue, 7 May 2019 19:17:02 +0000 (21:17 +0200)]
spl: Set spl_image->fdt_addr pointer for full fitImage configuration

Set the spl_image->fdt_addr pointer both for simple fitImage configuration
as well as full fitImage configuration, to let spl_perform_fixups() access
the DT and perform modifications to it if necessary.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
5 years agoARM: mediatek: mt8516: use PSCI to reset the SoC
Fabien Parent [Mon, 6 May 2019 14:17:56 +0000 (16:17 +0200)]
ARM: mediatek: mt8516: use PSCI to reset the SoC

Instead of using the watchdog, let's use PSCI to perform the reset
of the SoC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
5 years agobcm968380gerg: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
Philippe Reynes [Fri, 3 May 2019 17:51:44 +0000 (19:51 +0200)]
bcm968380gerg: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT

This board define the flag CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
but it's a mistake. It's a workaround for an issue in nand core.
This issue was fixed by the commit 5f626e78491c ("mtd: nand: raw:
Fix CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT behavior"). Now, this flag
break the nand on this board, so we simply remove it.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agobcm963158: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
Philippe Reynes [Fri, 3 May 2019 17:51:43 +0000 (19:51 +0200)]
bcm963158: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT

This board define the flag CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
but it's a mistake. It's a workaround for an issue in nand core.
This issue was fixed by the commit 5f626e78491c ("mtd: nand: raw:
Fix CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT behavior"). Now, this flag
break the nand on this board, so we simply remove it.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agobcm968580xref: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
Philippe Reynes [Fri, 3 May 2019 17:51:42 +0000 (19:51 +0200)]
bcm968580xref: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT

This board define the flag CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
but it's a mistake. It's a workaround for an issue in nand core.
This issue was fixed by the commit 5f626e78491c ("mtd: nand: raw:
Fix CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT behavior"). Now, this flag
break the nand on this board, so we simply remove it.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agodt: bcm63158: watchdog should use a 50Mhz clock
Philippe Reynes [Fri, 3 May 2019 17:43:08 +0000 (19:43 +0200)]
dt: bcm63158: watchdog should use a 50Mhz clock

The watchdog should use a clock at 50 Mhz, so
instead of using the clock osc (200 Mhz), we
define a reference clock at 50Mhz and use it
for both watchdog.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Stefan Roese <sr@denx.de>
5 years agodt: bcm6858: watchdog should use a 50Mhz clock
Philippe Reynes [Fri, 3 May 2019 17:43:07 +0000 (19:43 +0200)]
dt: bcm6858: watchdog should use a 50Mhz clock

The watchdog should use a clock at 50 Mhz, so
instead of using the clock osc (200 Mhz), we
define a reference clock at 50Mhz and use it
for both watchdog.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Stefan Roese <sr@denx.de>
5 years agowatchdog: bcm6345: callback start use tick instead of ms
Philippe Reynes [Fri, 3 May 2019 17:43:06 +0000 (19:43 +0200)]
watchdog: bcm6345: callback start use tick instead of ms

The function bcm6345_wdt_start use the argument timeout
as tick but it should be used as milliseconds.

A clock is added as requirement for this driver.
The frequency of the clock is then used to convert the
millisecond to ticks in the function bcm6345_wdt_start.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Stefan Roese <sr@denx.de>
5 years agoMakefile: Prioritize external dtb if defined
Michal Simek [Mon, 25 Mar 2019 14:55:16 +0000 (15:55 +0100)]
Makefile: Prioritize external dtb if defined

Prioritize external dtb if its passed via EXT_DTB
than the dtb that was built in the tree. With this
patch it appends the specified external dtb to
the u-boot image.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoCONFIG_SPL_SYS_[DI]CACHE_OFF: add
Trevor Woerner [Fri, 3 May 2019 13:41:00 +0000 (09:41 -0400)]
CONFIG_SPL_SYS_[DI]CACHE_OFF: add

While converting CONFIG_SYS_[DI]CACHE_OFF to Kconfig, there are instances
where these configuration items are conditional on SPL. This commit adds SPL
variants of these configuration items, uses CONFIG_IS_ENABLED(), and updates
the configurations as required.

Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Trevor Woerner <trevor@toganlabs.com>
[trini: Make the default depend on the setting for full U-Boot, update
more zynq hardware]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoCONFIG_SYS_[DI]CACHE_OFF: convert to Kconfig
Trevor Woerner [Fri, 3 May 2019 13:40:59 +0000 (09:40 -0400)]
CONFIG_SYS_[DI]CACHE_OFF: convert to Kconfig

CONFIG_SYS_[DI]CACHE_OFF had been partially converted to Kconfig
parameters; only for the ARC architecture. This patch turns these two
parameters into Kconfig items everywhere else they are found.

All of the include/configs/* and defconfig changes in this patch are
for arm machines only. The Kconfig changes for arc, nds32, riscv,
and xtensa have been included since these symbols are found in code
under arch/{arc,nds32,riscv,xtensa}, however, no currently-defined
include/configs/* or defconfigs for these architectures exist which
include these symbols.

These results have been confirmed with tools/moveconfig.py.

Acked-by: Alexey Brodkin <abrodkin@snopsys.com>
Signed-off-by: Trevor Woerner <trevor@toganlabs.com>
[trini: Re-migrate for a few more boards]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoCONFIG_SYS_[DI]CACHE_OFF: remove commented lines
Trevor Woerner [Fri, 3 May 2019 13:40:58 +0000 (09:40 -0400)]
CONFIG_SYS_[DI]CACHE_OFF: remove commented lines

Eventually these configuration items will be converted to Kconfig,
therefore there's little point in leaving commented-out versions of
them in include/configs.

Signed-off-by: Trevor Woerner <trevor@toganlabs.com>
5 years agoCONFIG_SYS_[DI]CACHE_OFF: remove superfluous "1"
Trevor Woerner [Fri, 3 May 2019 13:40:57 +0000 (09:40 -0400)]
CONFIG_SYS_[DI]CACHE_OFF: remove superfluous "1"

This config is the only config that uses:
#define CONFIG_SYS_DCACHE_OFF 1
in its #define.

Remove the superfluous "1" so this cache #define is like all the others.

Signed-off-by: Trevor Woerner <trevor@toganlabs.com>
5 years agoCONFIG_SYS_[ID]CACHE_OFF: unify the 'any' case
Trevor Woerner [Fri, 3 May 2019 13:40:56 +0000 (09:40 -0400)]
CONFIG_SYS_[ID]CACHE_OFF: unify the 'any' case

According to De Morgan's Law[1]:
!(A && B) = !A || !B
!(A || B) = !A && !B

There are 5 places in the code where we find:
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
and 4 places in the code where we find:
#if (!defined(CONFIG_SYS_ICACHE_OFF) || !defined(CONFIG_SYS_DCACHE_OFF))

In words, the construct:
!defined(CONFIG_SYS_[DI]CACHE_OFF)
means:
"is the [DI]CACHE on?"
and the construct:
defined(CONFIG_SYS_[DI]CACHE_OFF)
means:
"is the [DI]CACHE off?"

Therefore
!(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
means:
"the opposite of 'are they both off?'"
in other words:
"are either or both on?"
and:
(!defined(CONFIG_SYS_ICACHE_OFF) || !defined(CONFIG_SYS_DCACHE_OFF)
means:
"are either or both on?"

As a result, I've converted the 4 instances of '(!A || !B)' to '!(A && B)' for
consistency.

[1] https://en.wikipedia.org/wiki/De_Morgan%27s_laws

Signed-off-by: Trevor Woerner <trevor@toganlabs.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-samsung
Tom Rini [Thu, 16 May 2019 11:09:59 +0000 (07:09 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-samsung

- arndale fixes

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Thu, 16 May 2019 11:09:33 +0000 (07:09 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

- SoCFPGA DT and reset cleanup, AE MCVEVK board support.

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Thu, 16 May 2019 11:09:18 +0000 (07:09 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- Align env position on GR-Peach with downstream U-Boot.

5 years agoconfigs: arndale: Use appropriate driver for Asix AX88760
Krzysztof Kozlowski [Sat, 11 May 2019 11:24:33 +0000 (13:24 +0200)]
configs: arndale: Use appropriate driver for Asix AX88760

Arndale board has an Asix AX88760 USB 2.0 Hub and Fast Ethernet combo.
The appropriate driver for it is USB_ETHER_ASIX.

The mistake probably came from misinterpretation of commit e9954b867ce0
("usb: eth: add ASIX AX88179 DRIVER") which was tested on RECS5250 COM
module.  This module indeed has Exynos5250 and some similarities with
Arndale 5250 board but the USB/Ethernet chip used there is apparently
different.

Fixes: f58ad98a621c ("usb: net: migrate USB Ethernet adapters to Kconfig")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoarm: exynos: arndale: Remove unused CONFIG_DM_I2C_COMPAT
Krzysztof Kozlowski [Sat, 11 May 2019 11:24:32 +0000 (13:24 +0200)]
arm: exynos: arndale: Remove unused CONFIG_DM_I2C_COMPAT

The CONFIG_DM_I2C_COMPAT was introduced in
include/configs/exynos5-common.h in commit 189d80166b31 ("exynos5:
enable dm i2c") and then it propagated up to configs/arndale_defconfig.
However since beginning the Arndale board (Exynos5250) was not using
I2C.

In fact, the Arndale board is not configuring its PMIC (S5M8767) which
uses I2C bus.  This setting can be thus safely removed to fix build
warning:

    This board uses CONFIG_DM_I2C_COMPAT. Please remove
    (possibly in a subsequent patch in your series)
    before sending patches to the mailing list.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoarm: exynos: arndale: Remove unused CONFIG_POWER and CONFIG_POWER_I2C
Krzysztof Kozlowski [Sat, 11 May 2019 11:24:31 +0000 (13:24 +0200)]
arm: exynos: arndale: Remove unused CONFIG_POWER and CONFIG_POWER_I2C

The CONFIG_POWER and CONFIG_POWER_I2C were introduced in
include/configs/exynos5-common.h in commit 19bd3aaa5991 ("exynos5: fix
build break by adding CONFIG_POWER") and then it propagated up to
include/configs/arndale.h.  However before that commit, there was no
build break at all on Arndale and SMDK5250 boards.  It seems the commit
fixed nothing and just added unused defines.

In fact, the Arndale board is not configuring its PMIC (S5M8767) which
uses I2C bus.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoPrepare v2019.07-rc2 v2019.07-rc2
Tom Rini [Wed, 15 May 2019 19:58:48 +0000 (15:58 -0400)]
Prepare v2019.07-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Wed, 15 May 2019 11:10:52 +0000 (07:10 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-net

- micrel, ti PHY fixes
- rtl8169, mtk-eth fixes

5 years agoMerge tag 'u-boot-stm32-mcu-20190514' of https://github.com/pchotard/u-boot
Tom Rini [Wed, 15 May 2019 11:10:32 +0000 (07:10 -0400)]
Merge tag 'u-boot-stm32-mcu-20190514' of https://github.com/pchotard/u-boot

STM32 MCUs update:
_ Add MPU region for SPI NOR memory mapped region
_ Add missing QSPI flash compatible for STM32 F7 boards
_ Update spi-tx-bus-width and spi-rx-bus-width properties
_ Add QSPI support for STM32F469 Discovery board

5 years agoeth: mtk-eth: fix incorrect read of phy-handle
Weijie Gao [Sun, 28 Apr 2019 07:08:57 +0000 (15:08 +0800)]
eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: rtl8169: Support RTL-8168h/8111h
Thierry Reding [Tue, 16 Apr 2019 16:20:30 +0000 (18:20 +0200)]
net: rtl8169: Support RTL-8168h/8111h

This version of the RTL-8168 is present on some development boards and
is compatible with this driver. Add support for identifying this version
of the chip so that U-Boot won't complain about it being unknown.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: rtl8169: Implement ->hwaddr_write() callback
Thierry Reding [Tue, 16 Apr 2019 16:20:29 +0000 (18:20 +0200)]
net: rtl8169: Implement ->hwaddr_write() callback

Implement this callback that allows the MAC address to be set for the
Ethernet card. This is necessary in order for the device to be able to
receive packets for the MAC address that U-Boot advertises.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agophy: ti: Init node before reading
Michal Simek [Sat, 16 Mar 2019 11:43:17 +0000 (12:43 +0100)]
phy: ti: Init node before reading

There is a need to fill node before clk_output_sel is setup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Reviewed-by: <hannes.schmelzer@br-automation.com>
5 years agonet: phy: micrel: Allow KSZ8xxx and KSZ90x1 to be used together
James Byrne [Wed, 6 Mar 2019 12:48:27 +0000 (12:48 +0000)]
net: phy: micrel: Allow KSZ8xxx and KSZ90x1 to be used together

Commit d397f7c45b0b ("net: phy: micrel: Separate KSZ9000 drivers from
KSZ8000 drivers") separated the KSZ8xxx and KSZ90x1 drivers and warns
that you shouldn't select both of them due to a device ID clash between
the KSZ9021 and the KS8721, asserting that "it is highly unlikely for a
system to contain both a KSZ8000 and a KSZ9000 PHY". Unfortunately
boards like the SAMA5D3xEK do contain both types of PHY, but fortunately
the Linux Micrel PHY driver provides a solution by using different PHY
ID and mask values to distinguish these chips.

This commit contains the following changes:

- The PHY ID and mask values for the KSZ9021 and the KS8721 now match
those used by the Linux driver.
- The warnings about not enabling both drivers have been removed.
- The description for PHY_MICREL_KSZ8XXX has been corrected (these are
10/100 PHYs, not GbE PHYs).
- PHY_MICREL_KSZ9021 and PHY_MICREL_KSZ9031 no longer select PHY_GIGE
since this is selected by PHY_MICREL_KSZ90X1.
- All of the relevant defconfig files have been updated now that
PHY_MICREL_KSZ8XXX does not default to 'Y'.

Signed-off-by: James Byrne <james.byrne@origamienergy.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agoARM: dts: socfpga: Keep FPGA bridge entries in SPL DT
Marek Vasut [Tue, 7 May 2019 15:55:12 +0000 (17:55 +0200)]
ARM: dts: socfpga: Keep FPGA bridge entries in SPL DT

Keep the FPGA bridge entries in SPL DT to let do_bridge_reset() toggle
the bridges on/off as needed according to the handoff file.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
5 years agoARM: dts: socfpga: Factor out U-Boot specifics from A10 handoff files
Marek Vasut [Wed, 6 Mar 2019 18:47:22 +0000 (19:47 +0100)]
ARM: dts: socfpga: Factor out U-Boot specifics from A10 handoff files

Pull out the u-boot,dm-pre-reloc from socfpga_arria10_socdk_sdmmc_handoff.dtsi
into separate dtsi header file to make it easier to patch in custom handoff
dtsi files, without having to manually add the U-Boot bits. Shuffle the include
clauses in the A10 DT files to make it obvious what gets included where without
having to follow confusing long chain of includes, i.e. board DT file includes
everything it needs.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
5 years agoarm: socfpga: Re-add support for Aries MCV SoM and MCVEV[KP] board
Wolfgang Grandegger [Sun, 12 May 2019 17:25:18 +0000 (19:25 +0200)]
arm: socfpga: Re-add support for Aries MCV SoM and MCVEV[KP] board

Re-add support for Aries Embedded MCV SoM, which is CycloneV based
and the associated MCVEVK and MCVEVP baseboard. The board can boot
from eMMC. Ethernet and USB is supported.

The Aries Embedded boards have been removed with commit 03b54997d568
("board/aries: Remove"). I will now take care of them.

The device-tree files are from mainline Linux commit e93c9c99a629
("Linux v5.1)".

Signed-off-by: Wolfgang Grandegger <wg@aries-embedded.de>
CC: Marek Vasut <marex@denx.de>
CC: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoarm: sofcpga: s10: remove unused ad-hoc reset code
Simon Goldschmidt [Mon, 13 May 2019 19:16:44 +0000 (21:16 +0200)]
arm: sofcpga: s10: remove unused ad-hoc reset code

The stratix 10 reset manager ad-hoc code in arch/arm contains an unused
function 'reset_deassert_peripherals_handoff' that has been added from
the beginning. As this is probably a result of copying the gen5 reset
manager and this function has never been used, remove it.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoarm: socfpga: remove re-added ad-hoc reset code
Simon Goldschmidt [Mon, 13 May 2019 19:16:43 +0000 (21:16 +0200)]
arm: socfpga: remove re-added ad-hoc reset code

commit c5de2b7eae68 ("arm: socfpga: implement proper peripheral reset")
has removed the call to 'reset_deassert_peripherals_handoff()' from
socfpga gen5 SPL since the reset driver now handles resets. However,
commit c1d4b464c8b8 ("ARM: socfpga: Disable bridges in SPL unless booting from FPGA")
has re-added this ad-hoc reset code, so that all peripherals were now
again enabled instead of letting the drivers enable them by request.

While at it, remove this function for gen5 as it should not be used.

Fixes: commit c1d4b464c8b8 ("ARM: socfpga: Disable bridges in SPL unless booting from FPGA")
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoARM: renesas: grpeach: Align env position
Marek Vasut [Sat, 4 May 2019 17:35:27 +0000 (19:35 +0200)]
ARM: renesas: grpeach: Align env position

Move the U-Boot environment to 0x80000 to match the downstream
vendor fork and allow easy migration from one to the other.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoMerge tag 'efi-2019-07-rc3' of git://git.denx.de/u-boot-efi
Tom Rini [Mon, 13 May 2019 11:13:28 +0000 (07:13 -0400)]
Merge tag 'efi-2019-07-rc3' of git://git.denx.de/u-boot-efi

Pull request for UEFI sub-system for v2019.07-rc3

The development target for the UEFI sub-system is EBBR compliance. We have
already implemented some further protocols to enable running the UEFI Shell
and the UEFI SCT test suite.

As some boards are severely memory constrained make some of these extras
customizable.

Provide bug fixes. The most prominent ones let us pass the UEFI SCT memory
allocation tests.

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Mon, 13 May 2019 11:13:03 +0000 (07:13 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

- A10 FPGA programming support, Gen5 livetree conversion

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Mon, 13 May 2019 11:12:47 +0000 (07:12 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- SH2, SH3 removal

5 years agoefi_loader: comments for efi_install_fdt()
Heinrich Schuchardt [Sun, 12 May 2019 18:16:25 +0000 (20:16 +0200)]
efi_loader: comments for efi_install_fdt()

Describe that efi_install_fdt() defaults to using the device tree
indicated by environment variable fdtcontroladdr.

ACPI tables and device trees are mutually exclusive.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: deduplicate code in cmd/bootefi.c
Heinrich Schuchardt [Sun, 12 May 2019 18:16:25 +0000 (20:16 +0200)]
efi_loader: deduplicate code in cmd/bootefi.c

Move duplicate initialization code to single instance.

Adjust comments of concerned functions.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: ACPI device node to text
Heinrich Schuchardt [Sat, 11 May 2019 21:11:48 +0000 (23:11 +0200)]
efi_loader: ACPI device node to text

The device path to text protocol renders ACPI device nodes incorrectly.

Use capital hexadecimal numbers as shown in the UEFI spec examples.

Always output the optional UID. This matches what UEFI SCT expects and
saves us an `if`.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: infinite recursion notifying events
Heinrich Schuchardt [Sat, 11 May 2019 19:44:59 +0000 (21:44 +0200)]
efi_loader: infinite recursion notifying events

UEFI SCT uses this call sequence to determine the current TPL level inside
notification functions:

    OldTpl = BS->RaiseTPL(TPL_HIGH_LEVEL);
    BS->RestoreTPL(OldTpl);

In RestoreTPL() we trigger the notification function of queued events. If
we do not mark the event as non-queued before calling the notification
function, this results in an infinite recursive call sequence.

Mark the event as non-queued before entering the notification function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: simplify efi_allocate_pages()
Heinrich Schuchardt [Sat, 11 May 2019 06:43:30 +0000 (08:43 +0200)]
efi_loader: simplify efi_allocate_pages()

Replace unnecessary control structures by using return statements.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: AllocateAdress error handling
Heinrich Schuchardt [Sat, 11 May 2019 06:21:17 +0000 (08:21 +0200)]
efi_loader: AllocateAdress error handling

If AllocatePages() is called with AllocateAddress, the UEFI spec requires
to return EFI_NOT_FOUND in case the memory page does not exist.

The UEFI SCT II 2017 spec additionally requires to return EFI_NOT_FOUND if
the page is already allocated.

Check that *Memory refers to an unallocated page.

UEFI SCT II (2017): AllocatePages(), 5.1.2.1.9 - 5.1.2.1.10

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: out of resources in AllocatePages()
Heinrich Schuchardt [Sat, 11 May 2019 05:55:05 +0000 (07:55 +0200)]
efi_loader: out of resources in AllocatePages()

According to the UEFI AllocatePages() has to return EFI_OUT_OF_RESOURCES if
sufficient memory is not available.

Change the return value.

UEFI SCT II (2017): 3.2.1 AllocatePages(), 5.1.2.1.8

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: check memory address before freeing
Heinrich Schuchardt [Fri, 10 May 2019 19:21:30 +0000 (21:21 +0200)]
efi_loader: check memory address before freeing

When we call FreePages() we essentially add memory to our memory map. We
shouldn't do this for memory that does not exit.

Check if the memory that is to be freed via FreePages() or FreePool() is in
our memory map and is not EFI_CONVENTIONAL_MEMORY.

This check is mandated by the UEFI specification.

Cf. UEFI SCT  II (2017), 3.2.2 FreePages(), 5.1.2.1 - 5.1.2.2

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: error code in UninstallProtocolInterface()
Heinrich Schuchardt [Fri, 10 May 2019 18:06:48 +0000 (20:06 +0200)]
efi_loader: error code in UninstallProtocolInterface()

According to the UEFI specification UninstallProtocolInteface() has to
return EFI_NOT_FOUND if the interface is not found.

Correct the return value.

Cf. UEFI SCT II spec (2017), 3.3.2 UninstallProtocolInterface(), 5.1.3.2.4

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: superfluous check in efi_remove_protocol()
Heinrich Schuchardt [Fri, 10 May 2019 17:55:53 +0000 (19:55 +0200)]
efi_loader: superfluous check in efi_remove_protocol()

efi_search_protocol() already checks that the GUID matches. Don't check
a second time.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: LocateDevicePath() incorrect parameter check
Heinrich Schuchardt [Fri, 10 May 2019 17:21:41 +0000 (19:21 +0200)]
efi_loader: LocateDevicePath() incorrect parameter check

A parameter check in LocateDevicePath() does not match the requirements of
the UEFI spec.

If device is NULL, only return EFI_INVALID_PARAMETER if a matching handle
is found.

Cf. UEFI SCT II specification (2017)3.3.7 LocateDevicePath(), 5.1.3.7.3

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: fix typo in efi_locate_handle() comment
Heinrich Schuchardt [Fri, 10 May 2019 17:03:49 +0000 (19:03 +0200)]
efi_loader: fix typo in efi_locate_handle() comment

%s/not buffer/no buffer/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: make device path to text protocol customizable
Heinrich Schuchardt [Sat, 11 May 2019 07:53:33 +0000 (09:53 +0200)]
efi_loader: make device path to text protocol customizable

The device path to text protocol is not needed for EBBR compliance. So
let's make it a customizable option.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: make Unicode collation protocol customizable
Heinrich Schuchardt [Wed, 8 May 2019 21:24:26 +0000 (23:24 +0200)]
efi_loader: make Unicode collation protocol customizable

The Unicode collation protocol is not needed for EBBR compliance. So let's
make it a customizable option.

The Unicode capitalization table is only needed by this protocol. So let it
depend on the Unicode collation protocol.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: reword the EFI_LOADER config option
Heinrich Schuchardt [Sat, 11 May 2019 08:27:58 +0000 (10:27 +0200)]
efi_loader: reword the EFI_LOADER config option

No need to mention U-Boot in brief description.
Fix several typos, mention iPXE.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: format Kconfig
Heinrich Schuchardt [Wed, 8 May 2019 21:17:38 +0000 (23:17 +0200)]
efi_loader: format Kconfig

Use if/endif for dependencies to give structure to the configuration menu.

Sort important settings to the top.

Abbreviate the short description of EFI_LOADER_HII.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: observe CONFIG_EFI_LOADER_HII
Heinrich Schuchardt [Wed, 8 May 2019 19:42:36 +0000 (21:42 +0200)]
efi_loader: observe CONFIG_EFI_LOADER_HII

If EFI_LOADER_HII is not set, do not unnecessarily compile files for HII
protocols.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMAINTAINERS: assign include/charset.h
Heinrich Schuchardt [Wed, 8 May 2019 17:41:35 +0000 (19:41 +0200)]
MAINTAINERS: assign include/charset.h

Assign include/charset.h to EFI PAYLOAD.

The functions defined in this include are used by the UEFI sub-system.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agolib: charset: correct utf8_utf16_strnlen() description
Heinrich Schuchardt [Wed, 8 May 2019 17:34:48 +0000 (19:34 +0200)]
lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agogpio: dwapb_gpio: convert to livetree
Simon Goldschmidt [Thu, 9 May 2019 20:12:00 +0000 (22:12 +0200)]
gpio: dwapb_gpio: convert to livetree

Convert 'gpio_dwapb_bind' to iterate over subnodes using livetree
functions (inspired from mt7621_gpio.c).

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoreset: socfpga: convert to livetree
Simon Goldschmidt [Thu, 9 May 2019 20:11:59 +0000 (22:11 +0200)]
reset: socfpga: convert to livetree

Convert 'socfpga_reset_probe' to use 'dev_read_u32_default'
instead of 'fdtdec_get_int'.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoserial: altera_uart: convert to livetree
Simon Goldschmidt [Thu, 9 May 2019 20:11:58 +0000 (22:11 +0200)]
serial: altera_uart: convert to livetree

Convert 'altera_uart_ofdata_to_platdata' to use 'dev_read_u32_default'
instead of 'fdtdec_get_int' and get rid of DECLARE_GLOBAL_DATA_PTR.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agospi: designware: convert to livetree
Simon Goldschmidt [Thu, 9 May 2019 20:11:57 +0000 (22:11 +0200)]
spi: designware: convert to livetree

Convert 'dw_spi_ofdata_to_platdata' to use 'dev_read_u32_default'
instead of 'fdtdec_get_int' and get rid of DECLARE_GLOBAL_DATA_PTR.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agospi: cadence_qspi: convert to livetree
Simon Goldschmidt [Thu, 9 May 2019 20:11:56 +0000 (22:11 +0200)]
spi: cadence_qspi: convert to livetree

Convert 'cadence_spi_ofdata_to_platdata' to use dev_read_* functions to
read driver parameters and 'dev_read_first_subnode'/'ofnode_read_*' to
read flash (child node) parameters.

Tested on socfpga_socrates (socfpga gen5).

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>