oweals/u-boot.git
4 years agoconfigs: ls2088ardb: Correct DEFAULT_DEVICE_TREE value
Kuldeep Singh [Thu, 19 Mar 2020 10:04:16 +0000 (15:34 +0530)]
configs: ls2088ardb: Correct DEFAULT_DEVICE_TREE value

LS2088A-RDB has CONFIG_DEFAULT_DEVICE_TREE value correctly set as
"fsl-ls2088a-rdb-qspi" for QSPI secure/non-secure boot and TFA
non-secure boot mode.

Fix the value for TFA secure boot mode.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: enable DM_ETH support for LS1046ARDB
Madalin Bucur [Thu, 23 Apr 2020 13:25:22 +0000 (16:25 +0300)]
configs: enable DM_ETH support for LS1046ARDB

Enable DM_ETH on all the defconfigs for the LS1046ARDB board.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: enable DM_ETH support for LS1043ARDB
Madalin Bucur [Thu, 23 Apr 2020 13:25:21 +0000 (16:25 +0300)]
configs: enable DM_ETH support for LS1043ARDB

Enable DM_ETH on all the defconfigs for the LS1043ARDB board.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodriver: net: fm: add DM ETH support
Madalin Bucur [Thu, 23 Apr 2020 13:25:19 +0000 (16:25 +0300)]
driver: net: fm: add DM ETH support

Probe the FMan MACs based on the device tree while
retaining the legacy code/functionality.
One notable change introduced here is that, for DM_ETH,
the name of the interfaces is corrected to the fmX-macY
format, that avoids the referral to the MAC block names
which were incorrect for FMan v3 devices (i.e. DTSEC,
TGEC) and had weird formatting (i.e. FM1@DTSEC6, FM1@TGEC1).
The legacy code is left unchanged in this respect.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodriver: net: fm: add DM MDIO support
Madalin Bucur [Thu, 23 Apr 2020 13:25:18 +0000 (16:25 +0300)]
driver: net: fm: add DM MDIO support

Allow the MDIO devices to be probed based on the device tree.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodriver: net: fm: separate receive buffer free code
Madalin Bucur [Thu, 23 Apr 2020 13:25:17 +0000 (16:25 +0300)]
driver: net: fm: separate receive buffer free code

Move the receive buffer free code in a separate function.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodriver: net: fm: change init_phy() param
Madalin Bucur [Thu, 23 Apr 2020 13:25:16 +0000 (16:25 +0300)]
driver: net: fm: change init_phy() param

Change the init_phy() parameter to simplify the code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoARM: dts: add QorIQ DPAA 1 FMan v3 to LS1046ARDB
Madalin Bucur [Thu, 23 Apr 2020 13:25:15 +0000 (16:25 +0300)]
ARM: dts: add QorIQ DPAA 1 FMan v3 to LS1046ARDB

Introduce the QorIQ DPAA 1 Frame Manager nodes in the LS1046ARDB
device tree. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoARM: dts: add QorIQ DPAA 1 FMan v3 for LS1046A
Madalin Bucur [Thu, 23 Apr 2020 13:25:14 +0000 (16:25 +0300)]
ARM: dts: add QorIQ DPAA 1 FMan v3 for LS1046A

Add the QorIQ DPAA 1 Frame Manager v3 device tree nodes for the
LS1046A SoC. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoARM: dts: add QorIQ DPAA 1 FMan v3 to LS1043ARDB
Madalin Bucur [Thu, 23 Apr 2020 13:25:13 +0000 (16:25 +0300)]
ARM: dts: add QorIQ DPAA 1 FMan v3 to LS1043ARDB

Introduce the QorIQ DPAA 1 Frame Manager nodes in the LS1043ARDB
device tree. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoARM: dts: add QorIQ DPAA 1 FMan v3 for LS1043A
Madalin Bucur [Thu, 23 Apr 2020 13:25:12 +0000 (16:25 +0300)]
ARM: dts: add QorIQ DPAA 1 FMan v3 for LS1043A

Add the QorIQ DPAA 1 Frame Manager v3 device tree nodes for the
LS1043A SoC. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoARM: dts: add QorIQ DPAA 1 FMan v3 device tree nodes
Madalin Bucur [Thu, 23 Apr 2020 13:25:11 +0000 (16:25 +0300)]
ARM: dts: add QorIQ DPAA 1 FMan v3 device tree nodes

Add the QorIQ DPAA Frame Manager v3 device tree nodes description.
The device tree fragments are copied over with little modification
from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1012afrwy: drop env qspi_bootcmd
Biwen Li [Fri, 17 Apr 2020 09:37:01 +0000 (17:37 +0800)]
configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1046aqds: support distro boot
Biwen Li [Mon, 20 Apr 2020 10:29:06 +0000 (18:29 +0800)]
configs: ls1046aqds: support distro boot

Add support of distro boot for ls1046aqds

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1028aqds: add lpuart config
Yuantian Tang [Wed, 22 Apr 2020 03:34:39 +0000 (11:34 +0800)]
configs: ls1028aqds: add lpuart config

Add lpuart config to enable lpuart feature.

Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Signed-off-by: Yuantian Tang <andy.tang@nxp.com>.
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls1028aqds: add lpuart dts support
Yuantian Tang [Thu, 19 Mar 2020 08:48:25 +0000 (16:48 +0800)]
armv8: ls1028aqds: add lpuart dts support

