]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
4 years agoconfigs: disable eMMC HS200 support on layerscape platforms
Yangbo Lu [Tue, 3 Mar 2020 02:32:51 +0000 (10:32 +0800)]
configs: disable eMMC HS200 support on layerscape platforms

The eMMC HS200 speed mode on Layerscape platforms has not been
supported properly. The eSDHC clock tuning has not been implemented
by now. So disable it until it is supported properly in case of
any potential issues.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1012ardb: secure boot: Add PFE config
Priyanka Singh [Fri, 21 Feb 2020 00:27:04 +0000 (05:57 +0530)]
configs: ls1012ardb: secure boot: Add PFE config

Add config to enable the PFE and ETH support.
Also change the pfe secure boot header address.

Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: arm: ls1021aiot: enable CONFIG_DM_USB support
Ran Wang [Fri, 7 Feb 2020 04:42:08 +0000 (12:42 +0800)]
configs: arm: ls1021aiot: enable CONFIG_DM_USB support

Enable CONFIG_DM_USB to remove below compile warning:

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

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: arm64: ls1012afrdm Enable CONFIG_BLK
Ran Wang [Fri, 7 Feb 2020 04:42:07 +0000 (12:42 +0800)]
configs: arm64: ls1012afrdm Enable CONFIG_BLK

With DM_USB enabled, enable CONFIG_BLK to remove this
compile warning for ls1012afrdm based targets:

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

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodm: arm64: ls1046a: add i2c DM support
Biwen Li [Wed, 5 Feb 2020 14:02:17 +0000 (22:02 +0800)]
dm: arm64: ls1046a: add i2c DM support

This supports i2c DM and enables CONFIG_DM_I2C
for SoC LS1046A

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodm: arm64: ls1043a: add i2c DM support
Biwen Li [Wed, 5 Feb 2020 14:02:16 +0000 (22:02 +0800)]
dm: arm64: ls1043a: add i2c DM support

This supports i2c DM and enables CONFIG_DM_I2C
for SoC LS1043A

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1012afrwy: fix wrong env of board
Biwen Li [Fri, 20 Mar 2020 09:05:51 +0000 (17:05 +0800)]
configs: ls1012afrwy: fix wrong env of board

Fix wrong environment variable of board for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls1028a: clean up the environment variables
Yuantian Tang [Fri, 20 Mar 2020 06:37:07 +0000 (14:37 +0800)]
armv8: ls1028a: clean up the environment variables

Move the environment variables from command head file to
ls1028ardb specific head file so that they will not mess
up with ls1028aqds board.
Also updated some variable slightly.
There is no function change by this patch.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls1028aqds: add some environments
Yuantian Tang [Fri, 20 Mar 2020 06:37:06 +0000 (14:37 +0800)]
armv8: ls1028aqds: add some environments

Add sd and emmc bootcmd environments to facilitate
the boot process.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls2080aqds: support distro boot
Biwen Li [Thu, 19 Mar 2020 12:01:07 +0000 (20:01 +0800)]
configs: ls2080aqds: support distro boot

Add support of distro boot for ls2080aqds

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1088aqds: support distro boot
Biwen Li [Thu, 19 Mar 2020 11:38:42 +0000 (19:38 +0800)]
configs: ls1088aqds: support distro boot

Add support of distro boot for ls1088aqds

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: fsl: lx2160a: fix SDHC1_DAT4 signal routing
Yangbo Lu [Thu, 19 Mar 2020 07:18:54 +0000 (15:18 +0800)]
board: fsl: lx2160a: fix SDHC1_DAT4 signal routing

The SDHC1_DAT4 signal could be routes to SDHC1_VS or SDHC1
adapter slot for SDHC1 usage. When SDHC1 is selected in RCW,
do not force to route it to SDHC1 adapter slot if find it
has already been configued for SDHC1_VS.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agopci-host-ecam-generic: access config space independent of system-wide bus id
Vladimir Oltean [Fri, 13 Mar 2020 14:53:06 +0000 (16:53 +0200)]
pci-host-ecam-generic: access config space independent of system-wide bus id

The pci-host-ecam-generic code assumes that the ECAM is the first PCI
bus in the system to be probed. Therefore, the system-wide bus number
allocated by U-Boot in sequence for it is going to be zero, which
corresponds to the memory-mapped config spaces found within it.

Reuse the logic from other PCI bus drivers, and assume that U-Boot will
allocate bus numbers in sequence for all buses within the current ECAM.
So the base number of the bus needs to be subtracted when indexing the
correct config space.

Fixes: 3675cb044e68 ("PCI: Add driver for a 'pci-host-ecam-generic' host controller")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoinclude/configs: ls1012afrwy: fix load address of itb with bootm command
Biwen Li [Fri, 13 Mar 2020 02:26:29 +0000 (10:26 +0800)]
include/configs: ls1012afrwy: fix load address of itb with bootm command

The old load address of itb will overwrite uboots reserved memory
on ls1012afrwy with 512 MiB ram

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8/ls1046ardb: RGMII ports require internal delay
Madalin Bucur [Thu, 12 Mar 2020 12:53:46 +0000 (14:53 +0200)]
armv8/ls1046ardb: RGMII ports require internal delay

The correct setting for the RGMII ports on LS1046ARDB is to
enable delay on both Rx and Tx so the interface mode used must
be PHY_INTERFACE_MODE_RGMII_ID. There is a pull-up that turns
on Rx internal delay by default and the u-boot does not
override that (yet) so in u-boot the interface is functional.
In Linux the PHY driver is clearing the Rx delay for the
"rgmii-txid" mode and the reception does not work.
Changing the RGMII mode to internal delay here ensures that
device tree fix-ups for the PHY connection type turn on both
Tx and Rx internal delay in Linux.

