platform/kernel/u-boot.git
5 years agoARM: defconfig: add Raspberry Pi 3 Model B+
Heinrich Schuchardt [Sun, 28 Apr 2019 04:46:58 +0000 (06:46 +0200)]
ARM: defconfig: add Raspberry Pi 3 Model B+

Provide a defconfig file for the Raspberry Pi 3 Model B+. It is based on
the Raspberry Pi 3 file, just changing the device tree.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
5 years agofdt: update bcm283x device tree sources to Linux 5.1-rc6 state
Heinrich Schuchardt [Sun, 28 Apr 2019 04:46:57 +0000 (06:46 +0200)]
fdt: update bcm283x device tree sources to Linux 5.1-rc6 state

Updating the bcm283x device tree sources adds the device trees for

- Raspberry Pi 3 Model A+
- Raspberry Pi 3 Model B+
- Raspberry Pi Compute Module IO board rev1
- Raspberry Pi Compute Module 3 IO board V3.0
- Raspberry Pi Zero

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
5 years agoFix compilation error if CONFIG_USB is disabled
akaher [Thu, 11 Apr 2019 05:23:50 +0000 (05:23 +0000)]
Fix compilation error if CONFIG_USB is disabled

This patch is to fix the following compilation error when
disabling CONFIG_USB for Rpi3:

include/config_distro_bootcmd.h:242:2: error: expected ‘}’
before ‘BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB’
     BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB

