oweals/u-boot.git
5 years agomicroblaze: Fix lmb memory initialization
Michal Simek [Wed, 25 Sep 2019 07:11:48 +0000 (09:11 +0200)]
microblaze: Fix lmb memory initialization

Microblaze as Arm is using multiple memory banks which are read from DT
that's why there is a need to initialized LMB based on bd->bi_dram[].
Without this fix memory base/size is all the time 0 and image relocation is
not possible.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomicroblaze: Move CONFIG_LMB from board file to config.h
Michal Simek [Wed, 25 Sep 2019 06:32:27 +0000 (08:32 +0200)]
microblaze: Move CONFIG_LMB from board file to config.h

It is common for the whole architecture that's why move it there.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomicroblaze: Remove unused variable ram_base
Michal Simek [Wed, 25 Sep 2019 06:13:15 +0000 (08:13 +0200)]
microblaze: Remove unused variable ram_base

This variable is completely unused that's why remove it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Define default SYS_PROMPT
Michal Simek [Wed, 25 Sep 2019 10:37:15 +0000 (12:37 +0200)]
arm64: zynqmp: Define default SYS_PROMPT

All boards are using the same prompt that's why add it as default value to
Kconfig to simplify defconfigs.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
5 years agoARM: zynq: Define default SYS_PROMPT
Michal Simek [Wed, 25 Sep 2019 10:32:41 +0000 (12:32 +0200)]
ARM: zynq: Define default SYS_PROMPT

All boards are using the same prompt that's why add it as default value to
Kconfig to simplify defconfigs.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoconfigs: apalis-tk1: Do not define CONFIG_SYS_BOOT_RAMDISK_HIGH again
Michal Simek [Wed, 25 Sep 2019 09:06:50 +0000 (11:06 +0200)]
configs: apalis-tk1: Do not define CONFIG_SYS_BOOT_RAMDISK_HIGH again

CONFIG_SYS_BOOT_RAMDISK_HIGH is already defined in
arch/arm/include/asm/config.h:10:#define CONFIG_SYS_BOOT_RAMDISK_HIGH
that's why there is no reason to define it again in board file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Add a2197 memory board revA
Michal Simek [Fri, 12 Apr 2019 10:19:22 +0000 (12:19 +0200)]
arm64: zynqmp: Add a2197 memory board revA

Similar to processor board but i2c structure is completely different.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Add System Controller for a2197-g/p
Michal Simek [Wed, 27 Mar 2019 19:14:19 +0000 (20:14 +0100)]
arm64: zynqmp: Add System Controller for a2197-g/p

Similar SCs but different wiring.

- dc_i2c is connected to X-PRC cards that's why label is required to have
  an option to hook up some devices.
- Exactly identify i2c devices on x-prc boards.
  In case of missing i2c connection devices won't be accessible.
- USB 0 should be device mode with super speed.
- USB 1 should be host mode.
- Fix i2c mux reset pin entry - commented, not verified.
- Fix i2c1 eeprom compatible string - it is an ST 128Kbit device.
  Need to use atmel fallback.
- Fix si570 I2C slave address and add corresponding part numbers.
- Enable AMS for system monitoring.
- phy reset property should be commented because it will throw a
  warning dump when called from context that can sleep.
  No support for phys property (zynqmp phy driver) with SGMII.
  Add is-internal-pcspma property required by uboot.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
5 years agoarm64: zynqmp: Add generic a2197 system controller config
Michal Simek [Thu, 11 Apr 2019 08:35:37 +0000 (10:35 +0200)]
arm64: zynqmp: Add generic a2197 system controller config

Add generic configuration for a2197-p/-m/-g boards.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agonet: xilinx_axiemac: Fill the phy node pointer in phydev
Siva Durga Prasad Paladugu [Fri, 15 Mar 2019 12:16:45 +0000 (17:46 +0530)]
net: xilinx_axiemac: Fill the phy node pointer in phydev

This patch assings the phynode pointer to the phydev node as it is needed
later in the corresponding phy driver to read phy properties from DT.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agogpio: zynq: fix issue in set gpio output direction
Ashok Reddy Soma [Wed, 11 Sep 2019 10:40:11 +0000 (04:40 -0600)]
gpio: zynq: fix issue in set gpio output direction

This patch fixes zynq_gpio_direction() to call driver specific
zynq_gpio_set_value function rather than top level gpio_set_value.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: versal: Remove unneeded configs for mini configurations
Siva Durga Prasad Paladugu [Tue, 25 Jun 2019 11:21:37 +0000 (16:51 +0530)]
arm64: versal: Remove unneeded configs for mini configurations

The PSCI_RESET and EXPERT are not needed for mini configurations so remove
them to save space.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: versal: mini_emmc: Enable fatwrite support
Siva Durga Prasad Paladugu [Thu, 18 Jul 2019 10:26:59 +0000 (15:56 +0530)]
arm64: versal: mini_emmc: Enable fatwrite support

This patch enable fatwrite support for mini emmc configurations.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
5 years agoenv: Kconfig: Add environment default offset in versal
T Karthik Reddy [Mon, 5 Aug 2019 10:48:57 +0000 (16:18 +0530)]
env: Kconfig: Add environment default offset in versal