Rename fsl-ls1028a-qds.dts to fsl-ls1028a-qds.dtsi so that
it can be used as common device tree for lpuart and duart.
Add lpuart device tree and duart device tree respectively
for qds which are used with duart and lpuart console.

Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: ls1028a: add lpuart nodes
Yuantian Tang [Thu, 19 Mar 2020 08:48:24 +0000 (16:48 +0800)]
arm: dts: ls1028a: add lpuart nodes

Add lpuart nodes to enable lpuart feature

Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: freescale: ls1028a: mux changes for lpuart
Yuantian Tang [Thu, 19 Mar 2020 08:48:23 +0000 (16:48 +0800)]
board: freescale: ls1028a: mux changes for lpuart

mux changes in board file to enable lpuart1 and macro
define for lpuart1 used for mux changes in board configuation
register 13

Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: lx2160ardb: enable CONFIG_DM_ETH and related
Ioana Ciornei [Wed, 18 Mar 2020 14:47:49 +0000 (16:47 +0200)]
configs: lx2160ardb: enable CONFIG_DM_ETH and related

Enable CONFIG_DM_ETH and CONFIG_DM_MDIO and related configs for the
LX2160ARDB board.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls2088ardb: enable CONFIG_DM_ETH and related
Ioana Ciornei [Wed, 18 Mar 2020 14:47:48 +0000 (16:47 +0200)]
configs: ls2088ardb: enable CONFIG_DM_ETH and related

Enable CONFIG_DM_ETH and CONFIG_DM_MDIO and related configs for the
LS2088ARDB board.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1088ardb: enable CONFIG_DM_ETH and related
Ioana Ciornei [Wed, 18 Mar 2020 14:47:47 +0000 (16:47 +0200)]
configs: ls1088ardb: enable CONFIG_DM_ETH and related

Enable CONFIG_DM_ETH and CONFIG_DM_MDIO and related configs for the
LS1088ARDB board.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: ls1088ardb: add DPMAC and PHY nodes
Ioana Ciornei [Wed, 18 Mar 2020 14:47:46 +0000 (16:47 +0200)]
arm: dts: ls1088ardb: add DPMAC and PHY nodes

In order to maintain compatibility with the Linux DTS, the entire fsl-mc
node is added but instead of being probed by a dedicated bus driver it
will be a simple-mfd.

Also, annotate the external MDIO nodes and describe the PHYs (8 x
VSC8514, AQR105). Also, add phy-handles for the dpmacs to their
associated PHY.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: ls2088ardb: add DPMAC and PHY nodes
Ioana Ciornei [Wed, 18 Mar 2020 14:47:45 +0000 (16:47 +0200)]
arm: dts: ls2088ardb: add DPMAC and PHY nodes

In order to maintain compatibility with the Linux DTS, the entire fsl-mc
node is added but instead of being probed by a dedicated bus driver it
will be a simple-mfd.

Also, annotate the external MDIO nodes and describe the PHYs (4 x AQR405
and 4 x CS4340). Also, add phy-handles for the dpmacs to their
associated PHY.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: lx2160ardb: add DPMAC and PHY nodes
Ioana Ciornei [Wed, 18 Mar 2020 14:47:44 +0000 (16:47 +0200)]
arm: dts: lx2160ardb: add DPMAC and PHY nodes

In order to maintain compatibility with the Linux DTS, the entire fsl-mc
node is added but instead of being probed by a dedicated bus driver it
will be a simple-mfd.

Also, annotate the EMDIO1 node and describe the 2 AR8035 RGMII PHYs and
the 2 AQR107 PHYs. Also, add phy-handles for the dpmacs to their
associated PHY.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: ls1088a: add external MDIO nodes
Ioana Ciornei [Wed, 18 Mar 2020 14:47:43 +0000 (16:47 +0200)]
arm: dts: ls1088a: add external MDIO nodes

Add the External MDIO1 device node found in the WRIOP global memory
region. This is needed for management of external PHYs.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: ls2088a: add external MDIO nodes
Ioana Ciornei [Wed, 18 Mar 2020 14:47:42 +0000 (16:47 +0200)]
arm: dts: ls2088a: add external MDIO nodes

Add the External MDIO1 device node found in the WRIOP global memory
region. This is needed for management of external PHYs.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: lx2160a: add external MDIO nodes
Ioana Ciornei [Wed, 18 Mar 2020 14:47:41 +0000 (16:47 +0200)]
arm: dts: lx2160a: add external MDIO nodes

Add the External MDIO device nodes found in the WRIOP global memory
region. This is needed for management of external PHYs.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: ls2088ardb: transition to DM_ETH
Ioana Ciornei [Wed, 18 Mar 2020 14:47:40 +0000 (16:47 +0200)]
board: ls2088ardb: transition to DM_ETH

In case CONFIG_DM_ETH is enabled, no hardcoding is necessary for
DPAA2 Ethernet devices. Compile out any unnecessary setup when
CONFIG_DM_ETH is activated.
Also, force the PCI devices to be enumerated at probe time.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: ls1088ardb: transition to DM_ETH
Ioana Ciornei [Wed, 18 Mar 2020 14:47:39 +0000 (16:47 +0200)]
board: ls1088ardb: transition to DM_ETH

