]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
4 years agopci: Add Rockchip PCIe controller driver
Jagan Teki [Sat, 9 May 2020 16:56:21 +0000 (22:26 +0530)]
pci: Add Rockchip PCIe controller driver

Add Rockchip PCIe controller driver for rk3399 platform.

Driver support Gen1 by operating as a Root complex.

Thanks to Patrick for initial work.

Signed-off-by: Patrick Wildt <patrick@blueri.se>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Suniel Mahesh <sunil@amarulasolutions.com> #roc-rk3399-pc
4 years agoclk: rk3399: Enable/Disable the PCIEPHY clk
Jagan Teki [Sat, 9 May 2020 16:56:20 +0000 (22:26 +0530)]
clk: rk3399: Enable/Disable the PCIEPHY clk

Enable/Disable the PCIEPHY clk for rk3399.

CLK is clear in both enable and disable functionality.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Suniel Mahesh <sunil@amarulasolutions.com> #roc-rk3399-pc
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoclk: rk3399: Add enable/disable clks
Jagan Teki [Sat, 9 May 2020 16:56:19 +0000 (22:26 +0530)]
clk: rk3399: Add enable/disable clks

Yes, most of the high speed peripheral clocks
in rk3399 enabled by default.

But it would be better to handle them via clk
enable/disable API for handling proper reset
conditions like 'usb reset' over command line.

So, enable USB, GMAC clock via enable/disable ops.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Suniel Mahesh <sunil.m@amarulasolutions.com> # roc-rk3399-pc
Tested-by: Suniel Mahesh <sunil@amarulasolutions.com> #roc-rk3399-pc
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockpro64: Enable HDMI output on rockpro64 board
Andrius Štikonas [Fri, 24 Apr 2020 21:03:29 +0000 (22:03 +0100)]
rockpro64: Enable HDMI output on rockpro64 board

Reference to commit that adds HDMI to other rk3399 boards:
commit 9778edae5576 ("rockchip: Enable HDMI output on rk3399 board w/ HDMI")

Signed-off-by: Andrius Štikonas <andrius@stikonas.eu>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: rk3399: enable spl-fifo-mode for sdmmc
Deepak Das [Wed, 15 Apr 2020 03:25:24 +0000 (08:55 +0530)]
rockchip: rk3399: enable spl-fifo-mode for sdmmc