This patch adds default offset & sector size values for environment
variables to save in qspi/ospi flash for versal.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodrivers: usb: dwc3: setup phy before dwc3 core soft reset
T Karthik Reddy [Wed, 1 May 2019 04:44:49 +0000 (10:14 +0530)]
drivers: usb: dwc3: setup phy before dwc3 core soft reset

Phy setup should be done before dwc3 soft core reset as it is done
in linux & this fixes unreliable detection of usb cable on host side.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Enable 2 NAND chips support for zynqmp_mini_nand
T Karthik Reddy [Fri, 19 Apr 2019 03:40:37 +0000 (09:10 +0530)]
arm64: zynqmp: Enable 2 NAND chips support for zynqmp_mini_nand

This patch enables 2 nand chips support for zynqmp mini nand

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodoc: README.xilinx: Add dt bindings
T Karthik Reddy [Fri, 26 Jul 2019 09:49:28 +0000 (02:49 -0700)]
doc: README.xilinx: Add dt bindings

Devicetree bindings are already specified in Linux kernel documentation.
Instead of maintaining same dt bindings in U-Boot doc specify path to dt
bindings in Linux kernel & documenting specific changes that are in U-Boot.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
5 years agommc: zynq_sdhci: Remove check for DM_MMC config
Siva Durga Prasad Paladugu [Fri, 2 Aug 2019 11:16:26 +0000 (16:46 +0530)]
mmc: zynq_sdhci: Remove check for DM_MMC config

The zynq_sdhci drivers depends on DM_MMC in Kconfig so no need to check for
DM_MMC in the driver so this patch removes it.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Switch spi-flash to jedec, spi-nor compatible
Michal Simek [Wed, 11 Sep 2019 12:55:37 +0000 (14:55 +0200)]
arm64: zynqmp: Switch spi-flash to jedec, spi-nor compatible

Change has been done across the whole tree only zynqmp-mini-qspi hasn't
been fixed.
Origin changed done by commit ffd4c7c2ecb7
("dts: switch spi-flash to jedec, spi-nor compatible")

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agonet: phy: Add gmiitorgmii converter support
Siva Durga Prasad Paladugu [Tue, 27 Nov 2018 06:19:11 +0000 (11:49 +0530)]
net: phy: Add gmiitorgmii converter support

This patch adds support for gmiitorgmii converter.
This converter sits between the MAC and the external phy
MAC <==> GMII2RGMII <==> RGMII_PHY.
The ethernet driver probes this bridge and this bridge driver
probes real phy driver and invokes the real phy functionalities
as requested. This bridge just needs to be configured based on
real phy negotiated speed and duplex.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: zynq: Remove all Xilinx private commands
Michal Simek [Tue, 10 Sep 2019 13:01:53 +0000 (15:01 +0200)]
ARM: zynq: Remove all Xilinx private commands

All platforms have been moved to distro boot that's why remove the rest of
configurations to have unified boot flow.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: zynq: Use {} around variables for qspi and nand boot cmds
Michal Simek [Wed, 11 Sep 2019 11:12:43 +0000 (13:12 +0200)]
ARM: zynq: Use {} around variables for qspi and nand boot cmds

Follow conventions and used {} around variables.

Fixes: 90e97ab31e02 ("arm: zynq: Define distro boot commnads for qspi, nand and nor")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: zynq: Fix NOR boot mode
Michal Simek [Wed, 11 Sep 2019 11:16:33 +0000 (13:16 +0200)]
ARM: zynq: Fix NOR boot mode

There are two typos in this command that's why it couldn't work properly.
This bootmode is almost unused from the beggining on this SoC.

Fixes: 90e97ab31e02 ("arm: zynq: Define distro boot commnads for qspi, nand and nor")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: zynq: Enable USB1 as secondary boot device
Michal Simek [Wed, 11 Sep 2019 11:00:57 +0000 (13:00 +0200)]
ARM: zynq: Enable USB1 as secondary boot device

Xilinx Zynq SoC has two usb controllers and both could be used as secondary
boot method.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: zynq: Specify MMC controller number for boot sequence
Michal Simek [Wed, 11 Sep 2019 10:51:49 +0000 (12:51 +0200)]
ARM: zynq: Specify MMC controller number for boot sequence

Xilinx Zynq SoC has two sdhci controllers but boot is only possible from
the first one. That's why there is a need to specify controller number.
mmc1 is supposed to be secondary boot device and should be also listed in
distribution boot.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agonet: phy: Define init routine and register generic phy driver
Siva Durga Prasad Paladugu [Fri, 15 Mar 2019 12:16:47 +0000 (17:46 +0530)]
net: phy: Define init routine and register generic phy driver

This patch define init routine for generic phy driver and registers it
using phy_register as this generic phy driver also needs to be relocated
incase of manual reloc.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: zynq: dts: Added alias for usb node
Vipul Kumar [Tue, 7 Aug 2018 11:00:04 +0000 (16:30 +0530)]
ARM: zynq: dts: Added alias for usb node

This patch added alias for usb node in dts file.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: zynq: Align model name with DT
Michal Simek [Mon, 27 May 2019 08:13:34 +0000 (10:13 +0200)]
ARM: zynq: Align model name with DT

