oweals/u-boot.git
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 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 agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Tue, 4 Jun 2019 12:03:41 +0000 (08:03 -0400)]
Merge git://git.denx.de/u-boot-marvell

- Enable MMC in SPL to enable DM MMC booting on helios4 (Dennis)

5 years agoarm: mvebu: helios4: add MMC to SPL DT
Dennis Gilmore [Wed, 29 May 2019 14:36:13 +0000 (09:36 -0500)]
arm: mvebu: helios4: add MMC to SPL DT

This allows SPL to load the main U-Boot image from MMC once DM_MMC is
enabled.

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agoMerge tag 'efi-2019-07-rc4' of git://git.denx.de/u-boot-efi
Tom Rini [Sun, 2 Jun 2019 22:19:45 +0000 (18:19 -0400)]
Merge tag 'efi-2019-07-rc4' of git://git.denx.de/u-boot-efi

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

Corrections for boottime services for protocols and for the SetTime()
service are provided.

Error messages for the 'setenv -e' and 'bootefi bootmgr' commands are
added.

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Sun, 2 Jun 2019 12:33:10 +0000 (08:33 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-net

- Basic bug fixes and minor features for 2019.07.

5 years agoefi_selftest: unit test for OpenProtocolInformation()
Heinrich Schuchardt [Sat, 1 Jun 2019 19:00:50 +0000 (21:00 +0200)]
efi_selftest: unit test for OpenProtocolInformation()

Provide a unit test that checks that the open protocol information is
correctly updated when opening and closing protocols.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: CloseProtocol() fix open protocol information
Heinrich Schuchardt [Sat, 1 Jun 2019 18:54:32 +0000 (20:54 +0200)]
efi_loader: CloseProtocol() fix open protocol information

CloseProtocol() must delete all open protocol information records relating
to import parameters not only one.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: open protocol information
Heinrich Schuchardt [Sat, 1 Jun 2019 18:15:10 +0000 (20:15 +0200)]
efi_loader: open protocol information

When a protocol is opened the open protocol information must be updated.
The key fields of the open protocol information records are ImageHandle,
ControllerHandle, and Attributes.

Consider the Attributes field when determining if an open protocol
information record has to be updated or a new one has to be created.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: correct HandleProtocol()
Heinrich Schuchardt [Sat, 1 Jun 2019 17:29:39 +0000 (19:29 +0200)]
efi_loader: correct HandleProtocol()

The UEFI specification requires that when a protocol is opened via
HandleProtocol() the agent handle is the image handle of the EFI firmware
(see chapter on EFI_BOOT_SERVICES.OpenProtocol()).

Let efi_handle_protocol() pass efi_root as agent handle to
efi_open_protocol().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agocmd: mdio: Fix access to arbitrary PHY addresses
Vladimir Oltean [Thu, 30 May 2019 00:08:32 +0000 (03:08 +0300)]
cmd: mdio: Fix access to arbitrary PHY addresses

Alex reported the following:

  "
  I'm doing some MDIO work on a freescale/NXP platform and I bumped into
  errors with this command:
  => mdio r emdio#3 5 3
  Reading from bus emdio#3
  "Synchronous Abort" handler, esr 0x8600000e
  elr: ffffffff862b8000 lr : 000000008200cce4 (reloc)
  ...

  mdio list does not list any PHYs currently because ethernet is using DM
  and the interfaces are not probed at this time.  The PHY does exist
  on the bus though.
  The above scenario works with this commit reverted:
  e55047ec51a662c12ed53ff543ec7cdf158b2137 cmd: mdio: Switch to generic
  helpers when accessing the registers

  The current code using generic helpers only works for PHYs that have
  been registered and show up in bus->phymap and crashes for arbitrary
  IDs.  I find it useful to allow reading from other addresses over MDIO
  too, certainly helpful for people debugging MDIO on various boards.
  "

Fix this by reverting to use the raw MDIO bus operations in case there
is no PHY probed based on DT at the specified address.

This restores the old behavior for these PHYs, which means that the
newly introduced MMD-over-C22 helpers won't be available for them, but
at least they will be accessible again without crashing the system.

Fixes: commit e55047ec51a6 ("cmd: mdio: Switch to generic helpers when accessing the registers")
Reported-by: Alex Marginean <alexm.osslist@gmail.com>
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Alex Marginean <alexm.osslist@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agoriscv: sifive: fu540: Enable GEMGXL MGMT driver
Bin Meng [Wed, 22 May 2019 07:09:47 +0000 (00:09 -0700)]
riscv: sifive: fu540: Enable GEMGXL MGMT driver

Enable the new GEMGXL MGMT driver so that GEM 10/100 Mbps works now.

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 agodm: net: macb: Implement link speed change callback
Bin Meng [Wed, 22 May 2019 07:09:46 +0000 (00:09 -0700)]
dm: net: macb: Implement link speed change callback

At present the link speed change callback is a nop. According to
macb device tree bindings, an optional "tx_clk" is used to clock
the ethernet controller's TX_CLK under different link speed.

In 10/100 MII mode, transmit logic must be clocked from a free
running clock generated by the external PHY. In gigabit GMII mode,
the controller, not the external PHY, must generate the 125 MHz
transmit clock towards the PHY.

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>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agodm: net: macb: Update macb_linkspd_cb() signature
Bin Meng [Wed, 22 May 2019 07:09:45 +0000 (00:09 -0700)]
dm: net: macb: Update macb_linkspd_cb() signature

This updates DM version macb_linkspd_cb() signature for future
expansion, eg: adding an implementation for link speed changes.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agoclk: sifive: Add clock driver for GEMGXL MGMT
Bin Meng [Wed, 22 May 2019 07:09:44 +0000 (00:09 -0700)]
clk: sifive: Add clock driver for GEMGXL MGMT

This adds a clock driver to support the GEMGXL management IP block
found in FU540 SoCs to control GEM TX clock operation mode for
10/100/1000 Mbps.

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 agonet: eth-uclass: Support device tree MAC addresses
Thierry Reding [Mon, 20 May 2019 15:59:57 +0000 (17:59 +0200)]
net: eth-uclass: Support device tree MAC addresses

Add the standard Ethernet device tree bindings (imported from v5.0 of
the Linux kernel) and implement support for reading the MAC address for
Ethernet devices in the Ethernet uclass. If the "mac-address" property
exists, the MAC address will be parsed from that. If that property does
not exist, the "local-mac-address" property will be tried as fallback.

MAC addresses from device tree take precedence over the ones stored in
a network interface card's ROM.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
5 years agonet: eth-uclass: Write MAC address to hardware after probe
Thierry Reding [Mon, 20 May 2019 15:59:56 +0000 (17:59 +0200)]
net: eth-uclass: Write MAC address to hardware after probe

In order for the device to use the proper MAC address, which can have
been configured in the environment prior to the device being registered,
ensure that the MAC address is written after the device has been probed.
For devices that are registered before the network stack is initialized,
this is already done during eth_initialize(). If the Ethernet device is
on a bus that is not initialized on early boot, such as PCI, the device
is not available at the time eth_initialize() is called, so we need the
MAC address programming to also happen after probe.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
5 years agoefi_loader: Kconfig entries for GetTime(), SetTime()
Heinrich Schuchardt [Fri, 31 May 2019 20:56:02 +0000 (22:56 +0200)]
efi_loader: Kconfig entries for GetTime(), SetTime()

The GetTime() and the SetTime() runtime services are not obligatory. So
let's make them customizable.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: handling of daylight saving time
Heinrich Schuchardt [Fri, 31 May 2019 20:08:45 +0000 (22:08 +0200)]
efi_loader: handling of daylight saving time

If SetTime() is meant to set daylight saving time it will be called with
Time.Daylight == EFI_TIME_ADJUST_DAYLIGHT | EFI_TIME_IN_DAYLIGHT.

Return 0 from GetTime() if time is not in daylight because we cannot
determine if we are in a time zone with daylight saving time.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: export efi_set_time()
Heinrich Schuchardt [Fri, 31 May 2019 05:38:29 +0000 (07:38 +0200)]
efi_loader: export efi_set_time()

To let a board implement the runtime version of SetTime() we have to
provide the definition of the weak function in an include.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: check time in SetTime()
Heinrich Schuchardt [Fri, 31 May 2019 05:35:19 +0000 (07:35 +0200)]
efi_loader: check time in SetTime()

The UEFI spec prescribes that we check that the timestamp passed to
SetTime() is checked for validity.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agortc: export rtc_month_days()
Heinrich Schuchardt [Fri, 31 May 2019 05:21:03 +0000 (07:21 +0200)]
rtc: export rtc_month_days()

Export function rtc_month_days() for reuse in the UEFI subsystem.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: correct UninstallProtocolInterface()
Heinrich Schuchardt [Thu, 30 May 2019 18:12:19 +0000 (20:12 +0200)]
efi_loader: correct UninstallProtocolInterface()

When uninstalling a protocol the following steps are needed:
* request all drivers to disconnect
* close protocol for all non-drivers
* check if any open instance of the protocol exists on the handle and
  return EFI_ACCESS_DENIED in this case
* remove the protocol interface

By tort we tested for remaining open protocol instances already after
requesting drivers to disconnect.

With this correction the UEFI SCT II tests for UninstallProtocolInterface()
and ReinstallProtocolInterface are passed.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: avoid crash in OpenProtocol()
Heinrich Schuchardt [Thu, 30 May 2019 12:16:31 +0000 (14:16 +0200)]
efi_loader: avoid crash in OpenProtocol()

When trying to open a protocol exclusively attached drivers have to be
removed. This removes entries in the open protocol information linked list
over which we are looping. As additionally child controllers may have been
removed the only safe thing to do is to restart the loop over the linked
list when a driver is removed.

By observing the return code of DisconnectController() we can eliminate a
loop.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: correct OpenProtocol()
Heinrich Schuchardt [Thu, 30 May 2019 12:16:31 +0000 (14:16 +0200)]
efi_loader: correct OpenProtocol()

If a protocol is opened BY_DRIVER it cannot be opened by another agent
BY_DRIVER.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: registration key in LocateProtocol()
Heinrich Schuchardt [Wed, 29 May 2019 16:06:46 +0000 (18:06 +0200)]
efi_loader: registration key in LocateProtocol()

In LocateProtocol() implement searching by the registration key returned by
RegisterNotifyProtocol().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: factor out efi_check_register_notify_event()
Heinrich Schuchardt [Wed, 29 May 2019 05:46:33 +0000 (07:46 +0200)]
efi_loader: factor out efi_check_register_notify_event()

The code to check if a registration key is a valid key returned by
RegisterProtocolNotify() can be reused. So let us factor it out into a new
function efi_check_register_notify_event().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: bootmgr: print a message when loading from BootNext failed
AKASHI Takahiro [Fri, 24 May 2019 06:59:31 +0000 (15:59 +0900)]
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 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: correct notification of protocol installation
Heinrich Schuchardt [Tue, 21 May 2019 16:19:01 +0000 (18:19 +0200)]
efi_loader: correct notification of protocol installation

When a protocol is installed the handle should be queued for the
registration key of each registered event. LocateHandle() should return the
first handle from the queue for the registration key and delete it from the
queue.

Implement the queueing.

Correct the selftest.

With the patch the UEFI SCT tests for LocateHandle() are passed without
failure.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMerge tag 'rockchip-for-v2019.07-rc3' of git://git.denx.de/u-boot-rockchip
Tom Rini [Fri, 31 May 2019 11:17:09 +0000 (07:17 -0400)]
Merge tag 'rockchip-for-v2019.07-rc3' of git://git.denx.de/u-boot-rockchip

- some fix for rk3399-puma;
- rockchip script make_fit_atf.py cleanup
- Enable TPL for rk3399 orangepi and nanopi4;
- add support for rk3399 boards: Nanopi NEO4, Rockpro64, Rock PI 4;

5 years agoMerge tag 'u-boot-amlogic-20190531' of git://git.denx.de/u-boot-amlogic
Tom Rini [Fri, 31 May 2019 11:16:28 +0000 (07:16 -0400)]
Merge tag 'u-boot-amlogic-20190531' of git://git.denx.de/u-boot-amlogic

- Sync DT with Linux 5.2-rc1 for G12A
- Add USB clock support that was introduced in 5.2-rc1 bindings
- Add currently in-review for Linux eMMC & USB DT for G12A in -u-boot.dtsi
- Fix PHY routing to external PHY when chainloading from a misconfigred bootloader
- Remove useless PHY GPIO reset from q200 board file
- Enable USB support for Amlogic U200 reference board

5 years agoconfigs: u200: enable support for USB Host & Gadget
Neil Armstrong [Fri, 31 May 2019 08:07:56 +0000 (10:07 +0200)]
configs: u200: enable support for USB Host & Gadget

Now the Amlogic G12A DT and drivers are present, enable full USB
on the U200 Reference Design board.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoboards: amlogic-g200: remove phy reset
Neil Armstrong [Tue, 28 May 2019 11:15:15 +0000 (13:15 +0200)]
boards: amlogic-g200: remove phy reset

The PHY reset is now handled by the MAC driver, remove this leftover.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoARM: meson-gx: Reset GXL/GXM to external PHY when not using internal PHY
Neil Armstrong [Tue, 28 May 2019 11:13:19 +0000 (13:13 +0200)]
ARM: meson-gx: Reset GXL/GXM to external PHY when not using internal PHY

When using External PHY, reset the mux to use the external PHY in case U-Boot
was chainloaded from a misconfigured bootloader.

Fixes: 33e3378091 ("ARM: meson: rework soc arch file to prepare for new SoC")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoARM: dts: Add missing DT for Meson G12A support
Neil Armstrong [Tue, 28 May 2019 08:50:38 +0000 (10:50 +0200)]
ARM: dts: Add missing DT for Meson G12A support

The following DT nodes in the process on review for Linux 5.3,
until Linux 5.3 is tagged, add the missing DT nodes in u-boot specific
DTSI files that will be dropped when the v5.3-rc1 DT is synced again.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoclk: meson-g12a: Add PCIE PLL support
Neil Armstrong [Tue, 28 May 2019 08:50:37 +0000 (10:50 +0200)]
clk: meson-g12a: Add PCIE PLL support

The G12A PCIE PLL clock was introduced in Linux 5.2-rc1, and is needed
for USB to operate, add basic support for it and associated gates.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoARM: dts: sync Amlogic G12A DT with Linux 5.2-rc1
Neil Armstrong [Tue, 28 May 2019 08:50:36 +0000 (10:50 +0200)]
ARM: dts: sync Amlogic G12A DT with Linux 5.2-rc1

Sync from Linux commit a188339ca5a3 ("Linux 5.2-rc1")

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agodoc: rockchip: Add doc for rk3399 TPL build/flash
Jagan Teki [Wed, 29 May 2019 08:25:49 +0000 (13:55 +0530)]
doc: rockchip: Add doc for rk3399 TPL build/flash

This patch add documentation for TPL build and flashing steps
for rk3399 boards.

Add full boot log for future reference.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agork3399: nanopi4: Enable TPL
Jagan Teki [Wed, 29 May 2019 08:25:48 +0000 (13:55 +0530)]
rk3399: nanopi4: Enable TPL

Enable TPL for NanoPC T4, NanoPI M4 boards.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agork3399: orangepi: Enable TPL
Jagan Teki [Wed, 29 May 2019 08:25:47 +0000 (13:55 +0530)]
rk3399: orangepi: Enable TPL

Enable TPL for OrangePI rk3399 board.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agorockchip: rk3399: Add Rock PI 4 support
Jagan Teki [Fri, 17 May 2019 10:29:41 +0000 (15:59 +0530)]
rockchip: rk3399: Add Rock PI 4 support

Add initial support for Rock PI 4 board.

Specification
- Rockchip RK3399
- LPDDR4
- eMMC
- SD card slot
- RTL8211E 1Gbps
- HDMI In/Out, DP, MIPI DSI/CSI
- PCIe M.2
- USB 2.0, USB-3.0
- USB C Type

Commit details of rk3399-rock-pi-4.dts sync from Linux 5.1-rc2:
"arm64: dts: rockchip: add ROCK Pi 4 DTS support"
(sha1: 1b5715c602fda7b812af0e190eddcce2812e5417)

Signed-off-by: Akash Gajjar <akash@openedev.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3399: Add Rockpro64 board support
Jagan Teki [Fri, 17 May 2019 10:29:40 +0000 (15:59 +0530)]
rockchip: rk3399: Add Rockpro64 board support

Add initial support for Rockpro64 board.

Specification
- Rockchip RK3399
- 2/4GB Dual-Channel LPDDR3
- SD card slot
- eMMC socket
- 128Mb SPI Flash
- Gigabit ethernet
- PCIe 4X slot
- WiFI/BT module socket
- HDMI In/Out, DP, MIPI DSI/CSI, eDP
- USB 3.0, 2.0
- USB Type C power and data
- GPIO expansion ports
- DC 12V/2A

Commit details of rk3399-rockpro64.dts sync from Linux 5.1-rc2:
"arm64: dts: rockchip: rockpro64 dts add usb regulator"
(sha1: 6db644c79c8d45d73b56bc389aebd85fc3679beb)

'Akash' has sent an initial patch before, so I keep him as board
maintainer and I'm co-maintainer based on our conversation.

Signed-off-by: Akash Gajjar <akash@openedev.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3399: Add Nanopi NEO4 board support
Jagan Teki [Fri, 17 May 2019 10:29:39 +0000 (15:59 +0530)]
rockchip: rk3399: Add Nanopi NEO4 board support

Add initial support for Nanopi NEO4 board.

Specification
- Rockchip RK3399
- 1GB DDR3-1866
- SD card slot
- eMMC Socket
- RTL8211E 1Gbps
- AP6212 WiFI/BT
- HDMI In/Out, DP, MIPI CSI
- USB 3.0, 2.0
- USB Type C power and data
- GPIO expansion ports
- DC 5V/3A

Commit details of rk3399-nanopi-neo4.dts sync from Linux:
"arm64: dts: rockchip: Add Nanopi NEO4 initial support"
(sha1: 092470b537f19788d957aed12d835a179b606014)

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: Cleanup of make_fit_atf.py.
Christoph Muellner [Tue, 7 May 2019 09:11:01 +0000 (11:11 +0200)]
rockchip: Cleanup of make_fit_atf.py.

This patch cleans up make_fit_atf.py in the following way:

* Fix all issues reported by pylint
* Move copyright notice from file-to-generate to script
* Fix of-by-one bugs in loadables property
* Remove commented-out (dead) code.

Besides the bugfix no intended changes.

Tested on RK3399-Q7 with TF-A v2.1 as BL31.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: clk: rk3399: allow requests for all UART clocks
Christoph Muellner [Tue, 7 May 2019 08:58:44 +0000 (10:58 +0200)]
rockchip: clk: rk3399: allow requests for all UART clocks

This patch adds the rate for UART1 and UART3 the same way
as already implemented for UART0 and UART2.

This is required for boards, which have their console output
on these UARTs.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3399: Add option to print on UART3.
Christoph Muellner [Tue, 7 May 2019 08:58:43 +0000 (10:58 +0200)]
rockchip: rk3399: Add option to print on UART3.

The RK3399 SPL does not use a pinctrl driver to setup the UART pins.
Instead it works based on config macros, which set the base address
of the actual UART block.

Currently the RK3399 SPL support UART0 and UART2.
This patch adds UART3 in the same way as UART0.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: pinctrl: rk3399: Add support for UART3.
Christoph Muellner [Tue, 7 May 2019 08:58:42 +0000 (10:58 +0200)]
rockchip: pinctrl: rk3399: Add support for UART3.

This patch adds the missing GRF bit definitions for UART3 on the RK3399.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3399-puma: Move ENV_OFFSET to end of SPI NOR.
Christoph Muellner [Tue, 7 May 2019 08:37:22 +0000 (10:37 +0200)]
rockchip: rk3399-puma: Move ENV_OFFSET to end of SPI NOR.

Puma SoMs have a 4 MB SPI NOR flash.
Therefore we can move the environment to the end of the flash
(4 MiB - 16 kiB) in order to not overlap with SPL.

Reported-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Wed, 29 May 2019 11:28:40 +0000 (07:28 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra

- Audio support

5 years agoMerge branch '2019-05-28-master-imports'
Tom Rini [Wed, 29 May 2019 11:27:52 +0000 (07:27 -0400)]
Merge branch '2019-05-28-master-imports'

- Remove various dead code from DaVinci
- FAT fixes

5 years agoKconfig: Fix SPL_LOAD_FIT description
Marek Vasut [Sat, 25 May 2019 20:53:42 +0000 (22:53 +0200)]
Kconfig: Fix SPL_LOAD_FIT description

Both the SPL_LOAD_FIT and SPL_LOAD_FIT_FULL have the same description.
Adjust the description to make it clear which one is which.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
5 years agofs: fat: allocate a new cluster for root directory of fat32
AKASHI Takahiro [Fri, 24 May 2019 05:10:37 +0000 (14:10 +0900)]
fs: fat: allocate a new cluster for root directory of fat32

Contrary to fat12/16, fat32 can have root directory at any location
and its size can be expanded.
Without this patch, root directory won't grow properly and so we will
eventually fail to add files under root directory. Please note that this
can happen even if you delete many files as deleted directory entries
are not reclaimed but just marked as "deleted" under the current
implementation.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agofs: fat: flush a directory cluster properly
AKASHI Takahiro [Fri, 24 May 2019 05:10:36 +0000 (14:10 +0900)]
fs: fat: flush a directory cluster properly

When a long name directory entry is created, multiple directory entries
may be occupied across a directory cluster boundary. Since only one
directory cluster is cached in a directory iterator, a first cluster must
be written back to device before switching over a second cluster.

Without this patch, some added files may be lost even if you don't see
any failures on write operation.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agofs: fat: write to non-cluster-aligned root directory
AKASHI Takahiro [Fri, 24 May 2019 05:10:35 +0000 (14:10 +0900)]
fs: fat: write to non-cluster-aligned root directory

With the commit below, fat now correctly handles a file read under
a non-cluster-aligned root directory of fat12/16.
Write operation should be fixed in the same manner.

Fixes: commit 9b18358dc05d ("fs: fat: fix reading non-cluster-aligned
       root directory")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Anssi Hannula <anssi.hannula@bitwise.fi>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agocmd: remove unused `display` command
Heinrich Schuchardt [Tue, 21 May 2019 05:49:58 +0000 (07:49 +0200)]
cmd: remove unused `display` command

Compiling the display command leads to an error

    undefined reference to `display_set'

No implementation of display_set() exists in U-Boot.

Eliminate the `display` command as well as the accompanying files.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agodm: arm: bcmstb: Enable driver model MMC support
Thomas Fitzsimmons [Fri, 17 May 2019 12:17:07 +0000 (08:17 -0400)]
dm: arm: bcmstb: Enable driver model MMC support

For bcm7445 and bcm7260, this patch enables CONFIG_DM_MMC and updates
the bcmstb SDHCI driver to use the new driver model.  This allows
removal of SDHCI configuration handling from bcmstb.c, and eliminates
a board removal compile warning.

Signed-off-by: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Reviewed-by: Stefan Roese <sr@denx.de>
5 years agomcx: remove board
Bartosz Golaszewski [Fri, 17 May 2019 09:17:20 +0000 (11:17 +0200)]
mcx: remove board

This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agotwister: remove board
Bartosz Golaszewski [Fri, 17 May 2019 09:17:19 +0000 (11:17 +0200)]
twister: remove board

This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Stefano Babic <sbabic@denx.de>
5 years agomt_ventoux: remove board
Bartosz Golaszewski [Fri, 17 May 2019 09:17:18 +0000 (11:17 +0200)]
mt_ventoux: remove board

This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Stefano Babic <sbabic@denx.de>
5 years agocm_t3517: remove board
Bartosz Golaszewski [Fri, 17 May 2019 09:17:17 +0000 (11:17 +0200)]
cm_t3517: remove board

This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agoipam390: remove board
Bartosz Golaszewski [Fri, 17 May 2019 09:17:16 +0000 (11:17 +0200)]
ipam390: remove board

This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Heiko Schocher <hs@denx.de>
5 years agoeco5pk: remove board
Bartosz Golaszewski [Fri, 17 May 2019 09:17:15 +0000 (11:17 +0200)]
eco5pk: remove board

This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agoea20: remove board
Bartosz Golaszewski [Fri, 17 May 2019 09:17:14 +0000 (11:17 +0200)]
ea20: remove board

This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Stefano Babic <sbabic@denx.de>
5 years agocalimain: remove board
Bartosz Golaszewski [Fri, 17 May 2019 09:17:13 +0000 (11:17 +0200)]
calimain: remove board

This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agoboard/BuR: invalidate ${dtbaddr} before cfgscr
Hannes Schmelzer [Thu, 16 May 2019 15:24:19 +0000 (17:24 +0200)]
board/BuR: invalidate ${dtbaddr} before cfgscr

The first memory location of ${dtbaddr} may be still valid after a warm
restart of the machine and 'fdt addr ${dtbaddr}' doesn't recognize that
the cfgscript didn't run properly and fallback mechanism with copying
the internal fdt ${fdtcontroladdr} to ${dtbaddr} doesn't catch this.

To get sure that we have proper failsafe behaviour we simply zero the
first memory location of ${dtbaddr} for getting sure that the fdt is
invalid if cfgscript didn't run.

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
5 years agofs: fat: Fix possible double free of fatbuf
Andrew F. Davis [Thu, 16 May 2019 14:34:31 +0000 (09:34 -0500)]
fs: fat: Fix possible double free of fatbuf

fat_itr_root() allocates fatbuf so we free it on the exit path, if
the function fails we should not free it, check the return value
and skip freeing if the function fails.

Signed-off-by: Andrew F. Davis <afd@ti.com>
5 years agofs: fat: correct file name normalization
Heinrich Schuchardt [Sun, 12 May 2019 07:59:18 +0000 (09:59 +0200)]
fs: fat: correct file name normalization

File names may not contain control characters (< 0x20).
Simplify the coding.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoPrepare v2019.07-rc3 v2019.07-rc3
Tom Rini [Mon, 27 May 2019 18:29:39 +0000 (14:29 -0400)]
Prepare v2019.07-rc3

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

- defconfig updates to remove the DM-move build warnings for helios4 and
  controlcenterdc (Mario & Stefan)

5 years agoarm: mvebu: controlcenterdc: Update config
Mario Six [Mon, 20 May 2019 12:08:14 +0000 (14:08 +0200)]
arm: mvebu: controlcenterdc: Update config

Several drivers used by the ControlCenterDC board were converted to DM
upstream. But the board had not been using these drivers yet.

Update the board's config file to reflect these changes and use the DM
version of these drivers. No further device tree updates are necessary,
since the devices in question are already present in the device tree.

This especially fixes the three compile warnings about CONFIG_DM_MMC,
CONFIG_DM_USB, and CONFIG_AHCI for the ControlCenterDC board.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agoarm: mvebu: helios4: Enable CONFIG_BLK and CONFIG_DM_MMC
Stefan Roese [Mon, 20 May 2019 07:53:31 +0000 (09:53 +0200)]
arm: mvebu: helios4: Enable CONFIG_BLK and CONFIG_DM_MMC

This patch enables CONFIG_BLK and CONFIG_DM_MMC on helios4 to remove
these compile warnings:

===================== WARNING ======================
This board does not use CONFIG_DM_MMC. Please update
the board to use CONFIG_DM_MMC before the v2019.04 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================
===================== WARNING ======================
This board does not use CONFIG_DM_USB. Please update
the board to use CONFIG_DM_USB before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Dennis Gilmore <dgilmore@redhat.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Mon, 27 May 2019 00:18:20 +0000 (20:18 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- Gen3 PCIe driver + enablement on Salvator-X platforms.
- Gen3 recovery SPL used to reload ATF/OpTee/U-Boot instead of minimon.
- SDHI HS400 fixes ported from latest BSP and datasheet.

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Mon, 27 May 2019 00:15:46 +0000 (20:15 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

- SoCFPGA PL310 cleanup + A10 fix, A10 DT cleanup, DW GPIO fix.

5 years agoconfigs: Resync with savedefconfig
Tom Rini [Sun, 26 May 2019 18:45:25 +0000 (14:45 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoconfigs: Migrate CONFIG_FMAN_ENET and some related options to Kconfig
Tom Rini [Sun, 12 May 2019 11:59:12 +0000 (07:59 -0400)]
configs: Migrate CONFIG_FMAN_ENET and some related options to Kconfig

Move the main symbol for Freescale Fman Ethernet controller option to
Kconfig.  Also migrate the CONFIG_SYS_QE_FMAN_FW_IN_xxx macros and
rename the SPIFLASH one to follow the same format as all of the others.
To do this fully we need to migrate CONFIG_QC, do so.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge tag 'efi-2019-07-rc3-3' of git://git.denx.de/u-boot-efi
Tom Rini [Sat, 25 May 2019 15:34:40 +0000 (11:34 -0400)]
Merge tag 'efi-2019-07-rc3-3' of git://git.denx.de/u-boot-efi

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

Several bug fixes for the UEFI sub-system are provided.
The SetTime() boottime service is implemented.

5 years agoMerge tag 'mips-pull-2019-05-24' of git://git.denx.de/u-boot-mips
Tom Rini [Sat, 25 May 2019 15:34:31 +0000 (11:34 -0400)]
Merge tag 'mips-pull-2019-05-24' of git://git.denx.de/u-boot-mips

- mtmips: network stability fixes for gardena-smart-gateway
- mtmips: enable CONFIG_USE_PREBOOT and CONFIG_CMD_WDT

5 years agotegra: nyan-big: Enable sound
Simon Glass [Mon, 1 Apr 2019 20:38:42 +0000 (13:38 -0700)]
tegra: nyan-big: Enable sound

Enable sound output. With this, 'sound play 1000 400' emits a simple beep.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agotegra: nyan: Add a README
Simon Glass [Mon, 1 Apr 2019 20:38:42 +0000 (13:38 -0700)]
tegra: nyan: Add a README

Add a short note about how to boot U-Boot on Nyan-big using tegrarcm.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agosound: tegra: Add a sound driver
Simon Glass [Mon, 1 Apr 2019 20:38:41 +0000 (13:38 -0700)]
sound: tegra: Add a sound driver

Add a sound driver for tegra devices. This connects the audio hub, I2S
controller and audio codec to allow sound output.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agotegra: sound: Add an I2S driver
Simon Glass [Mon, 1 Apr 2019 20:38:40 +0000 (13:38 -0700)]
tegra: sound: Add an I2S driver

Add a driver which supports transmitting digital sound to an audio codec.
This uses fixed parameters as a device-tree binding is not currently
defined.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agotegra: sound: Add an audio hub driver
Simon Glass [Mon, 1 Apr 2019 20:38:39 +0000 (13:38 -0700)]
tegra: sound: Add an audio hub driver

Add a driver for the audio hub. This is modelled as a misc device which
supports writing audio data from I2S.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agotegra: Add a delay in clock_start_periph_pll()
Simon Glass [Mon, 1 Apr 2019 20:38:38 +0000 (13:38 -0700)]
tegra: Add a delay in clock_start_periph_pll()

This function enables a peripheral clock and then immediately sets its
divider. Add a delay to allow the clock to settle first. This matches the
delay in other places which do a similar thing.

Without this, the I2S device on Nyan does not init properly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agotegra: Correct tegra124 clock name
Simon Glass [Mon, 1 Apr 2019 20:38:38 +0000 (13:38 -0700)]
tegra: Correct tegra124 clock name

The first clock type appears to have and incorrect setting for out of the
mux outputs. It should be CLK_M, not OSC. Fix it and its only user.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoefi_loader: variable: attributes may not be changed if a variable exists
AKASHI Takahiro [Fri, 24 May 2019 06:59:03 +0000 (15:59 +0900)]
efi_loader: variable: attributes may not be changed if a variable exists

If a variable already exists, efi_set_variable() should not change
the variable's attributes. This patch enforces it.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: variable: return error for APPEND_WRITE
AKASHI Takahiro [Fri, 24 May 2019 06:59:02 +0000 (15:59 +0900)]
efi_loader: variable: return error for APPEND_WRITE

The current efi_st_variable() doesn't support EFI_VARIABLE_APPEND_WRITE
attiribute for now, and so should return an error.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Fix typos is commit message.
Add TODO comment.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi: selftest: APPEND_WRITE is not supported
AKASHI Takahiro [Fri, 24 May 2019 06:59:01 +0000 (15:59 +0900)]
efi: selftest: APPEND_WRITE is not supported

The error here should be marked *todo*.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: DEL is an illegal file name character
Heinrich Schuchardt [Fri, 24 May 2019 05:19:18 +0000 (07:19 +0200)]
efi_loader: DEL is an illegal file name character

According to the FAT32 specification 0x7f (DEL) is not a legal character
for file names.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: comments for structs
Heinrich Schuchardt [Tue, 21 May 2019 15:51:35 +0000 (17:51 +0200)]
efi_loader: comments for structs

Change comments for struct efi_open_protocol_info_item and
struct efi_handler to Sphinx format.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: correct device path check
Heinrich Schuchardt [Mon, 20 May 2019 19:55:18 +0000 (19:55 +0000)]
efi_loader: correct device path check

Since commit 226cddbe32f0 ("efi_loader: check device path in
InstallMultipleProtocolInterfaces") iPXE fails to access the network.

LocateDevicePath() returns EFI_SUCCESS even if a shorter path is found as a
partial match. It returns the remaining path. So to be sure that we found a
complete match we need to check that the remaining path refers to an end
node.

Provide debug output if a device path has already been installed.

Fixes: 226cddbe32f0 ("efi_loader: check device path in
       InstallMultipleProtocolInterfaces")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: return values of GetTime()
Heinrich Schuchardt [Sun, 19 May 2019 19:41:28 +0000 (21:41 +0200)]
efi_loader: return values of GetTime()

According to the UEFI spec 2.8 the GetTime() runtime service should return
EFI_UNSUPPORTED if the real time clock is not available.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: implement SetTime
Heinrich Schuchardt [Sun, 19 May 2019 18:07:39 +0000 (20:07 +0200)]
efi_loader: implement SetTime

Implement the SetTime() runtime service.

Extend the real time clock selftest to check setting the clock.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agomips: mt76xx: gardena-smart-gateway: Enable CONFIG_USE_PREBOOT
Stefan Roese [Thu, 23 May 2019 05:55:55 +0000 (07:55 +0200)]
mips: mt76xx: gardena-smart-gateway: Enable CONFIG_USE_PREBOOT

Enable CONFIG_USE_PREBOOT on for the gardena mt7688 platforms, so that
this feature can be used here.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agomips: mt76xx: Remove cache workaround and select SYS_MALLOC_CLEAR_ON_INIT
Stefan Roese [Thu, 23 May 2019 05:55:54 +0000 (07:55 +0200)]
mips: mt76xx: Remove cache workaround and select SYS_MALLOC_CLEAR_ON_INIT

With commit 06985289d452 ("watchdog: Implement generic watchdog_reset()
version") the init sequence has changed in arch_misc_init(), resulting
in a re-appearance of the d-cache issue on MT7688 boards (e.g. gardena).
When this happens, the first (or sometimes later ones as well) TFTP
command hangs and does not complete correctly. This leads to the
assumption that the d-cache is not in a clean state once the ethernet
driver is called (d-cache is used here for the buffers). The old work-
around with the cache flush somehow does not work any more now with
the new code change.

To fix this issue, this patch now removes the old workaround and selects
CONFIG_SYS_MALLOC_CLEAR_ON_INIT for ARCH_MTMIPS. With this option the
complete malloc area is initialized with zeros (cache lines are touched).
Testing has shown that this also fixes the issue on the MT7688 boards.

Signed-off-by: Stefan Roese <sr@denx.de>
Suggested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agomips: mt7688: gardena-smart-gateway-mt7688: Enable CMD_WDT
Stefan Roese [Wed, 8 May 2019 12:47:04 +0000 (14:47 +0200)]
mips: mt7688: gardena-smart-gateway-mt7688: Enable CMD_WDT

This patch enables the "wdt" command, which is quite useful for watchdog
testing.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>