oweals/u-boot.git
4 years agovideo: Factor out vidconsole_put_string()
Marek Vasut [Fri, 17 May 2019 18:22:31 +0000 (20:22 +0200)]
video: Factor out vidconsole_put_string()

Pull the vidconsole_put_string() function from DM tests, make it
available to e.g. boards that want to display information on the
LCD on boot.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
4 years agovideo: ipuv3: Set max display bpp to 32
Marek Vasut [Sun, 5 May 2019 23:11:32 +0000 (01:11 +0200)]
video: ipuv3: Set max display bpp to 32

The IPUv3 can handle 1920x1080x32bpp displays , set the max preallocated
framebuffer BPP to 32 to cater for all eventualities.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
4 years agoimx: mx6sabresd: fix boot hang with video
Peng Fan [Thu, 25 Apr 2019 02:36:22 +0000 (02:36 +0000)]
imx: mx6sabresd: fix boot hang with video

Meet the following boot hang.
"
U-Boot SPL 2019.04-00661-gdc80a012e4 (Apr 25 2019 - 10:31:57 +0800)
Trying to boot from MMC1

U-Boot 2019.04-00661-gdc80a012e4 (Apr 25 2019 - 10:31:57 +0800)

CPU:   Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz)
CPU:   Automotive temperature grade (-40C to 125C)Reset cause: POR
Model: Freescale i.MX6 Quad SABRE Smart Device Board
Board: MX6-SabreSD
I2C:   ready
DRAM:  1 GiB
Video device 'ipu@2400000' cannot allocate frame buffer memory -ensure the device is set up before relocation
Error binding driver 'ipuv3_video': -28
Video device 'ipu@2800000' cannot allocate frame buffer memory -ensure the device is set up before relocation
Error binding driver 'ipuv3_video': -28
Some drivers failed to bind
Error binding driver 'generic_simple_bus': -28
Some drivers failed to bind
initcall sequence 4ffe4500 failed at call 1780dfb7 (err=-28)
"

1. fdtdec_get_alias_seq will use "video" as base, however in alias node,
   we use ipux, so add new alias for U-Boot dts.
2. DM_VIDEO is enabled, however reserve_video is called before
   relocation, so to make DM_VIDEO work before relocation, need to
   set SYS_MALLOC_F_LEN
3. defconfig is updated with savedefconfig

 Note: I do not have a video panel to test, but with this patch, U-Boot
       boots up again, below log.

"
U-Boot SPL 2019.04-00662-g0b62453bff (Apr 25 2019 - 10:36:31 +0800)
Trying to boot from MMC1

U-Boot 2019.04-00662-g0b62453bff (Apr 25 2019 - 10:36:31 +0800)

CPU:   Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz)
CPU:   Automotive temperature grade (-40C to 125C) at 34C
Reset cause: POR
Model: Freescale i.MX6 Quad SABRE Smart Device Board
Board: MX6-SabreSD
I2C:   ready
DRAM:  1 GiB
PMIC:  PFUZE100 ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 3
Loading Environment from MMC... *** Warning - bad CRC, using default environment

PCI:   pcie phy link never came up
In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Hit any key to stop autoboot:  0
"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
4 years agoarm: imx: cx9020: remove unnecessary includes
Steffen Dirkwinkel [Wed, 17 Apr 2019 11:57:19 +0000 (13:57 +0200)]
arm: imx: cx9020: remove unnecessary includes

There are several includes in mx53cx9020.c which are not required
anymore.

Acked-by: Patrick Bruenn <p.bruenn@beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
4 years agodm: arm: imx: cx9020: remove unused mmc functions
Steffen Dirkwinkel [Wed, 17 Apr 2019 11:57:18 +0000 (13:57 +0200)]
dm: arm: imx: cx9020: remove unused mmc functions

These mmc functions were not used anymore since DM_MMC was introduced.

Acked-by: Patrick Bruenn <p.bruenn@beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
4 years agodm: arm: imx: cx9020: migrate to dm_video
Steffen Dirkwinkel [Wed, 17 Apr 2019 11:57:17 +0000 (13:57 +0200)]
dm: arm: imx: cx9020: migrate to dm_video

Enable DM_VIDEO in config and don't overwrite console so it can be set
from environment

Acked-by: Patrick Bruenn <p.bruenn@beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
4 years agoarm: imx: add ipu to imx53.dts and set dm-pre-reloc
Steffen Dirkwinkel [Wed, 17 Apr 2019 11:57:16 +0000 (13:57 +0200)]
arm: imx: add ipu to imx53.dts and set dm-pre-reloc

The ipu node in imx53 is needed for DM_VIDEO. We also need to set
u-boot,dm-pre-reloc to initialize before relocation.

Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
4 years agodm: arm: imx: video: add compatible for imx53-ipu
Steffen Dirkwinkel [Wed, 17 Apr 2019 11:57:15 +0000 (13:57 +0200)]
dm: arm: imx: video: add compatible for imx53-ipu

This code also works with imx53 ipus so we can enable it for them.

Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
4 years agodm: arm: imx: cx9020: enable DM_GPIO
Steffen Dirkwinkel [Wed, 17 Apr 2019 11:57:14 +0000 (13:57 +0200)]
dm: arm: imx: cx9020: enable DM_GPIO

Switch to DM_GPIO and add gpio_request where necessary.
This is needed for DM_VIDEO and fixes an issue with sd card detection
which was introduced by the combination of these commits:

commit 7a0425dd969c ("mmc: fsl_esdhc: make get_cd work well in dm_mmc_ops")
commit 7e04b4c751a1 ("dm: arm: imx: migrate cx9020 to CONFIG_DM_MMC")

Acked-by: Patrick Bruenn <p.bruenn@beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
4 years agosplash: Load internal and external data from FIT
Leo Ruan [Fri, 8 Feb 2019 09:51:36 +0000 (10:51 +0100)]
splash: Load internal and external data from FIT