adapting commit fa2047c47310 ("rockchip: rk3328: enable spl-fifo-mode
for emmc and sdmmc") for rk3399.
Since mmc to sram can't do dma, add patch to prevent aborts transferring
TF-A parts.

Signed-off-by: Deepak Das <deepakdas.linux@gmail.com>
4 years agoboard: puma: use dtb given on the commandline instead of using u-boot.dtb
Heiko Stuebner [Wed, 6 May 2020 11:06:56 +0000 (13:06 +0200)]
board: puma: use dtb given on the commandline instead of using u-boot.dtb

The make_fit_spl scripts get the dtb to use as commandline option,
so use it for puma as well.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
4 years agoMerge git://git.denx.de/u-boot-sh
Tom Rini [Thu, 21 May 2020 12:26:40 +0000 (08:26 -0400)]
Merge git://git.denx.de/u-boot-sh

- Enable -ffunction-sections / -fdata-sections --gc-sections to SH
- RCar Gen3 updates

4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
Tom Rini [Wed, 20 May 2020 12:46:56 +0000 (08:46 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq

- Add DM_ETH support for lx2160aqds, ls2080aqds, ls1088aqds
- QSI related fixes on ls1012a, ls2080a, ls1046a, ls1088a, ls1043a based
  platforms
- Bug-fixes/updtaes related to ls1046afrwy, fsl-mc, msi-map property

4 years agoMerge branch '2020-05-19-misc-fixes'
Tom Rini [Wed, 20 May 2020 12:22:17 +0000 (08:22 -0400)]
Merge branch '2020-05-19-misc-fixes'

- Assorted minor fixes

4 years agosh: Enable ffunction-sections and fdata-sections
Marek Vasut [Sun, 3 May 2020 15:22:43 +0000 (17:22 +0200)]
sh: Enable ffunction-sections and fdata-sections

Enable these two options to let compiler eliminate unused code.
On R2Dplus, this results in considerable amount of saved space:

      text    data     bss     dec     hex filename
  - 266580   13196   39076  318852   4dd84 u-boot
  + 220214   12797   38745  271756   4258c u-boot

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Tom Rini <trini@konsulko.com>
4 years agoARM: dts: rmobile: Enable eMMC DDR52 modes on Gen3 Salvator-X(S),ULCB,Ebisu
Marek Vasut [Sun, 8 Mar 2020 17:25:09 +0000 (18:25 +0100)]
ARM: dts: rmobile: Enable eMMC DDR52 modes on Gen3 Salvator-X(S),ULCB,Ebisu

Enable DDR52 modes, since the SD core supports correct switching now.
For completeness, list HS200 modes, however those were already enabled.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 years agoARM: rmobile: Enable support for OpTee on Gen3
Marek Vasut [Sat, 11 Apr 2020 18:54:02 +0000 (20:54 +0200)]
ARM: rmobile: Enable support for OpTee on Gen3

Enable OpTee support on R-Car Gen3, so that U-Boot would copy the
OpTee /firmware and /reserved-memory nodes into the Linux DT.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
4 years agoARM: rmobile: Merge prior-stage firmware DT fragment into U-Boot DT on Gen3
Marek Vasut [Sat, 11 Apr 2020 18:50:24 +0000 (20:50 +0200)]
ARM: rmobile: Merge prior-stage firmware DT fragment into U-Boot DT on Gen3

The prior-stage firmware generates DT fragment containing the /firmware
node, /reserved-memory node and /memory@ nodes. Merge these nodes into
the U-Boot DT, so U-Boot can use this information.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
4 years agoARM: dts: rmobile: Reserve space in R-Car Gen3 DTs
Marek Vasut [Sat, 11 Apr 2020 18:49:49 +0000 (20:49 +0200)]
ARM: dts: rmobile: Reserve space in R-Car Gen3 DTs

Reserve 4 kiB of space in R-Car Gen3 DTs when those DTs are compiled
to permit patching in OpTee-OS /firmware node, /reserved-memory node
and possibly also additional /memory@ nodes.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
4 years agofdtdec: Add weak function to patch U-Boot DT right after fdtdec_setup()
Marek Vasut [Sat, 11 Apr 2020 19:18:59 +0000 (21:18 +0200)]
fdtdec: Add weak function to patch U-Boot DT right after fdtdec_setup()

Add weak function which is called right after fdtdec_setup() configured
the U-Boot DT. This permits board-specific adjustments to the U-Boot DT
before U-Boot starts parsing the DT. This could be used e.g. to patch in
various custom nodes or merge in DT fragments from prior-stage firmware.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
4 years agolibfdt: Export overlay_apply_node() as fdt_overlay_apply_node()
Marek Vasut [Sat, 11 Apr 2020 18:43:07 +0000 (20:43 +0200)]
libfdt: Export overlay_apply_node() as fdt_overlay_apply_node()

This function is useful to merge a subset of DT into another DT, for
example if some prior-stage firmware passes a DT fragment to U-Boot
and U-Boot needs to merge it into its own DT. Export this function
to permit implementing such functionality.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
4 years agocmd: avb: free partition buffer upon verify completion
Gary Bisson [Mon, 11 May 2020 10:11:53 +0000 (12:11 +0200)]
cmd: avb: free partition buffer upon verify completion

Doing the same as the unittests for libavb [1].

Allows to run 'avb verify' multiple times which can be useful after a
failure to be able to re-flash the partition and try again.

[1]
https://android.googlesource.com/platform/external/avb/+/refs/tags/android-9.0.0_r37/test/avb_slot_verify_unittest.cc#156

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
4 years agodrivers: crypto: mod_exp_sw: Re-add DM_FLAG_PRE_RELOC
Jan Kiszka [Thu, 7 May 2020 18:36:03 +0000 (20:36 +0200)]
drivers: crypto: mod_exp_sw: Re-add DM_FLAG_PRE_RELOC

This driver is safe to use in SPL without relocation. Denying
DM_FLAG_PRE_RELOC prevents its usability for verifying the main U-Boot
or other artifacts from the SPL unless needless enabling the full driver
set (SPL_OF_PLATDATA).

Fixes: 17e117408571 ("drivers: crypto: rsa_mod_exp: avoid DM_FLAG_PRE_RELOC")
CC: Heinrich Schuchardt <xypron.glpk@gmx.de>
CC: Marek Vasut <marex@denx.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
4 years agotest: Use ut_asserteq_mem() where possible
Simon Glass [Sun, 10 May 2020 18:52:45 +0000 (12:52 -0600)]
test: Use ut_asserteq_mem() where possible

Quite a few tests still use ut_assertok(memcmp(...)) and variants. Modify
them to use the macro designed for this purpose.

Suggested-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
4 years agompc83xx, abb: remove suvd3 board
Heiko Schocher [Tue, 18 Feb 2020 17:03:51 +0000 (18:03 +0100)]
mpc83xx, abb: remove suvd3 board

the mpc83xxx suvd3 variant is not longer used, so
remove it.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agompc83xx: remove redundant MPC83xx_RESET #define
Rasmus Villemoes [Mon, 4 May 2020 22:21:18 +0000 (00:21 +0200)]
mpc83xx: remove redundant MPC83xx_RESET #define

This macro is only used (tested for existence) in mpc83xx.c, which
unconditionally includes mpc83xx.h where it is unconditionally
defined. Removing it makes the remaining code easier to read.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4 years agoMerge branch '2020-05-18-reduce-size-of-common.h'
Tom Rini [Tue, 19 May 2020 14:51:43 +0000 (10:51 -0400)]
Merge branch '2020-05-18-reduce-size-of-common.h'

Bring in the latest round of Simon's changes to reduce what's in
<common.h> overall.

4 years agoconfigs: ls2080aqds_tfa_defconfig: enable DM_ETH and related
Ioana Ciornei [Mon, 18 May 2020 11:48:37 +0000 (14:48 +0300)]
configs: ls2080aqds_tfa_defconfig: enable DM_ETH and related

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

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: ls2080aqds: add CONFIG_MULTI_DTB_FIT support
Ioana Ciornei [Mon, 18 May 2020 11:48:36 +0000 (14:48 +0300)]
arm: dts: ls2080aqds: add CONFIG_MULTI_DTB_FIT support

Add support for selecting the appropriate DTS file depending on the
SERDES protocol used.

The fsl-ls2080a-qds DTS will be used by default if there isn't a DTS
file specifically made for the current SERDES protocol.

This patch adds the necessary DPMAC nodes (DPMAC 1-8) for
protocol 42 (0x2A) on SD#1.

Also, in case CONFIG_DM_ETH and CONFIG_MULTI_DTB_FIT are enabled
implement the board_fit_config_name_match() function in order to choose
the appropriate DTS.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: ls2080aqds: transition to DM_ETH
Ioana Ciornei [Mon, 18 May 2020 11:48:35 +0000 (14:48 +0300)]
board: ls2080aqds: 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 agoconfigs: ls1088aqds_tfa_defconfig: enable DM_ETH and related
Ioana Ciornei [Fri, 15 May 2020 06:56:50 +0000 (09:56 +0300)]
configs: ls1088aqds_tfa_defconfig: enable DM_ETH and related

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

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: ls1088aqds: transition to DM_ETH
Ioana Ciornei [Fri, 15 May 2020 06:56:49 +0000 (09:56 +0300)]
board: ls1088aqds: 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 agoarm: dts: ls1088aqds: add CONFIG_MULTI_DTB_FIT support
Ioana Ciornei [Fri, 15 May 2020 06:56:48 +0000 (09:56 +0300)]
arm: dts: ls1088aqds: add CONFIG_MULTI_DTB_FIT support

Add support for selecting the appropriate DTS file depending on the
SERDES protocol used. The fsl-ls2088a-qds DTS will be used by default if
there isn't a DTS file specifically made for the current SERDES
protocol.

This patch adds support for the on-board ports (DPMAC 1,2 and 4,5) found
on the SERDES protocols 21(0x15) and 29(0x1d) for SD#1.

On the LS1088AQDS board EMDIO1 is used with two onboard RGMII PHYs
(Realtek RTL8211FD-CG), as well as 2 input/output connectors for
mezzanine cards. Configuration signals from the Qixis FPGA control the
routing of the external MDIOs.

Register 0x54 of the Qixis FPGA controls the routing of the EMDIO1 one
of the 2 IO slots. As a consequence, a new node is added to
describe register 0x54 as a MDIO mux controlled with child nodes
describing all the IO slots as MDIO buses.

Also, in case CONFIG_DM_ETH and CONFIG_MULTI_DTB_FIT are enabled
implement the board_fit_config_name_match() function in order to choose
the appropriate DTS.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoinclude/configs: ls1046afrwy: add support for boot targets.
Pramod Kumar [Wed, 29 Apr 2020 09:30:41 +0000 (15:00 +0530)]
include/configs: ls1046afrwy: add support for boot targets.

ls1046afrwy does not support sata boot.
So Override default BOOT_TARGET_DEVICES
and support only  mmc, usb and dhcp as boot targets.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agonet: fsl-mc: fixup DPC: add /board/ports node if missing
Razvan Ionut Cirjan [Tue, 28 Apr 2020 13:09:59 +0000 (16:09 +0300)]
net: fsl-mc: fixup DPC: add /board/ports node if missing

The DPC fixup for MAC address and enet_if is not made if
/board/ports node is missing in DPC file.
Add /board/ports or /ports nodes if them are missing.

Signed-off-by: Razvan Ionut Cirjan <razvanionut.cirjan@nxp.com>
Reviewed-by: Ioana Ciornei <Ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard_r: Detect ifc-nor flash at run-time
Pankit Garg [Thu, 30 Apr 2020 10:24:05 +0000 (15:54 +0530)]
board_r: Detect ifc-nor flash at run-time

CONFIG_MTD_NOR_FLASH flag needs to be enable for all
boot sources,as all flash drivers need to compile in
TFA Boot.Probe ifc nor flash only when there is nor
flash available on board.So needs to detect ifc-nor
flash at run-time for probing.

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: lx2160aqds_tfa_defconfig: enable DM_ETH and related
Ioana Ciornei [Mon, 27 Apr 2020 12:21:17 +0000 (15:21 +0300)]
configs: lx2160aqds_tfa_defconfig: enable DM_ETH and related

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

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Razvan Ionut Cirjan <razvanionut.cirjan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: lx2160aqds: implement board_fit_config_name_match
Ioana Ciornei [Mon, 27 Apr 2020 12:21:16 +0000 (15:21 +0300)]
board: lx2160aqds: implement board_fit_config_name_match

In case CONFIG_DM_ETH and CONFIG_MULTI_DTB_FIT are enabled implement the
board_fit_config_name_match() function in order to choose the
appropriate DTS for the current SERDES protocol configuration.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Razvan Ionut Cirjan <razvanionut.cirjan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: lx2160aqds: transition to DM_ETH
Ioana Ciornei [Mon, 27 Apr 2020 12:21:15 +0000 (15:21 +0300)]
board: lx2160aqds: 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: Razvan Ionut Cirjan <razvanionut.cirjan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: lx2160aqds: add nodes describing possible mezzanine cards
Ioana Ciornei [Mon, 27 Apr 2020 12:21:14 +0000 (15:21 +0300)]
arm: dts: lx2160aqds: add nodes describing possible mezzanine cards

Add device trees describing possible uses of mezzanine cards depending
on the SERDES protocol employed.

This patch adds DPAA2 networking support for the following protocols on
each SERDES block:
 * SD #1: 3, 7, 19, 20
 * SD #2: 11

Each SERDES block has a different device tree file per protocol
supported, where the IO SLOTs used are enabled and PHYs located on the
mezzanine cards are described. Also, dpmac nodes are edited and their
associated phy-connection-type and phy-handle are added.

Top DTS files are also added for each combination of protocol on the 3
SERDES blocks.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Razvan Ionut Cirjan <razvanionut.cirjan@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: lx2160aqds: add MDIO slots
Ioana Ciornei [Mon, 27 Apr 2020 12:21:13 +0000 (15:21 +0300)]
arm: dts: lx2160aqds: add MDIO slots

The LX2160A processor has two external MDIO interfaces, described in the
DTS as emdio1 and emdio2.

On the LX2160AQDS board EMDIO1 is used with two onboard RGMII PHYs
(Realtek RTL8211FD-CG), as well as eight input/output connectors for
mezzanine cards. Configuration signals from the Qixis FPGA control the
routing of the external MDIOs.

Register 0x54 of the Qixis FPGA controls the routing of the EMDIO1 one
of the 8 IO slots. As a consequence, a new node is added to
describe register 0x54 as a MDIO mux controlled with child nodes
describing all the IO slots as MDIO buses.

Also, DPMAC 17 and 18 are updated to reference the on-board PHYs.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Razvan Ionut Cirjan <razvanionut.cirjan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: lx2160a: add noted for dpmacs 1, 2, 5-6
Ioana Ciornei [Mon, 27 Apr 2020 12:21:12 +0000 (15:21 +0300)]
arm: dts: lx2160a: add noted for dpmacs 1, 2, 5-6

Add nodes for DPMACs 1, 2 and 5-6 which were missing from the
description. These will be later used on the LX2160AQDS specific DTS.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Razvan Ionut Cirjan <razvanionut.cirjan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodrivers: net: fsl-mc: fixup msi-map property
Laurentiu Tudor [Mon, 4 May 2020 11:47:11 +0000 (14:47 +0300)]
drivers: net: fsl-mc: fixup msi-map property

Similarly to iommu-map, the msi-map property must also be fixed up
in the device tree, in order for the icid -> streamid translation
be possible in the MSI case as well.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Diana Craciun <diana.craciun@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodriver: net: fm: minor fix in DM ETH support
Madalin Bucur [Mon, 4 May 2020 10:09:12 +0000 (13:09 +0300)]
driver: net: fm: minor fix in DM ETH support

Bus callback functions for read/write/reset need to be set only for
DM_ETH, moving endif a bit lower.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1012a: Unset ENV_ADDR value
Kuldeep Singh [Mon, 4 May 2020 06:04:55 +0000 (11:34 +0530)]
configs: ls1012a: Unset ENV_ADDR value

LS1012A-FRWY and LS1012A-RDB crashes in flash environment when
CONFIG_ENV_ADDR value is set. Unset the config value in *_tfa_defconfig*
to resolve booting crash.

Following crash is observed:
    Using SERDES1 Protocol: 13576 (0x3508)
    "Synchronous Abort" handler, esr 0x96000006
    elr: 00000000820452c0 lr : 0000000082013f54 (reloc)
    elr: 00000000b7b932c0 lr : 00000000b7b61f54
    x0 : 0000000000000000 x1 : 000000007604e004
    x2 : 0000000000000001 x3 : 0000000000000000
    ...
    Code: 54ffff80 9100c000 17fffff7 f9402241 (3860c820)
    Resetting CPU ...

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: nxp: Enable CONFIG_SYS_RELOC_GD_ENV_ADDR
Kuldeep Singh [Sat, 14 Dec 2019 14:02:56 +0000 (19:32 +0530)]
configs: nxp: Enable CONFIG_SYS_RELOC_GD_ENV_ADDR

Commit 323d3af59fe4 ("configs: ls1012ardb: Enable
CONFIG_SYS_RELOC_GD_ENV_ADDR") enables the config only for LS1012ARDB.

Apart from LS1012A-RDB, other platforms such as LS1012A-FRWY, LS2088A
and LS1046A-RDB/FRWY also require this config to be enabled. This also
helps in resolving booting crash observed in flash environment.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1012a: Reduce CONFIG_ENV_SIZE to 0x2000
Ashish Kumar [Wed, 29 Apr 2020 12:12:03 +0000 (17:42 +0530)]
configs: ls1012a: Reduce CONFIG_ENV_SIZE to 0x2000

All LS1012A board variants have same CONFIG_ENV_SECT_SIZE and
CONFIG_ENV_SIZE values. If both config values are same, flash
environment cannot be saved. Since, CONFIG_ENV_SECT_SIZE needs to be
same as that of flash sector size, this entry cannot be changed.
Reduce CONFIG_ENV_SIZE value to 0x2000. This also helps in making config
value aligned with other boards environemt size.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Ashish Kumar <Ashish.kumar@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1012a: Increase CONFIG_SYS_MALLOC_LEN size
Kuldeep Singh [Tue, 12 May 2020 09:28:51 +0000 (14:58 +0530)]
configs: ls1012a: Increase CONFIG_SYS_MALLOC_LEN size

CONFIG_SYS_MALLOC_LEN is currently set to low value and leaves very less
space to do malloc in flash environmet. Increase the value to get more
memory and also make it align with other boards(ls1046a, ls1043a etc.)
config values.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls2080ardb: Make BOOT command access flash memory as per spi-mem
Kuldeep Singh [Fri, 7 Feb 2020 16:45:18 +0000 (22:15 +0530)]
configs: ls2080ardb: Make BOOT command access flash memory as per spi-mem

BOOT command currently access spi-nor flash memory directly. As per spi-mem
framework, flash memory access via absolute addresses is no more possible.
Use flash APIs to access memory instead of directly using it.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls2080ardb: Make MC_INIT access flash memory as per spi-mem
Kuldeep Singh [Fri, 7 Feb 2020 16:39:09 +0000 (22:09 +0530)]
configs: ls2080ardb: Make MC_INIT access flash memory as per spi-mem

MC_INIT command currently access spi-nor flash memory directly. As per
spi-mem framework, flash memory access via absolute addresses is no more
possible. Use flash APIs to access memory instead of directly using it.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1046a: Define ENV_ADDR value
Kuldeep Singh [Tue, 12 May 2020 09:09:46 +0000 (14:39 +0530)]
configs: ls1046a: Define ENV_ADDR value

CONFIG_ENV_ADDR helps in picking environment from flash before DDR init.
The macro value is already defined in ls1046ardb_tfa_defconfig, also
define the value as 0x40300000 in qspi_defconfig.

ls1046aqds has one spansion flash "S25FL128S_64K" of size 16M with
sector size 64K. Correct ENV_ADDR and ENV_SECT_SIZE value for QSPI and
TFA defconfigs of the board.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls2080a: Correct ENV_ADDR value
Kuldeep Singh [Tue, 11 Feb 2020 09:26:42 +0000 (14:56 +0530)]
configs: ls2080a: Correct ENV_ADDR value

CONFIG_ENV_ADDR helps in picking environment from flash before DDR init.
QSPI region in LS2088ARDB and LS2088AQDS starts from 0x20000000 offset.
Correct the config value i.e 0x80500000 -> 0x20500000.

Also, define config value as 0x20300000 in qspi defconfig.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1088a: Correct ENV_ADDR value
Kuldeep Singh [Tue, 11 Feb 2020 09:21:35 +0000 (14:51 +0530)]
configs: ls1088a: Correct ENV_ADDR value

CONFIG_ENV_ADDR helps in picking environment from flash before DDR init.
QSPI region starts from 0x20000000 offset.
Correct the config value i.e 0x80500000 -> 0x20500000.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agotreewide: Update fsl qspi node dt properties as per spi-mem driver
Kuldeep Singh [Thu, 12 Dec 2019 06:19:24 +0000 (11:49 +0530)]
treewide: Update fsl qspi node dt properties as per spi-mem driver

According to new qspi driver, some properties like "bus-num, num-cs,
big-endian" are no longer used. Device endiannes can be determined from
device-type data in driver.

Now use board specific compatibles, generic node names and specific
labels to align with linux device-tree properties.

Also consolidate spi-max-frequency to 50Mhz treewide.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1046a: Move SPI_FLASH_SPANSION to defconfig
Kuldeep Singh [Tue, 12 May 2020 09:02:39 +0000 (14:32 +0530)]
configs: ls1046a: Move SPI_FLASH_SPANSION to defconfig

Enable CONFIG_SPI_FLASH_SPANSION in defconfigs of LS1046ARDB and
LS1046AQDS which have two spansion flases i.e s25fs512s each of size
64M.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1012a: Enable CONFIG_SPI_FLASH_SPANSION in defconfigs
Kuldeep Singh [Tue, 12 May 2020 09:01:07 +0000 (14:31 +0530)]
configs: ls1012a: Enable CONFIG_SPI_FLASH_SPANSION in defconfigs

Since CONFIG_FSL_QSPI is already enabled for LS1012A in defconfigs. Also
enable CONFIG_SPI_FLASH_SPANSION for LS1012A boards having spansion
flashes.

Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1043a: Move CONFIG_FSL_QSPI and SPI_FLASH_SPANSION to defconfig
Kuldeep Singh [Tue, 12 May 2020 08:58:56 +0000 (14:28 +0530)]
configs: ls1043a: Move CONFIG_FSL_QSPI and SPI_FLASH_SPANSION to defconfig

Move CONFIG_FSL_QSPI to the board defconfigs and while at it also move
CONFIG_SPI_FLASH_SPANSION for LS1043AQDS.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agotreewide: Remove unused FSL QSPI config options for Layerscape platforms
Kuldeep Singh [Tue, 12 May 2020 07:24:07 +0000 (12:54 +0530)]
treewide: Remove unused FSL QSPI config options for Layerscape platforms

Some of these options are not used by the driver anymore and some of
them are obsolete as the information is gathered from the dt. Also
consolidating defines in common headers.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agocommon: Drop linux/bitops.h from common header
Simon Glass [Sun, 10 May 2020 17:40:13 +0000 (11:40 -0600)]
common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoUse __ASSEMBLY__ as the assembly macros
Simon Glass [Sun, 10 May 2020 17:40:12 +0000 (11:40 -0600)]
Use __ASSEMBLY__ as the assembly macros

Some places use __ASSEMBLER__ instead which does not work since the
Makefile does not define it. Fix them.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop linux/delay.h from common header
Simon Glass [Sun, 10 May 2020 17:40:11 +0000 (11:40 -0600)]
common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoFix some checkpatch warnings in calls to udelay()
Simon Glass [Sun, 10 May 2020 17:40:10 +0000 (11:40 -0600)]
Fix some checkpatch warnings in calls to udelay()

Fix up some incorrect code style in calls to functions in the linux/time.h
header, mostly udelay().

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop linux/stringify.h from common header
Simon Glass [Sun, 10 May 2020 17:40:09 +0000 (11:40 -0600)]
common: Drop linux/stringify.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop linux/bug.h from common header
Simon Glass [Sun, 10 May 2020 17:40:08 +0000 (11:40 -0600)]
common: Drop linux/bug.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop asm_offsets.h from common header
Simon Glass [Sun, 10 May 2020 17:40:07 +0000 (11:40 -0600)]
common: Drop asm_offsets.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop asm/ptrace.h from common header
Simon Glass [Sun, 10 May 2020 17:40:06 +0000 (11:40 -0600)]
common: Drop asm/ptrace.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop log.h from common header
Simon Glass [Sun, 10 May 2020 17:40:05 +0000 (11:40 -0600)]
common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoFix some checkpatch warnings in calls to debug()
Simon Glass [Sun, 10 May 2020 17:40:04 +0000 (11:40 -0600)]
Fix some checkpatch warnings in calls to debug()

Fix up some incorrect code style in calls to functions in the log.h
header, mostly debug().

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommand: Remove the cmd_tbl_t typedef
Simon Glass [Sun, 10 May 2020 17:40:03 +0000 (11:40 -0600)]
command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop init.h from common header
Simon Glass [Sun, 10 May 2020 17:40:02 +0000 (11:40 -0600)]
common: Drop init.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop image.h from common header
Simon Glass [Sun, 10 May 2020 17:40:01 +0000 (11:40 -0600)]
common: Drop image.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop bootstage.h from common header
Simon Glass [Sun, 10 May 2020 17:40:00 +0000 (11:40 -0600)]
common: Drop bootstage.h from common header

Move this fairly uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobootstage: Use BOOTSTAGE instead of BOOTSTATE
Simon Glass [Sun, 10 May 2020 17:39:59 +0000 (11:39 -0600)]
bootstage: Use BOOTSTAGE instead of BOOTSTATE

Some of the enum members are wrong. Fix them.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop part.h from common header
Simon Glass [Sun, 10 May 2020 17:39:58 +0000 (11:39 -0600)]
common: Drop part.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agopart: Drop disk_partition_t typedef
Simon Glass [Sun, 10 May 2020 17:39:57 +0000 (11:39 -0600)]
part: Drop disk_partition_t typedef

We should not be using typedefs and these make it harder to use
forward declarations (to reduce header file inclusions). Drop the typedef.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop net.h from common header
Simon Glass [Sun, 10 May 2020 17:39:56 +0000 (11:39 -0600)]
common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoarm: Don't include common.h in header files
Simon Glass [Sun, 10 May 2020 17:39:55 +0000 (11:39 -0600)]
arm: Don't include common.h in header files

It is bad practice to include common.h in other header files since it can
bring in any number of superfluous definitions. It implies that some C
files don't include it and thus may be missing CONFIG options that are set
up by that file. The C files should include these themselves.

Update some header files in arch/arm to drop this.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop flash.h from common header
Simon Glass [Sun, 10 May 2020 17:39:54 +0000 (11:39 -0600)]
common: Drop flash.h from common header

Move this uncommon header out of the common header.

Fix up some style problems in flash.h while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoflash: Tidy up coding style for flash functions
Simon Glass [Sun, 10 May 2020 17:39:53 +0000 (11:39 -0600)]
flash: Tidy up coding style for flash functions

Some functions use the wrong code style and generate checkpatch errors.
Fix these.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop uuid.h from common header
Simon Glass [Sun, 10 May 2020 17:39:52 +0000 (11:39 -0600)]
common: Drop uuid.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoMerge tag 'efi-2020-07-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Mon, 18 May 2020 12:17:29 +0000 (08:17 -0400)]
Merge tag 'efi-2020-07-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-07-rc3

A series of patches introduces the possibility to manage UEFI variables
via an OP-TEE module. CONFIG_EFI_MM_COMM_TEE enables this. If this
option is not specified the U-Boot behavior remains unchanged. A defconfig
is provided for compile testing (lx2160ardb_tfa_stmm_defconfig).

An incorrect UEFI memory allocation for fsl-layerscape is fixed

4 years agodts: nxp2160ardb: add op-tee node
Ilias Apalodimas [Sun, 17 May 2020 19:25:49 +0000 (22:25 +0300)]
dts: nxp2160ardb: add op-tee node

A defconfig is added on lx2160ardb which allows UEFI variable management
via OP-TEE. Enable the the node in the relevant DTS file.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 years agoconfigs: lx2160a: Add default config for lx2160a using StMM in OP-TEE
Ilias Apalodimas [Sun, 17 May 2020 19:25:48 +0000 (22:25 +0300)]
configs: lx2160a: Add default config for lx2160a using StMM in OP-TEE

Previous patches allow UEFI secure variables to be stored in an RPMB
device using OPTEE. Add a config for the lx2160a hardware so the feature
gets at least compiled.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Remove superfluous differences to lx2160ardb_tfa_defconfig.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agodoc: uefi.rst: Add OP-TEE variable storage config options
Ilias Apalodimas [Sun, 17 May 2020 19:25:47 +0000 (22:25 +0300)]
doc: uefi.rst: Add OP-TEE variable storage config options

If OP-TEE is compiled with an EDK2 application running in secure world
it can process and store UEFI variables in an RPMB.
Add documentation for the config options enabling this.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMAINTAINERS: Add maintainer for EFI variables via OP-TEE
Ilias Apalodimas [Sun, 17 May 2020 19:25:46 +0000 (22:25 +0300)]
MAINTAINERS: Add maintainer for EFI variables via OP-TEE

Add myself as maintainer for the OP-TEE related UEFI variable storage.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agocmd: efidebug: Add support for querying UEFI variable storage
Ilias Apalodimas [Sun, 17 May 2020 19:25:45 +0000 (22:25 +0300)]
cmd: efidebug: Add support for querying UEFI variable storage

With the previous patches that use OP-TEE and StandAloneMM for UEFI
variable storage we've added functionality for efi_query_variable_info.
So let's add the relevant command to efidebug and retrieve information
about the container used to store UEFI variables

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 years agoefi_loader: Implement EFI variable handling via OP-TEE
Ilias Apalodimas [Sun, 17 May 2020 19:25:44 +0000 (22:25 +0300)]
efi_loader: Implement EFI variable handling via OP-TEE

In OP-TEE we can run EDK2's StandAloneMM on a secure partition.
StandAloneMM is responsible for the UEFI variable support. In
combination with OP-TEE and it's U-Boot supplicant, variables are
authenticated/validated in secure world and stored on an RPMB partition.

So let's add a new config option in U-Boot implementing the necessary
calls to OP-TEE for the variable management.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Pipat Methavanitpong <pipat1010@gmail.com>
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: Add headers for EDK2 StandAloneMM communication
Sughosh Ganu [Sun, 17 May 2020 19:25:43 +0000 (22:25 +0300)]
efi_loader: Add headers for EDK2 StandAloneMM communication

In Arm devices OP-TEE has the ability to run StandAloneMM (from EDK2)
in a separate partition and handle UEFI variables.
A following patch introduces this functionality.

Add the headers needed for OP-TEE <--> StandAloneMM communication

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: round the memory area in efi_add_memory_map()
Michael Walle [Sun, 17 May 2020 10:29:19 +0000 (12:29 +0200)]
efi_loader: round the memory area in efi_add_memory_map()

Virtually all callers of this function do the rounding on their own.
Some do it right, some don't. Instead of doing this in each caller,
do the rounding in efi_add_memory_map(). Change the size parameter
to bytes instead of pages and remove aligning and size calculation in
all callers.

There is no more need to make the original efi_add_memory_map() (which
takes pages as size) available outside the module. Thus rename it to
efi_add_memory_map_pg() and make it static to prevent further misuse
outside the module.

Signed-off-by: Michael Walle <michael@walle.cc>
Add missing comma in sunxi_display.c.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMerge branch '2020-05-15-kconfig-migrations'
Tom Rini [Sat, 16 May 2020 01:44:46 +0000 (21:44 -0400)]
Merge branch '2020-05-15-kconfig-migrations'

- Convert CONFIG_DELAY_ENVIRONMENT to Kconfig and update initr_pci to be
  Kconfig'd.

4 years agoqemu-x86*_defconfig: Enable CONFIG_PCI_INIT_R
Ovidiu Panait [Wed, 6 May 2020 17:38:47 +0000 (20:38 +0300)]
qemu-x86*_defconfig: Enable CONFIG_PCI_INIT_R

Enable CONFIG_PCI_INIT_R for qemux86 and qemux86-64 pci enumeration during
boot in order to eliminate the custom preboot commands in
include/configs/qemu-x86.h.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
4 years agoqemu_arm_defconfig: Enable CONFIG_PCI_INIT_R
Ovidiu Panait [Wed, 6 May 2020 17:38:46 +0000 (20:38 +0300)]
qemu_arm_defconfig: Enable CONFIG_PCI_INIT_R

Replace the "pci enum" preboot sequence with CONFIG_PCI_INIT_R=y.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
4 years agoqemu_arm64_defconfig: Enable CONFIG_PCI_INIT_R
Ovidiu Panait [Wed, 6 May 2020 17:38:45 +0000 (20:38 +0300)]
qemu_arm64_defconfig: Enable CONFIG_PCI_INIT_R

Replace the "pci enum" preboot sequence with CONFIG_PCI_INIT_R=y.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
4 years agoboard_r: Introduce CONFIG_PCI_INIT_R Kconfig option
Ovidiu Panait [Wed, 6 May 2020 17:38:44 +0000 (20:38 +0300)]
board_r: Introduce CONFIG_PCI_INIT_R Kconfig option

With CONFIG_DM_PCI enabled, PCI buses are not enumerated at boot, as they
are without that config option enabled. However, there are cases such as DM
PCI-based Ethernet devices that need the PCI bus enumerated so that they
can be discovered by their drivers.

Currently, to solve this, some boards enumerate the pci bus using
"pci enum" preboot command, while others do it manually in board files
(in board_init/board_late_init/etc. functions).

In order to possibly make the pci enumeration process uniform across all
boards, introduce CONFIG_PCI_INIT_R Kconfig option.

This change also preserves the current behavior in the !DM_PCI case
(pci_init is run unconditionally at boot).

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
4 years agoboard_r: env: Use IS_ENABLED() instead of #ifdefs
Ovidiu Panait [Wed, 6 May 2020 17:38:43 +0000 (20:38 +0300)]
board_r: env: Use IS_ENABLED() instead of #ifdefs

Use IS_ENABLED() instead of #ifdef in should_load_env and initr_env
functions.

No functional change intended.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
4 years agoenv: Convert CONFIG_DELAY_ENVIRONMENT to Kconfig
Ovidiu Panait [Wed, 6 May 2020 17:38:42 +0000 (20:38 +0300)]
env: Convert CONFIG_DELAY_ENVIRONMENT to Kconfig

This converts ad-hoc CONFIG_DELAY_ENVIRONMENT to Kconfig.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
4 years agoconfigs: Resync with savedefconfig
Tom Rini [Fri, 15 May 2020 20:49:11 +0000 (16:49 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge branch '2020-05-15-misc-bugfixes'
Tom Rini [Fri, 15 May 2020 20:42:06 +0000 (16:42 -0400)]
Merge branch '2020-05-15-misc-bugfixes'

- A number of symbol name consistency updates
- JFFS2 bugfix
- Use /* fallthrough */ for now to help at least gcc know when we're
  intentionally not 'break;'ing in a switch statement, we'll adopt
  fallthrough; later on.
- Assorted other fixes

4 years agolib: rsa: avoid overriding the object name when already specified
Jan Luebbe [Wed, 13 May 2020 10:26:24 +0000 (12:26 +0200)]
lib: rsa: avoid overriding the object name when already specified

If "object=" is specified in "keydir" when using the pkcs11 engine do
not append another "object=<key-name-hint>". This makes it possible to
use object names other than the key name hint. These two string
identifiers are not necessarily equal.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Bastian Krause <bst@pengutronix.de>
Reviewed-by: George McCollister <george.mccollister@gmail.com>
4 years agoMAINTAINERS: POWERPC MPC8XX: Update email address
Christophe Leroy [Wed, 13 May 2020 05:30:03 +0000 (05:30 +0000)]
MAINTAINERS: POWERPC MPC8XX: Update email address

Our email addresses have changed from @c-s.fr to @csgroup.eu

Update entry in MAINTAINERS

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
4 years agotools: ftdgrep: use /* fallthrough */ as needed
Heinrich Schuchardt [Sat, 9 May 2020 15:12:42 +0000 (17:12 +0200)]
tools: ftdgrep: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agotools: mkimage: use /* fallthrough */ as needed
Heinrich Schuchardt [Sat, 9 May 2020 15:10:41 +0000 (17:10 +0200)]
tools: mkimage: use /* fallthrough */ as needed

GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled.
Let's use it consistently.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agocommon/board_f: avoid -Wtype-limits warning
Heinrich Schuchardt [Sat, 9 May 2020 19:21:14 +0000 (21:21 +0200)]
common/board_f: avoid -Wtype-limits warning

CONFIG_SYS_SDRAM_BASE maybe zero. Avoid a build warning when compiling with
-Wtype-limits.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agospl: Always define preloader_console_init
Samuel Holland [Thu, 7 May 2020 23:08:10 +0000 (18:08 -0500)]
spl: Always define preloader_console_init

A large number of boards call preloader_console_init unconditionally.
Currently, they fail to build with CONFIG_SPL_SERIAL=n, because the
function is undefined in that case. To fix the build, always define
preloader_console_init, but make it no-op when CONFIG_SPL_SERIAL=n.

For the few boards that did check for CONFIG_SPL_SERIAL before calling
preloader_console_init, remove the checks, since the function can now
be called unconditionally.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agolib: rsa: Also check for presence of r-squared property
Jan Kiszka [Thu, 7 May 2020 18:36:13 +0000 (20:36 +0200)]
lib: rsa: Also check for presence of r-squared property

Better than crashing later if it is missing.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>