Use model property to distinguish different configurations.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Add idcodes for new RFSoC silicons ZU48DR and ZU49DR
Siva Durga Prasad Paladugu [Tue, 23 Jul 2019 06:26:17 +0000 (11:56 +0530)]
arm64: zynqmp: Add idcodes for new RFSoC silicons ZU48DR and ZU49DR

Add zu48dr and zu49dr to the list of zynqmp devices. The zu48dr and zu49dr
are the new RFSoC silicons with id values of 0x7b and 0x7e.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: versal: Fix for OCM overwriting issue
Ashok Reddy Soma [Mon, 9 Sep 2019 09:31:08 +0000 (03:31 -0600)]
arm64: versal: Fix for OCM overwriting issue

This patch reduces the console buffer size from 2048 to 1024, thus fixes
OCM overwriting issue.

Differences are in bss section as is shown from output:
xilinx_versal_mini: all -2056 bss -2048 text -8
   u-boot: add: 0/0, grow: 0/-3 bytes: 0/-2056 (-2056)
     function                                   old     new   delta
     cli_simple_run_command                     340     332      -8
     static.lastcommand                        2049    1025   -1024
     console_buffer                            2049    1025   -1024

Better would be to use PPU RAM but this change is also aligned with changes
done in ZynqMP mini configurations.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: zynq: Increase input buffer console size to 2k
Michal Simek [Tue, 10 Sep 2019 13:49:42 +0000 (15:49 +0200)]
ARM: zynq: Increase input buffer console size to 2k

ZynqMP and Versal is using 2k that's why aligned all platform together to
be able to use the same scripts.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: zynq: Increase init ram size by 4K
Siva Durga Prasad Paladugu [Mon, 24 Jul 2017 11:23:15 +0000 (16:53 +0530)]
ARM: zynq: Increase init ram size by 4K

Increase init ram size by 4K such that more stack space will be available
during initialization as the present stackspace is not sufficient if DEBUG
option is enabled and causes system hang. Increasing init ram size provides
sufficient stack space during init even if DEBUG enabled and solves the
hang issue.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: zynq: Do not enable NETBSD support by default
Michal Simek [Tue, 10 Sep 2019 13:39:15 +0000 (15:39 +0200)]
ARM: zynq: Do not enable NETBSD support by default

This option is disable in Xilinx tree for quite a long time that's why
let's disable it in mainline. If there is anybody who requires this options
then it should be moved to Kconfig first and should be removed from this
config.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agofpga: zynqmp: Fix second local variable declaration
Michal Simek [Fri, 2 Aug 2019 10:43:29 +0000 (12:43 +0200)]
fpga: zynqmp: Fix second local variable declaration

No reason to define new_buf again.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agommc: sdhci: Move ZYNQ_HISPD_BROKEN to Kconfig
Siva Durga Prasad Paladugu [Mon, 27 May 2019 09:03:14 +0000 (14:33 +0530)]
mmc: sdhci: Move ZYNQ_HISPD_BROKEN to Kconfig

This patch moves CONFIG_ZYNQ_HISPD_BROKEN to Kconfig

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agonet: zynq_gem: Remove check for Versal
Siva Durga Prasad Paladugu [Mon, 1 Jul 2019 06:49:25 +0000 (12:19 +0530)]
net: zynq_gem: Remove check for Versal

This patch removes check for Versal platform
in gem driver as it now supports clock setting
through clock framework.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoclk: versal: Add clock driver support
Siva Durga Prasad Paladugu [Sun, 23 Jun 2019 06:54:57 +0000 (12:24 +0530)]
clk: versal: Add clock driver support

This patch adds clock driver support for Versal platform. The clock driver
queries and performs clock operations using PLM firmware by communicating
with it using SMC calls.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agonet: zynq_gem: Add new versal compatible string
Siva Durga Prasad Paladugu [Fri, 26 Jul 2019 06:07:59 +0000 (23:07 -0700)]
net: zynq_gem: Add new versal compatible string

This patch adds new versal compatible string to GEM driver for Versal
platform.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agonet: gem: Remove DECLARE_GLOBAL_DATA_PTR from gem driver
Michal Simek [Thu, 25 Apr 2019 18:30:22 +0000 (11:30 -0700)]
net: gem: Remove DECLARE_GLOBAL_DATA_PTR from gem driver

GD is not used anywhere that's why there is no reason to have this macro
in the driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Add new jtag distro boot command
Siva Durga Prasad Paladugu [Tue, 25 Jun 2019 12:11:09 +0000 (17:41 +0530)]
arm64: zynqmp: Add new jtag distro boot command

This patch adds new jtag distro boot command to look for bootscript file in
DDR and execute it first incase of jtag bootmode.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Update scriptaddr value to 512MB
Siva Durga Prasad Paladugu [Tue, 25 Jun 2019 12:11:08 +0000 (17:41 +0530)]
arm64: zynqmp: Update scriptaddr value to 512MB

This patch updates scriptaddr value to 512MB as having it at 32MB has high
chance of script corruption incase of bigger kernel.

