oweals/u-boot.git
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Fri, 27 Jul 2018 03:12:39 +0000 (23:12 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra

5 years agotegra: beaver/apalis: Fix DTC warning
Tom Warren [Thu, 26 Jul 2018 20:14:15 +0000 (13:14 -0700)]
tegra: beaver/apalis: Fix DTC warning

Fix warning when compiling tegra30-beaver/-apalis.dts with latest DTC:

  "Warning (avoid_unnecessary_addr_size): /pci/pch@1f,0: unnecessary
   #address-cells/#size-cells without "ranges" or child "reg" property"

Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: avoid using secure carveout RAM
Stephen Warren [Fri, 22 Jun 2018 19:03:19 +0000 (13:03 -0600)]
ARM: tegra: avoid using secure carveout RAM

If a secure carveout exists, U-Boot cannot use that memory. Fix
carveout_size() to reflect this, and hence transitively fix
usable_ram_size_below_4g() and board_get_usable_ram_top(). This change
ensures that when U-Boot copies the secure monitor code to install it, the
copy target is not in-use for U-Boot code/data.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: PSCI: Enable the PSCI node
Stephen Warren [Fri, 22 Jun 2018 19:03:18 +0000 (13:03 -0600)]
ARM: PSCI: Enable the PSCI node

When fixing up the DT to report PSCI support, explicitly enable the node.
DTs may ship with the node disabled in case a PSCI implementation is not
present, and expect any PSCI implementation to enable the node if they are
actually present.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: PSCI: Support PSCI v0.2
Stephen Warren [Fri, 22 Jun 2018 19:03:17 +0000 (13:03 -0600)]
ARM: PSCI: Support PSCI v0.2

Enhance the PSCI DT editing code to allow setting a PSCI v0.2 compatible
value in the DT. The CONFIG_ option is added to the whitelist to match the
existing PSCI_1_0 option. While not adding new options to Kconfig isn't
ideal, I figure it's better to keep related options together.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: define MON_MODE
Stephen Warren [Fri, 22 Jun 2018 19:03:16 +0000 (13:03 -0600)]
ARM: define MON_MODE

Add a MON_MODE define for ARM's monitor mode. This can be used later by
a secure monitor to avoid hard-coding mode IDs.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: implement RAM repair
Bibek Basu [Fri, 22 Jun 2018 19:02:28 +0000 (13:02 -0600)]
ARM: tegra: implement RAM repair

RAM repair has a few pre-requisites:
1) PMIC power supply (rail) enabled.
2) PMC CRAIL power partition powered.
3) Fuse clock active (it's the default).
4) PLLP reshift branch enabled (it's the default, when PLLP is active).

RAM repair also only need run whenever specific partitions are powered
(main SoC and CCPLEX respectively); RAM repair does not need to be
triggered when any other partition changes state.

start_cpu() needs to be re-ordered slightly to match these requirements.
Note that C0NC and CE0 aren't required for RAM repair to
operate, but they also do no harm, so the entire of powerup_cpus() is
moved rather than splitting it up. The call to remove_cpu_resets() is
moved last to ensure that all other actions complete before releasing
reset; since the PMC power partitions are now enabled early, releasing
reset is what causes the CPUs to start executing code, and RAM repair must
complete before the CPU boots.

Note that this commit is the result of squashing a numbmer of commits
in NVIDIA's downstream L4T branch, hence the multiple signoffs below.

Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Signed-off-by: Sandipan Patra <spatra@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoRevert "tegra: Introduce SRAM repair on tegra124"
Stephen Warren [Fri, 22 Jun 2018 19:02:27 +0000 (13:02 -0600)]
Revert "tegra: Introduce SRAM repair on tegra124"

This reverts commit 701b7b1d2cf657d435d2bd6caf43d0247d37220d. It will
be immediately replaced by a different implementation that is more
complete and runs are more targetted times.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Thu, 26 Jul 2018 19:55:42 +0000 (15:55 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-net

5 years agotegra: Indicate that binman makes all three output files
Simon Glass [Sat, 21 Jul 2018 01:49:27 +0000 (19:49 -0600)]
tegra: Indicate that binman makes all three output files

Use GNU make pattern rules to indicate that a single run of binman
produces all three Tegra output files. The avoids make running binman
three times (perhaps in parallel) and those instances inteferring with
each other.

See http://patchwork.ozlabs.org/patch/944611/ for the bug report.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
5 years agoMAINTAINERS: Mark NAND as Orphaned
Tom Rini [Thu, 26 Jul 2018 16:02:03 +0000 (12:02 -0400)]
MAINTAINERS: Mark NAND as Orphaned

Scott is no longer maintaining the NAND subsystem, mark as orphaned for
now.

Acked-by: Scott Wood <oss@buserror.net>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agonet: zynq_gem: convert to use livetree
Siva Durga Prasad Paladugu [Mon, 16 Jul 2018 12:55:45 +0000 (18:25 +0530)]
net: zynq_gem: convert to use livetree

This patch updates the zynq gem driver to support livetree.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agodrivers: net: zynq_gem: fix phy dt node setting
Grygorii Strashko [Thu, 5 Jul 2018 17:02:52 +0000 (12:02 -0500)]
drivers: net: zynq_gem: fix phy dt node setting

Now zynq_gem driver will overwrite UCLASS_ETH node when PHY is
connected and configured which is not correct.
Use struct phydev->node instead.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
5 years agodrivers: net: cpsw: fix phy dt node setting
Grygorii Strashko [Thu, 5 Jul 2018 17:02:51 +0000 (12:02 -0500)]
drivers: net: cpsw: fix phy dt node setting

Now CPSW driver will overwrite UCLASS_ETH node when PHY is
connected and configured which is not correct.
Use struct phydev->node instead.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: phy: xilinx: switch to use phy_get_ofnode()
Grygorii Strashko [Thu, 5 Jul 2018 17:02:50 +0000 (12:02 -0500)]
net: phy: xilinx: switch to use phy_get_ofnode()

Use PHY API phy_get_ofnode() helper to get PHY DT node.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: phy: dp83867: switch to use phy_get_ofnode()
Grygorii Strashko [Thu, 5 Jul 2018 17:02:49 +0000 (12:02 -0500)]
net: phy: dp83867: switch to use phy_get_ofnode()

Use PHY API phy_get_ofnode() helper to get PHY DT node.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
5 years agonet: phy: add ofnode node to struct phy_device
Grygorii Strashko [Thu, 5 Jul 2018 17:02:48 +0000 (12:02 -0500)]
net: phy: add ofnode node to struct phy_device

Now the UCLASS_ETH device "node" field is owerwritten by some network drivers in
case of Ethernet PHYs which are linked to UCLASS_ETH device using
"phy-handle" DT property and when Ethernet PHY driver needs to read some
additional information from DT. In such cases following happens (in
general):

- network drivers
priv->phydev = phy_connect(priv->bus, priv->phyaddr, dev,
   priv->interface);
<-- phydev is connected to dev which is UCLASS_ETH device

if (priv->phy_of_handle > 0)
dev_set_of_offset(priv->phydev->dev, priv->phy_of_handle);
<-- phydev->dev->node is overwritten by phy-handle DT node

- PHY driver in .config() callback
int node = dev_of_offset(dev);
<-- PHY driver uses overwritten dev->node
        const void *fdt = gd->fdt_blob;

 if (fdtdec_get_bool(fdt, node, "property"))
...

As result, UCLASS_ETH device can't be used any more for DT accessing.

This patch adds additional ofnode node field to struct phy_device which can
be set explicitly by network drivers and used by PHY drivers, so
overwriting can be avoided. Also add helper function phy_get_ofnode()
which will check and return phy_device->node or dev_ofnode(phydev->dev) for
backward compatibility with existing drivers.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: phy: Clean up includes of common.h
Joe Hershberger [Wed, 25 Jul 2018 17:59:22 +0000 (12:59 -0500)]
net: phy: Clean up includes of common.h

We want to be able to include some other system headers in phy.h but
that requires us to have included common.h in the top-level first.

Also, common.h includes config.h as the first thing it does, so don't
include it directly.

Series-to: u-boot
Series-cc: Grygorii Strashko <grygorii.strashko@ti.com>
Seried-cc: ti
Series-process-log: sort, uniq
Cover-letter:
Prepare for net: phy: prevent uclass_eth device "node" field overwriting
Prepare for [1] so that it doesn't break the build for a bunch of
boards. There are a number of reasons this series broke the build
but none of them depend on changes in the series, so fix up those
situations ahead of applying that series.

[1] https://patchwork.ozlabs.org/cover/940104/
END
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agophy: Break include cycle
Joe Hershberger [Tue, 17 Jul 2018 20:02:30 +0000 (15:02 -0500)]
phy: Break include cycle

Because some phy wants to export some functions [1], export.h was
including the whole phy subsystem which pulls in lots of stuff that
causes some ordering and redefinition issues. Split out the only part
that is actually needed in export.h and include it there and in phy.h.

[1] commit 95279315076c ("board/ls2085rdb: Export functions for
  standalone AQ FW load apps")

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agoarm: Prevent redefinition error in fsl-layerscape
Joe Hershberger [Mon, 16 Jul 2018 20:33:51 +0000 (15:33 -0500)]
arm: Prevent redefinition error in fsl-layerscape

The include/phy.h will start including dm.h, which pulls in
linux/compat.h after the attempted redefinition in
arch/arm/include/asm/armv8/mmu.h, so move this include to allow
redefinition.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: phy: dp83867: switch to use ofnode api
Grygorii Strashko [Thu, 28 Jun 2018 19:26:35 +0000 (14:26 -0500)]
net: phy: dp83867: switch to use ofnode api

Switch to use more generic ofnode API instead of FDT API.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
5 years agonet: phy: dp83867: add workaround for incorrect RX_CTRL pin strap
Murali Karicheri [Thu, 28 Jun 2018 19:26:34 +0000 (14:26 -0500)]
net: phy: dp83867: add workaround for incorrect RX_CTRL pin strap

The data manual for DP83867IR/CR, SNLS484E[1], revised march 2017,
advises that strapping RX_DV/RX_CTRL pin in mode 1 and 2 is not
supported (see note below Table 5 (4-Level Strap Pins)).

It further advises that if a board has this pin strapped in mode 1 and
mode 2, then bit[7] of Configuration Register 4 (address 0x0031) must
be cleared to 0. This is to ensure proper operation of PHY.

Since it is not possible to detect in software if RX_DV/RX_CTRL pin is
incorrectly strapped, add a device-tree property to advertise this and
allow corrective action in software.
[1] http://www.ti.com/lit/ds/snls484e/snls484e.pdf

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
5 years agonet: mvgbe: convert to DM
Chris Packham [Mon, 9 Jul 2018 09:34:00 +0000 (21:34 +1200)]
net: mvgbe: convert to DM

Add driver model support to the mvgbe driver. As a temporary measure
both DM and non-DM uses are supported. Once all the users have been
converted the non-DM support can be dropped.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Michael Walle <michael@walle.cc>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: mvgbe: prepare for conversion to driver model
Chris Packham [Mon, 9 Jul 2018 09:33:59 +0000 (21:33 +1200)]
net: mvgbe: prepare for conversion to driver model

Extract some function bodies to helper functions that can be reused in
the DM/non-DM implementations.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agoinitialize net_mode.if_type
Andrew Thomas [Thu, 21 Jun 2018 23:21:01 +0000 (16:21 -0700)]
initialize net_mode.if_type

if_type is not correctly initialized

Failure to initialize if_type means that grub2/efinet sends
a bogus arp request. It therefore gets no response. On Raspberry Pi 3B+
this leads to a pause at:

lan78xx_eth Waiting for PHY auto negotiation to complete....... done
lan78xx_eth Waiting for PHY auto negotiation to complete....... done

Signed-off-by: Andrew Thomas <andrew.thomas@oracle.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: Consolidate the parsing of bootfile
Joe Hershberger [Wed, 4 Jul 2018 00:36:43 +0000 (19:36 -0500)]
net: Consolidate the parsing of bootfile

The same basic parsing was implemented in tftp and nfs, so add a helper
function to do the work once.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: Read bootfile from env on netboot_common()
Joe Hershberger [Wed, 4 Jul 2018 00:36:42 +0000 (19:36 -0500)]
net: Read bootfile from env on netboot_common()

Instead of depending on a env callback for bootfile, read it explicitly.

We do this because the bootfile can be specified on the command line and
if it is, we will overwrite the internal variable. If a netboot_common()
is called again with no bootfile parameter, we want to use the one in
the environment.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: Make copy_filename() accept NULL src
Joe Hershberger [Wed, 4 Jul 2018 00:36:41 +0000 (19:36 -0500)]
net: Make copy_filename() accept NULL src

Rather than crashing, check the src ptr and set dst to empty string.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: Re-check prerequisites when autoloading
Joe Hershberger [Wed, 4 Jul 2018 00:36:40 +0000 (19:36 -0500)]
net: Re-check prerequisites when autoloading

With net autoload, we check the prerequisites for the initial command,
but the greater prerequisites when autoloading are not checked.

If we would attempt to autoload, check those prerequisites too.

If we are not expecting a serverip from the server, then don't worry
about it not being set, but don't attempt to load if it isn't.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: When checking prerequisites, consider boot_file_name
Joe Hershberger [Wed, 4 Jul 2018 00:36:39 +0000 (19:36 -0500)]
net: When checking prerequisites, consider boot_file_name

For net_boot_common, we allow the serverip to be specified as part of
the boot file name. For net commands that require serverip, include that
source as a valid specification of serverip.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
5 years agonet: Always print basic info for nfs, just like tftp
Joe Hershberger [Wed, 4 Jul 2018 00:22:56 +0000 (19:22 -0500)]
net: Always print basic info for nfs, just like tftp

nfs was only printing basic info about the transfer in the case of a
DEBUG build. Print the same level of detail as tftp always.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: Check subnet against the actual ip address in use for nfs
Joe Hershberger [Wed, 4 Jul 2018 00:22:55 +0000 (19:22 -0500)]
net: Check subnet against the actual ip address in use for nfs

The check for sending to the gateway was not using the correct variable
for comparison, so it was reporting that packets are sent to the gateway
when they were not.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: Correct size of NFS buffers
Joe Hershberger [Wed, 4 Jul 2018 00:22:54 +0000 (19:22 -0500)]
net: Correct size of NFS buffers

Reported-by: Coverity (CID: 152888)
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agosandbox: eth-raw: Add a SIMPLE_BUS to enumerate host interfaces
Joe Hershberger [Mon, 2 Jul 2018 19:47:54 +0000 (14:47 -0500)]
sandbox: eth-raw: Add a SIMPLE_BUS to enumerate host interfaces

Ask the OS for each of its interfaces and for each one, bind a U-Boot
device and then probe it. This will allocate the priv data structure
that is then populated.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: eth-raw: Make random MAC addresses available to eth-raw
Joe Hershberger [Mon, 2 Jul 2018 19:47:53 +0000 (14:47 -0500)]
sandbox: eth-raw: Make random MAC addresses available to eth-raw

We don't necessarily know how many MAC addresses we'll need, so implement
a ROM read so we always have something valid.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: eth-raw: Allow interface to be specified by index
Joe Hershberger [Mon, 2 Jul 2018 19:47:52 +0000 (14:47 -0500)]
sandbox: eth-raw: Allow interface to be specified by index

With systemd stable interface names, eth0 will almost never exist.
Instead of using that name in the sandbox.dts, use an index.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: eth-raw: Add a function to ask the host about localhost
Joe Hershberger [Mon, 2 Jul 2018 19:47:51 +0000 (14:47 -0500)]
sandbox: eth-raw: Add a function to ask the host about localhost

Instead of doing a simple string compare against "lo", look for the flag
that indicates a localhost interface.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agonet: sandbox-raw: Convert raw eth driver to livetree
Joe Hershberger [Mon, 2 Jul 2018 19:47:50 +0000 (14:47 -0500)]
net: sandbox-raw: Convert raw eth driver to livetree

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agonet: sandbox: Convert sandbox mock eth driver to livetree
Joe Hershberger [Mon, 2 Jul 2018 19:47:49 +0000 (14:47 -0500)]
net: sandbox: Convert sandbox mock eth driver to livetree

Use the dev_ functions to access DT properties.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agonet: Correct comment in Kconfig
Joe Hershberger [Mon, 2 Jul 2018 19:47:48 +0000 (14:47 -0500)]
net: Correct comment in Kconfig

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: eth-raw: Make sure descriptors are always initialized
Joe Hershberger [Mon, 2 Jul 2018 19:47:47 +0000 (14:47 -0500)]
sandbox: eth-raw: Make sure descriptors are always initialized

If we let descriptors equal 0, we can end up closing STDIN. Make sure
they start out as -1.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agonet: Only call halt on a driver that has been init'ed
Joe Hershberger [Mon, 2 Jul 2018 19:47:46 +0000 (14:47 -0500)]
net: Only call halt on a driver that has been init'ed

With driver model, we were not checking if the state of the device was
marked as active before calling the halt function. Check that the device
is probed and also marked as active. This avoids the case where we were
calling halt on the first device in net_init() and the driver would
operate on bogus data structures causing problems. In this case, the
priv was all 0, so halt() would close STDIN.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: Fix format of fake-host-hwaddr in test.dts
Joe Hershberger [Mon, 2 Jul 2018 19:47:45 +0000 (14:47 -0500)]
sandbox: Fix format of fake-host-hwaddr in test.dts

test.dts specified the fake MAC address as a u32 array. Instead it
should be a u8 array.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: eth-raw: Correct valid socket test in send/recv
Joe Hershberger [Mon, 2 Jul 2018 19:47:44 +0000 (14:47 -0500)]
sandbox: eth-raw: Correct valid socket test in send/recv

In open, the socket is correctly checked to be -1 in the error case.
In send and recv, we checked for 0, but that is a valid socket number.

Correct this by checking for -1 as a bad socket everywhere.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: Don't disable ctrlc() on sandbox if in raw mode
Joe Hershberger [Tue, 3 Jul 2018 01:06:49 +0000 (20:06 -0500)]
sandbox: Don't disable ctrlc() on sandbox if in raw mode

In raw mode, handle ctrl-c as normal. This allows normal ctrl-c behavior
such as aborting a command that is timing out without completely
terminating the sandbox executable.

In [1], Simon disabled this.  His reason for it was that it interferes
with piping test scripts. Piping should be done in cooked mode, so this
change should still not interfere.

[1] commit 8969ea3e9f2db04a6b3675 ("sandbox: Disable Ctrl-C")

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoconsole: Remember if ctrlc is disabled in console_tstc()
Joe Hershberger [Tue, 3 Jul 2018 01:06:48 +0000 (20:06 -0500)]
console: Remember if ctrlc is disabled in console_tstc()

We don't necessarily want to re-enable ctrl-c if it was already disabled
when calling tstc().

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd/ubi.c: Fix format warning
Tom Rini [Thu, 26 Jul 2018 15:17:24 +0000 (11:17 -0400)]
cmd/ubi.c: Fix format warning

On 64bit platforms we would otherwise see:
../cmd/ubi.c: In function 'ubi_volume_read':
../cmd/ubi.c:359:16: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Wformat=]

Fixes: 68c7025d99db ("cmd: ubi: print load size after establishing volume size")
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Thu, 26 Jul 2018 15:43:26 +0000 (11:43 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Thu, 26 Jul 2018 15:43:23 +0000 (11:43 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

5 years agoMakefile: Fix 'clean' target
Tom Rini [Wed, 25 Jul 2018 15:38:17 +0000 (11:38 -0400)]
Makefile: Fix 'clean' target

Now that we have removed the DocBook files we need to not try and clean
that directory.

Reported-by: ericywl <midnight2903@gmail.com>
Reported-by: Jagan Teki <jagan@amarulasolutions.com>
Fixes: 78a88f7930be ("doc: Replace DocBook with sphinx-based docs")
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Wed, 25 Jul 2018 02:46:50 +0000 (22:46 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

5 years agoARM: uniphier: enable distro boot
Masahiro Yamada [Fri, 20 Jul 2018 12:47:18 +0000 (21:47 +0900)]
ARM: uniphier: enable distro boot

Switch to the distro boot for UniPhier platform.

 - Remove the environment vairalbes used to load images from raw
   block devices.

 - Keep the command to download images via tftp.  This will be
   useful to boot the kernel when no valid kernel image is ready
   yet in the file system.

 - Use root.cpio.gz instead of root.cpio.uboot because we always know
   the file size of the init ramdisk; it is loaded via either a file
   system or network.

 - Rename fit_addr_r to kernel_addr_r, which the distro command
   checks to get the load address of FIT image.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: enable MTD partition and UBI
Masahiro Yamada [Thu, 19 Jul 2018 07:28:27 +0000 (16:28 +0900)]
ARM: uniphier: enable MTD partition and UBI

Enable "mtdparts" and "ubi" commands for uniphier_v8_defconfig to
use UBI on NAND devices.

Enable only "mtdparts" for uniphier_{v7,ld4_sld8}_defconfig because
enabling UBI would increase 170KB, which would be memory footprint
problem.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: support fdt_fixup_mtdparts
Masahiro Yamada [Thu, 19 Jul 2018 07:28:26 +0000 (16:28 +0900)]
ARM: uniphier: support fdt_fixup_mtdparts

Propagate the "mtdparts" environment variable to the DT passed
in to OS.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: split ft_board_setup() out to a separate file
Masahiro Yamada [Thu, 19 Jul 2018 07:28:25 +0000 (16:28 +0900)]
ARM: uniphier: split ft_board_setup() out to a separate file

Prepare to add more fdt fixup code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: clean-up ft_board_setup()
Masahiro Yamada [Thu, 19 Jul 2018 07:28:24 +0000 (16:28 +0900)]
ARM: uniphier: clean-up ft_board_setup()

The 'bd' is passed in ft_board_setup() as the second argument.
Replace 'gd->bd' with 'bd'.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoboard: constify struct node_info array
Masahiro Yamada [Thu, 19 Jul 2018 07:28:23 +0000 (16:28 +0900)]
board: constify struct node_info array

Add 'const' (also 'static' in some places) to struct node_info
arrays to save memory footprint.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agofdt_support: make fdt_fixup_mtdparts() prototype more specific
Masahiro Yamada [Thu, 19 Jul 2018 07:28:22 +0000 (16:28 +0900)]
fdt_support: make fdt_fixup_mtdparts() prototype more specific

The second argument of fdt_fixup_mtdparts() is an opaque pointer,
'void *node_info', hence callers can pass any pointer.

Obviously, fdt_fixup_mtdparts() expects 'struct node_info *'
otherwise, it crashes run-time.

Change the prototype so that it is compile-time checked.

Also, add 'const' qualifier to it so that callers can constify
the struct node_info arrays.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agomtd: nand: denali: correct buffer alignment for DMA transfer
Masahiro Yamada [Thu, 19 Jul 2018 01:13:23 +0000 (10:13 +0900)]
mtd: nand: denali: correct buffer alignment for DMA transfer

The NAND framework makes sure to pass in the buffer with at least
chip->buf_align alignment.  Currently, the Denali NAND driver only
requests 16 byte alignment.  This causes unaligned cache operations
for the DMA transfer.

[Error Example]

=> nand read 81000010 0 1000

NAND read: device 0 offset 0x0, size 0x1000
CACHE: Misaligned operation at range [8100001081001010]
CACHE: Misaligned operation at range [8100001081001010]
CACHE: Misaligned operation at range [8100001081001010]
CACHE: Misaligned operation at range [8100001081001010]
 4096 bytes read: OK

Reported-by: Marek Vasut <marex@denx.de>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agokconfig: Avoid format overflow warning from GCC 8.1
Luis Araneda [Thu, 5 Jul 2018 20:55:31 +0000 (16:55 -0400)]
kconfig: Avoid format overflow warning from GCC 8.1

cherry-pick kernel commit 2ae89c7 (2018-06-05)
to avoid warnings when compiling with GCC 8.1

In file included from scripts/kconfig/zconf.tab.c:2486:
scripts/kconfig/confdata.c: In function ‘conf_write’:
scripts/kconfig/confdata.c:771:22: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  sprintf(newname, "%s%s", dirname, basename);
                      ^~
scripts/kconfig/confdata.c:771:19: note: assuming directive output of 7 bytes
  sprintf(newname, "%s%s", dirname, basename);
                   ^~~~~~
scripts/kconfig/confdata.c:771:2: note: ‘sprintf’ output 1 or more bytes (assuming 4104) into a destination of size 4097
  sprintf(newname, "%s%s", dirname, basename);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:774:23: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
                       ^~~~~~~~~~~
scripts/kconfig/confdata.c:774:3: note: ‘sprintf’ output between 13 and 4119 bytes into a destination of size 4097
   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: rmobile: gen2: Enable ACTLR[0] (Enable invalidates of BTB) to facilitate CVE_201...
Marek Vasut [Sat, 30 Jun 2018 06:07:41 +0000 (08:07 +0200)]
ARM: rmobile: gen2: Enable ACTLR[0] (Enable invalidates of BTB) to facilitate CVE_2017-5715 WA in OS

Enable CVE_2017_5715 mitigation on CPU0 on R-Car H2, M2W, M2N, V2H,
which all contain Cortex-A15 cores. R-Car E2 contains only Cortex-A7
cores and is not affected. Without this enabled, Linux kernel reports:

  CPU0: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable

With this enabled, Linux kernel reports:

  CPU0: Spectre v2: using ICIALLU workaround

NOTE: This by itself does not enable the workaround for other CPUs
      than CPU0 and may require additional kernel patches for the
      other CPUs in SMP configurations.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: dts: socfpga: Adjust NAND register layout on Arria10
Marek Vasut [Mon, 7 May 2018 20:22:26 +0000 (22:22 +0200)]
ARM: dts: socfpga: Adjust NAND register layout on Arria10

Adjust the NAND register size on Arria10 to reflect reality.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
5 years agoARM: socfpga: Init missing security policies on A10
Marek Vasut [Thu, 12 Jul 2018 13:34:23 +0000 (15:34 +0200)]
ARM: socfpga: Init missing security policies on A10

The Arria10 requires proper configuration of the NOC firewall, otherwise
the access to certain areas of the LWHPS bridge fails in Linux. Add the
missing setup.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
5 years agoARM: socfpga: Assure correct CPACR configuration
Marek Vasut [Thu, 12 Jul 2018 13:07:46 +0000 (15:07 +0200)]
ARM: socfpga: Assure correct CPACR configuration

Make sure the ARM CPACR register is zeroed out, this is mandatory
on Arria10.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
5 years agoarm: socfpga: Fixes: Rename CONFIG_SPL_RESET_SUPPORT to CONFIG_SPL_DM_RESET
Ley Foon Tan [Fri, 13 Jul 2018 05:40:23 +0000 (13:40 +0800)]
arm: socfpga: Fixes: Rename CONFIG_SPL_RESET_SUPPORT to CONFIG_SPL_DM_RESET

Commit bfc6bae8fa1f2d8a9c51548767b02f1a1e0ffe52

This commit rename CONFIG_SPL_RESET_SUPPORT to CONFIG_SPL_DM_RESET. Update
with new CONFIG name and enable CONFIG_SPL_DM_RESET when CONFIG_DM_RESET is enabled.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Acked-by: Marek Vasut <marex@denx.de>
5 years agomailmap: Fix broken email from fit_image.c
Michal Simek [Tue, 24 Jul 2018 10:51:37 +0000 (12:51 +0200)]
mailmap: Fix broken email from fit_image.c

The patch
"tools/mkimage: Fix DTC run command to handle file names with space"
(sha1: a6e9810495bc929b6beafb88f557cdaadf87fc83) contains comma in name
which is confusing patman. Fix it by defining Mirza's email in mailmap.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoconfigs: am3517-evm: Setup NAND booting
Adam Ford [Sat, 21 Jul 2018 23:12:12 +0000 (18:12 -0500)]
configs: am3517-evm: Setup NAND booting

The NAND offsets for the kernel and U-Boot were missing.
This patch sets up the offsets so the AM3517-EVM can boot from NAND
when DIP switches S7:1 and S7:4 are to the OFF position

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: AM3517-EVM: Update Maintainer
Adam Ford [Sat, 21 Jul 2018 23:18:10 +0000 (18:18 -0500)]
ARM: AM3517-EVM: Update Maintainer

The previous e-mail pointing to Vaibhav Hiremath <hvaibhav@ti.com>
is bouncing and has for some time.  This updates it to myself and I
work for Logic PD the manufacturer of the AM3517-SOM and EVM

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoconfig: remove unused CONFIG_SPL_RELOC_STACK_SIZE
Heinrich Schuchardt [Sat, 21 Jul 2018 15:08:13 +0000 (17:08 +0200)]
config: remove unused CONFIG_SPL_RELOC_STACK_SIZE

Symbol CONFIG_SPL_RELOC_STACK_SIZE is not used anywhere. So remove it.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agodoc: Move device tree bindings documentation to doc/device-tree-bindings
Breno Lima [Sat, 21 Jul 2018 00:48:10 +0000 (21:48 -0300)]
doc: Move device tree bindings documentation to doc/device-tree-bindings

Currently the U-Boot project contains 2 documentation directories:

- doc/
- Documentation/

The Documentation directory only contains device tree bindings related
content, so move the 3 files to doc/device-tree-bindings/.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
5 years agomkimage: fit_image: Use macros from image.h
Michal Simek [Fri, 20 Jul 2018 10:31:02 +0000 (12:31 +0200)]
mkimage: fit_image: Use macros from image.h

There is no reason not to use macros which are already defined.
It is also much easier for grepping.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoomap3: beagle: re-enable EFI support after the following commit removed it by mistake:
Guillaume GARDET [Wed, 18 Jul 2018 19:38:44 +0000 (21:38 +0200)]
omap3: beagle: re-enable EFI support after the following commit removed it by mistake:

commit d233ccb1d84b901f7e23e6d9b4f2c6a57198b23b
  ARM: omap3: beagle: Enable DM_SERIAL, update distro usage and NAND layout

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Derald D. Woods <woods.technical@gmail.com>
Cc: Tom Rini <trini@konsulko.com>
5 years agospl: remove dependency to "asm/utils.h"
Paulo Zaneti [Tue, 17 Jul 2018 19:15:46 +0000 (16:15 -0300)]
spl: remove dependency to "asm/utils.h"

Header file "asm/utils.h" is not required to compile "spl_ymodem.c".
So, removing this dependency allows other architectures to use this
booting device as "asm/utils.h" is only present in "arm" architecture.

Signed-off-by: Paulo Zaneti <paulo.zaneti@datacom.ind.br>
5 years agohashtable: Fix length calculation in hexport_r
Zubair Lutfullah Kakakhel [Tue, 17 Jul 2018 18:25:38 +0000 (19:25 +0100)]
hashtable: Fix length calculation in hexport_r

The length returned by hexport_r has a few redundant characters.
This appears as NULL characters at the end so seems harmless.

Remove the surplus counts in two places

totlen += strlen(ep->key) + 2;
I'm guessing the +2 here is for = and sep char. But there is another
totlen += 2; line that does that.

size = totletn + 1;
Doesn't make sense and isn't justified with any comment.

Signed-off-by: Zubair Lutfullah Kakakhel <zubair@resin.io>
5 years agoavb2.0: use block API in AVB ops
Igor Opaniuk [Tue, 17 Jul 2018 11:33:26 +0000 (14:33 +0300)]
avb2.0: use block API in AVB ops

Use blk_dread()/blk_dwrite() in mmc_read()/mmc_write() AVB operation
implementations. This fixes compilation issues when CONFIG_BLK is
enabled.

Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Tested-by: Eugeniu Rosca <rosca.eugeniu@gmail.com>
5 years agoavb2.0: add proper dependencies
Igor Opaniuk [Tue, 17 Jul 2018 11:33:25 +0000 (14:33 +0300)]
avb2.0: add proper dependencies

1. Since libavb library alone is highly portable, introduce dedicated
Kconfig symbol for AVB bootloader-dependent operations, so it's possible
to build libavb separately. AVB bootloader-dependent operations include:
  * Helpers to process strings in order to build OS bootargs.
  * Helpers to access MMC, similar to drivers/fastboot/fb_mmc.c.
  * Helpers to alloc/init/free avb ops.
2. Add CONFIG_FASTBOOT dependency, as fastboot buffer is
re-used in partition verification operations.

Reported-by: Eugeniu Rosca <rosca.eugeniu@gmail.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Reviewed-by: Eugeniu Rosca <rosca.eugeniu@gmail.com>
Tested-by: Eugeniu Rosca <rosca.eugeniu@gmail.com>
5 years agomtdparts: fixed buffer overflow bug
Kay Potthoff [Tue, 17 Jul 2018 06:19:39 +0000 (08:19 +0200)]
mtdparts: fixed buffer overflow bug

In the case that there was no name defined for a partition the
code assumes that name_len is 22 and therefore allocates exactly
that space for a dummy name. But the function sprintf() first
resolves "0x%08llx@0x%08llx" to a string that is longer than 22
bytes. This leads to a buffer overflow. The replacement function
snprintf() limits the copied bytes to name_len and therefore
avoids the buffer overflow.

Signed-off-by: Kay Potthoff <Kay.Potthoff@microsys.de>
5 years agoboard: STiH410-B2260: Set SYS_BOOTM_LEN to 16M
Patrice Chotard [Mon, 16 Jul 2018 08:04:19 +0000 (10:04 +0200)]
board: STiH410-B2260: Set SYS_BOOTM_LEN to 16M

With recent kernel v4.18-rcx, uImage becomes bigger than 8MB.
Set SYS_BOOTM_LEN to 16MB, this fix the following error message:
"Fix Loading Kernel Image ... Image too large: increase
CONFIG_SYS_BOOTM_LEN"

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agomtd: remove stale comment in mtd_oob_ops structure
Miquel Raynal [Sat, 14 Jul 2018 12:37:19 +0000 (14:37 +0200)]
mtd: remove stale comment in mtd_oob_ops structure

A comment in the kernel doc of the mtd_oob_ops structure tells that it
is not possible to write more than one page with OOB. This was
probably true at some time in the past but today it is entirely wrong.

As one can see for instance in the nand_do_write_ops() helper available
in the NAND core, this implementation called by mtd->_write_oob()
simply loops over the pages until everything has been written.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
5 years agortc: compile date.c if DM_RTC
AKASHI Takahiro [Wed, 11 Jul 2018 09:06:06 +0000 (18:06 +0900)]
rtc: compile date.c if DM_RTC

rtc_to_tm() and rtc_mktime() are required for some RTC drivers, at least
PL031. Without this patch, we also need to enable CONFIG_CMD_DATE even if
we don't want or need this command.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agomtd: nand: add new enum for storing ECC algorithm
Rafał Miłecki [Tue, 10 Jul 2018 09:48:08 +0000 (11:48 +0200)]
mtd: nand: add new enum for storing ECC algorithm

Our nand_ecc_modes_t is already a bit abused by value NAND_ECC_SOFT_BCH.
This enum should store ECC mode only and putting algorithm details there
is a bad idea. It would result in too many values impossible to support
in a sane way.

To solve this problem let's add a new enum. We'll have to modify all
drivers to set it properly but once it's done it'll be possible to drop
NAND_ECC_SOFT_BCH. That will result in a cleaner design and more
possibilities like setting ECC algorithm for hardware ECC mode.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: b0fcd8ab7b3c89b5da7fff5224d06ed73e7a33cc]
[Philippe Reynes: adapt code to u-boot]
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agoARM: configs: omap3_logic: remove Legacy OMAP3 USB driver
Adam Ford [Fri, 13 Jul 2018 20:27:13 +0000 (15:27 -0500)]
ARM: configs: omap3_logic: remove Legacy OMAP3 USB driver

Only the MUSB driver is currently supported on the omap3_logic
boards.  The driver is using the new-musb and not the legacy
version, so this patch removes the dead code references.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoConvert CONFIG_DA8XX_GPIO to Kconfig
Adam Ford [Tue, 10 Jul 2018 12:01:20 +0000 (07:01 -0500)]
Convert CONFIG_DA8XX_GPIO to Kconfig

This converts the following to Kconfig:
   CONFIG_DA8XX_GPIO

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: DTS: am3517-evm-u-boot: Mark MMC1 with cd-inverted
Adam Ford [Tue, 10 Jul 2018 10:23:37 +0000 (05:23 -0500)]
ARM: DTS: am3517-evm-u-boot: Mark MMC1 with cd-inverted

In order to use the device tree for MMC, the card-detect pin
needs to be inverted.  This patch places this into the
am3517-evm-u-boot.dtsi file to keep the main DTS and DTSI files
clean and in-sync with Linux

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: dts: am3517-evm-uboot: Add reg-shift for UART
Adam Ford [Tue, 10 Jul 2018 10:04:38 +0000 (05:04 -0500)]
ARM: dts: am3517-evm-uboot: Add reg-shift for UART

With the resync of the omap3.dtsi file, the reg-shift was removed
so it breaks the UART.  Adding the reg-shift into the
am3517-evm-u-boot.dtsi keeps the reg-shift for U-Boot, but keeps
the dts/dtsi files clean from Linux.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agodoc: Replace DocBook with sphinx-based docs
Mario Six [Tue, 10 Jul 2018 06:40:17 +0000 (08:40 +0200)]
doc: Replace DocBook with sphinx-based docs

The Linux kernel moved to sphinx-based documentation and got rid of the
DocBook based documentation quite a while ago. Hence, the DocBook
documentation for U-Boot should be converted as well.

To achieve this, import the necessary files from Linux v4.17, and
convert the current DocBook documentation (three files altogether) to
sphinx/reStructuredText.

For now, all old DocBook documentation was merged into a single
handbook, tentatively named "U-Boot Hacker Manual".

For some source files, the documentation style was changed to comply
with kernel-doc; no functional changes were applied.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agoARM: DTS: Resync Logic PD SOM-LV 37xx devkit with Linux 4.18-RC4
Adam Ford [Tue, 10 Jul 2018 01:18:44 +0000 (20:18 -0500)]
ARM: DTS: Resync Logic PD SOM-LV 37xx devkit with Linux 4.18-RC4

There have been some significant changes to the DM37 SOM-LV device
tree.  This patch re-syncs it with Linux.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: DTS: Resync LogicPD-Torpedo-37xx-devkit with Linux 4.18-RC4
Adam Ford [Tue, 10 Jul 2018 01:18:14 +0000 (20:18 -0500)]
ARM: DTS: Resync LogicPD-Torpedo-37xx-devkit with Linux 4.18-RC4

There have been some refactoring of the DTS files for the Logic PD
DM37 Torpedo.  This patch re-sync's the DTS files with Linux

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: dts: Resync OMAP3 and omap36xx with Linux 4.18-RC4
Adam Ford [Tue, 10 Jul 2018 01:14:25 +0000 (20:14 -0500)]
ARM: dts: Resync OMAP3 and omap36xx with Linux 4.18-RC4

There have been several minor changes to the OMAP3.dtsi, so this
patch re-syncs it with Linux.  An addition include/dt-binding was
also brought with it.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: DTS: Resync am3517-evm.dts with Linux 4.18-rc4
Adam Ford [Tue, 10 Jul 2018 00:52:48 +0000 (19:52 -0500)]
ARM: DTS: Resync am3517-evm.dts with Linux 4.18-rc4

Several changes have been made to the AM3517-evm and the underlying
am3517.dtsi file.  This patch re-sync's the DTS and DTSI files with
Linux.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agom68k: m5253evbe: Remove this board
Tom Rini [Mon, 9 Jul 2018 14:44:51 +0000 (10:44 -0400)]
m68k: m5253evbe: Remove this board

The m5253evbe board has been marked as orphan since June of 2014 and
should have been dropped a while ago.  Do so now.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agospi: stm32_qspi: rework mode management
Christophe Kerello [Mon, 9 Jul 2018 13:32:38 +0000 (15:32 +0200)]
spi: stm32_qspi: rework mode management

This patch solves quad read issue with Macronix/Micron spi nor.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agospi: stm32_qspi: assign functional operation mode in _stm32_qspi_gen_ccr
Christophe Kerello [Mon, 9 Jul 2018 13:32:37 +0000 (15:32 +0200)]
spi: stm32_qspi: assign functional operation mode in _stm32_qspi_gen_ccr

This patch assigns the functional operation mode in _stm32_qspi_gen_ccr
function.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agobios_emulator: remove assignment without effect
Heinrich Schuchardt [Sun, 18 Mar 2018 10:01:23 +0000 (11:01 +0100)]
bios_emulator: remove assignment without effect

Assigning a parameter which is not used afterwards has not effect.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-imx
Tom Rini [Mon, 23 Jul 2018 14:51:13 +0000 (10:51 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-imx

trini: Update colibri-imx6ull to use Kconfig for mtdparts related
options.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoconfigs: imx6q_logic: Cleanup ramdiskaddr and fdtaddr
Adam Ford [Fri, 20 Jul 2018 13:25:53 +0000 (08:25 -0500)]
configs: imx6q_logic: Cleanup ramdiskaddr and fdtaddr

There are already definitions for ramdisk_addr_r and fdt_addr_r, so
having a duplicate copy called ramdiskaddr and fdtaddr is confusing.
This patch converts any references to ramdisk_addr_r and fdt_addr_r
and removes the duplicates.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agomx25: fix the offset between the USB ports' registers
Martin Kaiser [Mon, 16 Jul 2018 20:11:57 +0000 (22:11 +0200)]
mx25: fix the offset between the USB ports' registers

The USBOH module on imx25 chips contains two USB controllers which are
called USB OTG Controller and USB Host Controller. Each one has its EHCI
root hub. The OTG Controller's EHCI registers start at offset 0, the Host
Controller's registers start at offset 0x400.

We set CONFIG_MXC_USB_PORT=0 to select the OTG Controller and 1 for the
Host Controller. Therefore, IMX_USB_PORT_OFFSET must be 0x400. Using
this setting, the Host Controller starts working on my imx25 board.

Please note that the imx25 reference manual claims that the Host
Controller's registers start at 0x200. This is not correct. The Linux
Kernel uses the correct offset 0x400 in imx25.dtsi.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
5 years agotools/imximage: get HAB information from header
Holger Dengler [Fri, 6 Jul 2018 14:10:00 +0000 (16:10 +0200)]
tools/imximage: get HAB information from header

Signing parts of a u-boot imximage for image verification in High
Assurance Boot (HAB) in a post-build process, requires some
information from the imximage header. Currently, this information is
only provided during the image build, which makes the transfer of this
information to the post-build process harder than necessary.

The i.MX HAB information (start and length) can be calculated either
by using information from the image-configuration file, or from the
information in the flash header of the imximage.
The advantage of using information from flash header is, that they are
not only available during image creation, but also available if
existing images are processed.

Example:
$ tools/mkimage -l u-boot.imx
Image Type:   Freescale IMX Boot Image
Image Ver:    2 (i.MX53/6/7 compatible)
Mode:         DCD
Data Size:    483328 Bytes = 472.00 KiB = 0.46 MiB
Load Address: 877ff420
Entry Point:  87800000
HAB Blocks:   0x877ff400 0x00000000 0x00071c00
DCD Blocks:   0x00910000 0x0000002c 0x00000208

Signed-off-by: Holger Dengler <dengler@linutronix.de>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
5 years agoARM: dh_imx6: enable GigaDevice, Macronix, and Winbond SPI Flash support in Kconfig
Ludwig Zenz [Fri, 6 Jul 2018 09:26:03 +0000 (11:26 +0200)]
ARM: dh_imx6: enable GigaDevice, Macronix, and Winbond SPI Flash support in Kconfig

In preparation for delivery bottlenecks, enable support for GigaDevice, Macronix, and Winbond nor flash chips.

Signed-off-by: Ludwig Zenz <lzenz@dh-electronics.de>
5 years agoimx: i.mx6q: imx6q_logic: Migrate to SPL and enable SDP
Adam Ford [Fri, 6 Jul 2018 01:58:24 +0000 (20:58 -0500)]
imx: i.mx6q: imx6q_logic: Migrate to SPL and enable SDP

Since the vast majority of i.MX6 boards are migrating to SPL,
this patch converts im6q_logic to SPL and enables the SDP for
loading SPL and u-boot.img over USB.  The Falcon mode only
supports NAND flash as of now due to limited space/RAM, but
all i.MX6D/Q SOM's from Logic PD have internal NAND from which
to boot.

Signed-off-by: Adam Ford <aford173@gmail.com>