Fixes: cc1aa218f510 ("armv8/ls1046a: RGMII PHY requires internal
delay on Tx")
Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8/ls1043ardb: RGMII ports require internal delay
Madalin Bucur [Thu, 12 Mar 2020 12:53:45 +0000 (14:53 +0200)]
armv8/ls1043ardb: RGMII ports require internal delay

The correct setting for the RGMII ports on LS1043ARDB is to
enable delay on both Rx and Tx so the interface mode used must
be PHY_INTERFACE_MODE_RGMII_ID. There is a pull-up that turns
on Rx internal delay by default and the u-boot does not
override that (yet) so in u-boot the interface is functional.
In Linux the PHY driver is clearing the Rx delay for the
"rgmii-txid" mode and the reception does not work.
Changing the RGMII mode to internal delay here ensures that
device tree fix-ups for the PHY connection type turn on both
Tx and Rx internal delay in Linux.

Fixes: 5a78a472f666 ("armv8/ls1043a: RGMII PHY requires internal
delay on Tx")
Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agonet: fman: add support for all RGMII delay modes
Madalin Bucur [Thu, 12 Mar 2020 12:53:44 +0000 (14:53 +0200)]
net: fman: add support for all RGMII delay modes

The RGMII modes that include internal delay were not all
properly treated in the memac code. Add support for all
RGMII delay modes.

Fixes: 111fd19e3b9e ("fm/mEMAC: add mEMAC frame work")
Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agolx2160a: Add dhcp in boot_targets
Meenakshi Aggarwal [Wed, 11 Mar 2020 15:21:47 +0000 (20:51 +0530)]
lx2160a: Add dhcp in boot_targets

Add dhcp in supported boot_targets for lx2160.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls1028a: add dhcp boot target device
Yuantian Tang [Tue, 10 Mar 2020 03:31:05 +0000 (11:31 +0800)]
armv8: ls1028a: add dhcp boot target device

Add DHCP boot target device to enable command bootcmd_dhcp.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: ls1028ardb: add BOARD_LATE_INIT config
Yuantian Tang [Mon, 9 Mar 2020 06:10:07 +0000 (14:10 +0800)]
board: ls1028ardb: add BOARD_LATE_INIT config

Select BOARD_LATE_INIT config so that many board works can be done
in late init stage.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agolx2160a : Remove default VID setting
Meenakshi Aggarwal [Wed, 26 Feb 2020 11:16:48 +0000 (16:46 +0530)]
lx2160a : Remove default VID setting

Set VID to 800 mV for Rev1 and set VID as per switch settings
for Rev2.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls1028a: Update secure boot headers offset
Priyanka Singh [Fri, 21 Feb 2020 00:27:03 +0000 (05:57 +0530)]
armv8: ls1028a: Update secure boot headers offset

Update the secure boot headers offsets of Kernel and other
    firmware images for SD and XSPI boot sources used by
    esbc_validate command.

Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agolx2160a : Add emmc in boot_targets environment variable
Meenakshi Aggarwal [Wed, 19 Feb 2020 18:00:45 +0000 (23:30 +0530)]
lx2160a : Add emmc in boot_targets environment variable

Add emmc in supported boot_targets and
Add bootcmd environment variable for emmc boot.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm64: ls1046a: remove fdt_high environment variable
Yuantian Tang [Wed, 19 Feb 2020 09:02:22 +0000 (17:02 +0800)]
arm64: ls1046a: remove fdt_high environment variable

Setting fdt_high and initrd_high to 0xffffffffffffffff leads to
various difficulty to resolve bugs.
Remove them and use bootm_size instead to safely contain a kernel,
device tree and initrd for relocation.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm64: ls1028a: remove fdt_high environment variable
Yuantian Tang [Wed, 19 Feb 2020 09:02:21 +0000 (17:02 +0800)]
arm64: ls1028a: remove fdt_high environment variable

Setting fdt_high and initrd_high to 0xffffffffffffffff leads to
various difficulty to resolve bugs.
Remove them and use bootm_size instead to safely contain a kernel,
device tree and initrd for relocation.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: fsl: lx2160a: Add GIC LPI memory reserve fixup
Wasim Khan [Fri, 14 Feb 2020 05:34:36 +0000 (11:04 +0530)]
board: fsl: lx2160a: Add GIC LPI memory reserve fixup

Reserve DDR memory region used for GIC LPI configuration table.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: lx2160a: Enable GIC_V3_ITS config
Wasim Khan [Fri, 14 Feb 2020 05:34:35 +0000 (11:04 +0530)]
configs: lx2160a: Enable GIC_V3_ITS config

Enable GIC_V3_ITS config to program GIC LPI
configuration table.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: fsl: lx2160a: Program GIC LPI configuration table
Wasim Khan [Fri, 14 Feb 2020 05:34:34 +0000 (11:04 +0530)]
board: fsl: lx2160a: Program GIC LPI configuration table

Program GIC LPI configuration table:

1. Redistributor PROCBASER configuration table (which
is common for all redistributors)

2. Redistributor pending table (PENDBASER), for all the
available redistributors.

Signed-off-by: Manish Tomar <manish.tomar@nxp.com>
Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: lx2160a: Correct board fixup for PCIe nodes
Vikas Singh [Wed, 12 Feb 2020 08:17:09 +0000 (13:47 +0530)]
board: lx2160a: Correct board fixup for PCIe nodes

Update "board_fix_fdt" with correct counter value "i".
This will fix the issue while fetching the "reg_names"
resource from fdt after fixup.

Signed-off-by: Vikas Singh <vikas.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agols1021a: Set CONFIG_SYS_BOOTMAPSZ to the memory for relocation
Alison Wang [Mon, 3 Feb 2020 07:25:19 +0000 (15:25 +0800)]
ls1021a: Set CONFIG_SYS_BOOTMAPSZ to the memory for relocation

This patch sets CONFIG_SYS_BOOTMAPSZ to the amount of memory available
to safely contain a kernel, device tree and initrd for relocation. The
way to set fdt_high as 0xffffffff to disable device tree relocation is
removed.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoMerge branch '2020-03-27-master-imports'
Tom Rini [Fri, 27 Mar 2020 21:54:38 +0000 (17:54 -0400)]
Merge branch '2020-03-27-master-imports'

- Update a few MAINTAINERS entries
- cache alignment fix in ext4 code
- Two small test fixes

4 years agotest: typo decompression
Heinrich Schuchardt [Mon, 23 Mar 2020 17:47:47 +0000 (18:47 +0100)]
test: typo decompression

%s/decopmression/decompression/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoMAINTAINERS: add myself as maintainer of fs/btrfs
Marek Behún [Wed, 25 Mar 2020 11:04:46 +0000 (12:04 +0100)]
MAINTAINERS: add myself as maintainer of fs/btrfs

Signed-off-by: Marek Behún <marek.behun@nic.cz>
4 years agofs: ext4: Fix alignment of cache buffers
Jan Kiszka [Wed, 25 Mar 2020 20:27:51 +0000 (21:27 +0100)]
fs: ext4: Fix alignment of cache buffers

We need to align the cache buffer to ARCH_DMA_MINALIGN in order to avoid
access errors like

CACHE: Misaligned operation at range [be0231e0be0235e0]

seen on the MCIMX7SABRE.

Fixes: d5aee659f217 ("fs: ext4: cache extent data")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
4 years agoMAINTAINERS: Add usb.h entry to usb
Marek Vasut [Wed, 25 Mar 2020 20:35:53 +0000 (21:35 +0100)]
MAINTAINERS: Add usb.h entry to usb

Add usb.h file into the USB list.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
4 years agotest/py: mmc: Fix 'mmc info' testcase
Harald Seiler [Thu, 26 Mar 2020 17:07:27 +0000 (18:07 +0100)]
test/py: mmc: Fix 'mmc info' testcase

Commit 41e30dcf8796 ("cmd: mmc: Make Mode: printout consistent") fixed
the layout of `mmc info` output.  Reflect this change in the respective
testcase.

Also fix a typo in the documentation.

Fixes: 41e30dcf8796 ("cmd: mmc: Make Mode: printout consistent")
Signed-off-by: Harald Seiler <hws@denx.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoRevert "vexpress_ca9x4: Enable use of correct DTB file and restore EFI loader."
Tom Rini [Fri, 27 Mar 2020 15:47:04 +0000 (11:47 -0400)]
Revert "vexpress_ca9x4: Enable use of correct DTB file and restore EFI loader."

Currently this causes failures of the platform when running the EFI
loader tests, so disable it for now.

This reverts commit af827140e5965e5bb2bcad1c53ca8419b428ff6d.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge tag 'u-boot-rockchip-20200327' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Fri, 27 Mar 2020 01:39:59 +0000 (21:39 -0400)]
Merge tag 'u-boot-rockchip-20200327' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip

- Fixed for rv1108 and elgin-rv1108 board
- Fix the keyboard from USB instead of CrOS EC

4 years agorockchip: mkimage: Use an existing macro instead of a decimal value
Miquel Raynal [Wed, 18 Mar 2020 16:22:55 +0000 (17:22 +0100)]
rockchip: mkimage: Use an existing macro instead of a decimal value

Depending on the SoC, a header of four characters is prepended to the
image. There is already a macro defining the number of characters:
RK_SPL_HDR_SIZE, so use it instead of hardcoding "4".

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorv1108: Fix boot regression
Otavio Salvador [Fri, 13 Mar 2020 17:42:48 +0000 (14:42 -0300)]
rv1108: Fix boot regression

Since commit 79030a486128 ("rockchip: Add Single boot image
(with binman, pad_cat)") the following boot regression is seen:

U-Boot 2020.04-rc3-00050-gd16e18ca6c-dirty (Mar 09 2020 - 11:40:07 -0300)

Model: Elgin RV1108 R1 board
DRAM:  128 MiB
initcall sequence 67fd12a0 failed at call 6000b927 (err=-22)

This happens because the above commit missed to include the
"rockchip-u-boot.dtsi" for rv1108, so include this file
like it done for other Rockchip SoC dtsi's.

Fixes: 79030a486128 ("rockchip: Add Single boot image (with binman, pad_cat)")
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoelgin-rv1108: Avoid adc_channel_single_shot error
Otavio Salvador [Fri, 13 Mar 2020 17:42:47 +0000 (14:42 -0300)]
elgin-rv1108: Avoid adc_channel_single_shot error

Currently the following error message is seen during boot:

U-Boot 2020.01-08751-g55759ae141 (Mar 09 2020 - 14:44:52 -0300)

Model: Elgin RV1108 R1 board
DRAM:  128 MiB
APLL: 600000000 DPLL:1200000000 GPLL:1188000000
ACLK_BUS: 148500000 ACLK_PERI:148500000 HCLK_PERI:148500000 PCLK_PERI:74250000
MMC:   dwmmc@30110000: 0
Loading Environment from MMC... OK
In:    serial@10210000
Out:   serial@10210000
Err:   serial@10210000
Model: Elgin RV1108 R1 board
rockchip_dnl_key_pressed: adc_channel_single_shot fail!
....

Since the elgin-rv1108 does not use ADC to read the download
key status, select CONFIG_ROCKCHIP_BOOT_MODE_REG=0 to avoid
such error.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoelgin-rv1108: Use rk_board_late_init() for GPIO settings
Otavio Salvador [Fri, 13 Mar 2020 17:42:46 +0000 (14:42 -0300)]
elgin-rv1108: Use rk_board_late_init() for GPIO settings

Since commit 8e9a8d0d0c8c ("rockchip: elgin-rv1108: use board_early_init_f
for per-boar init") the function that configure the board GPIOs is no
longer called since CONFIG_BOARD_EARLY_INIT_F=y is not selected.

These GPIOs do not need to be configured in such early stagem, so change it
to rk_board_late_init() and also select CONFIG_BOARD_LATE_INIT=y
to fix the regression.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoARM: dts: Activate pullups in the console pins on rv1108-elgin-r1
Otavio Salvador [Fri, 13 Mar 2020 17:42:45 +0000 (14:42 -0300)]
ARM: dts: Activate pullups in the console pins on rv1108-elgin-r1

In order to make the console pins more robust to noise, activate
the pullups and increase its drive strength.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: Change keyboard input from CrOS EC keyboard to a USB keyboard
Peter Robinson [Mon, 2 Mar 2020 07:57:55 +0000 (07:57 +0000)]
rockchip: Change keyboard input from CrOS EC keyboard to a USB keyboard

These boards aren't ChromeOS devices so won't have a cros-ec-keyb
input as it's the keyboard available via the ChromeOS Embedded
Controller. Update them to use a USB keyboard which would actually
be available. Also enable the usb keyboard option for those devices
that don't have it enabled already.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: evb-rv1108: Use syscon API to get grf base
Kever Yang [Wed, 19 Feb 2020 01:46:06 +0000 (09:46 +0800)]
rockchip: evb-rv1108: Use syscon API to get grf base

Use syscon API to get grf base instead of get from dts.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agorockchip: elgin-rv1108: Use syscon API to get grf base
Kever Yang [Wed, 19 Feb 2020 01:46:05 +0000 (09:46 +0800)]
rockchip: elgin-rv1108: Use syscon API to get grf base

Use syscon API to get grf base instead of get from dts.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
4 years agovexpress_ca9x4: Enable use of correct DTB file and restore EFI loader.
Kristian Amlie [Tue, 25 Feb 2020 17:22:16 +0000 (18:22 +0100)]
vexpress_ca9x4: Enable use of correct DTB file and restore EFI loader.

EFI was disabled in f95b8a4b5f64f because of the missing DTB file,
and indeed, the DTB file is required to load recent versions of GRUB
(2.04) correctly.

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
4 years agoMerge tag 'efi-2020-04-rc4-5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Mon, 23 Mar 2020 14:14:31 +0000 (10:14 -0400)]
Merge tag 'efi-2020-04-rc4-5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-04-rc4 (5)

This series contains bug fixes for the UEFI sub-system:

* report correct variable length in GetNextVariable()
* correct copying direction if freestanding memmove()
* remove const for parameter of GetNextVariableName()
* correct function descriptions

Unit tests are added and adjusted.

4 years agoefi_loader: definition of GetNextVariableName()
Heinrich Schuchardt [Sun, 22 Mar 2020 17:28:20 +0000 (18:28 +0100)]
efi_loader: definition of GetNextVariableName()

'vendor' is both an input and an output parameter. So it cannot be
constant.

Fixes: 0bda81bfdc5c ("efi_loader: use const efi_guid_t * for variable services")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_selftest: test CalculateCrc32, CopyMem, SetMem
Heinrich Schuchardt [Sun, 22 Mar 2020 08:32:55 +0000 (09:32 +0100)]
efi_selftest: test CalculateCrc32, CopyMem, SetMem

Provide unit tests for CalculateCrc32(), CopyMem(), SetMem().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: fix freestanding memmove()
Heinrich Schuchardt [Sun, 22 Mar 2020 08:52:48 +0000 (09:52 +0100)]
efi_loader: fix freestanding memmove()

For EFI binaries we have to provide an implementation of memmove() in
efi_freestanding.c.

Before this patch the memmove() function was copying in the wrong
direction.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: description efi_convert_pointer()
Heinrich Schuchardt [Sun, 22 Mar 2020 07:28:15 +0000 (08:28 +0100)]
efi_loader: description efi_convert_pointer()

Correct the description of function efi_convert_pointer().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: simplify logical expression in efi_disk_add_dev()
Heinrich Schuchardt [Thu, 19 Mar 2020 14:45:52 +0000 (15:45 +0100)]
efi_loader: simplify logical expression in efi_disk_add_dev()

To check if a variable is non-zero there is no need for '!= 0'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_selftest: check length reported by GetNextVariableName()
Heinrich Schuchardt [Fri, 20 Mar 2020 18:20:17 +0000 (19:20 +0100)]
efi_selftest: check length reported by GetNextVariableName()

GetNextVariableName should report the length of the variable including the
final 0x0000 in bytes.

Check this in the unit test.

Increase the buffer size for variable names. 40 bytes is too short.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: correct reported length in GetNextVariable()
Heinrich Schuchardt [Fri, 20 Mar 2020 18:04:34 +0000 (19:04 +0100)]
efi_loader: correct reported length in GetNextVariable()

The runtime service GetNextVariable() returns the length of the next
variable including the closing 0x0000. This length should be in bytes.

Comparing the output of EDK2 and U-Boot shows that this is currently not
correctly implemented:

EDK2:
OsIndicationsSupported: 46
PlatformLang: 26
PlatformLangCodes: 36

U-Boot:
OsIndicationsSupported: 23
PlatformLang: 13
PlatformLangCodes: 18

Provide correct length in GetNextVariable().

Fixes: d99a87f84b75 ("efi_loader: implement GetNextVariableName()")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: fix function descriptions in efi_disk.c
Heinrich Schuchardt [Thu, 19 Mar 2020 12:49:34 +0000 (13:49 +0100)]
efi_loader: fix function descriptions in efi_disk.c

Use Sphinx style for function descriptions.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: description of efi_variable.c
Heinrich Schuchardt [Thu, 19 Mar 2020 17:15:18 +0000 (17:15 +0000)]
efi_loader: description of efi_variable.c

Correct the file description.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMerge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi
Tom Rini [Wed, 18 Mar 2020 11:48:53 +0000 (07:48 -0400)]
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi

- Revert "sunxi: psci: avoid error address-of-packed-member"

4 years agoMerge tag 'efi-2020-04-rc4-4' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Wed, 18 Mar 2020 11:48:39 +0000 (07:48 -0400)]
Merge tag 'efi-2020-04-rc4-4' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-04-rc4 (4)

This series fixes several bugs:

* consider the /reserved-memory node in the device tree
* consider memory reservations created in ft_board_setup()
* correct output of 'efidebug memmap' on the sandbox
* correct the definition of efi_capsule_header()

Furthermore some definitions needed for future patches are added to
header files.

4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Wed, 18 Mar 2020 11:48:11 +0000 (07:48 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-riscv

- Fix sbi_remote_sfence_vma{,_asid}.
- Avoid calling sbi_clear_ipi().
- Add new SBI v0.2 extensions support.

4 years agoRevert "sunxi: psci: avoid error address-of-packed-member"
Tomasz Duszynski [Sun, 16 Feb 2020 12:17:16 +0000 (13:17 +0100)]
Revert "sunxi: psci: avoid error address-of-packed-member"

Using memcpy() for some MMIO access is generally frowned upon and might
break things on some platforms. Allwinner H3, which fails to boot, being
an example here.

Moreover, fields being accessed are naturally aligned and warnings
produced by GCC have been quiesced for some time already by:

53dc8ae ("gcc-9: silence 'address-of-packed-member' warning")

That said, it should be okay to revert this commit.

This reverts commit 9bd34a69a453d409792e08c00953ce8862145e65.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agoefi_loader: correct a definition of struct efi_capsule_header
AKASHI Takahiro [Tue, 17 Mar 2020 02:12:37 +0000 (11:12 +0900)]
efi_loader: correct a definition of struct efi_capsule_header

See UEFI specification, section 8.5.3.
In addition, the structure, efi_capsule_header, should be "packed"
as it is a serialized binary format in a capsule file.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader: export a couple of protocol related functions
AKASHI Takahiro [Tue, 17 Mar 2020 02:12:36 +0000 (11:12 +0900)]
efi_loader: export a couple of protocol related functions

This is a preparatory patch.
Those functions will be used in an implementation of UEFI firmware
management protocol as part of my capsule update patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader: define System Resource Table macros
AKASHI Takahiro [Tue, 17 Mar 2020 02:12:35 +0000 (11:12 +0900)]
efi_loader: define System Resource Table macros

Some of those values will be used in an implementation of UEFI firmware
management protocol as part of my capsule update patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader: define OsIndicationsSupported flags
AKASHI Takahiro [Tue, 17 Mar 2020 02:12:34 +0000 (11:12 +0900)]
efi_loader: define OsIndicationsSupported flags

These flags are expected to be set in OsIndicationsSupported variable
if corresponding features are supported. See UEFI specification,
section 8.5.4.

In particular, capsule-related flags will be used in my capsule
update patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Fix misspelled EFI_OS_INDICATIONS_BOOT_TO_FW_UI.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agocmd: bootefi: Parse reserved-memory node from DT
Atish Patra [Sat, 14 Mar 2020 00:11:30 +0000 (17:11 -0700)]
cmd: bootefi: Parse reserved-memory node from DT

Currently, bootefi only parses memory reservation block to setup
EFI reserved memory mappings. However, it doesn't parse the
reserved-memory[1] device tree node that also can contain the
reserved memory regions.

Add capability to parse reserved-memory node and update the EFI memory
mappings accordingly.

1. <U-Boot source>/doc/device-tree-bindings/reserved-memory/reserved-memory.txt]

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Fix an endless loop.

The /reserved-memory node may have children without reg property. Remove
a superfluous debug statement.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agocmd: map addresses to sysmem in efidebug memmap
Heinrich Schuchardt [Sat, 14 Mar 2020 07:44:07 +0000 (08:44 +0100)]
cmd: map addresses to sysmem in efidebug memmap

Addresses in the sandbox's device tree are in the sandbox's virtual address
space. If we want to compare memory reservations in the device-tree with
the output of 'efidebug memmap', we need to convert back to this address
space.

Adjust the output of the 'efidebug memmap' command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: create reservations after ft_board_setup
Heinrich Schuchardt [Sat, 14 Mar 2020 09:59:34 +0000 (10:59 +0100)]
efi_loader: create reservations after ft_board_setup

Some memory reservations are made in ft_board_setup(). Ensure that we
create reserved memory map entries after ft_board_setup().

The downside of this patch is that if bootefi is called multiple times with
an devicetree argument superfluous reservations for the old copies of the
device tree will exist. But that is still better than missing a reservation.

Deleting the superfluous reservations is not possible because reservations
in the memory map are rounded to page size and may be coallesced.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoriscv: Implement new SBI v0.2 extensions
Bin Meng [Tue, 10 Mar 2020 02:35:31 +0000 (19:35 -0700)]
riscv: Implement new SBI v0.2 extensions

Few v0.1 SBI calls are being replaced by new SBI calls that follows
v0.2 calling convention.

Implement the replacement extensions and few additional new SBI
function calls that makes way for a better SBI interface in future.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
4 years agoriscv: Introduce a new config for SBI v0.1
Bin Meng [Tue, 10 Mar 2020 02:35:30 +0000 (19:35 -0700)]
riscv: Introduce a new config for SBI v0.1

We now have SBI v0.2 which is more scalable and extendable to handle
future needs for RISC-V supervisor interfaces.

Introduce a new config and move all SBI v0.1 code under that config.
This allows to implement the new replacement SBI extensions cleanly
and remove v0.1 extensions easily in future. Currently, the config
is enabled by default. Once all M-mode software, with v0.1, is no
longer in use, this config option and all relevant code can be easily
removed.

This commit is inspired from Linux kernel patch:
https://patchwork.kernel.org/patch/11407361/

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
4 years agoriscv: Add SBI v0.2 extension definitions
Bin Meng [Tue, 10 Mar 2020 02:35:29 +0000 (19:35 -0700)]
riscv: Add SBI v0.2 extension definitions

Few v0.1 SBI calls are being replaced by new SBI calls that follows
v0.2 calling convention.

This patch just defines these new extensions.

This commit is inspired from Linux kernel patch:
https://patchwork.kernel.org/patch/11407359/

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
4 years agoriscv: Add basic support for SBI v0.2
Bin Meng [Tue, 10 Mar 2020 02:35:28 +0000 (19:35 -0700)]
riscv: Add basic support for SBI v0.2

The SBI v0.2 introduces a base extension which is backward compatible
with v0.1. Implement all helper functions and minimum required SBI
calls from v0.2 for now. All other base extension function will be
added later as per need.

As v0.2 calling convention is backward compatible with v0.1, remove
the v0.1 helper functions and just use v0.2 calling convention.

Add a new Kconfig options CONFIG_SBI for the new SBI v0.2 codes, and
let CONFIG_SBI_IPI depend on it.

This commit is inspired from Linux kernel patch:
https://patchwork.kernel.org/patch/11407363/

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
4 years agoriscv: Mark existing SBI as v0.1 SBI
Bin Meng [Tue, 10 Mar 2020 02:35:27 +0000 (19:35 -0700)]
riscv: Mark existing SBI as v0.1 SBI

As per the new SBI specification, current SBI implementation version
is defined as 0.1 and will be removed/replaced in future. Each of the
function call in 0.1 is defined as a separate extension which makes
easier to replace them one at a time.

Rename existing implementation to reflect that. This patch is just
a preparatory patch for SBI v0.2 and doesn't introduce any functional
changes.

This commit is inspired from Linux kernel patch:
https://patchwork.kernel.org/patch/11407355/

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
4 years agoriscv: Avoid calling sbi_clear_ipi()
Bin Meng [Fri, 6 Mar 2020 08:44:17 +0000 (00:44 -0800)]
riscv: Avoid calling sbi_clear_ipi()

There is no need for S-mode U-Boot to call sbi_clear_ipi() as it
can be cleared directly from S-mode. This saves some cycles.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas@auer.io>
4 years agoriscv: Fix sbi_remote_sfence_vma{,_asid}
Bin Meng [Fri, 6 Mar 2020 08:44:16 +0000 (00:44 -0800)]
riscv: Fix sbi_remote_sfence_vma{,_asid}

Currently sbi_remote_sfence_vma{,_asid} does not pass their arguments
to SBI at all, which is semantically incorrect.

This keeps in sync with Linux kernel commit:
  a21344dfc6ad: fix sbi_remote_sfence_vma{,_asid}

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas@auer.io>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Mon, 16 Mar 2020 16:33:24 +0000 (12:33 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- Fix timer wrap (Chris)
- Use dev_read only if OF_PLATDATA is not enabled (Walter)

4 years agowatchdog: Handle timer wrap around
Chris Packham [Mon, 24 Feb 2020 00:20:33 +0000 (13:20 +1300)]
watchdog: Handle timer wrap around

On some platforms/architectures the value from get_timer() can wrap.
This is particularly problematic when long-running code needs to measure
a time difference as is the case with watchdog_reset() which tries to
avoid tickling the watchdog too frequently.

Use time_after() from time.h instead of a plain > comparison to avoid
any issues with the time wrapping on a system that has been sitting in
u-boot for a long time.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agowatchdog: Use dev_read only if OF_PLATDATA is not enabled
Walter Lozano [Thu, 23 Jan 2020 19:05:05 +0000 (16:05 -0300)]
watchdog: Use dev_read only if OF_PLATDATA is not enabled

Currently watchdog tries to use dev_read_u32_default to get timeout
configuration in case OF_CONTROL is enabled. However, if SPL is
built with OF_PLATDATA this has no sense as there is no device tree.

This patch fixes this issue by only use dev_read_u32_default if OF_CONTROL
is enabled but OF_PLATDATA is not.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoMerge branch '2020-03-13-master-imports'
Tom Rini [Fri, 13 Mar 2020 17:21:17 +0000 (13:21 -0400)]
Merge branch '2020-03-13-master-imports'

- Address the regression with the 'gpio' command
- Fix mcfuart regression
- Other minor fixes

4 years agoMAINTAINERS: update entry for ARM STI
Patrice Chotard [Thu, 12 Mar 2020 10:11:18 +0000 (11:11 +0100)]
MAINTAINERS: update entry for ARM STI

Add STi drivers/include files and git tree.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
4 years agofit: check return value of fit_image_get_data_size()
Heinrich Schuchardt [Wed, 11 Mar 2020 20:51:08 +0000 (21:51 +0100)]
fit: check return value of fit_image_get_data_size()

GCC-10 reports:

In file included from tools/common/image-fit.c:1:
include/image.h: In function ‘fit_image_get_data_and_size’:
./tools/../common/image-fit.c:1015:9: warning: ‘len’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
 1015 |   *size = len;
      |   ~~~~~~^~~~~
./tools/../common/image-fit.c:996:6: note: ‘len’ was declared here
  996 |  int len;
      |      ^~~

Add the missing check of the return value of fit_image_get_data_size().

Fixes: c3c863880479 ("add FIT data-position & data-offset property support")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agowatchdog: Align Kconfig properties
Michal Simek [Wed, 11 Mar 2020 11:26:53 +0000 (12:26 +0100)]
watchdog: Align Kconfig properties

Just cleanup help indentation to be the same for all options.
It means <tab><space><space> indentation.

OMAP3 should be indented by tabs which is also fixed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agocmd: gpio: Make `gpio input` return pin value again
Alex Kiernan [Wed, 11 Mar 2020 08:46:29 +0000 (08:46 +0000)]
cmd: gpio: Make `gpio input` return pin value again

4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value") correctly
changed the behaviour of the gpio command to return CMD_RET_SUCCESS or
CMD_RET_FAILURE, but any existing script which expects the return value
to be the pin value is broken by this change.

Reinstate the legacy behaviour for `gpio input` only.

Fixes: 4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value")
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alex Kiernan <alex.kiernan@hivehome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoMakefile: doesn't need check stack size when dtb is not built
AKASHI Takahiro [Tue, 10 Mar 2020 00:20:43 +0000 (09:20 +0900)]
Makefile: doesn't need check stack size when dtb is not built

The commit 5fed97af20da ("Makefile: ensure DTB doesn't overflow into
initial stack") adds an extra check for stack size in BSS if
CONFIG_SYS_INIT_SP_BSS_OFFSET is enabled.
This check, however, doesn't make sense under the configuration where
control dtb won't be built in and it should be void in such cases.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Fixes: 5fed97af20da ("Makefile: ensure DTB doesn't overflow into initial stack")
Reviewed-by: Stephen Warren <swarren@nvidia.com>
4 years agoserial: mcfuart: renaming to a more appropriate name
Angelo Durgehello [Sat, 29 Feb 2020 00:09:35 +0000 (01:09 +0100)]
serial: mcfuart: renaming to a more appropriate name

All drivers seems to align now to serial_xxx maning, so, aligning
also this driver, to allow to be found easily.

Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
4 years agoserial: mcfuart: fix uart port index
Angelo Durgehello [Sat, 29 Feb 2020 00:01:32 +0000 (01:01 +0100)]
serial: mcfuart: fix uart port index

Actually, using dev->seq value before probe to deduce the current
serial port index leads to reading an invalid seq value (-1).
So, getting dev->seq at probe time.

Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
4 years agoMerge tag 'efi-2020-04-rc4-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 12 Mar 2020 16:51:44 +0000 (12:51 -0400)]
Merge tag 'efi-2020-04-rc4-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-04-rc4 (3)

This pull request provides the hardware RNG driver for Amlogic systems needed
for the EFI_RNG_PROTOCOL.

Furthermore bug fixes are provided:

* correct an error message in the efidebug command
* correct an error in the 'efidebug rm' command
* remove an unnecessary assignment in efi_queue_event()

4 years agoMerge tag 'u-boot-stm32-20200310' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Thu, 12 Mar 2020 16:50:09 +0000 (12:50 -0400)]
Merge tag 'u-boot-stm32-20200310' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- stm32mp: fix dependency for CONFIG_STM32_ETZPC

4 years agodrivers/rng: add Amlogic hardware RNG driver
Heinrich Schuchardt [Sun, 2 Feb 2020 18:52:04 +0000 (19:52 +0100)]
drivers/rng: add Amlogic hardware RNG driver

Add support for the hardware random number generator of Amlogic SOCs.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
4 years agodrivers/rng: simplify Kconfig
Heinrich Schuchardt [Sun, 2 Feb 2020 18:45:35 +0000 (19:45 +0100)]
drivers/rng: simplify Kconfig

For all sandbox systems with DM_RNG we enable RNG_SANDBOX. So we can simply
set the default to yes.

All rng drivers depend on DM_RNG. Use a single 'if' instead of individual
dependencies. Now 'make menuconfig' shows the individual drivers neatly
indented under the DM_RNG entry.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
4 years agoefi_loader: unnecessary assignment in efi_queue_event
Heinrich Schuchardt [Fri, 6 Mar 2020 20:56:10 +0000 (21:56 +0100)]
efi_loader: unnecessary assignment in efi_queue_event

The assigned value NULL is never used.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agocmd: efidebug: correct error message
Heinrich Schuchardt [Mon, 2 Mar 2020 19:13:10 +0000 (20:13 +0100)]
cmd: efidebug: correct error message

Add the missing line feed at the error message if the variable referred to
by 'efidebug boot rm' does not exist.

Shorten the format string by using the variable name instead of the number
of the boot variable.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agocmd: efidebug: fix a failure of "boot rm" sub-command
AKASHI Takahiro [Fri, 28 Feb 2020 00:05:04 +0000 (09:05 +0900)]
cmd: efidebug: fix a failure of "boot rm" sub-command

There is a wrong usage of utf8_utf16_strncpy() in "boot rm" command, and
then it will end up with a failure of this command due to a wrong
value of an interim variable ("var_name16").

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: get_memory_map: return parameters whenever possible
AKASHI Takahiro [Wed, 11 Mar 2020 06:18:18 +0000 (15:18 +0900)]
efi_loader: get_memory_map: return parameters whenever possible

Currently, if GetMemoryMap API returns EFI_BUFFER_TOO_SMALL, it doesn't
set valid values to other parameters, descriptor_size and
descriptor_version, except memory_map_size.
Some efi applications, however, may use those value; in particular,
xen uses descriptor_size to calculate a size of buffer to be allocated.

While UEFI specification is ambiguous in this point, it would be better
to address this issue proactively to maximize the compatibility with
existing efi applications.

With this patch, for example, xen.efi (and hence linux kernel) can be
started via bootefi without modification.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMerge tag 'mmc-2020-3-9' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Wed, 11 Mar 2020 01:13:26 +0000 (21:13 -0400)]
Merge tag 'mmc-2020-3-9' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc

- DM support for CAxxxx SoCs
- eMMC board for presidio-asic
- Add defer probe for mmc sdhci
- TI SoCs mmc misc update

4 years agoarm: mediatek: remove unused binman config
Sam Shih [Wed, 4 Mar 2020 12:03:48 +0000 (20:03 +0800)]
arm: mediatek: remove unused binman config

The binman-option BINMAN_FDT is introduced by this commit:
commit 3c10dc95bdd0 ("binman: Add a library to access binman entries")
BINMAN_FDT being selected when BINMAN=y that resulting in mt7623
and mt7622 are unable to boot. The root cause of this issue is commit:
commit cbd2fba1eca1 ("arm: MediaTek: add basic support for MT7629 boards")
select BINMAN=y in all mediatek SoCs, and others mediatek SoCs not
expect to use BINMAN_FDT.
This patch remove BINMAN=y option when ARCH_MEDIATEK=y and
move this to the specify SoCs part config.

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
4 years agopower-domain: fix hang in endless loop on i.MX8
Anatolij Gustschin [Mon, 17 Feb 2020 08:42:11 +0000 (09:42 +0100)]
power-domain: fix hang in endless loop on i.MX8

Currently when booting the kernel on i.MX8 U-Boot hangs in an
endless loop when switching off dma, connectivity or lsio power
domains during device removal. It hapens first when removing
gpio0 (gpio@5d080000) device, here its power domain device
'lsio_gpio0' is obtained for switching off power. Since the
obtained 'lsio_gpio0' device is removed afterwards, its power
domain is also switched off and here the parent power domain
device 'lsio_power_domain' is optained for switching off the
power. Thereafter, when the obtained 'lsio_power_domain' is
removed, device_remove() removes its first child 'lsio_gpio0'.
During this child removal the 'lsio_power_domain' device is
obtained again for switching and when removing it later,
the same child removal is repeated, so we are stuck in an
endless loop. Below is a snippet from dm tree on i.MX8QXP
for better illustration of the DM devices relationship:

 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
...
 simple_bus    0  [ + ]   generic_simple_bus    |-- imx8qx-pm
 power_doma    0  [ + ]   imx8_power_domain     |   |-- lsio_power_domain
 power_doma    1  [ + ]   imx8_power_domain     |   |   |-- lsio_gpio0
 power_doma    2  [ + ]   imx8_power_domain     |   |   |-- lsio_gpio1

Do not remove a power domain device if it is a parent of the
currently controlled device.

Fixes: 52edfed65de9 ("dm: core: device: switch off power domain after device removal")
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reported-by: Oliver Graute <oliver.graute@gmail.com>
Reported-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Tested-by: Fabio Estevam <festevam@gmail.com>
4 years agoMerge tag 'u-boot-imx-20200310' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Tue, 10 Mar 2020 17:13:08 +0000 (13:13 -0400)]
Merge tag 'u-boot-imx-20200310' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

Fixes for 2020.04
-----------------

- DM : mx6sabresd
- mx6ul_14x14_evk: fix video
- mx8qxp; fix console for booting
- sync DTS with kernel (imx6sx)
- drop obsolete woodburn (mx35)

Travis: https://travis-ci.org/sbabic/u-boot-imx/builds/660550811

4 years agoMerge tag 'u-boot-atmel-fixes-2020.04-a' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Tue, 10 Mar 2020 17:12:21 +0000 (13:12 -0400)]
Merge tag 'u-boot-atmel-fixes-2020.04-a' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmel

First set of u-boot-atmel fixes for 2020.04 cycle:
- Includes two small configuration fixes that will solve the SPL booting
  on sama5d3_xplained board.

4 years agostm32mp: update dependency for STM32_ETZPC
Patrick Delaunay [Tue, 10 Mar 2020 15:05:43 +0000 (16:05 +0100)]
stm32mp: update dependency for STM32_ETZPC

Correct the dependency for STM32 ETZPC protection, linked to SOC
STM32MP identified by CONFIG_STM32MP15x and not linked to
CONFIG_TARGET_STM32MP1 (no more existing).

This patch fix an issue introduced by commit 846254888e2e ("stm32mp1:
split board and SOC support for STM32MP15x family").

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>