In case CONFIG_DM_ETH is enabled, no hardcoding is necessary for
DPAA2 Ethernet devices. Compile out any unnecessary setup when
CONFIG_DM_ETH is activated.
Also, force the PCI devices to be enumerated at probe time.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodrivers: net: fsl-mc: add support for CONFIG_DM_ETH
Ioana Ciornei [Wed, 18 Mar 2020 14:47:38 +0000 (16:47 +0200)]
drivers: net: fsl-mc: add support for CONFIG_DM_ETH

Make any adjustments necessary in order to support DPAA2 devices probed
using CONFIG_DM_ETH. While at it, fixup some styling issues aroung the
switch-case statement.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodrivers: net: ldpaa: add DTS based probing support
Ioana Ciornei [Wed, 18 Mar 2020 14:47:37 +0000 (16:47 +0200)]
drivers: net: ldpaa: add DTS based probing support

When CONFIG_DM_ETH is enabled DPAA2 network interfaces will now probe
based on DTS nodes with the "fsl,qoriq-mc-dpmac" compatible.
In this case, transform the ldpaa_eth driver into a UCLASS_ETH driver
and reuse the _open()/_tx()/_stop() functions already inplemented.

For the moment, the ldpaa_eth driver will support both configurations:
with or without CONFIG_DM_ETH enabled. Any 'struct eth_device' occurrence
now has a matching 'struct udevice' made mutually exclusive based on the
state of CONFIG_DM_ETH.

Signed-off-by: Florin Laurentiu Chiculita <florinlaurentiu.chiculita@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodrivers: net: add Layerscape mEMAC MDIO driver
Ioana Ciornei [Wed, 18 Mar 2020 14:47:36 +0000 (16:47 +0200)]
drivers: net: add Layerscape mEMAC MDIO driver

Add a driver for the MDIO interface integrated in the mEMAC (Multi-rate
Ethernet Media Access Controller) and the Fman 10G Ethernet MACs.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agolx2160a : Update eMMC boot environment variable
Meenakshi Aggarwal [Mon, 27 Apr 2020 14:26:40 +0000 (19:56 +0530)]
lx2160a : Update eMMC boot environment variable

Update mcinitcmd and bootcmd environment variable for emmc boot.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls208xa: Enable GIC_V3_ITS config
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:35 +0000 (10:19 +0800)]
configs: ls208xa: Enable GIC_V3_ITS config

Enable GIC_V3_ITS config to initialize the GIC redistributor
tables.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1028a: Enable GIC_V3_ITS config
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:34 +0000 (10:19 +0800)]
configs: ls1028a: Enable GIC_V3_ITS config

Enable GIC_V3_ITS config to initialize the GIC redistributor
tables.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1088a: Enable GIC_V3_ITS config
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:33 +0000 (10:19 +0800)]
configs: ls1088a: Enable GIC_V3_ITS config

Enable GIC_V3_ITS config to initialize the GIC redistributor
tables.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl-layerscape: Move GIC RD tables init to soc.c
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:32 +0000 (10:19 +0800)]
fsl-layerscape: Move GIC RD tables init to soc.c

Move GIC redistributor tables initialization to CPU setup function.

This patch introduces a GIC redistributor tables init function, and
moves the function of reserving memory for GIC redistributor tables
to soc.c and adds a argument for the memory size to reserve, BTW
rename the function so that it is more readable.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl-layerscape: Kconfig: Select RESV_RAM if GIC_V3_ITS
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:31 +0000 (10:19 +0800)]
fsl-layerscape: Kconfig: Select RESV_RAM if GIC_V3_ITS

The GIC redistributor tables initialization depends on RESV_RAM config,
so select RESV_RAM if GIC_V3_ITS is enabled.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: lx2160a: Align RD tables address to 64KB
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:30 +0000 (10:19 +0800)]
board: lx2160a: Align RD tables address to 64KB

As the lower 16bit of the redistributor pending table is reserved
for describing the memory attributes, we must give a 64KB aligned
address to the GIC LPI initialization function.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: lx2160a: Add check in GIC RD tables init
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:29 +0000 (10:19 +0800)]
board: lx2160a: Add check in GIC RD tables init

Program the GIC redistributor tables only when succeeded to reserve memory
for them, otherwise kernel will lose the chance to program them using
allocated memory.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl-layerscape: Add RESV_RAM check in resv_ram addr
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:28 +0000 (10:19 +0800)]
fsl-layerscape: Add RESV_RAM check in resv_ram addr

The initialization of gd->arch.resv_ram pointer should depend on if the
RESV_RAM config is enabled.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls1046ardb: update the DIMM WRLVL_START value
Yuantian Tang [Mon, 20 Apr 2020 04:52:54 +0000 (12:52 +0800)]
armv8: ls1046ardb: update the DIMM WRLVL_START value

The WRLVL_START values are optimized for old DDR MTA18ASF1G72AZ.
Update DDR struct to set new WRLVL_START values so that the new DIMM
MTA18ADF2G72AZ get optimized and the old DIMM still works.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1021a: Append CMA configuration to bootargs
Alison Wang [Thu, 23 Apr 2020 14:37:34 +0000 (22:37 +0800)]
configs: ls1021a: Append CMA configuration to bootargs