Be aware that 512MB is used for SPL malloc area that's why images should be
loaded after SPL (the best after u-boot relocation).

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: versal: Change boot script offset address in versal
T Karthik Reddy [Mon, 5 Aug 2019 10:48:56 +0000 (16:18 +0530)]
arm64: versal: Change boot script offset address in versal

With the current boot script offset address in qspi is being overlaped
by BOOT.BIN as it is over 90MB with fpga included. So moving the script
offset address to end of flash after "bootenv" mtd partition. Here we
are considering qspi flash size >= 128Mbytes on versal and left
512Kbytes space to save boot.scr script.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: versal: Add new dfu usb distro boot command
T Karthik Reddy [Thu, 11 Jul 2019 10:37:57 +0000 (16:07 +0530)]
arm64: versal: Add new dfu usb distro boot command

This patch adds new dfu usb distro boot command to look for bootscript
from dfu-util and runs it.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
5 years agoarm64: versal: Add new jtag distro boot command
Siva Durga Prasad Paladugu [Tue, 25 Jun 2019 11:43:14 +0000 (17:13 +0530)]
arm64: versal: Add new jtag distro boot command

This patch adds new jtag distro boot command to look for bootscript file
in DDR and execute it first incase of jtag bootmode.
This patch also updates scriptaddr to 512MB as there is high of script
corruption incase of bigger kernel image.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: versal: Define configs related to USB DFU functionality
Siva Durga Prasad Paladugu [Mon, 22 Apr 2019 09:15:04 +0000 (14:45 +0530)]
arm64: versal: Define configs related to USB DFU functionality

This patch defines macros required for DFU functionality
for Xilinx Versal platform.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agozynqmp: firmware: Add Xilinx ZynqMP firmware driver
Rajan Vaja [Fri, 15 Feb 2019 12:45:32 +0000 (04:45 -0800)]
zynqmp: firmware: Add Xilinx ZynqMP firmware driver

Add simple ZynqMP firmware drive to populate child nodes under
zynqmp_firmware DT node.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Provide a Kconfig option to disable OCM and TCM MMU mapping
Michal Simek [Wed, 11 Sep 2019 07:39:59 +0000 (09:39 +0200)]
arm64: zynqmp: Provide a Kconfig option to disable OCM and TCM MMU mapping

This patch provides an option to enable/disable OCM and TCM memory into MMU
table with corresponding memory attributes.

The same change was done for ZynqMP by commit 189bec47ab1f
("arm64: zynqmp: Provide a Kconfig option to define OCM and TCM in MMU")

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: versal: Enable memory mapping via DT
Michal Simek [Mon, 29 Apr 2019 16:39:09 +0000 (09:39 -0700)]
arm64: versal: Enable memory mapping via DT

Code reads DT and setup MMU table based on memory node. This will ensure
that only DT needs to be changed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Set initrd_high to as high as possible
T Karthik Reddy [Tue, 20 Aug 2019 04:00:57 +0000 (09:30 +0530)]
arm64: zynqmp: Set initrd_high to as high as possible

This patch is setting up the initrd_high to as high as possible by leaving
max stack size for u-boot so that bigger rootfs can also be loaded by
u-boot for booting kernel.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: versal: Set initrd_high to as high as possible
Siva Durga Prasad Paladugu [Mon, 5 Aug 2019 17:58:30 +0000 (23:28 +0530)]
arm64: versal: Set initrd_high to as high as possible

This patch is setting up the initrd_high to as high as possible by leaving
max stack size for u-boot so that bigger rootfs can also be loaded by
u-boot for booting kernel.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: versal: fpga: Add PL bit stream load support
Siva Durga Prasad Paladugu [Mon, 5 Aug 2019 10:24:59 +0000 (15:54 +0530)]
arm64: versal: fpga: Add PL bit stream load support

This patch adds PL bitstream load support for Versal platform. The PL
bitstream is loaded by making an SMC to ATF which in turn communicates
with platform firmware which configures and loads PL bitstream on to PL.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: versal: Also record versal name to versal fragment
Michal Simek [Wed, 11 Sep 2019 07:20:41 +0000 (09:20 +0200)]
arm64: versal: Also record versal name to versal fragment

Just to make sure that also drivers with versal name are assigned to proper
fragment.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: versal: Define board_late_init for versal
Siva Durga Prasad Paladugu [Thu, 31 Jan 2019 11:58:14 +0000 (17:28 +0530)]
arm64: versal: Define board_late_init for versal

Define board_late_init which performs bootmode detection
and prepares corresponding distro boot commaand sequence.

Also disable it for mini platforms because simply there is no need to have
it enabled.
But also disable it for virtual platform because Qemu is not modelling this
register space that's why travis testing would fail. This configuration
should be reverted when mainline Qemu is updated.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Enable SPI support in SPL for zcu104
Michal Simek [Tue, 10 Sep 2019 09:48:52 +0000 (11:48 +0200)]
arm64: zynqmp: Enable SPI support in SPL for zcu104

It is enabling this mode but full boot is not validated yet.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Add u-boot,dm-pre-reloc to clk300 node
Michal Simek [Tue, 10 Sep 2019 09:15:05 +0000 (11:15 +0200)]
arm64: zynqmp: Add u-boot,dm-pre-reloc to clk300 node