The FIT image could contain the splash data in 3 different structure:
- The splash data is embedded in FIT image (internal)
  In this case, the property 'data' presents in FIT image header. And
  internal information 'start' and 'end' represent the location and
  size of splash data inside of FIT image.
- The splash data is external with absolute position in FIT image
  This case is made by 'mkimage -p [pos]'. The splash data is stored
  at the absolute position. Instead the property 'data', the properties
  'data-position' and 'data-size' are used to specify the location and
  size of the splash data.
- the splash data is external with relative offset in FIT image
  This case is made by 'mkimage -E'. The splash data is placed after
  the FIT image header with 4 byte alignment. Instead the property
  'data', the properties 'data-offset' and 'data-size' are used to
  specify the location and size of the splash data.

Currently, the splash only support to load external data with relative
offset from FIT image. This commit make it possible to load the splash
data embedded in FIT image or the external data with absolute position

This inspiration comes from Simon Glass <sjg@chromium.org>, see
common/spl_fit.c

Signed-off-by: Leo Ruan <tingquan.ruan@cn.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefano Babic <sbabic@denx.de>
4 years agosplash: Use splashfile instead of location->name
Leo Ruan [Fri, 8 Feb 2019 09:51:35 +0000 (10:51 +0100)]
splash: Use splashfile instead of location->name

The splash image could be loaded from different sources (e.g. sf, mmc)
with different formats (e.g. raw, file-system). These sources are
structured by a board dependent object 'splash_location'. To decide
where is the splash image loaded, following environment variables are
used to select the splash source and file:
- 'splashsource' is used to select the splash source by setting its
  value to specified name of splash location.
- 'splashfile' specify the name of splash image file

But, when loads the splash image from FIT, the name of splash image
within FIT is specified by splash location name. Due to the splash
location name is already used for the splash source, its name may
conflicts with the name of splash image.

To solve the conflict, the environment variable 'splashfile' is used
to specify the splash image in FIT, and keeps the splash location
name for the splash source.