The default reserved memory for CMA is high memory. If LPAE is enabled,
highmem pages are non-remapped and can not be used with
dma_alloc_coherent. Reserving low memory for CMA is needed for LS1021A.
This patch appends the related CMA configuration to bootargs.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoinclude/configs: ls1012afrwy: support dhcp boot
Biwen Li [Wed, 22 Apr 2020 10:06:58 +0000 (18:06 +0800)]
include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoMerge tag 'video-for-v2020.07-rc1' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Mon, 27 Apr 2020 13:41:51 +0000 (09:41 -0400)]
Merge tag 'video-for-v2020.07-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

- simple panel 'nv140fhmn49' compatible
- rockchip eDP and LVDS drivers build fix

4 years agovideo: simple_panel: add boe,nv140fhmn49 display
Peter Robinson [Mon, 20 Apr 2020 19:27:32 +0000 (20:27 +0100)]
video: simple_panel: add boe,nv140fhmn49 display

add "boe,nv140fhmn49" display to compatible node.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
4 years agodrivers: video: rockchip: fix building eDP and LVDS drivers
Peter Robinson [Mon, 20 Apr 2020 18:18:25 +0000 (19:18 +0100)]
drivers: video: rockchip: fix building eDP and LVDS drivers

The rk_edp.c and rk_lvds.c files reference rk_setreg which is declared in
hardware.h so include it so the drivers build. Adjust rk_lvds.c so
includes are in alphabetical order while updating.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Tested-by: Vagrant Cascadian <vagrant@debian.org>
4 years agoMerge branch '2020-04-25-master-imports'
Tom Rini [Sat, 25 Apr 2020 12:20:22 +0000 (08:20 -0400)]
Merge branch '2020-04-25-master-imports'

- Assorted minor fixes
- Actions S700 SoC and Cubieboard7 support

4 years agortc: ds1374: typo Watchdog
Heinrich Schuchardt [Mon, 20 Apr 2020 16:31:21 +0000 (18:31 +0200)]
rtc: ds1374: typo Watchdog

%s/Watchdoc/Watchdog/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agospi: mpc8xxx_spi: fix missing dev_err definition
Rasmus Villemoes [Mon, 20 Apr 2020 14:13:41 +0000 (16:13 +0200)]
spi: mpc8xxx_spi: fix missing dev_err definition

The build currently fails with

drivers/spi/mpc8xxx_spi.c:64:3: warning: implicit declaration of function ‘dev_err’ [-Wimplicit-function-declaration]
...
drivers/spi/built-in.o: In function `mpc8xxx_spi_set_speed':
drivers/spi/mpc8xxx_spi.c:227: undefined reference to `dev_err'

Fixes: 4856cc7a97 (mpc8xxx_spi: implement real ->set_speed)
Fixes: 1a7b462dee (mpc8xxx_spi: put max_cs to use)
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4 years agospl: fit: do not check argument of free()
Heinrich Schuchardt [Mon, 20 Apr 2020 10:44:01 +0000 (12:44 +0200)]
spl: fit: do not check argument of free()

The free() function checks if its argument is NULL. It is superfluous to do
the same check on the calling side.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMAINTAINERS: add entry for cubieboard7 config
Amit Singh Tomar [Sun, 19 Apr 2020 13:58:37 +0000 (19:28 +0530)]
MAINTAINERS: add entry for cubieboard7 config

This commit adds entry for cubieboard7 config under Actions Semi
OWL family.

Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agodoc: boards: add Cubieboard7 documentation
Amit Singh Tomar [Sun, 19 Apr 2020 13:58:36 +0000 (19:28 +0530)]
doc: boards: add Cubieboard7 documentation

This adds build and flash steps for Actions S700
based Cubieboard7 board.

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agoarm: add Cubieboard7 board support
Amit Singh Tomar [Sun, 19 Apr 2020 13:58:35 +0000 (19:28 +0530)]
arm: add Cubieboard7 board support

The Cubieboard is a single board computer containing a
Actions S700 SoC(with 4 ARMv8 Cortex-A53 cores).

This patch adds respective defconfig alongwith .dts(copied
from Linux v5.5-rc6 with hash "b3a987b0264d").

Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agoactions: Move defconfig options to Kconfig
Amit Singh Tomar [Sun, 19 Apr 2020 13:58:34 +0000 (19:28 +0530)]
actions: Move defconfig options to Kconfig

This patch moves some of the config options from bubblegum_96_defconfig
to respective Kconfig files.

Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agoarm: add support Actions Semi S700
Amit Singh Tomar [Sun, 19 Apr 2020 13:58:33 +0000 (19:28 +0530)]
arm: add support Actions Semi S700

This patch adds basic support for Actions Semi based S700
SoC, which is driven by common owl framework.

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agoarm: dts: actions: s700: add u-boot specific dtsi file
Amit Singh Tomar [Sun, 19 Apr 2020 13:58:32 +0000 (19:28 +0530)]
arm: dts: actions: s700: add u-boot specific dtsi file

Devices like uart and clk are needed to be enabled before relocation.
this patch adds u-boot.dtsi file that mark these device as dm-pre-reloc.

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agoarm: actions: add S700 SoC device tree
Amit Singh Tomar [Sun, 19 Apr 2020 13:58:31 +0000 (19:28 +0530)]
arm: actions: add S700 SoC device tree