This node is used by qspi driver for supporting qspi boot mode in SPL.

Similar changes have beeen done by commit a9022b017a90
("ARM64: zynqmp: Add u-boot,dm-pre-reloc to clk nodes")

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Enable gpio hog support for zcu102
Michal Simek [Wed, 29 May 2019 13:04:51 +0000 (15:04 +0200)]
arm64: zynqmp: Enable gpio hog support for zcu102

Gpio hogs are used for GT mux setup after power up.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: Add sd boot command script for reference
Siva Durga Prasad Paladugu [Wed, 27 Mar 2019 05:18:33 +0000 (10:48 +0530)]
xilinx: Add sd boot command script for reference

This patch adds sdboot command script for reference.
This can be converetd into uboot script using mkimage and
use for booting.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: Add qspi boot command script for reference
Siva Durga Prasad Paladugu [Fri, 8 Mar 2019 07:43:26 +0000 (13:13 +0530)]
xilinx: Add qspi boot command script for reference

Thsi patch adds qspiboot command script for reference.
This can be converetd into uboot script using mkimage and
use for booting.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Define default SPL_TEXT_BASE address in Kconfig
Michal Simek [Wed, 11 Sep 2019 06:49:31 +0000 (08:49 +0200)]
arm64: zynqmp: Define default SPL_TEXT_BASE address in Kconfig

Define default address via Kconfig. There is no need to change this address
for most of the boards but it is also possible. This one line save a lot of
lines in defconfigs that's why make sense to do it.

The similar change has been done by commit 9340d8fe8beb
("sunxi: move CONFIG_SPL_TEXT_BASE from *_defconfig to Kconfig")

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
5 years agoPrepare v2019.10 v2019.10
Tom Rini [Mon, 7 Oct 2019 21:14:02 +0000 (17:14 -0400)]
Prepare v2019.10

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoNET: DW: fix regression for ARC boards
Eugeniy Paltsev [Mon, 7 Oct 2019 16:10:50 +0000 (19:10 +0300)]
NET: DW: fix regression for ARC boards

The commit
642b80d256e ("net: designware: drop compatible altr, socfpga-stmmac")
breaks designware ethernet for all ARC boards. It removes
"altr, socfpga-stmmac" compatible from "drivers/net/designware.c"
without changing compatible in the boards which use it.

Fix that by adding "snps,arc-dwmac-3.70a" compatible string to
"drivers/net/designware.c" and using it in ARC boards device tree.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
5 years agoMerge branch '2019-10-06-master-imports'
Tom Rini [Sun, 6 Oct 2019 22:02:18 +0000 (18:02 -0400)]
Merge branch '2019-10-06-master-imports'

- Regression work-around on SoCFPGA by disabling WDT in some cases.
- Fix seg fault on 'host info' in some cases.

5 years agocmd: host: fix seg fault at "host info"
AKASHI Takahiro [Thu, 22 Aug 2019 07:47:39 +0000 (16:47 +0900)]
cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMAINTAINERS: Update my email address
Maxime Ripard [Thu, 3 Oct 2019 16:32:11 +0000 (18:32 +0200)]
MAINTAINERS: Update my email address

I'm not at bootlin anymore, and my mail address doesn't work any longer.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
5 years agoarm: socfpga: disable CONFIG_SPL_WDT for gen5 and a10
Simon Goldschmidt [Sat, 5 Oct 2019 20:10:11 +0000 (22:10 +0200)]
arm: socfpga: disable CONFIG_SPL_WDT for gen5 and a10

These boards don't have a watchdog enabled in SPL, so make sure
CONFIG_SPL_WDT is not enabled.

Fixes: commit 6874cb72204f ("watchdog: Split WDT from SPL_WDT")

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agogitlab-ci: fix typo 'plaforms'
Heinrich Schuchardt [Sun, 6 Oct 2019 10:26:16 +0000 (12:26 +0200)]
gitlab-ci: fix typo 'plaforms'