Signed-off-by: Leo Ruan <tingquan.ruan@cn.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Tomas Melin <tomas.melin@vaisala.com>
4 years agoMerge branch 'master' of git://git.denx.de/u-boot-samsung
Tom Rini [Thu, 16 May 2019 11:09:59 +0000 (07:09 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-samsung

- arndale fixes

4 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Thu, 16 May 2019 11:09:33 +0000 (07:09 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

- SoCFPGA DT and reset cleanup, AE MCVEVK board support.

4 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Thu, 16 May 2019 11:09:18 +0000 (07:09 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- Align env position on GR-Peach with downstream U-Boot.

4 years agoconfigs: arndale: Use appropriate driver for Asix AX88760
Krzysztof Kozlowski [Sat, 11 May 2019 11:24:33 +0000 (13:24 +0200)]
configs: arndale: Use appropriate driver for Asix AX88760

Arndale board has an Asix AX88760 USB 2.0 Hub and Fast Ethernet combo.
The appropriate driver for it is USB_ETHER_ASIX.

The mistake probably came from misinterpretation of commit e9954b867ce0
("usb: eth: add ASIX AX88179 DRIVER") which was tested on RECS5250 COM
module.  This module indeed has Exynos5250 and some similarities with
Arndale 5250 board but the USB/Ethernet chip used there is apparently
different.

Fixes: f58ad98a621c ("usb: net: migrate USB Ethernet adapters to Kconfig")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
4 years agoarm: exynos: arndale: Remove unused CONFIG_DM_I2C_COMPAT
Krzysztof Kozlowski [Sat, 11 May 2019 11:24:32 +0000 (13:24 +0200)]
arm: exynos: arndale: Remove unused CONFIG_DM_I2C_COMPAT

The CONFIG_DM_I2C_COMPAT was introduced in
include/configs/exynos5-common.h in commit 189d80166b31 ("exynos5:
enable dm i2c") and then it propagated up to configs/arndale_defconfig.
However since beginning the Arndale board (Exynos5250) was not using
I2C.

In fact, the Arndale board is not configuring its PMIC (S5M8767) which
uses I2C bus.  This setting can be thus safely removed to fix build
warning:

    This board uses CONFIG_DM_I2C_COMPAT. Please remove
    (possibly in a subsequent patch in your series)
    before sending patches to the mailing list.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
4 years agoarm: exynos: arndale: Remove unused CONFIG_POWER and CONFIG_POWER_I2C
Krzysztof Kozlowski [Sat, 11 May 2019 11:24:31 +0000 (13:24 +0200)]
arm: exynos: arndale: Remove unused CONFIG_POWER and CONFIG_POWER_I2C

The CONFIG_POWER and CONFIG_POWER_I2C were introduced in
include/configs/exynos5-common.h in commit 19bd3aaa5991 ("exynos5: fix
build break by adding CONFIG_POWER") and then it propagated up to
include/configs/arndale.h.  However before that commit, there was no
build break at all on Arndale and SMDK5250 boards.  It seems the commit
fixed nothing and just added unused defines.

In fact, the Arndale board is not configuring its PMIC (S5M8767) which
uses I2C bus.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
4 years agoPrepare v2019.07-rc2 v2019.07-rc2
Tom Rini [Wed, 15 May 2019 19:58:48 +0000 (15:58 -0400)]
Prepare v2019.07-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Wed, 15 May 2019 11:10:52 +0000 (07:10 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-net

- micrel, ti PHY fixes
- rtl8169, mtk-eth fixes

4 years agoMerge tag 'u-boot-stm32-mcu-20190514' of https://github.com/pchotard/u-boot
Tom Rini [Wed, 15 May 2019 11:10:32 +0000 (07:10 -0400)]
Merge tag 'u-boot-stm32-mcu-20190514' of https://github.com/pchotard/u-boot

STM32 MCUs update:
_ Add MPU region for SPI NOR memory mapped region
_ Add missing QSPI flash compatible for STM32 F7 boards
_ Update spi-tx-bus-width and spi-rx-bus-width properties
_ Add QSPI support for STM32F469 Discovery board

4 years agoeth: mtk-eth: fix incorrect read of phy-handle
Weijie Gao [Sun, 28 Apr 2019 07:08:57 +0000 (15:08 +0800)]
eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
4 years agonet: rtl8169: Support RTL-8168h/8111h
Thierry Reding [Tue, 16 Apr 2019 16:20:30 +0000 (18:20 +0200)]
net: rtl8169: Support RTL-8168h/8111h

This version of the RTL-8168 is present on some development boards and
is compatible with this driver. Add support for identifying this version
of the chip so that U-Boot won't complain about it being unknown.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
4 years agonet: rtl8169: Implement ->hwaddr_write() callback
Thierry Reding [Tue, 16 Apr 2019 16:20:29 +0000 (18:20 +0200)]
net: rtl8169: Implement ->hwaddr_write() callback

Implement this callback that allows the MAC address to be set for the
Ethernet card. This is necessary in order for the device to be able to
receive packets for the MAC address that U-Boot advertises.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
4 years agophy: ti: Init node before reading
Michal Simek [Sat, 16 Mar 2019 11:43:17 +0000 (12:43 +0100)]
phy: ti: Init node before reading

There is a need to fill node before clk_output_sel is setup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Reviewed-by: <hannes.schmelzer@br-automation.com>
4 years agonet: phy: micrel: Allow KSZ8xxx and KSZ90x1 to be used together
James Byrne [Wed, 6 Mar 2019 12:48:27 +0000 (12:48 +0000)]
net: phy: micrel: Allow KSZ8xxx and KSZ90x1 to be used together

Commit d397f7c45b0b ("net: phy: micrel: Separate KSZ9000 drivers from
KSZ8000 drivers") separated the KSZ8xxx and KSZ90x1 drivers and warns
that you shouldn't select both of them due to a device ID clash between
the KSZ9021 and the KS8721, asserting that "it is highly unlikely for a
system to contain both a KSZ8000 and a KSZ9000 PHY". Unfortunately
boards like the SAMA5D3xEK do contain both types of PHY, but fortunately
the Linux Micrel PHY driver provides a solution by using different PHY
ID and mask values to distinguish these chips.

This commit contains the following changes:

- The PHY ID and mask values for the KSZ9021 and the KS8721 now match
those used by the Linux driver.
- The warnings about not enabling both drivers have been removed.
- The description for PHY_MICREL_KSZ8XXX has been corrected (these are
10/100 PHYs, not GbE PHYs).
- PHY_MICREL_KSZ9021 and PHY_MICREL_KSZ9031 no longer select PHY_GIGE
since this is selected by PHY_MICREL_KSZ90X1.
- All of the relevant defconfig files have been updated now that
PHY_MICREL_KSZ8XXX does not default to 'Y'.

Signed-off-by: James Byrne <james.byrne@origamienergy.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
4 years agoARM: dts: socfpga: Keep FPGA bridge entries in SPL DT
Marek Vasut [Tue, 7 May 2019 15:55:12 +0000 (17:55 +0200)]
ARM: dts: socfpga: Keep FPGA bridge entries in SPL DT

Keep the FPGA bridge entries in SPL DT to let do_bridge_reset() toggle
the bridges on/off as needed according to the handoff file.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
4 years agoARM: dts: socfpga: Factor out U-Boot specifics from A10 handoff files
Marek Vasut [Wed, 6 Mar 2019 18:47:22 +0000 (19:47 +0100)]
ARM: dts: socfpga: Factor out U-Boot specifics from A10 handoff files

Pull out the u-boot,dm-pre-reloc from socfpga_arria10_socdk_sdmmc_handoff.dtsi
into separate dtsi header file to make it easier to patch in custom handoff
dtsi files, without having to manually add the U-Boot bits. Shuffle the include
clauses in the A10 DT files to make it obvious what gets included where without
having to follow confusing long chain of includes, i.e. board DT file includes
everything it needs.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
4 years agoarm: socfpga: Re-add support for Aries MCV SoM and MCVEV[KP] board
Wolfgang Grandegger [Sun, 12 May 2019 17:25:18 +0000 (19:25 +0200)]
arm: socfpga: Re-add support for Aries MCV SoM and MCVEV[KP] board

Re-add support for Aries Embedded MCV SoM, which is CycloneV based
and the associated MCVEVK and MCVEVP baseboard. The board can boot
from eMMC. Ethernet and USB is supported.

The Aries Embedded boards have been removed with commit 03b54997d568
("board/aries: Remove"). I will now take care of them.

The device-tree files are from mainline Linux commit e93c9c99a629
("Linux v5.1)".

Signed-off-by: Wolfgang Grandegger <wg@aries-embedded.de>
CC: Marek Vasut <marex@denx.de>
CC: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agoarm: sofcpga: s10: remove unused ad-hoc reset code
Simon Goldschmidt [Mon, 13 May 2019 19:16:44 +0000 (21:16 +0200)]
arm: sofcpga: s10: remove unused ad-hoc reset code

The stratix 10 reset manager ad-hoc code in arch/arm contains an unused
function 'reset_deassert_peripherals_handoff' that has been added from
the beginning. As this is probably a result of copying the gen5 reset
manager and this function has never been used, remove it.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agoarm: socfpga: remove re-added ad-hoc reset code
Simon Goldschmidt [Mon, 13 May 2019 19:16:43 +0000 (21:16 +0200)]
arm: socfpga: remove re-added ad-hoc reset code

commit c5de2b7eae68 ("arm: socfpga: implement proper peripheral reset")
has removed the call to 'reset_deassert_peripherals_handoff()' from
socfpga gen5 SPL since the reset driver now handles resets. However,
commit c1d4b464c8b8 ("ARM: socfpga: Disable bridges in SPL unless booting from FPGA")
has re-added this ad-hoc reset code, so that all peripherals were now
again enabled instead of letting the drivers enable them by request.

While at it, remove this function for gen5 as it should not be used.

Fixes: commit c1d4b464c8b8 ("ARM: socfpga: Disable bridges in SPL unless booting from FPGA")
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agoARM: renesas: grpeach: Align env position
Marek Vasut [Sat, 4 May 2019 17:35:27 +0000 (19:35 +0200)]
ARM: renesas: grpeach: Align env position

Move the U-Boot environment to 0x80000 to match the downstream
vendor fork and allow easy migration from one to the other.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 years agoMerge tag 'efi-2019-07-rc3' of git://git.denx.de/u-boot-efi
Tom Rini [Mon, 13 May 2019 11:13:28 +0000 (07:13 -0400)]
Merge tag 'efi-2019-07-rc3' of git://git.denx.de/u-boot-efi

Pull request for UEFI sub-system for v2019.07-rc3

The development target for the UEFI sub-system is EBBR compliance. We have
already implemented some further protocols to enable running the UEFI Shell
and the UEFI SCT test suite.

As some boards are severely memory constrained make some of these extras
customizable.

Provide bug fixes. The most prominent ones let us pass the UEFI SCT memory
allocation tests.

4 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Mon, 13 May 2019 11:13:03 +0000 (07:13 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

- A10 FPGA programming support, Gen5 livetree conversion

4 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Mon, 13 May 2019 11:12:47 +0000 (07:12 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- SH2, SH3 removal

4 years agoefi_loader: comments for efi_install_fdt()
Heinrich Schuchardt [Sun, 12 May 2019 18:16:25 +0000 (20:16 +0200)]
efi_loader: comments for efi_install_fdt()

Describe that efi_install_fdt() defaults to using the device tree
indicated by environment variable fdtcontroladdr.

ACPI tables and device trees are mutually exclusive.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: deduplicate code in cmd/bootefi.c
Heinrich Schuchardt [Sun, 12 May 2019 18:16:25 +0000 (20:16 +0200)]
efi_loader: deduplicate code in cmd/bootefi.c

Move duplicate initialization code to single instance.

Adjust comments of concerned functions.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: ACPI device node to text
Heinrich Schuchardt [Sat, 11 May 2019 21:11:48 +0000 (23:11 +0200)]
efi_loader: ACPI device node to text

The device path to text protocol renders ACPI device nodes incorrectly.

Use capital hexadecimal numbers as shown in the UEFI spec examples.

Always output the optional UID. This matches what UEFI SCT expects and
saves us an `if`.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: infinite recursion notifying events
Heinrich Schuchardt [Sat, 11 May 2019 19:44:59 +0000 (21:44 +0200)]
efi_loader: infinite recursion notifying events

UEFI SCT uses this call sequence to determine the current TPL level inside
notification functions:

    OldTpl = BS->RaiseTPL(TPL_HIGH_LEVEL);
    BS->RestoreTPL(OldTpl);

In RestoreTPL() we trigger the notification function of queued events. If
we do not mark the event as non-queued before calling the notification
function, this results in an infinite recursive call sequence.

Mark the event as non-queued before entering the notification function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: simplify efi_allocate_pages()
Heinrich Schuchardt [Sat, 11 May 2019 06:43:30 +0000 (08:43 +0200)]
efi_loader: simplify efi_allocate_pages()

Replace unnecessary control structures by using return statements.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: AllocateAdress error handling
Heinrich Schuchardt [Sat, 11 May 2019 06:21:17 +0000 (08:21 +0200)]
efi_loader: AllocateAdress error handling

If AllocatePages() is called with AllocateAddress, the UEFI spec requires
to return EFI_NOT_FOUND in case the memory page does not exist.

The UEFI SCT II 2017 spec additionally requires to return EFI_NOT_FOUND if
the page is already allocated.

Check that *Memory refers to an unallocated page.

UEFI SCT II (2017): AllocatePages(), 5.1.2.1.9 - 5.1.2.1.10

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: out of resources in AllocatePages()
Heinrich Schuchardt [Sat, 11 May 2019 05:55:05 +0000 (07:55 +0200)]
efi_loader: out of resources in AllocatePages()

According to the UEFI AllocatePages() has to return EFI_OUT_OF_RESOURCES if
sufficient memory is not available.

Change the return value.

UEFI SCT II (2017): 3.2.1 AllocatePages(), 5.1.2.1.8

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: check memory address before freeing
Heinrich Schuchardt [Fri, 10 May 2019 19:21:30 +0000 (21:21 +0200)]
efi_loader: check memory address before freeing

When we call FreePages() we essentially add memory to our memory map. We
shouldn't do this for memory that does not exit.

Check if the memory that is to be freed via FreePages() or FreePool() is in
our memory map and is not EFI_CONVENTIONAL_MEMORY.

This check is mandated by the UEFI specification.

Cf. UEFI SCT  II (2017), 3.2.2 FreePages(), 5.1.2.1 - 5.1.2.2

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: error code in UninstallProtocolInterface()
Heinrich Schuchardt [Fri, 10 May 2019 18:06:48 +0000 (20:06 +0200)]
efi_loader: error code in UninstallProtocolInterface()

According to the UEFI specification UninstallProtocolInteface() has to
return EFI_NOT_FOUND if the interface is not found.

Correct the return value.

Cf. UEFI SCT II spec (2017), 3.3.2 UninstallProtocolInterface(), 5.1.3.2.4

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: superfluous check in efi_remove_protocol()
Heinrich Schuchardt [Fri, 10 May 2019 17:55:53 +0000 (19:55 +0200)]
efi_loader: superfluous check in efi_remove_protocol()

efi_search_protocol() already checks that the GUID matches. Don't check
a second time.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: LocateDevicePath() incorrect parameter check
Heinrich Schuchardt [Fri, 10 May 2019 17:21:41 +0000 (19:21 +0200)]
efi_loader: LocateDevicePath() incorrect parameter check

A parameter check in LocateDevicePath() does not match the requirements of
the UEFI spec.

If device is NULL, only return EFI_INVALID_PARAMETER if a matching handle
is found.

Cf. UEFI SCT II specification (2017)3.3.7 LocateDevicePath(), 5.1.3.7.3

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: fix typo in efi_locate_handle() comment
Heinrich Schuchardt [Fri, 10 May 2019 17:03:49 +0000 (19:03 +0200)]
efi_loader: fix typo in efi_locate_handle() comment

%s/not buffer/no buffer/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: make device path to text protocol customizable
Heinrich Schuchardt [Sat, 11 May 2019 07:53:33 +0000 (09:53 +0200)]
efi_loader: make device path to text protocol customizable

The device path to text protocol is not needed for EBBR compliance. So
let's make it a customizable option.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: make Unicode collation protocol customizable
Heinrich Schuchardt [Wed, 8 May 2019 21:24:26 +0000 (23:24 +0200)]
efi_loader: make Unicode collation protocol customizable

The Unicode collation protocol is not needed for EBBR compliance. So let's
make it a customizable option.

The Unicode capitalization table is only needed by this protocol. So let it
depend on the Unicode collation protocol.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: reword the EFI_LOADER config option
Heinrich Schuchardt [Sat, 11 May 2019 08:27:58 +0000 (10:27 +0200)]
efi_loader: reword the EFI_LOADER config option

No need to mention U-Boot in brief description.
Fix several typos, mention iPXE.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: format Kconfig
Heinrich Schuchardt [Wed, 8 May 2019 21:17:38 +0000 (23:17 +0200)]
efi_loader: format Kconfig

Use if/endif for dependencies to give structure to the configuration menu.

Sort important settings to the top.

Abbreviate the short description of EFI_LOADER_HII.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: observe CONFIG_EFI_LOADER_HII
Heinrich Schuchardt [Wed, 8 May 2019 19:42:36 +0000 (21:42 +0200)]
efi_loader: observe CONFIG_EFI_LOADER_HII

If EFI_LOADER_HII is not set, do not unnecessarily compile files for HII
protocols.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMAINTAINERS: assign include/charset.h
Heinrich Schuchardt [Wed, 8 May 2019 17:41:35 +0000 (19:41 +0200)]
MAINTAINERS: assign include/charset.h

Assign include/charset.h to EFI PAYLOAD.

The functions defined in this include are used by the UEFI sub-system.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agolib: charset: correct utf8_utf16_strnlen() description
Heinrich Schuchardt [Wed, 8 May 2019 17:34:48 +0000 (19:34 +0200)]
lib: charset: correct utf8_utf16_strnlen() description

Correct the description of utf8_utf16_strnlen() and utf8_utf16_strlen() to
reflect that they return u16 count and not byte count.

For these functions and utf16_utf8_strnlen() describe the handling of
invalid code sequences.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agogpio: dwapb_gpio: convert to livetree
Simon Goldschmidt [Thu, 9 May 2019 20:12:00 +0000 (22:12 +0200)]
gpio: dwapb_gpio: convert to livetree

Convert 'gpio_dwapb_bind' to iterate over subnodes using livetree
functions (inspired from mt7621_gpio.c).

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agoreset: socfpga: convert to livetree
Simon Goldschmidt [Thu, 9 May 2019 20:11:59 +0000 (22:11 +0200)]
reset: socfpga: convert to livetree

Convert 'socfpga_reset_probe' to use 'dev_read_u32_default'
instead of 'fdtdec_get_int'.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agoserial: altera_uart: convert to livetree
Simon Goldschmidt [Thu, 9 May 2019 20:11:58 +0000 (22:11 +0200)]
serial: altera_uart: convert to livetree

Convert 'altera_uart_ofdata_to_platdata' to use 'dev_read_u32_default'
instead of 'fdtdec_get_int' and get rid of DECLARE_GLOBAL_DATA_PTR.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agospi: designware: convert to livetree
Simon Goldschmidt [Thu, 9 May 2019 20:11:57 +0000 (22:11 +0200)]
spi: designware: convert to livetree

Convert 'dw_spi_ofdata_to_platdata' to use 'dev_read_u32_default'
instead of 'fdtdec_get_int' and get rid of DECLARE_GLOBAL_DATA_PTR.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agospi: cadence_qspi: convert to livetree
Simon Goldschmidt [Thu, 9 May 2019 20:11:56 +0000 (22:11 +0200)]
spi: cadence_qspi: convert to livetree

Convert 'cadence_spi_ofdata_to_platdata' to use dev_read_* functions to
read driver parameters and 'dev_read_first_subnode'/'ofnode_read_*' to
read flash (child node) parameters.

Tested on socfpga_socrates (socfpga gen5).

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agotimer: dw-apb: remove unused DECLARE_GLOBAL_DATA_PTR
Simon Goldschmidt [Thu, 9 May 2019 20:11:55 +0000 (22:11 +0200)]
timer: dw-apb: remove unused DECLARE_GLOBAL_DATA_PTR

The dw-apb timer does not use 'gd', so remove its declaration.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agoconfigs: stratix10: Enable CONFIG_SPI_FLASH_USE_4K_SECTORS
Ley Foon Tan [Wed, 8 May 2019 03:07:37 +0000 (11:07 +0800)]
configs: stratix10: Enable CONFIG_SPI_FLASH_USE_4K_SECTORS

Fix SPI flash environment erase size error.

CONFIG_ENV_SECT_SIZE is set to 4KB. Enable CONFIG_SPI_FLASH_USE_4K_SECTORS
to allow erase one environment sector.

Fix error below:

SOCFPGA_STRATIX10 # saveenv
Saving Environment to SPI Flash...
SF: Detected mt25qu02g with page size 256 Bytes, erase size 64 KiB, total 256 MiB
Erasing SPI flash...SF: Erase offset/length not multiple of erase size
Failed (-22)

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
4 years agoARM: socfpga: Increase Malloc pool size to support FAT filesystem in SPL
Tien Fong Chee [Tue, 7 May 2019 09:42:32 +0000 (17:42 +0800)]
ARM: socfpga: Increase Malloc pool size to support FAT filesystem in SPL

Increasing Malloc pool size up to 0x15000 is required to support FAT in SPL
. The result of calculation is come from default max cluster(0x10000) +
others(0x2000) + additional memory for headroom(0x3000).

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
4 years agoARM: socfpga: Synchronize the configuration for A10 SoCDK
Tien Fong Chee [Tue, 7 May 2019 09:42:31 +0000 (17:42 +0800)]
ARM: socfpga: Synchronize the configuration for A10 SoCDK

Update the default configuration file to enable the necessary functionality
the get the kit working.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
4 years agospl: socfpga: Implement fpga bitstream loading with socfpga loadfs
Tien Fong Chee [Tue, 7 May 2019 09:42:30 +0000 (17:42 +0800)]
spl: socfpga: Implement fpga bitstream loading with socfpga loadfs

Add support for loading FPGA bitstream to get DDR up running before
U-Boot is loaded into DDR. Boot device initialization, generic firmware
loader and SPL FAT support are required for this whole mechanism to work.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
4 years agoARM: socfpga: Add the configuration for FPGA SoCFPGA A10 SoCDK
Tien Fong Chee [Tue, 7 May 2019 09:42:29 +0000 (17:42 +0800)]
ARM: socfpga: Add the configuration for FPGA SoCFPGA A10 SoCDK

Update the default configuration file to enable the necessary functionality
to get the SoCFPGA loadfs driver support. This would enable the
implementation of programming bitstream into FPGA from MMC.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
4 years agoARM: socfpga: Add FPGA drivers for Arria 10 FPGA bitstream loading
Tien Fong Chee [Tue, 7 May 2019 09:42:28 +0000 (17:42 +0800)]
ARM: socfpga: Add FPGA drivers for Arria 10 FPGA bitstream loading

Add FPGA driver to support program FPGA with FPGA bitstream loading from
filesystem. The driver are designed based on generic firmware loader
framework. The driver can handle FPGA program operation from loading FPGA
bitstream in flash to memory and then to program FPGA.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
4 years agoARM: socfpga: Moving the watchdog reset to the for-loop status polling
Tien Fong Chee [Tue, 7 May 2019 09:42:27 +0000 (17:42 +0800)]
ARM: socfpga: Moving the watchdog reset to the for-loop status polling

Current watchdog reset is misplaced after for-loop status polling, so
this poses a risk that watchdog can't be reset timely if polling taking
longer than watchdog timeout. This patch moving the watchdog reset
into polling to ensure the watchdog can be reset timely.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
4 years agoARM: socfpga: Cleaning up and ensuring consistent format messages in driver
Tien Fong Chee [Tue, 7 May 2019 09:42:26 +0000 (17:42 +0800)]
ARM: socfpga: Cleaning up and ensuring consistent format messages in driver

Ensure all the debug messages are always prefix with "FPGA: " and comment
beginning with uppercase letter.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
4 years agoARM: socfpga: Add default FPGA bitstream fitImage for Arria10 SoCDK
Tien Fong Chee [Tue, 7 May 2019 09:42:25 +0000 (17:42 +0800)]
ARM: socfpga: Add default FPGA bitstream fitImage for Arria10 SoCDK

Add default fitImage file bundling FPGA bitstreams for Arria10.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
4 years agoARM: socfpga: Description on FPGA bitstream type and file name for Arria 10
Tien Fong Chee [Tue, 7 May 2019 09:42:24 +0000 (17:42 +0800)]
ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10

This patch adds description on properties about file name used for both
peripheral bitstream and core bitstream.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
4 years agosh: sh3: Remove CPU support
Marek Vasut [Tue, 7 May 2019 20:04:05 +0000 (22:04 +0200)]
sh: sh3: Remove CPU support

This CPU core is old, no boards using the CPU are left in mainline,
it has no prospects of ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
4 years agosh: shmin: Remove the board
Marek Vasut [Tue, 7 May 2019 20:02:39 +0000 (22:02 +0200)]
sh: shmin: Remove the board

Last change to this board was done in 2016, has no prospects of
ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
4 years agosh: ms7720se: Remove the board
Marek Vasut [Tue, 7 May 2019 20:01:37 +0000 (22:01 +0200)]
sh: ms7720se: Remove the board

Last change to this board was done in 2016, has no prospects of
ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
4 years agosh: mpr2: Remove the board
Marek Vasut [Tue, 7 May 2019 19:59:57 +0000 (21:59 +0200)]
sh: mpr2: Remove the board

Last change to this board was done in 2016, has no prospects of
ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Mark Jonas <mark.jonas@de.bosch.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
4 years agosh: sh2: Remove CPU support
Marek Vasut [Tue, 7 May 2019 19:52:47 +0000 (21:52 +0200)]
sh: sh2: Remove CPU support

This CPU core is old, no boards using the CPU are left in mainline,
it has no prospects of ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
4 years agosh: rsk7269: Remove the board
Marek Vasut [Tue, 7 May 2019 19:51:39 +0000 (21:51 +0200)]
sh: rsk7269: Remove the board

Last change to this board was done in 2016, has no prospects of
ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
4 years agosh: rsk7264: Remove the board
Marek Vasut [Tue, 7 May 2019 19:51:06 +0000 (21:51 +0200)]
sh: rsk7264: Remove the board

Last change to this board was done in 2016, has no prospects of
ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
4 years agosh: rsk7203: Remove the board
Marek Vasut [Tue, 7 May 2019 19:49:16 +0000 (21:49 +0200)]
sh: rsk7203: Remove the board

Last change to this board was done in 2016, has no prospects of
ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
4 years agoserial: sh: Drop assorted SH3, SH4, SH5 macros
Marek Vasut [Tue, 7 May 2019 20:31:23 +0000 (22:31 +0200)]
serial: sh: Drop assorted SH3, SH4, SH5 macros

Drop unused macros from the header to clean it up.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
4 years agoserial: sh: Drop RTS7751R2D support
Marek Vasut [Tue, 7 May 2019 20:27:32 +0000 (22:27 +0200)]
serial: sh: Drop RTS7751R2D support

There is no RTS7751R2D support in U-Boot, drop all the RTS7751R2D macros.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
4 years agoserial: sh: Drop SH2007 support
Marek Vasut [Tue, 7 May 2019 20:26:21 +0000 (22:26 +0200)]
serial: sh: Drop SH2007 support

There is no SH2007 support in U-Boot, drop all the SH2007 macros.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
4 years agoserial: sh: Drop H8 support
Marek Vasut [Tue, 7 May 2019 20:14:49 +0000 (22:14 +0200)]
serial: sh: Drop H8 support

There is no H8 support in U-Boot, drop all the H8 macros.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
4 years agoMerge branch '2019-05-10-master-imports'
Tom Rini [Fri, 10 May 2019 15:08:48 +0000 (11:08 -0400)]
Merge branch '2019-05-10-master-imports'

- Correct CONFIG_CRC32 related options in Kconfig
- CONFIG_GPIO select's DM_GPIO, drop CONFIG_GPIO from whitelist.txt

4 years agoRemove whitelist entry for CONFIG_CRC32
Chris Packham [Sat, 13 Apr 2019 09:13:59 +0000 (21:13 +1200)]
Remove whitelist entry for CONFIG_CRC32

There are no longer any references to this in the code so this can be
removed.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agoRemove #define CONFIG_CRC32
Chris Packham [Sat, 13 Apr 2019 09:13:58 +0000 (21:13 +1200)]
Remove #define CONFIG_CRC32

There is no check for CONFIG_CRC32 so the #define in image.h does
nothing. Remove it.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agomtd: ubi: Remove select for non existent option
Chris Packham [Sat, 13 Apr 2019 09:13:57 +0000 (21:13 +1200)]
mtd: ubi: Remove select for non existent option

There is no 'config CRC32' remove the select that was attempting to use
it.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agocmd: ubifs: Remove select for non-existent option
Chris Packham [Sat, 13 Apr 2019 09:13:56 +0000 (21:13 +1200)]
cmd: ubifs: Remove select for non-existent option

There is no 'config CRC32', remove the select that was attempting to use
it.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agoRemove whitelist entry for CONFIG_GPIO
Chris Packham [Sat, 13 Apr 2019 08:35:24 +0000 (20:35 +1200)]
Remove whitelist entry for CONFIG_GPIO

CONFIG_GPIO does not exist. There is one hit for it in tegra_gpio.c but
it is a variable name.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agosysreset: select DM_GPIO instead of GPIO
Chris Packham [Sat, 13 Apr 2019 08:35:23 +0000 (20:35 +1200)]
sysreset: select DM_GPIO instead of GPIO

CONFIG_GPIO does not exist. sysreset_gpio.c uses the DM gpio APIs so the
correct option to select is DM_GPIO.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoMerge branch '2019-05-09-master-imports'
Tom Rini [Fri, 10 May 2019 11:07:49 +0000 (07:07 -0400)]
Merge branch '2019-05-09-master-imports'

- Minor fixes (ata memory leak, implement feedback on ohci-da8xx
  changes, avb test fix, mmc test fix, spelling fixes, make FIT really
  optional, fit-dtb blob cleanups, TI K3 workflow improvements, bootz
  can boot barebox on 32bit ARM).

4 years agoremoteproc: k3_system_controller: Increase rx timeout
Lokesh Vutla [Thu, 2 May 2019 10:05:52 +0000 (15:35 +0530)]
remoteproc: k3_system_controller: Increase rx timeout

There is one case where 400ms is not sufficient for loading the
system firmware:
- System firmware is not signed with rsa degenerate key.
- ROM loading the sysfw directly from SPI flash which is in memory
  mapped mode.

The above scenario is definitely not desired in production use cases
as it effects boot time. But still keeping this support as this is
a valid boot scenario.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: k3: config.mk: Use k3_gen_x509_cert.sh to generate boot images
Lokesh Vutla [Thu, 2 May 2019 10:05:51 +0000 (15:35 +0530)]
arm: k3: config.mk: Use k3_gen_x509_cert.sh to generate boot images

Instead of overlading makefile, use the k3_gen_x509_cert.sh script
to generate boot images.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agotools: k3_get_x509 cert: Add a script to generate x509 certificate for K3 devices
Lokesh Vutla [Thu, 2 May 2019 10:05:50 +0000 (15:35 +0530)]
tools: k3_get_x509 cert: Add a script to generate x509 certificate for K3 devices

TI's K3 boot architecture mandates a x509 certificate for every boot image.
While signing the image K3 ROM allows for two types of keys based on which
the boot image gets loaded in different ways:
- Degenerate RSA keys: This generates a signature which is equal to the digest.
       When ROM sees this, it does a DMA for copying the images,
       which significantly improves the boot time.
- Any other key: Does a memcpy to load the image. This is introduced as a
 fallback for DMA copy.

Add a script for generating boot images with the above options. Default
generates image using rsa degenerate key in order to improve boot time.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
4 years agoSet time and umask on fit-dtb.blob to ensure reproducibile builds.
Vagrant Cascadian [Thu, 2 May 2019 18:14:12 +0000 (11:14 -0700)]
Set time and umask on fit-dtb.blob to ensure reproducibile builds.

Support for compressed fit-dtb.blob was added in:

  commit 95f4bbd581cf ("lib: fdt: Allow LZO and GZIP DT compression in
  U-Boot")

When building compressed (lzop, gzip) fit-dtb.blob images, the
compression tool may embed the time or umask in the image.

Work around this by manually setting the time of the source file using
SOURCE_DATE_EPOCH and a hard-coded 0600 umask.

With gzip, this could be accomplished by using -n/--no-name, but lzop
has no current workaround:

  https://bugs.debian.org/896520

This is essentially the same fix applied to multi-dtb fit SPL images in:

  commit 8664ab7debab ("Set time and umask on multi-dtb fit images to
  ensure reproducibile builds.")

Signed-off-by: Vagrant Cascadian <vagrant@reproducible-builds.org>
4 years agoRemove fit-dtb.blob* in clean target.
Vagrant Cascadian [Thu, 2 May 2019 18:14:11 +0000 (11:14 -0700)]
Remove fit-dtb.blob* in clean target.

Support for compressed fit-dtb.blob was added in:

  commit 95f4bbd581cf ("lib: fdt: Allow LZO and GZIP DT compression in
  U-Boot")

Adjust Makefile to also clean compressed blobs.

Signed-off-by: Vagrant Cascadian <vagrant@reproducible-builds.org>
4 years agoAdd fit-dtb.blob* to .gitignore.
Vagrant Cascadian [Thu, 2 May 2019 18:14:10 +0000 (11:14 -0700)]
Add fit-dtb.blob* to .gitignore.

Support for compressed fit-dtb.blob was added in:

  commit 95f4bbd581cf ("lib: fdt: Allow LZO and GZIP DT compression in
  U-Boot")

Adjust .gitignore to also exclude compressed blobs.

Signed-off-by: Vagrant Cascadian <vagrant@reproducible-builds.org>
4 years agoarm: zimage: add barebox image magic number
Christoph Fritz [Fri, 3 May 2019 11:19:49 +0000 (13:19 +0200)]
arm: zimage: add barebox image magic number

For chainboot configurations or test environments, this patch allows
booting barebox images by using command bootz.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
4 years agotest/py: don't use mmc_rd config for other mmc tests
Stephen Warren [Tue, 16 Apr 2019 22:04:49 +0000 (16:04 -0600)]
test/py: don't use mmc_rd config for other mmc tests

Fix test_mmc_dev(), test_mmc_rescan(), test_mmc_info() not to use the
same configuration data that test_mmc_rd() does. Doing so causes the
following issues:

* The new code uncondtionally expects certain keys to exist in the
configuration data. These keys do not exist in existing configuration
data since they were not previously required, and there was no
notification re: a requirement to add these new keys. This causes test
failures due to thrown exceptions when accessing the non-existent keys.

* The new tests logically operate on different objects. test_mmc_rd()
operates on ranges of sectors on an MMC device (which may be the entire
set of sectors of a device, or a part of a device), whereas all the new
tests operate solely on entire devices. These are separate things, and
it's entirely likely that the user will wish to runs the two types of
tests on different sets of data; see the example configuration data that
this commit adds. Ideally, the new tests would have been added to a
separate Python file, since they aren' closely related to the existing
tests.

FIXME: Marek, can you please replace the "???" in this patch with some
reasonable looking data? Thanks.

Cc: Marek Vasut <marek.vasut@gmail.com>
Fixes: 4ffec8cdf512 ("test/py: mmc: Add 'mmc info' test")
Fixes: ce4b2cafa79c ("test/py: mmc: Add 'mmc rescan' test")
Fixes: 86dfd152c917 ("test/py: mmc: Add 'mmc dev' test")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
4 years agofdt_shrink_to_minimum: do not mark fdt space reserved unconditionally
Simon Goldschmidt [Fri, 3 May 2019 19:19:03 +0000 (21:19 +0200)]
fdt_shrink_to_minimum: do not mark fdt space reserved unconditionally

This function merely relocates the fdt blob, so don't let it alter
it by adding reservations that didn't exist before.

Instead, if the memory used for the fdt blob has been reserved
before calling this function, ensure the relocated memory is
marked as reserved instead.

Reported-by: Keerthy <j-keerthy@ti.com>
Reported-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoMake FIT support really optional
Fabrice Fontaine [Fri, 3 May 2019 20:37:05 +0000 (22:37 +0200)]
Make FIT support really optional

Due to some mistakes in the source code, it was not possible to really
turn FIT support off. This commit fixes the problem by means of the
following changes:

- Enclose "bootm_host_load_image" and "bootm_host_load_images" between
  checks for CONFIG_FIT_SIGNATURE, in common/bootm.c.

- Enclose the declaration of "bootm_host_load_images" between checks for
  CONFIG_FIT_SIGNATURE, in common/bootm.h.

- Condition the compilation and linking of fit_common.o fit_image.o
  image-host.o common/image-fit.o to CONFIG_FIT=y, in tools/Makefile.

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
[fabio: adapt for 2016.07]
Signed-off-by: Fabio Estevam <festevam@gmail.com>
[Ricardo: fix conditional compilation and linking of the files mentioned above
for 2016.07]
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
[Jörg: adapt for 2019.01]
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/uboot-tools/0003-Make-FIT-support-really-optional.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
4 years agoFix spelling of available.
Vagrant Cascadian [Fri, 3 May 2019 22:28:37 +0000 (14:28 -0800)]
Fix spelling of available.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>