This patch adds .dtsi file(sync with Linux 5.5-rc6 with hash "b3a987b0264d")
and required binding for S700 SoC that is a 64-bit Quad-core ARM
Cortex-A53 cores.

It also provisions dts file to be built based on selected
platform(CONFIG_MACH_S900/S700).

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agoclk: actions: Add common clock driver
Amit Singh Tomar [Sun, 19 Apr 2020 13:58:30 +0000 (19:28 +0530)]
clk: actions: Add common clock driver

This patch converts S900 clock driver to something common that can
be used for other SoCs, for instance S700(few of clk registers are same).

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agoarm: dts: actions: s900: add u-boot specific dtsi file
Amit Singh Tomar [Sun, 19 Apr 2020 13:58:29 +0000 (19:28 +0530)]
arm: dts: actions: s900: add u-boot specific dtsi file

Devices like uart and clk are needed to be enabled before relocation.
This patch adds u-boot.dtsi file that mark these device as dm-pre-reloc.

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agoarm: dts: sync dts for Action Semi S900
Amit Singh Tomar [Sun, 19 Apr 2020 13:58:28 +0000 (19:28 +0530)]
arm: dts: sync dts for Action Semi S900

Synchronize device tree bindings with v5.5-rc6 tag with commit id
"b3a987b0264d".

Also, it removes older clock binding defined for S900 along with undocumented
compatible string "actions,s900-serial" from serial driver and adapts clock
driver to cater to new bindings.

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agoserial: actions: add compatible string
Amit Singh Tomar [Sun, 19 Apr 2020 13:58:27 +0000 (19:28 +0530)]
serial: actions: add compatible string

This patch adds "actions,owl-uart" string to the owl uart driver. It
is also defined in Linux kernel.

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agoarm: actions: rename sysmap-s900 to sysmap-owl
Amit Singh Tomar [Sun, 19 Apr 2020 13:58:26 +0000 (19:28 +0530)]
arm: actions: rename sysmap-s900 to sysmap-owl

Now that memory maps(for both S700 and S900 SoCs) can be managed using
a common file, rename sysmap-s900 to sysmap-owl to reflect the same.

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agoarm: actions: Add common framework for Actions Owl Semi SoCs
Amit Singh Tomar [Sun, 19 Apr 2020 13:58:25 +0000 (19:28 +0530)]
arm: actions: Add common framework for Actions Owl Semi SoCs

This commit adds common arch support for Actions Semi Owl
series SoCs and removes the Bubblegum96 board files.

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agococcinelle: adjust NULL check before free()
Heinrich Schuchardt [Sun, 19 Apr 2020 09:56:02 +0000 (11:56 +0200)]
coccinelle: adjust NULL check before free()

The free() function checks if its argument is NULL. We should avoid
checking for NULL before calling free like in

    if (result->tds)
        free(result->tds);

The list of relevant functions differs between Linux and U-Boot, e.g. we
use free().

Adjust the list of relevant functions.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agococcinelle: check for casting malloc output
Heinrich Schuchardt [Sun, 19 Apr 2020 09:07:34 +0000 (11:07 +0200)]
coccinelle: check for casting malloc output

Casting the (void *) output of memory allocation functions before
assignment like in

sata->cmd_hdr_tbl_offset = (void *)malloc(length + align);

is useless.

Adopt the Linux kernel script
scripts/coccinelle/api/alloc/alloc_cast.cocci.

Now 'make coccicheck' generates warnings like:

./drivers/ata/fsl_sata.c:143:29-33:
WARNING: casting value returned by memory allocation function
to (void *) is useless.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agokbuild: cherry-pick kbuild changes from Linux
Masahiro Yamada [Fri, 17 Apr 2020 07:21:36 +0000 (16:21 +0900)]
kbuild: cherry-pick kbuild changes from Linux

b42841b7bb62 kbuild: Get rid of KBUILD_STR
2aedcd098a94 kbuild: suppress annoying "... is up to date." message
9c8fa9bc08f6 kbuild: fix if_change and friends to consider argument order
ebf003f0cfb3 kbuild: Consolidate header generation from ASM offset information
2982c953570b kbuild: remove redundant $(wildcard ...) for cmd_files calculation
8a78756eb545 kbuild: create object directories simpler and faster
4d4b5c2e3b6e treewide: remove explicit rules for *offsets.s
01d509a48b46 kbuild: remove unimportant comments from ./Kbuild

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
4 years agokbuild: add FORCE to dependency of $(obj)/dts/dt-platdata.o
Masahiro Yamada [Fri, 17 Apr 2020 07:21:35 +0000 (16:21 +0900)]
kbuild: add FORCE to dependency of $(obj)/dts/dt-platdata.o

if_changed must have FORCE as a prerequisite.

Add $(obj)/dts/dt-platdata.o to 'targets' so that the corresponding
.cmd file is included.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
4 years agocache: l2x0: Fix write to incorrect shared-override bit
Ley Foon Tan [Fri, 17 Apr 2020 06:45:35 +0000 (14:45 +0800)]
cache: l2x0: Fix write to incorrect shared-override bit

The existing code write bit-0 for shared attribute override enable bit.
It should be bit-22 based on cache controller specification [1].