Signed-off-by: Ajay Kaher <akaher@vmware.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
5 years agoPrepare v2019.07-rc4 v2019.07-rc4
Tom Rini [Tue, 11 Jun 2019 01:27:46 +0000 (21:27 -0400)]
Prepare v2019.07-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Mon, 10 Jun 2019 13:43:11 +0000 (09:43 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

- mpc8xxx spi driver fixes (Mario)
- mpc8xxx spi dm conversion (Mario, Jagan)
- SPI DM Migration update (Jagan)

5 years agoMerge tag 'video-updates-for-2019.07-rc3' of git://git.denx.de/u-boot-video
Tom Rini [Mon, 10 Jun 2019 13:41:19 +0000 (09:41 -0400)]
Merge tag 'video-updates-for-2019.07-rc3' of git://git.denx.de/u-boot-video

- mxsfb DM_VIDEO conversion
- splash fix for DM_VIDEO configurations
- meson HDMI fix for boards without hdmi-supply regulator

5 years agoMerge tag 'u-boot-atmel-fixes-2019.07-a' of git://git.denx.de/u-boot-atmel
Tom Rini [Mon, 10 Jun 2019 13:41:00 +0000 (09:41 -0400)]
Merge tag 'u-boot-atmel-fixes-2019.07-a' of git://git.denx.de/u-boot-atmel

First set of u-boot-atmel fixes for 2019.07 cycle

5 years agodm: MIGRATION: Update migration status for SPI
Jagan Teki [Sun, 28 Apr 2019 20:28:54 +0000 (01:58 +0530)]
dm: MIGRATION: Update migration status for SPI

Now, we have few driver are fully converted into dm and few
are partially converted.

So, update the migration status accordingly.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Convert to DM
Jagan Teki [Sun, 28 Apr 2019 20:28:53 +0000 (01:58 +0530)]
spi: mpc8xxx: Convert to DM

Support DM in the MPC8xxx SPI driver, and remove the legacy SPI
interface.

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

The comment before the transmission loop in conjunction with the
definition of SPI_TIMEOUT as 1000 implies that the loop is supposed to
have a timeout value of 1000 ms. But since there is no mdelay(1) or
similar in the loop body, the loop just runs 1000 times, without regard
for the time elapsed.

To correct this, use the standard get_timer functionality to properly
time out the loop after 1000 ms.

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

Decreasing the bit length and increasing the write data pointer should
be done when there are more than 32 bit of data, not 16 bit.

This did not produce incorrect behavior, because the only time where the
two checks produce different outcomes is the case of 16 < bitlen < 32,
and in this case the subsequent transmission is the last one regardless,
hence the additional bit length decrease and write data pointer increase
has no effect anyway.

Still, the correct check is the check for "bitlen > 32", so correct this
behavior.

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

Minize the time the adapter is disabled (via SPI_MODE_EN
clearing/setting) to just the character length setting, and only set up
the temporary data writing variable right before we need it, so there is
a more clear distinction between setting up the SPI adapter, and setting
up the data to be written.

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

Instead of having a table right before the code implementing the length
setting for documentation, have inline comments for the if branches
actually implementing the length setting described table's entries
(which is readable thanks to the set_char_len function).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
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 agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Sat, 8 Jun 2019 13:10:31 +0000 (09:10 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra

The bulk of these changes are an effort to unify Tegra186 builds with
builds of prior 64-bit Tegra generations. On top of that there are
various improvements that allow data (such as the MAC address and boot
arguments) to be passed through from early firmware to the kernel on
boot.

5 years agospl: Correct SPL_SIZE_LIMIT Kconfig option
Tom Rini [Sat, 8 Jun 2019 00:39:32 +0000 (20:39 -0400)]
spl: Correct SPL_SIZE_LIMIT Kconfig option

When introduced this limit was an int but was then changed to hex
without noting as much in the prompt nor changing existing users.  Put
this back to an int.

Reported-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Fabio Estevam <festevam@gmail.com>
Fixes: 2577015dc5c4 ("spl: add overall SPL size check")
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge branch '2019-06-07-master-imports'
Tom Rini [Fri, 7 Jun 2019 22:03:18 +0000 (18:03 -0400)]
Merge branch '2019-06-07-master-imports'

- Include Heinrich's series to move the i.MX board size check function
  to be more widely available.
- Include Simon Goldschmidt's patch to make it possible to have a more
  accurate SPL size check applied.

5 years agospl: add overall SPL size check
Simon Goldschmidt [Fri, 24 May 2019 20:07:04 +0000 (22:07 +0200)]
spl: add overall SPL size check

This adds a size check for SPL that can dynamically check generated
SPL binaries (including devicetree) for a size limit that ensures
this image plus global data, heap and stack fit in initial SRAM.

Since some of these sizes are not available to make, a new host tool
'spl_size_limit' is added that dumps the resulting maximum size for
an SPL binary to stdout. This tool is used in toplevel Makefile to
implement the size check on SPL binaries.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoconfigs: rk3288: Tinker Board SPL file must fit into 32 KiB
Heinrich Schuchardt [Tue, 2 Apr 2019 17:19:07 +0000 (19:19 +0200)]
configs: rk3288: Tinker Board SPL file must fit into 32 KiB

The SPL image for the Tinker Board has to fit into 32 KiB. This includes
up to 2 KiB for the file header.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoconfigs: define CONFIG_SPL_SIZE_LIMIT
Heinrich Schuchardt [Tue, 2 Apr 2019 17:19:06 +0000 (19:19 +0200)]
configs: define CONFIG_SPL_SIZE_LIMIT

A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
the board specific maximum size for the SPL file.

Use Makefile function size_check() to implement the test.

Depending on the size of CONFIG_SPL_SIZE_LIMIT an error like the following
is thrown:

spl/u-boot-spl.bin exceeds file size limit:
  limit:  30720 bytes
  actual: 33426 bytes
  excess: 2706 bytes
make: *** [Makefile:1663: spl/u-boot-spl.bin] Error 1

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoimx: move BOARD_SIZE_CHECK to main Makefile
Heinrich Schuchardt [Tue, 2 Apr 2019 17:19:05 +0000 (19:19 +0200)]
imx: move BOARD_SIZE_CHECK to main Makefile

We currently have duplicate definitions for BOARD_SIZE_CHECK in Makefile
and arch/arm/mach-imx/Makefile.

Move the board size check from arch/arm/mach-imx/Makefile to Makefile.

Depending on the value of CONFIG_BOARD_SIZE_LIMIT an error like an error
like the following is thrown:

u-boot-dtb.imx exceeds file size limit:
  limit:  503696 bytes
  actual: 509720 bytes
  excess: 6024 bytes
make: *** [Makefile:1051: u-boot-dtb.imx] Error 1

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agoMakefile: reusable function for BOARD_SIZE_CHECK
Heinrich Schuchardt [Tue, 2 Apr 2019 17:19:04 +0000 (19:19 +0200)]
Makefile: reusable function for BOARD_SIZE_CHECK

Carve out function size_check from macro BOARD_SIZE_CHECK. This will allow
us to reuse the function for other file size checks.

Depending on the value of CONFIG_BOARD_SIZE_LIMIT an error like the
following is thrown:

u-boot-dtb.img exceeds file size limit:
  limit:  409516 bytes
  actual: 444346 bytes
  excess: 34830 bytes
make: *** [Makefile:1212: u-boot-dtb.img] Error 1

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agolib/vsprintf: allow printing upper case GUIDs
Heinrich Schuchardt [Mon, 29 Apr 2019 06:08:43 +0000 (08:08 +0200)]
lib/vsprintf: allow printing upper case GUIDs

In the UEFI context GUIDs are expected to be rendered in upper case.

The patch uses the formerly unused bit 1 of the parameter str_format
of function uuid_bin_to_str() to indicate if we need upper or lower case
output.

Function uuid_string() in vsprint.c is adjusted to correctly set the bit
depending on the print format code.

%pUb: 01020304-0506-0708-090a-0b0c0d0e0f10
%pUB: 01020304-0506-0708-090A-0B0C0D0E0F10
%pUl: 04030201-0605-0807-090a-0b0c0d0e0f10
%pUL: 04030201-0605-0807-090A-0B0C0D0E0F10

Up to this point only a diagnostic message in mount_ubifs() using '%pUB' is
concerned by the change. Further patches are needed to adjust the UEFI
subsystem.

A unit test is provided inside the ut_print command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoconfigs: at91: sama5d2_icp: enable CONFIG_SPL_AT91_MCK_BYPASS and resync
Eugen Hristev [Fri, 24 May 2019 06:40:08 +0000 (09:40 +0300)]
configs: at91: sama5d2_icp: enable CONFIG_SPL_AT91_MCK_BYPASS and resync

Enabled CONFIG_SPL_AT91_MCK_BYPASS and resync with savedefconfig

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
5 years agospl: at91: add support for SPL_AT91_MCK_BYPASS
Eugen Hristev [Fri, 24 May 2019 06:38:10 +0000 (09:38 +0300)]
spl: at91: add support for SPL_AT91_MCK_BYPASS

By default the configuration of the PMC is to have an external crystal
connected that requires driving on both XIN and XOUT pins.
The bypass configuration means that only XIN will be used, the SoC will not
do any driving, and the XIN needs to be provided with a proper signal.
This is the MOSCXTBY bit in the PMC main clock generator register.
The SPL needs to properly initialize the PMC registers before switching
to external clock signal and raising the clock to the cruise speed.

Also created Kconfig for this specific configuration.
By default this is disabled.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
5 years agoMerge tag 'efi-2019-07-rc4-2' of git://git.denx.de/u-boot-efi
Tom Rini [Wed, 5 Jun 2019 19:53:18 +0000 (15:53 -0400)]
Merge tag 'efi-2019-07-rc4-2' of git://git.denx.de/u-boot-efi

Pull request for UEFI sub-system for v2019.07-rc4-2

Support for managing the non-volatile attribute of UEFI variables
is added though we do not have a backend for persistence yet.

Error messages for changes of UEFI variables are provided.

UEFI boottime service implementations are corrected.

5 years agoMerge branch '2019-06-05-master-imports'
Tom Rini [Wed, 5 Jun 2019 19:49:09 +0000 (15:49 -0400)]
Merge branch '2019-06-05-master-imports'

- More DaVinci fixes
- BuR platform fix

5 years agoARM: tegra: Mark built-in Ethernet as default on Jetson TX2
Thierry Reding [Mon, 15 Apr 2019 09:32:38 +0000 (11:32 +0200)]
ARM: tegra: Mark built-in Ethernet as default on Jetson TX2

Add an "ethernet" alias that points to the default network interface,
which is the built-in EQoS on Jetson TX2.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Rename pcie-controller to pcie
Thierry Reding [Mon, 15 Apr 2019 09:32:37 +0000 (11:32 +0200)]
ARM: tegra: Rename pcie-controller to pcie

Recent versions of DTC have checks for PCI host bridge device tree nodes
that are named something other than "pci" or "pcie". Fix all occurrences
of such nodes for Tegra boards to avoid potential warnings from DTC.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agop2771-0000: Add support for framebuffer carveouts
Thierry Reding [Mon, 15 Apr 2019 09:32:36 +0000 (11:32 +0200)]
p2771-0000: Add support for framebuffer carveouts

If early firmware initialized the display hardware and the display
controllers are scanning out a framebuffer (e.g. a splash screen), make
sure to pass information about the memory location of that framebuffer
to the kernel before booting to avoid the kernel from using that memory
for the buddy allocator.

This same mechanism can also be used in the kernel to set up early SMMU
mappings and avoid SMMU faults caused by the display controller reading
from memory for which it has no mapping.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agop2371-2180: Add support for framebuffer carveouts
Thierry Reding [Mon, 15 Apr 2019 09:32:35 +0000 (11:32 +0200)]
p2371-2180: Add support for framebuffer carveouts

If early firmware initialized the display hardware and the display
controllers are scanning out a framebuffer (e.g. a splash screen), make
sure to pass information about the memory location of that framebuffer
to the kernel before booting to avoid the kernel from using that memory
for the buddy allocator.

This same mechanism can also be used in the kernel to set up early SMMU
mappings and avoid SMMU faults caused by the display controller reading
from memory for which it has no mapping.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agop2771-0000: Pass Ethernet MAC to the kernel
Thierry Reding [Mon, 15 Apr 2019 09:32:34 +0000 (11:32 +0200)]
p2771-0000: Pass Ethernet MAC to the kernel

Pass the ethernet MAC address to the kernel upon boot. This passes both
the local-mac-address property (as passed to U-Boot from cboot) and the
currently set MAC address via the mac-address property. The latter will
only be set if it is different from the address that was already passed
via the local-mac-address property.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agop2371-2180: Pass Ethernet MAC to the kernel
Thierry Reding [Mon, 15 Apr 2019 09:32:33 +0000 (11:32 +0200)]
p2371-2180: Pass Ethernet MAC to the kernel

Pass the ethernet MAC address to the kernel upon boot. This passes both
the local-mac-address property (as passed to U-Boot from cboot) and the
currently set MAC address via the mac-address property. The latter will
only be set if it is different from the address that was already passed
via the local-mac-address property.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Enable position independent build for 64-bit
Thierry Reding [Mon, 15 Apr 2019 09:32:32 +0000 (11:32 +0200)]
ARM: tegra: Enable position independent build for 64-bit

Note that U-Boot is always chainloaded from cboot starting with L4T
release 28. cboot always loads U-Boot to a fixed address, so making
the builds position independent isn't strictly necessary. However,
position independent builds can be convenient because if U-Boot is
ever loaded to an address different from its link address, it will
still be able to boot.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Import cbootargs value from cboot DTB
Thierry Reding [Mon, 15 Apr 2019 09:32:31 +0000 (11:32 +0200)]
ARM: tegra: Import cbootargs value from cboot DTB

Read the boot arguments passed by cboot via the /chosen/bootargs
property and store it in the cbootargs environment variable.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Implement cboot_get_ethaddr()
Thierry Reding [Mon, 15 Apr 2019 09:32:30 +0000 (11:32 +0200)]
ARM: tegra: Implement cboot_get_ethaddr()

This function will attempt to look up an Ethernet address in the DTB
that was passed in from cboot. It does so by first trying to locate the
default Ethernet device for the board (identified by the "ethernet"
alias) and if found, reads the "local-mac-address" property. If the
"ethernet" alias does not exist, or if it points to a device tree node
that doesn't exist, or if the device tree node that it points to does
not have a "local-mac-address" property or if the value is invalid, it
will fall back to the legacy mechanism of looking for the MAC address
stored in the "nvidia,ethernet-mac" or "nvidia,ether-mac" properties of
the "/chosen" node.

The MAC address is then written to the default Ethernet device for the
board (again identified by the "ethernet" alias) in U-Boot's control
DTB. This allows the device driver for that device to read the MAC
address from the standard location in device tree.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Implement cboot_save_boot_params() in C
Thierry Reding [Mon, 15 Apr 2019 09:32:29 +0000 (11:32 +0200)]
ARM: tegra: Implement cboot_save_boot_params() in C

This is easier to deal with and works just as well for this simple
function.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Unify Tegra186 builds
Thierry Reding [Mon, 15 Apr 2019 09:32:28 +0000 (11:32 +0200)]
ARM: tegra: Unify Tegra186 builds

Tegra186 build are currently dealt with in very special ways, which is
because Tegra186 is fundamentally different in many respects. It is no
longer necessary to do many of the low-level programming because early
boot firmware will already have taken care of it.

Unfortunately, separating Tegra186 builds from the rest in this way
makes it difficult to share code with prior generations of Tegra. With
all of the low-level programming code behind Kconfig guards, the build
for Tegra186 can again be unified.

As a side-effect, and partial reason for this change, other Tegra SoC
generations can now make use of the code that deals with taking over a
boot from earlier bootloaders. This used to be nvtboot, but has been
replaced by cboot nowadays. Rename the files and functions related to
this to avoid confusion. The implemented protocols are unchanged.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Restore DRAM bank count
Thierry Reding [Mon, 15 Apr 2019 09:32:27 +0000 (11:32 +0200)]
ARM: tegra: Restore DRAM bank count

Commit 86cf1c82850f ("configs: Migrate CONFIG_NR_DRAM_BANKS") reduced
the number of DRAM banks supported by U-Boot from 1026 to 8 on P2771-000
boards.

However, as explained in commit a9819b9e33bd ("ARM: tegra: p2771-000:
increase max DRAM bank count"), the platform can have a large number of
unusable chunks of memory (up to 1024), so a total of 1026 DRAM banks
are needed to describe the worst-case situation.

In practice the number of DRAM banks needed will typically be much
lower, but we should be prepared to properly deal with the worst case.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Workaround UDC boot issues only if necessary
Thierry Reding [Mon, 15 Apr 2019 09:32:26 +0000 (11:32 +0200)]
ARM: tegra: Workaround UDC boot issues only if necessary

Resetting the USB device controller on boot is only necessary if the SoC
actually has a UDC controller and U-Boot enables support for it. All the
Tegra boards support UDC via the ChipIdea UDC driver, so make the UDC on
boot workaround depend on the ChipIdea UDC driver.

This prevents a crash on Tegra186 which does not have the ChipIdea UDC.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Support TZ-only access to PMC
Thierry Reding [Mon, 15 Apr 2019 09:32:25 +0000 (11:32 +0200)]
ARM: tegra: Support TZ-only access to PMC

Some devices may restrict access to the PMC to TrustZone software only.
Non-TZ software can detect this and use SMC calls to the firmware that
runs in the TrustZone to perform accesses to PMC registers.

Note that this also fixes reset_cpu() and the enterrcm command on
Tegra186 where they were previously trying to access the PMC at a wrong
physical address.

Based on work by Kalyani Chidambaram <kalyanic@nvidia.com> and Tom
Warren <twarren@nvidia.com>.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Allow boards to override boot target devices
Thierry Reding [Mon, 15 Apr 2019 09:32:24 +0000 (11:32 +0200)]
ARM: tegra: Allow boards to override boot target devices

Boards may not support all the boot target devices in the default list
for Tegra devices. Allow a board to override the list and default to the
standard list only if the board hasn't specified one itself.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Fix save_boot_params() prototype
Thierry Reding [Mon, 15 Apr 2019 09:32:23 +0000 (11:32 +0200)]
ARM: tegra: Fix save_boot_params() prototype

The save_boot_params() function takes as its first four arguments the
first four registers. On 32-bit ARM these are r0, r1, r2 and r3, all of
which are 32 bits wide. However, on 64-bit ARM thene registers are x0,
x1, x2 and x3, all of which are 64 bits wide. In order to allow reusing
the save_boot_params() implementation on 64-bit ARM, change it to take
unsigned long parameters rather than the fixed size 32-bit integers.
This ensures that the correct values are passed.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Guard powergate code with a Kconfig symbol
Thierry Reding [Mon, 15 Apr 2019 09:32:22 +0000 (11:32 +0200)]
ARM: tegra: Guard powergate code with a Kconfig symbol

Powergate code is not relevant on all Tegra SoC generations, so guard it
with a Kconfig symbol that can be selected by the generations that need
it.

This is in preparation for unifying Tegra186 code with the code used on
older generations.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Guard pin controller code with a Kconfig symbol
Thierry Reding [Mon, 15 Apr 2019 09:32:21 +0000 (11:32 +0200)]
ARM: tegra: Guard pin controller code with a Kconfig symbol

Pin controller code is not relevant on all Tegra SoC generations, so
guard it with a Kconfig symbol that can be selected by the generations
that need it.

This is in preparation for unifying Tegra186 code with the code used on
older generations.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Guard memory controller code with a Kconfig symbol
Thierry Reding [Mon, 15 Apr 2019 09:32:20 +0000 (11:32 +0200)]
ARM: tegra: Guard memory controller code with a Kconfig symbol

Memory controller code is not relevant on all Tegra SoC generations, so
guard it with a Kconfig symbol that can be selected by the generations
that need it.

This is in preparation for unifying Tegra186 code with the code used on
older generations.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Guard GP pad control code with a Kconfig symbol
Thierry Reding [Mon, 15 Apr 2019 09:32:19 +0000 (11:32 +0200)]
ARM: tegra: Guard GP pad control code with a Kconfig symbol

The GP pad control code is not relevant on all Tegra SoC generations, so
guard it with a Kconfig symbol that can be selected by the generations
that need it.

This is in preparation for unifying Tegra186 code with the code used on
older generations.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Guard clock code with a Kconfig symbol
Thierry Reding [Mon, 15 Apr 2019 09:32:18 +0000 (11:32 +0200)]
ARM: tegra: Guard clock code with a Kconfig symbol

Clock code is not relevant on all Tegra SoC generations, so guard it
with a Kconfig symbol that can be selected by the generations that need
it.

This is in preparation for unifying Tegra186 code with the code used on
older generations.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Use common header for PMU declarations
Thierry Reding [Mon, 15 Apr 2019 09:32:17 +0000 (11:32 +0200)]
ARM: tegra: Use common header for PMU declarations

There's no need to replicate the pmu.h header file for every Tegra SoC
generation. Use a single header that is shared across generations.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Remove disp1 clock initialization on Tegra210
Thierry Reding [Mon, 15 Apr 2019 09:32:16 +0000 (11:32 +0200)]
ARM: tegra: Remove disp1 clock initialization on Tegra210

pll_c is not a valid parent for the disp1 clock, so trying to set it
will fail. Given that display is not used in U-Boot, remove the init
table entry so that disp1 will keep its default parent (clk_m).

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Fix mux type for disp1 and disp2 clocks on Tegra210
Thierry Reding [Mon, 15 Apr 2019 09:32:15 +0000 (11:32 +0200)]
ARM: tegra: Fix mux type for disp1 and disp2 clocks on Tegra210

On Tegra210 the parents for the disp1 and disp2 clocks are slightly
different from earlier chips. Only pll_p, pll_d_out0, pll_d2_out0 and
clk_m are valid parents (technically pll_d_out is as well, but U-Boot
doesn't know anything about it). Fix up the type name and the mux
definition.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agolib: Implement strndup()
Thierry Reding [Mon, 15 Apr 2019 09:32:14 +0000 (11:32 +0200)]
lib: Implement strndup()

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agofdtdec: Add fdtdec_set_ethernet_mac_address()
Thierry Reding [Mon, 15 Apr 2019 09:32:13 +0000 (11:32 +0200)]
fdtdec: Add fdtdec_set_ethernet_mac_address()

This function can be used to set the local MAC address for the default
Ethernet interface in its device tree node. The default interface is
identified by the "ethernet" alias.

One case where this is useful is for devices that store their MAC
address in a custom location. Once extracted, board code can store the
MAC address in U-Boot's control DTB so that it will automatically be
used by the Ethernet uclass.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agocmd/led: check subcommand "list" instead "l"
Heiko Schocher [Mon, 27 May 2019 06:14:16 +0000 (08:14 +0200)]
cmd/led: check subcommand "list" instead "l"

current implementation for checking if "led list"
command is called checks only if "l" is passed to the
led command. This prevents switching leds with name
which starts also with a "l". So check for passing
"list".

While at it, also fix a typo in led command usage.

Signed-off-by: Heiko Schocher <hs@denx.de>
5 years agoboard: am335x/mux: configure the pins for 8-bit data transfer on MMC1
Jean-Jacques Hiblot [Thu, 23 May 2019 12:07:23 +0000 (14:07 +0200)]
board: am335x/mux: configure the pins for 8-bit data transfer on MMC1

This is required for proper operation of the 8-bit data transfers.
This fixes transient errors seen on BeagleBone Black.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agoboard/km: update maintainer e-mail
Holger Brunck [Tue, 4 Jun 2019 12:10:32 +0000 (14:10 +0200)]
board/km: update maintainer e-mail

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
5 years agoarm: davinci: remove leftover assembly
Bartosz Golaszewski [Wed, 29 May 2019 08:02:00 +0000 (10:02 +0200)]
arm: davinci: remove leftover assembly

There are no more users of lowlevel_init.S. Remove the file.

Suggested-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agoconfigs/legoev3: define CONFIG_SKIP_LOWLEVEL_INIT
David Lechner [Wed, 29 May 2019 08:01:59 +0000 (10:01 +0200)]
configs/legoev3: define CONFIG_SKIP_LOWLEVEL_INIT

This adds a define for CONFIG_SKIP_LOWLEVEL_INIT in the legoev3 config.
On the EV3, U-Boot is loaded into RAM by another bootloader, so we
don't need the lowlevel init in U-Boot.

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agoARM: da850evm: Fix reading MAC from SPI
Adam Ford [Wed, 29 May 2019 14:36:58 +0000 (09:36 -0500)]
ARM: da850evm: Fix reading MAC from SPI

The MAC address is located at at the last 64K of SPI Flash, and
it's 6 bytes long.  This patch corrects both the length and
starting byte of the MAC address.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoarm: omap3: Manually initialize GPIO if OF_CONTROL doesn't
Adam Ford [Wed, 29 May 2019 20:42:53 +0000 (15:42 -0500)]
arm: omap3: Manually initialize GPIO if OF_CONTROL doesn't

The commong initialization code manually initializes the GPIO
even when OF_CONTROL does it, so we can reduce the code size a
bit by not doing it manually when we have device tree support.

Using the omap3_logic board (dm3730), the sizes shrunk:

Before:

   text    data     bss     dec     hex filename
 561066   28596  116880  706542   ac7ee u-boot
  55245    1605    1888   58738    e572 spl/u-boot-spl

After
  text    data     bss     dec     hex filename
 560898   28548  116872  706318   ac70e u-boot
  55121    1557    1888   58566    e4c6 spl/u-boot-spl

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: DTS: imx6q-logicpd: Resync with Linux 5.1
Adam Ford [Fri, 31 May 2019 12:09:22 +0000 (07:09 -0500)]
ARM: DTS: imx6q-logicpd: Resync with Linux 5.1

Resync imx6q-logicpd with Kernel 5.1.5

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: davinci: Remove ipam390 linker script from Kconfig
Adam Ford [Thu, 30 May 2019 23:04:44 +0000 (18:04 -0500)]
ARM: davinci: Remove ipam390 linker script from Kconfig

With ipam390 support removed in we can remove the reference to the
linker script since that case will never be true.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agoARM: davinci: SPL: fix BSS initialization
Sekhar Nori [Thu, 30 May 2019 13:34:55 +0000 (19:04 +0530)]
ARM: davinci: SPL: fix BSS initialization

U-Boot README recommends initializing SDRAM in board_init_f(). DA850
was doing it as part of board_init_r() (through call to spl_board_init()
which calls arch_cpu_init() which calls da850_ddr_setup())

This worked fine till commit 15b8c7505819 ("davinci:
da850evm/omapl138-lcdk: Move BSS to SDRAM because SRAM is full") moved
BSS to SDRAM.

Functions like mmc_initialize() called in board_init_r() assume BSS is
available. Since SDRAM was not initialized when arch/arm/lib/crt0.S tried
to initialize BSS to 0, BSS is not initialized correctly.

Fix this by simply calling arch_cpu_init() from board_init_f(). Also move
preloader_console_init() there to help debug issues with board_init_r().

With this spl_board_init() is no longer needed, we remove it.

Tested using MMC/SD boot on OMAP-L138 LCDK board.

Tested-by: Adam Ford <aford173@gmail.com> #da850evm
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Tested-by: Peter Howard <phoward@gme.net.au> #omapl138_lcdk
5 years agoARM: davinci: omal138_lcdk: fix MMC boot breakage due to driver model conversion
Sekhar Nori [Thu, 30 May 2019 13:34:54 +0000 (19:04 +0530)]
ARM: davinci: omal138_lcdk: fix MMC boot breakage due to driver model conversion

commit 21af33ed0319 ("ARM: davinci: omapl138_lcdk: Enable DM_MMC")
wanted to enable DM_MMC only for U-Boot and not for SPL.

But CONFIG_DM_MMC is defined for SPL build too. Because of this
MMC device was not getting registered for SPL causing MMC/SD
boot breakage.

Instead use CONFIG_IS_ENABLED(DM_MMC) which will remain false until
CONFIG_SPL_DM_MMC is defined.

Tested-by: Adam Ford <aford173@gmail.com> #da850evm
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Tested-by: Peter Howard <phoward@gme.net.au> #omapl138_lcdk
5 years agoboard/BuR/common: fix detection for PSC/STM resetcontroller
Hannes Schmelzer [Fri, 10 May 2019 09:22:00 +0000 (11:22 +0200)]
board/BuR/common: fix detection for PSC/STM resetcontroller

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
5 years agoMerge git://git.denx.de/u-boot-riscv
Tom Rini [Wed, 5 Jun 2019 14:07:31 +0000 (10:07 -0400)]
Merge git://git.denx.de/u-boot-riscv

- Support Microchip MPFS Icicle board.
- Enable e1000 and nvme support for qemu.
- Enable PCI host ECAM generic driver for qemu.
- Increase the environment size to 128kB for qemu.

5 years agovideo: meson: hdmi-supply regulator should be optional
Maxime Jourdan [Tue, 4 Jun 2019 20:26:19 +0000 (22:26 +0200)]
video: meson: hdmi-supply regulator should be optional

Some boards don't have such a regulator, and don't need one to enable
HDMI display. Make it optional, fixing hdmi display for those boards.

Also surround the regulator code with a config check on DM_REGULATOR.

Reported-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
5 years agoriscv: Add Microchip MPFS Icicle board support
Padmarao Begari [Tue, 28 May 2019 10:17:51 +0000 (15:47 +0530)]
riscv: Add Microchip MPFS Icicle board support

This patch adds Microchip MPFS Icicle board support.
For now, NS16550 serial driver is only enabled.
The Microchip MPFS Icicle defconfig by default builds
U-Boot for M-Mode with SMP support.

Signed-off-by: Padmarao Begari <padmarao.begari@microchip.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
5 years agoriscv: qemu: Enable e1000 and nvme support
Bin Meng [Wed, 15 May 2019 15:42:59 +0000 (08:42 -0700)]
riscv: qemu: Enable e1000 and nvme support

Since we have added the PCI support to the 'virt' target, enable
e1000 and NVME as alternate network and storage devices for these
virtio based devices.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Tested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
5 years agoriscv: qemu: Enable PCI host ECAM generic driver
Bin Meng [Wed, 15 May 2019 15:42:58 +0000 (08:42 -0700)]
riscv: qemu: Enable PCI host ECAM generic driver

QEMU 4.0.0 'virt' target integrates a generic ECAM PCI host.
Enable the driver for it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Tested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
5 years agoriscv: increase the environment size for the qemu-riscv platform to 128kB
Karsten Merker [Sun, 5 May 2019 21:36:29 +0000 (23:36 +0200)]
riscv: increase the environment size for the qemu-riscv platform to 128kB

The existing default size of 4kB is too small as the default environment
has already nearly that size and defining a single additional environment
variable can exceed the available space.

Signed-off-by: Karsten Merker <merker@debian.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agocmd: env: add -nv option for UEFI non-volatile variable
AKASHI Takahiro [Tue, 4 Jun 2019 06:52:11 +0000 (15:52 +0900)]
cmd: env: add -nv option for UEFI non-volatile variable

With this option, -nv, at "setenv -e" command, a variable will be defined
as non-volatile.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agocmd: efidebug: make some boot variables non-volatile
AKASHI Takahiro [Tue, 4 Jun 2019 06:52:10 +0000 (15:52 +0900)]
cmd: efidebug: make some boot variables non-volatile

Boot####, BootOrder and BootNext should be non-volatile.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: bootmgr: make BootNext non-volatile
AKASHI Takahiro [Tue, 4 Jun 2019 06:52:09 +0000 (15:52 +0900)]
efi_loader: bootmgr: make BootNext non-volatile

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: variable: support non-volatile attribute
AKASHI Takahiro [Tue, 4 Jun 2019 06:52:06 +0000 (15:52 +0900)]
efi_loader: variable: support non-volatile attribute

The attribute, EFI_VARIABLE_NON_VOLATILE, should be encoded as "nv" flag
in U-Boot variable if specified.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agocolibri_imx7_emmc: enable DM_VIDEO
Igor Opaniuk [Mon, 3 Jun 2019 21:06:01 +0000 (00:06 +0300)]
colibri_imx7_emmc: enable DM_VIDEO

Enable DM_VIDEO for Colibri iMX7 eMMC version.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoARM: dts: colibri_imx7: Add lcdif node
Igor Opaniuk [Mon, 3 Jun 2019 21:06:00 +0000 (00:06 +0300)]
ARM: dts: colibri_imx7: Add lcdif node

Extend lcdif DT node with proper display-timings for mxsfb driver.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agovideo: mxsfb: add DM_VIDEO support
Igor Opaniuk [Mon, 3 Jun 2019 21:05:59 +0000 (00:05 +0300)]
video: mxsfb: add DM_VIDEO support

Extend the driver to build with DM_VIDEO enabled. DTS files
must additionally include 'u-boot,dm-pre-reloc' property in
soc and child nodes to enable driver binding to mxsfb device.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agovideo: mxsfb: refactor video_hw_init()
Igor Opaniuk [Mon, 3 Jun 2019 21:05:58 +0000 (00:05 +0300)]
video: mxsfb: refactor video_hw_init()

Refactor video_hw_init() function, and introduce an independent function
for the common procedure of initialization.

Currently video_hw_init() is only in charge of parsing configuration from
env("videomode") and filling struct GraphicPanel, and new
mxs_probe_common() does hw specific initialization (invocation of
mxs_lcd_init() etc.)

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agovideo: mxsfb: reorder includes
Igor Opaniuk [Mon, 3 Jun 2019 21:05:57 +0000 (00:05 +0300)]
video: mxsfb: reorder includes

Follow alphabetical order of includes, which simplifies detecting duplicate
includes etc.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agovideo: mxsfb: change mxs_lcd_init signature
Igor Opaniuk [Mon, 3 Jun 2019 21:05:56 +0000 (00:05 +0300)]
video: mxsfb: change mxs_lcd_init signature

Provide directly framebuffer address instead of pointer to
GraphicDevice struct, which will let to re-use this function in
DM_VIDEO configurations.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri imx6/t20: enable CONFIG_SYS_WHITE_ON_BLACK
Igor Opaniuk [Thu, 30 May 2019 15:00:08 +0000 (18:00 +0300)]
colibri imx6/t20: enable CONFIG_SYS_WHITE_ON_BLACK

Enable CONFIG_SYS_WHITE_ON_BLACK by default for DM_VIDEO enabled
configurations, where env("splashimage") is used for showing Toradex
boot logo.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agosplash: display splash in DM_VIDEO configurations
Igor Opaniuk [Wed, 29 May 2019 09:01:43 +0000 (09:01 +0000)]
splash: display splash in DM_VIDEO configurations

Currently for CONFIG_DM_VIDEO=y setting splashimage env variable doesn't
have any effect. Introduce a common function for both dm-video/lcd stacks,
that checks env("splashimage") and invokes bmp_display() accordingly.
For additional details please check discussion [1].

[1] https://lists.denx.de/pipermail/u-boot/2019-May/371002.html

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoefi_loader: notify memory map changes
Heinrich Schuchardt [Tue, 4 Jun 2019 18:55:12 +0000 (20:55 +0200)]
efi_loader: notify memory map changes

When the memory map is changed signal events of the
EFI_EVENT_GROUP_MEMORY_MAP_CHANGE event group.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agocmd: env: print a message when setting UEFI variable failed
AKASHI Takahiro [Tue, 28 May 2019 00:00:35 +0000 (09:00 +0900)]
cmd: env: print a message when setting UEFI variable failed

Error message will alert a user that setting/deleting a variable failed.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: bootmgr: print a message when loading from BootNext failed
AKASHI Takahiro [Wed, 29 May 2019 18:54:25 +0000 (20:54 +0200)]
efi_loader: bootmgr: print a message when loading from BootNext failed

If a user defines BootNext but not BootOrder and loading from BootNext
fails, you will see only a message like this:
BootOrder not defined

This may confuse a user. Adding an error message will be helpful.

An example output looks like this:

=> efidebug boot add 0001 label1 scsi 0:1 "\path1\file1.efi" "--option foo"
=> efidebug boot add 0002 label2 scsi 0:1 "\path2\file2.efi" "--option bar"
=> efidebug boot add 0003 label3 scsi 0:1 "\path3\file3.efi" "--option no"
=> efidebug boot order 0001 0002
=> efidebug boot next 0003
=> bootefi bootmgr
Loading from Boot0003 'label3' failed
Loading from BootNext failed, falling back to BootOrder
Loading from Boot0001 'label1' failed
Loading from Boot0002 'label2' failed
EFI boot manager: Cannot load any image

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Adjust messages.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: close protocols in UnloadImage()
Heinrich Schuchardt [Sun, 2 Jun 2019 18:02:32 +0000 (20:02 +0200)]
efi_loader: close protocols in UnloadImage()

When UnloadImage() is called all protocols opened by the image have to be
closed.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>