%s/plaforms/platforms/g

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Sun, 6 Oct 2019 00:06:58 +0000 (20:06 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- ARM: dts: rmobile: Restore increase off-on delay on the SD Vcc regulator

5 years agoMerge branch '2019-10-04-master-imports'
Tom Rini [Fri, 4 Oct 2019 16:22:43 +0000 (12:22 -0400)]
Merge branch '2019-10-04-master-imports'

- Assorted TI platform fixes
- Revert the change that broke environment flag validation
- Assorted typo fixes
- Assorted Kconfig dependency fixes
- Other minor bug fixes

5 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Fri, 4 Oct 2019 16:22:28 +0000 (12:22 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86

- dm: core: Correct low cell in ofnode_read_pci_addr()
- dm: core: Correct bad cast in ofnode_get_addr_size_index()

5 years agoRevert "env: solve compilation error in SPL"
Tom Rini [Fri, 4 Oct 2019 16:21:33 +0000 (12:21 -0400)]
Revert "env: solve compilation error in SPL"

This reverts commit 7d4776545b0f8a8827e5d061206faf61c9ba6ea9.  The
changes here break environment validation and furthermore do not seem to
be required.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoARM: dts: imx6q-logicpd: Add missing imx6q-logicpd-u-boot for SPL
Adam Ford [Wed, 7 Aug 2019 15:16:33 +0000 (10:16 -0500)]
ARM: dts: imx6q-logicpd: Add missing imx6q-logicpd-u-boot for SPL

The SPL device tree is missing the entires for gpio1, uart1, usdhc1 and
usdhc2.  This creates the missing imx6q-logicpd-u-boot.dtsi file
which will enable these functions so SPL can properly setup UART, detect
microSD card, and startup.

Fixes: 8f4691e31a18 ("ARM: imx6q_logic: With SPL_OF_CONTROL enabled,
remove MMC init")

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoinitcall.h: initcall_run_list(): Improve debug output
Ovidiu Panait [Wed, 25 Sep 2019 11:10:54 +0000 (14:10 +0300)]
initcall.h: initcall_run_list(): Improve debug output

Existing debug output is mixed with the function name:
initcall_run_list() initcall: 25263initcall_run_list()  (relocated to 425263)

Turn it to:
initcall_run_list() initcall: 25263 (relocated to 425263)

Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
5 years agoKconfig: fix a typo in the description of bmp command.
Andrius Štikonas [Mon, 23 Sep 2019 21:43:41 +0000 (22:43 +0100)]
Kconfig: fix a typo in the description of bmp command.

Signed-off-by: Andrius Štikonas <andrius@stikonas.eu>
5 years agoKconfig: Migrate CONFIG_BOOTM_* options
Tom Rini [Fri, 20 Sep 2019 21:36:50 +0000 (17:36 -0400)]
Kconfig: Migrate CONFIG_BOOTM_* options

Migrate all of the existing OS support options that are under
CONFIG_BOOTM_* to Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agocmd: part: number: return hexadecimal value
Roman Stratiienko [Fri, 20 Sep 2019 13:59:18 +0000 (15:59 +0200)]
cmd: part: number: return hexadecimal value

At this point we are using part number sub-command to retrieve UUID
of the partition using it's name.

e.g.:
 part number mmc $mmcdev system_a system_a_index
 part uuid mmc $mmcdev:${system_a_index} system_a_uuid

Since 'part uuid' sub-command expects partition index in hex format and
'part number' returns decimal value, 'part uuid' command will provide
wrong UUID or fail.

Fixes: be683756f62034 ("cmd: part: Add 'number' sub-command")
Cc: Dirk Behme <dirk.behme@de.bosch.com>
Reported-by: Pontus Fuchs <pontus.fuchs@se.bosch.com>
Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
5 years agoARM: keystone2: update the default addresses of the secure monitor
Jean-Jacques Hiblot [Tue, 17 Sep 2019 21:18:25 +0000 (17:18 -0400)]
ARM: keystone2: update the default addresses of the secure monitor

To accommodate the growth of u-boot, we need to shift the location of the
secure monitor. Moving it 64kB further.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agoboard: ti: am654: Disable TRNG node for HS devices
Andrew F. Davis [Tue, 17 Sep 2019 21:15:40 +0000 (17:15 -0400)]
board: ti: am654: Disable TRNG node for HS devices

On HS devices the access to TRNG is restricted on the non-secure
ARM side, disable the node in DT to prevent firewall violations.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoautoboot: add necessary dependency at AUTOBOOT_MENU_SHOW
AKASHI Takahiro [Thu, 12 Sep 2019 06:31:22 +0000 (15:31 +0900)]
autoboot: add necessary dependency at AUTOBOOT_MENU_SHOW

Otherwise, menu_show() will be undefined in bootdelay_process().

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
5 years agoMAINTAINERS, git-mailrc: Update the maintainer for socfpga
Ley Foon Tan [Fri, 4 Oct 2019 08:43:50 +0000 (16:43 +0800)]
MAINTAINERS, git-mailrc: Update the maintainer for socfpga

This updates MAINTAINERS and git-mailrc to add me as maintainer for
socfpga.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Acked-by: Marek Vasut <marex@denx.de>
5 years agoMakefile: mrproper should remove *.pyc files
Heinrich Schuchardt [Thu, 3 Oct 2019 16:45:29 +0000 (16:45 +0000)]
Makefile: mrproper should remove *.pyc files

*.pyc files contain compiled Python bytecode. 'make mrproper' should remove
them.

Removing *.pyc files helps for instance sometimes when running into an
error "binman: Unknown entry type 'blob' in node '/binman/blob'".

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoMakefile: Fix typo around CONFIG_SPL_FIT_SOURCE
Michal Simek [Wed, 2 Oct 2019 13:53:12 +0000 (15:53 +0200)]
Makefile: Fix typo around CONFIG_SPL_FIT_SOURCE

Trivial fix.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm: K3: Increase default SYSFW image size allocation
Andrew F. Davis [Tue, 1 Oct 2019 14:33:43 +0000 (10:33 -0400)]
arm: K3: Increase default SYSFW image size allocation

The memory allocated to store the FIT image containing SYSFW and board
configuration data is statically defined to the largest size expected.
This was 269000 bytes but now needs to be grown to 276000 to make room
for the signatures attached to the board configuration data on High
Security devices.

Signed-off-by: Andrew F. Davis <afd@ti.com>
5 years agodm: core: Correct bad cast in ofnode_get_addr_size_index()
Simon Glass [Wed, 25 Sep 2019 14:55:50 +0000 (08:55 -0600)]
dm: core: Correct bad cast in ofnode_get_addr_size_index()

At present this code passes an fdt_addr_t pointer as a u64 pointer which
is not safe, since sizeof(fdt_addr_t) may be 4, e.g. with sandbox. Correct
this to avoid a stack corruption problem.

Fixes: e679d03b08 (core: ofnode: Add ofnode_get_addr_size_index)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: correct one typo in the commit message]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
5 years agodm: core: Correct low cell in ofnode_read_pci_addr()
Simon Glass [Wed, 25 Sep 2019 14:55:46 +0000 (08:55 -0600)]
dm: core: Correct low cell in ofnode_read_pci_addr()

This reads the low cell of the PCI address from the wrong cell. Fix it.
Also fix the function that this code came from.

Fixes: 9e51204527 (dm: core: Add operations on device tree references)
Fixes: 4ea5243a3a (fdt: fix fdtdec_get_pci_addr() for CONFIG_PHYS_64BIT)
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoMerge tag 'rpi-next-2019.10.2' of https://github.com/mbgg/u-boot
Tom Rini [Tue, 1 Oct 2019 20:31:26 +0000 (16:31 -0400)]
Merge tag 'rpi-next-2019.10.2' of https://github.com/mbgg/u-boot

RPi4:
Fix amount of memory seen by the kernel.

5 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Tue, 1 Oct 2019 20:31:11 +0000 (16:31 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86

- Propagate acpi_rsdp_addr to x86 kernel via boot parameters

5 years agox86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters
Andy Shevchenko [Fri, 13 Sep 2019 15:42:00 +0000 (18:42 +0300)]
x86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters

This is reincarnation of the U-Boot

commit 3469bf4274540d1491d58e878a9edc0bdcba17ac
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date:   Wed Jan 10 19:40:15 2018 +0200

    x86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters

after upstream got eventually the Linux kernel

commit e6e094e053af75cbc164e950814d3d084fb1e698
Author: Juergen Gross <jgross@suse.com>
Date:   Tue Nov 20 08:25:29 2018 +0100

    x86/acpi, x86/boot: Take RSDP address from boot params if available

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agorpi4: enable dram bank initialization
Matthias Brugger [Mon, 9 Sep 2019 16:31:56 +0000 (18:31 +0200)]
rpi4: enable dram bank initialization

When booting through the efi stub, the memory map get's created by
reading the dram bank information. Depending on the version of the RPi4
this information changes. Read the device tree to initialize the dram
bank data structure. This way the kernel is able to access the whole
range of available memory.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
5 years agoMerge tag 'u-boot-atmel-fixes-2019.10-a' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 30 Sep 2019 11:21:38 +0000 (07:21 -0400)]
Merge tag 'u-boot-atmel-fixes-2019.10-a' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmel

First set of u-boot-atmel fixes for 2019.10 cycle:

This includes only tiny cleanups on env changes related to 2019.10 new
features: removal of duplicate env settings (otherwise there may be
warnings in building..) and a small fix for flashes on Gardena smart
gateway (requires nand bad block tables).

5 years agoMerge tag 'u-boot-rockchip-20190928' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 30 Sep 2019 11:20:35 +0000 (07:20 -0400)]
Merge tag 'u-boot-rockchip-20190928' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip

- Fix efuse read data number for rk3399
- make_fit_atf.py: fix .its generation for a single atf image

5 years agoat91: configs: Drop duplication of defconfig macros
Tudor Ambarus [Fri, 20 Sep 2019 10:52:58 +0000 (10:52 +0000)]
at91: configs: Drop duplication of defconfig macros

'commit a9221f3ebd6d ("at91, omap2plus: configs: migrate CONFIG_ENV_ to defconfigs")'
migrated CONFIG_ENV_ macros to defconfigs but did not remove the
identical redefinition of these macros in include/configs/.

Since the duplicated macros have the same value as the ones in defconfigs,
no "redefined" warnings were raised. Remove duplicated macros for all
sama5 and sam9x5ek boards.

While verifying that the removal of the macros from include/configs did
not change the same macros in defconfigs, overwrite the old defconfig by
saving them with the output from "make arch=ARM savedefconfig". This
resulted in the movement of some macros in the defconfig files.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
5 years agoarm: at91: gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT
Stefan Roese [Tue, 27 Aug 2019 06:14:50 +0000 (08:14 +0200)]
arm: at91: gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT

This patch enables the BBT in NAND on the AT91SAM based GARDENA smart
Gateway. This is especially important, since the Linux driver also
enables this option and uses the BBT table pages. Without setting this
option, U-Boot will try to re-use these pages again (e.g. UBI).

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Cc: Tom Rini <trini@konsulko.com>
5 years agoARM: dts: rmobile: Restore increase off-on delay on the SD Vcc regulator
Marek Vasut [Mon, 18 Mar 2019 02:20:31 +0000 (03:20 +0100)]
ARM: dts: rmobile: Restore increase off-on delay on the SD Vcc regulator

This patch restores commit c49d0ac38a76 ("ARM: dts: rmobile: Increase off-on
delay on the SD Vcc regulator"), which was accidentally dropped during DT
resync in commit 317d13ac6307 ("ARM: dts: rmobile: Synchronize Gen3 DTs with
Linux 5.0").

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Fixes: 317d13ac6307 ("ARM: dts: rmobile: Synchronize Gen3 DTs with Linux 5.0")

5 years agorockchip: make_fit_atf.py: fix .its generation for a single atf image
Heiko Stuebner [Thu, 26 Sep 2019 19:15:15 +0000 (21:15 +0200)]
rockchip: make_fit_atf.py: fix .its generation for a single atf image

The commit 619f002db864 ("rockchip: make_fit_atf.py: fix loadables property
set error") fixed the double-loading of the primary atf-image, but didn't
take into account that there may be rare atf images with only that main
section present.

Right now this will result in a broken its due to the loadables section not
getting closed correctly, so fix that by adapting the guards around the loop.

The guards now protect against 0 segments when the bl31 binary doesn't
contain any section and 1 segment when only a core atf section is present.

Fixes: 619f002db864 ("rockchip: make_fit_atf.py: fix loadables property set error")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
5 years agorockchip: misc: read the correct number of bytes from the efuse
Heiko Stuebner [Wed, 25 Sep 2019 18:40:56 +0000 (20:40 +0200)]
rockchip: misc: read the correct number of bytes from the efuse

Originally the cpuid var the value gets read into was defined as
    u8 cpuid[RK3399_CPUID_LEN];
hence the sizeof(cpuid) would return the correct the correct number
of array elements.

With the move to a separate function cpuid becomes a pointer and
sizeof(cpuid) hence returns the pointer size - 8 in the arm64 case.

We do have the actual id length available as function param so use
it for actual amount of bytes to read.

Fixes: 04825384999f ("rockchip: rk3399: derive ethaddr from cpuid")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
5 years agoMerge tag 'efi-2019-10-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 26 Sep 2019 21:22:22 +0000 (17:22 -0400)]
Merge tag 'efi-2019-10-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for v2019.10-rc5

Bug fixes for the SetVariable() boot service.

5 years agoci: add envtools support
Pierre-Jean Texier [Mon, 26 Aug 2019 11:06:18 +0000 (13:06 +0200)]
ci: add envtools support

This commit add envtools suppport to CI to verify if there
is no build issues.

Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoenv: add missing <compiler.h> header file
Pierre-Jean Texier [Mon, 26 Aug 2019 11:06:17 +0000 (13:06 +0200)]
env: add missing <compiler.h> header file

Since commit af95f20 ("env: Create a new file for environment functions"),
a new header file exists.

So, this commit add a missing header file.

Fixes:

include/env.h:158:1: error: unknown type name ‘ulong’; did you mean ‘long’?
 ulong env_get_ulong(const char *name, int base, ulong default_val);
 ^~~~~
 long
include/env.h:158:49: error: unknown type name ‘ulong’; did you mean ‘long’?
 ulong env_get_ulong(const char *name, int base, ulong default_val);

Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Tested-by: Joris Offouga <offougajoris@gmail.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agofw_env: fix build error
Pierre-Jean Texier [Mon, 26 Aug 2019 11:06:16 +0000 (13:06 +0200)]
fw_env: fix build error

The following error appears:

tools/env/fw_env.c:1149:25: error: lvalue required as unary ‘&’ operand
  rc = write(fd, &ENV_REDUND_OBSOLETE, sizeof(ENV_REDUND_OBSOLETE));

Fixes: d3716dd ("env: Rename the redundancy flags")

Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Tested-by: Joris Offouga <offougajoris@gmail.com>
Tested-by: Heiko Schocher <hs@denx.de>
Suggested-by: Heiko Schocher <hs@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agofw_env: remove duplicated definitions
Pierre-Jean Texier [Mon, 26 Aug 2019 11:06:15 +0000 (13:06 +0200)]
fw_env: remove duplicated definitions

Since commit d3716dd ("env: Rename the redundancy flags"), the
definitions of ENV_REDUND_OBSOLETE & ENV_REDUND_ACTIVE was moved
to env.h.

Fixes:

tools/env/fw_env.c:122:22: error: ‘ENV_REDUND_ACTIVE’ redeclared as different kind of symbol
 static unsigned char ENV_REDUND_ACTIVE = 1;
                      ^~~~~~~~~~~~~~~~~
In file included from tools/env/fw_env.c:13:
include/env.h:63:2: note: previous definition of ‘ENV_REDUND_ACTIVE’ was here
  ENV_REDUND_ACTIVE = 1,
  ^~~~~~~~~~~~~~~~~
tools/env/fw_env.c:127:22: error: ‘ENV_REDUND_OBSOLETE’ redeclared as different kind of symbol
 static unsigned char ENV_REDUND_OBSOLETE;
                      ^~~~~~~~~~~~~~~~~~~
In file included from tools/env/fw_env.c:13:
include/env.h:62:2: note: previous definition of ‘ENV_REDUND_OBSOLETE’ was here
  ENV_REDUND_OBSOLETE = 0,

Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Tested-by: Joris Offouga <offougajoris@gmail.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>