[1] http://infocenter.arm.com/help/topic/com.arm.doc.ddi0246f/DDI0246F_l2c310_r3p2_trm.pdf

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
4 years agoREADME: remove references on no more used config CONFIG_SYS_RCAR_I2C*
Patrick Delaunay [Fri, 10 Apr 2020 14:34:41 +0000 (16:34 +0200)]
README: remove references on no more used config CONFIG_SYS_RCAR_I2C*

Remove the references in README on CONFIG_SYS_RCAR_I2C_* not use
in U-Boot drivers/i2c/rcar_i2c.c, since commit a4d9aafadb31 ("i2c:
 rcar_i2c: Remove the driver") and commit a06a0ac36d59 ("i2c: rcar_i2c:
 Add DM and DT capable I2C driver")

Checked by the command: grep -r SYS_RCAR_I2C *
And these CONFIG are only defined in
arch/arm/mach-rmobile/include/mach/rcar-base.h

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agocosmetic: README: Fix one CONFIG name
Patrick Delaunay [Fri, 10 Apr 2020 14:34:40 +0000 (16:34 +0200)]
cosmetic: README: Fix one CONFIG name

Only replace CONFIF_ by CONFIG_

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodm: mmc: Update mmc_get_mmc_dev() to use const *
Simon Glass [Wed, 8 Apr 2020 14:33:00 +0000 (08:33 -0600)]
dm: mmc: Update mmc_get_mmc_dev() to use const *

This function does not modify the device to change it to use const *, so
that callers with a const udevice * can call it without a cast.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agopci: Add a macro to convert BDF from linux to U-Boot
Simon Glass [Wed, 8 Apr 2020 14:32:59 +0000 (08:32 -0600)]
pci: Add a macro to convert BDF from linux to U-Boot

U-Boot's BDF format has its bits in the same position as the device tree
PCI definition.

Some x86 devices use linux format in their register format and it is
useful to be able to convert to U-Boot format. Add a macro for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agouuid: Use const char * where possible
Simon Glass [Wed, 8 Apr 2020 14:32:58 +0000 (08:32 -0600)]
uuid: Use const char * where possible

Update the arguments of these functions so they can be called from code
which uses constant strings.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agolib: Add a function to convert a string to upper case
Simon Glass [Wed, 8 Apr 2020 14:32:56 +0000 (08:32 -0600)]
lib: Add a function to convert a string to upper case

Add a helper function for this operation. Update the strtoul() tests to
check upper case as well.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agotest: Add the beginnings of some string tests
Simon Glass [Wed, 8 Apr 2020 14:32:55 +0000 (08:32 -0600)]
test: Add the beginnings of some string tests

There are quite a few string functions in U-Boot with no tests. Make a
start by adding a test for strtoul().

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agolib: strto: Stop detection when invalid char is used
Michal Simek [Wed, 8 Apr 2020 08:09:16 +0000 (10:09 +0200)]
lib: strto: Stop detection when invalid char is used

This issue has been found when mtd partition are specified. Autodetection
code should stop when the first invalid char is found.

Here is the example of commands:
setenv mtdids nand0=memory-controller@e000e000
setenv mtdparts "mtdparts=nand0:4m(boot),4m(env),64m(kernel),96m(rootfs)"
mtd list

Before:
Zynq> mtd list
List of MTD devices:
* nand0
  - type: NAND flash
  - block size: 0x20000 bytes
  - min I/O: 0x800 bytes
  - OOB size: 64 bytes
  - OOB available: 16 bytes
  - ECC strength: 1 bits
  - ECC step size: 2048 bytes
  - bitflip threshold: 1 bits
  - 0x000000000000-0x000010000000 : "nand0"
  - 0x000000000000-0x000000400000 : "boot"
  - 0x000000400000-0x000000800000 : "env"
  - 0x000000800000-0x000006c00000 : "kernel"
  - 0x000006c00000-0x000010000000 : "rootfs"

Where it is visible that kernel partition has 100m instead of 64m

After:
Zynq> mtd list
* nand0
  - type: NAND flash
  - block size: 0x20000 bytes
  - min I/O: 0x800 bytes
  - OOB size: 64 bytes
  - OOB available: 16 bytes
  - ECC strength: 1 bits
  - ECC step size: 2048 bytes
  - bitflip threshold: 1 bits
  - 0x000000000000-0x000010000000 : "nand0"
  - 0x000000000000-0x000000400000 : "boot"
  - 0x000000400000-0x000000800000 : "env"
  - 0x000000800000-0x000004800000 : "kernel"
  - 0x000004800000-0x00000a800000 : "rootfs"

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Fixes: 0486497e2b5f ("lib: Improve _parse_integer_fixup_radix base 16 detection")
Tested-by: Heiko Schocher <hs@denx.de>
Tested-by: Pali Rohár <pali@kernel.org>
4 years agomtd: nand: pxa3xx: fix raw read when last_chunk_size == 0
Baruch Siach [Sun, 5 Apr 2020 16:19:31 +0000 (19:19 +0300)]
mtd: nand: pxa3xx: fix raw read when last_chunk_size == 0

Commit 6293b0361d9 ("mtd: nand: pxa3xx: add raw read support") added the
local data_len variable in handle_data_pio() to track read size, but
forgot to update the condition of drain_fifo() call. That happens to
work when the layout last_chunk_size != 0. But when last_chunk_size ==
0, drain_fifo() is not called to read the last chunk, which leads to
"Wait timeout!!!" error. Fix this.

Fixes: 6293b0361d9 ("mtd: nand: pxa3xx: add raw read support")
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
4 years agocommon/board_f: Make reserve_mmu generic
Ovidiu Panait [Sun, 29 Mar 2020 17:57:41 +0000 (20:57 +0300)]
common/board_f: Make reserve_mmu generic

Introduce arch_reserve_mmu to allow for architecture-specific reserve_mmu
routines. Also, define a weak nop stub for it.

Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoarm: asm/cache.c: Introduce arm_reserve_mmu
Ovidiu Panait [Sun, 29 Mar 2020 17:57:40 +0000 (20:57 +0300)]
arm: asm/cache.c: Introduce arm_reserve_mmu

As a preparation for turning reserve_mmu into an arch-specific variant,
introduce arm_reserve_mmu on ARM. It implements the default routine for
reserving memory for MMU TLB and needs to be weakly defined in order to allow
for machines to override it.

Without this decoupling, after introducing arch_reserve_mmu, there would be two
weak definitions for it, one in common/board_f.c and one in
arch/arm/lib/cache.c.

Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agocommon/board_f: Move arm-specific reserve_mmu to arch/arm/lib/cache.c
Ovidiu Panait [Sun, 29 Mar 2020 17:57:39 +0000 (20:57 +0300)]
common/board_f: Move arm-specific reserve_mmu to arch/arm/lib/cache.c

Move the ARM-specific reserve_mmu definition from common/board_f.c
to arch/arm/lib/cache.c.

Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoMerge tag 'u-boot-stm32-20200424' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Fri, 24 Apr 2020 18:07:59 +0000 (14:07 -0400)]
Merge tag 'u-boot-stm32-20200424' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- Solve stm32mp15 pinctrl dts issue (patch conflict in branches master and next)
- Split device tree for DHCOR Som and AV 96 board
- Update PLL4 setting in AV96 board
- Enable bootd, iminfo, imxtract on DHCOM

4 years agoRevert "sunxi: Fix PHY regression on A20-OLinuXino-Lime2 and A20-Olimex-SOM-EVB"
Tom Rini [Fri, 24 Apr 2020 17:13:33 +0000 (13:13 -0400)]
Revert "sunxi: Fix PHY regression on A20-OLinuXino-Lime2 and A20-Olimex-SOM-EVB"

While the change is correct, generally, it was not intended to be pushed
just yet.

This reverts commit b897306341024695d17296efc1f9d83d06368209.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge branch '2020-04-24-master-imports'
Tom Rini [Fri, 24 Apr 2020 17:04:38 +0000 (13:04 -0400)]
Merge branch '2020-04-24-master-imports'

- Assorted minor bugfixes.
- Resync fixdep with Linux v5.7-rc1
- Numerous changes to reduce SPL in various cases including when we have
  read-only env support.
- Allow mkimage to align the header on FIT images to a specific size.

4 years agosunxi: Fix PHY regression on A20-OLinuXino-Lime2 and A20-Olimex-SOM-EVB
Tom Rini [Fri, 24 Apr 2020 16:30:45 +0000 (12:30 -0400)]
sunxi: Fix PHY regression on A20-OLinuXino-Lime2 and A20-Olimex-SOM-EVB

When moving the PHYLIB PHY drivers around in Kconfig we did not at the
same time perform a careful migration of the related drivers and
sub-options.  This lead to the case where previously Kconfig-enabled
driver choices were now disabled on some platforms.  Correct this by
enabling both the PHY driver and sub-option on the above referenced
platforms.

Fixes: af2cbfd6b982 ("drivers: net: Provide Kconfig menu for PHYLIB")
Fixes: 8728c97eff5b ("configs: Re-sync")
Reported-by: Dario <dario86@tutamail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
After checking back on the original commit I can see that these are the
only two platforms to have been broken in the change.

4 years agoARM: stm32: Enable bootd, iminfo, imxtract on DHCOM
Marek Vasut [Wed, 1 Apr 2020 15:13:15 +0000 (17:13 +0200)]
ARM: stm32: Enable bootd, iminfo, imxtract on DHCOM

Enable these standard U-Boot commands for image manipulation and for
starting the default boot command using 'boot' command in U-Boot shell.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
4 years agotravis: Correct error checking when building boards
Simon Glass [Sun, 19 Apr 2020 23:02:32 +0000 (17:02 -0600)]
travis: Correct error checking when building boards

At present if buildman reports an error, the travis build still succeeds.

This is because the travis script does not stop when it sees errors; nor
does it automatically return the exit code. Also the current error
checking never triggers since 'ret' is not set.

Fix this by setting 'ret' correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
4 years agomkimage: fit: Free buf directly in fit_extract_data()
Bin Meng [Sat, 18 Apr 2020 08:59:11 +0000 (01:59 -0700)]
mkimage: fit: Free buf directly in fit_extract_data()

If given ptr to free() is NULL, no operation is performed.
Hence we can just free buf directly in fit_extract_data().

Signed-off-by: Bin Meng <bin.meng@windriver.com>
4 years agomkimage: fit: Unmmap the memory before closing fd in fit_import_data()
Lihua Zhao [Sat, 18 Apr 2020 08:59:10 +0000 (01:59 -0700)]
mkimage: fit: Unmmap the memory before closing fd in fit_import_data()

Without calling munmap(), the follow-up call to open() the same file
with a flag O_TRUNC seems not to cause any issue on Linux, but it fails
on Windows with error like below:

    Can't open kernel_fdt.itb.tmp: Permission denied

Fix this by unmapping the memory before closing fd in fit_import_data().

Signed-off-by: Lihua Zhao <lihua.zhao@windriver.com>
Signed-off-by: Bin Meng <bin.meng@windriver.com>
4 years agotools: Remove the out-of-date MinGW support codes
Bin Meng [Sat, 18 Apr 2020 08:59:09 +0000 (01:59 -0700)]
tools: Remove the out-of-date MinGW support codes

MinGW build for U-Boot tools has been broken for years. The official
support of Windows build is now MSYS2. Remove the MinGW support codes.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
4 years agodoc: invalid doc link in rstFlatTable.py
Heinrich Schuchardt [Sat, 18 Apr 2020 00:16:34 +0000 (02:16 +0200)]
doc: invalid doc link in rstFlatTable.py

Remove an invalid documentation link in rstFlatTable.py. This synchronizes
the file with Linux next-20200413.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agospl: Kconfig: de-dup SPL_DM_GPIO definition
Joel Johnson [Fri, 17 Apr 2020 15:42:29 +0000 (09:42 -0600)]
spl: Kconfig: de-dup SPL_DM_GPIO definition

Two nearly concurrent commits (d4d65e112 and bcee8d676) added a
SPL_DM_GPIO symbol. Resolve the duplication in favor of the version
in drivers/gpio/Kconfig.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
4 years agofixdep: Re-sync with Linux 5.7-rc1
Masahiro Yamada [Thu, 16 Apr 2020 05:01:45 +0000 (14:01 +0900)]
fixdep: Re-sync with Linux 5.7-rc1

fixdep is a standalone host program, so we can just re-sync it with
the latest Linux in one commit.

I kept the U-Boot own code block surrounded by
/* hack for U-Boot */ ... /* U-boot hack end */.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
4 years agofixdep: handle CONFIG_IS_ENABLE() and friends for TPL
Masahiro Yamada [Thu, 16 Apr 2020 05:01:44 +0000 (14:01 +0900)]
fixdep: handle CONFIG_IS_ENABLE() and friends for TPL

Since commit f1c6e1922eb5 ("spl: dm: use CONFIG_IS_ENABLED to test for
the DM option"), CONFIG_IS_ENABLED() handles CONFIG_TPL_* options, but
fixdep still cannot because it hard-codes the "SPL_" prefix as follows:

    char tmp_buf[256] = "SPL_"; /* hack for U-Boot */

Take care of the "TPL_" prefix too.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
4 years ago.mailmap: map Ruchika Gupta's mail address
Heinrich Schuchardt [Wed, 15 Apr 2020 18:47:38 +0000 (18:47 +0000)]
.mailmap: map Ruchika Gupta's mail address

Freescale mail addresses are not valid anymore.

Reported-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agodlmalloc: remove unit test support in SPL
Heinrich Schuchardt [Wed, 15 Apr 2020 16:46:23 +0000 (18:46 +0200)]
dlmalloc: remove unit test support in SPL

We cannot run unit tests in SPL. So remove the unit test support.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agolib: do not provide hexdump in SPL
Heinrich Schuchardt [Wed, 15 Apr 2020 16:46:22 +0000 (18:46 +0200)]
lib: do not provide hexdump in SPL

SPL should not be enlarged by building with CONFIG_HEXDUMP=y.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agocommon: image_sign_info helper functions in SPL
Heinrich Schuchardt [Wed, 15 Apr 2020 16:46:21 +0000 (18:46 +0200)]
common: image_sign_info helper functions in SPL

Do not build image_sign_info helper functions in SPL if not needed.

Fixes: b983cc2da0ba ("lib: rsa: decouple rsa from FIT image verification")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agolib: do not build OID registry in SPL
Heinrich Schuchardt [Wed, 15 Apr 2020 16:46:19 +0000 (18:46 +0200)]
lib: do not build OID registry in SPL

The OID registry is only used by crypto functions that are not built in
SPL. So we should not build it in SPL.

Fixes: a9b45e6e8382 ("lib: add oid registry utility")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotools: image-host.c: use correct output format
Heinrich Schuchardt [Sat, 11 Apr 2020 16:36:04 +0000 (18:36 +0200)]
tools: image-host.c: use correct output format

When building on a 32bit host the following warning occurs:

tools/image-host.c: In function ‘fit_image_read_data’:
tools/image-host.c:310:42: warning: format ‘%ld’ expects argument of type
‘long int’, but argument 3 has type ‘ssize_t’ {aka ‘int’} [-Wformat=]
   printf("Can't read all file %s (read %ld bytes, expexted %ld)\n",
                                        ~~^
                                        %d
          filename, n, sbuf.st_size);
                    ~

n is of type ssize_t so we should use %zd for printing.

Fixes: 7298e422504e ("mkimage: fit: add support to encrypt image with aes")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>