]> Git Repo - u-boot.git/log
u-boot.git
3 years agotools: kwbimage: Align kwbimage header to proper size
Pali Rohár [Mon, 8 Nov 2021 17:12:48 +0000 (18:12 +0100)]
tools: kwbimage: Align kwbimage header to proper size

Currently kwbimage header is always aligned to 4096 bytes. But it does not
have to be aligned to such a high value.

The header needs to be just 4-byte aligned, while some image types have
additional alignment restrictions.

This change reduces size of kwbimage binaries by removing extra padding
between header and data part.

Signed-off-by: Pali Rohár <[email protected]>
Signed-off-by: Marek Behún <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
3 years agotools: kwbimage: Do not put final image padding to the image data size
Pali Rohár [Mon, 8 Nov 2021 17:12:47 +0000 (18:12 +0100)]
tools: kwbimage: Do not put final image padding to the image data size

This change allows to convert image from one format to another without need
to include unnecessary padding (e.g. when target image format has smaller
alignment requirement as source image format).

Do it by storing real image data size without padding to the kwbimage
header.

Signed-off-by: Pali Rohár <[email protected]>
Signed-off-by: Marek Behún <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
3 years agotools: kwbimage: Align final UART image to 128 bytes
Pali Rohár [Mon, 8 Nov 2021 17:12:46 +0000 (18:12 +0100)]
tools: kwbimage: Align final UART image to 128 bytes

xmodem block size is 128 bytes, therefore it is possible to transfer only
images with size multiple of 128 bytes. kwboot automatically pads image
with zero bytes at the end to align it to 128 bytes boundary.

Do this padding when generating image to allow uploading with other xmodem
tools or older kwboot versions.

Signed-off-by: Pali Rohár <[email protected]>
Signed-off-by: Marek Behún <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
3 years agotools: kwbimage: Remove unused enums and prototypes
Pali Rohár [Mon, 8 Nov 2021 17:12:45 +0000 (18:12 +0100)]
tools: kwbimage: Remove unused enums and prototypes

There are more unused enums and function prototypes. Remove them. The
function kwbimage_check_params() does not return enum kwbimage_cmd_types,
but a boolean value returned as int.

Signed-off-by: Pali Rohár <[email protected]>
Signed-off-by: Marek Behún <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
3 years agotools: kwbimage: Fix validation of kwbimage v0
Pali Rohár [Mon, 8 Nov 2021 17:12:44 +0000 (18:12 +0100)]
tools: kwbimage: Fix validation of kwbimage v0

kwbimage v0 sldo has 32-bit data checksum at the end like kwbimage v1.

Use same data checksum validation for both v0 and v1 image types.

Signed-off-by: Pali Rohár <[email protected]>
Signed-off-by: Marek Behún <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
3 years agotools: kwbimage: Set BOOT_FROM by default to SPI
Pali Rohár [Mon, 8 Nov 2021 17:12:43 +0000 (18:12 +0100)]
tools: kwbimage: Set BOOT_FROM by default to SPI

kwbimage must have valid blockid member instead of zero value. Thus if
config file does not contain BOOT_FROM command, use by default the value
for SPI booting (which is probably the most common).

Signed-off-by: Pali Rohár <[email protected]>
Signed-off-by: Marek Behún <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
3 years agotools: kwbimage: Explicitly set version also for kwbimage v0
Pali Rohár [Mon, 8 Nov 2021 17:12:42 +0000 (18:12 +0100)]
tools: kwbimage: Explicitly set version also for kwbimage v0

For documentation purposes update struct main_hdr_v0 to include information
where version of the image must be stored. For kwbimage v0 it obviously
must be 0. By default all image header memory is initialized to zero,
therefore this change has no functional effect.

Signed-off-by: Pali Rohár <[email protected]>
Signed-off-by: Marek Behún <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
3 years agotools: kwbimage: Add support for new commands UART_PORT and UART_MPP
Pali Rohár [Mon, 8 Nov 2021 17:12:41 +0000 (18:12 +0100)]
tools: kwbimage: Add support for new commands UART_PORT and UART_MPP

These two commands allow to specify custom setting of UART port used for
printing BootROM messages.

Signed-off-by: Pali Rohár <[email protected]>
Signed-off-by: Marek Behún <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
3 years agopci: pci_mvebu: Use global MBUS_PCI_MEM_SIZE macro
Pali Rohár [Sat, 6 Nov 2021 11:16:12 +0000 (12:16 +0100)]
pci: pci_mvebu: Use global MBUS_PCI_MEM_SIZE macro

Header file mach/cpu.h already defines MBUS_PCI_MEM_SIZE macro which
defines size of MBUS_PCI_MEM_BASE window. So use global MBUS_PCI_MEM_SIZE
macro instead of locally defined PCIE_MEM_SIZE macro. Both macros have same
definition.

Signed-off-by: Pali Rohár <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
3 years agotools: kwboot: Always print kwboot version
Pali Rohár [Fri, 5 Nov 2021 22:30:42 +0000 (23:30 +0100)]
tools: kwboot: Always print kwboot version

It is useful to see kwboot version in the boot log output for debugging
purposes.

Signed-off-by: Pali Rohár <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
3 years agotools: kwboot: Fix sending Kirkwood v0 images
Pali Rohár [Fri, 5 Nov 2021 22:29:58 +0000 (23:29 +0100)]
tools: kwboot: Fix sending Kirkwood v0 images

Properly calculate and align image header size to xmodem block size.

Kirkwood v0 images do not have stored total size of header in header
structure itself like it is for v1 images. So kwbheader_size() calculates
size by traversing image structure itself. Aligning is done in kwboot by
putting zero padding bytes between the header and data part.

Signed-off-by: Pali Rohár <[email protected]>
Tested-by: Tony Dinh <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
3 years agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
Tom Rini [Wed, 10 Nov 2021 03:26:56 +0000 (22:26 -0500)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi

- watchdog: don't autostart watchdog on Sunxi boards

3 years agowatchdog: don't autostart watchdog on Sunxi boards
Heinrich Schuchardt [Fri, 5 Nov 2021 18:34:31 +0000 (19:34 +0100)]
watchdog: don't autostart watchdog on Sunxi boards

The Sunxi boards only support a 16 second watchdog timeout. This is too
short to boot Linux. The UEFI specification requires 300 seconds as
default timeout.

Change the default for CONFIG_WATCHDOG_AUTOSTART for ARCH_SUNXI.

Fixes: b147bd3607f8 ("sunxi: Enable watchdog timer support by default")
Signed-off-by: Heinrich Schuchardt <[email protected]>
Tested-by: Andre Przywara <[email protected]>
Signed-off-by: Andre Przywara <[email protected]>
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-samsung
Tom Rini [Tue, 9 Nov 2021 13:51:00 +0000 (08:51 -0500)]
Merge https://source.denx.de/u-boot/custodians/u-boot-samsung

[trini: Migrate CONFIG_EXYNOS7420 as part of merging, so espresso7420
still builds]

Signed-off-by: Tom Rini <[email protected]>
3 years agoconfigs: ls1028a: ensure Ethernet is enabled
Vladimir Oltean [Tue, 9 Nov 2021 11:32:31 +0000 (17:02 +0530)]
configs: ls1028a: ensure Ethernet is enabled

CONFIG_FSL_ENETC is not explicitly enabled in the NXP LS1028A config
files, instead it is selected by CONFIG_MSCC_FELIX_SWITCH, a state of
matters which is fragile.

CONFIG_MSCC_FELIX_SWITCH depends on CONFIG_DM_DSA, which depends on
CONFIG_PHY_FIXED.

Not all LS1028A boards did enable CONFIG_PHY_FIXED, which resulted in
all of Ethernet being compiled out.

This patch makes sure that CONFIG_PHY_FIXED is enabled for all LS1028A
boards, and CONFIG_FSL_ENETC as well - don't rely on that fragile
selection done by the Felix switch config.

Signed-off-by: Vladimir Oltean <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
[Rebased]
Signed-off-by: Priyanka Jain <[email protected]>
3 years agopci: layerscape: Fix the LUT and msi-map mismatch issue
Hou Zhiqiang [Tue, 9 Nov 2021 11:26:24 +0000 (16:56 +0530)]
pci: layerscape: Fix the LUT and msi-map mismatch issue

In the current code, it doesn't reset the cursors of LUT entry and
StreamID at the beginning of the fixup, so it can result in LUT entry
setup and msi-map mismatch and LUT entries and StreamID leaking
when reload and fixup the DTB.
This patch move the initialization of LUT entry and StreamID cursors
to the beginning of the fixup to resolve the issues.

Signed-off-by: Hou Zhiqiang <[email protected]>
[Rebased]
Signed-off-by: Priyanka Jain <[email protected]>
3 years agoconfigs: fsl: migrate FMAN/QE specific defines to Kconfig
Rajesh Bhagat [Tue, 9 Nov 2021 11:00:38 +0000 (16:30 +0530)]
configs: fsl: migrate FMAN/QE specific defines to Kconfig

Use moveconfig.py script to convert CONFIG_SYS_FMAN_FW_ADDR,
CONFIG_SYS_QE_FW_ADDR and CONFIG_SYS_QE_FMAN_FW_LENGTH to Kconfig and
move these entries to defconfigs.

Signed-off-by: Rajesh Bhagat <[email protected]>
[Rebased]
Signed-off-by: Priyanka Jain <[email protected]>
3 years agoconfigs: ls1046aqds: Configure environment related configs
Kuldeep Singh [Tue, 9 Nov 2021 09:26:41 +0000 (14:56 +0530)]
configs: ls1046aqds: Configure environment related configs

LS1046A-QDS board requires updation in few environment configs in TFA
defconfigs of the board.

Following are the changes:
- Update CONFIG_ENV_ADDR
- Update CONFIG_ENV_SECT_SIZE
- Enable CONFIG_SYS_RELOC_GD_ENV_ADDR

Signed-off-by: Kuldeep Singh <[email protected]>
[Rebased]
Signed-off-by: Priyanka Jain <[email protected]>
3 years agoconfigs: ls1046aqds: Move CONFIG_SPI_FLASH_* definitions to defconfigs
Kuldeep Singh [Tue, 9 Nov 2021 09:22:26 +0000 (14:52 +0530)]
configs: ls1046aqds: Move CONFIG_SPI_FLASH_* definitions to defconfigs

LS1046A-QDS has CONFIG_SPI_FLASH_SST, CONFIG_SPI_FLASH_EON and
CONFIG_SPI_FLASH_STMICRO defines present in header. Move these entries
from header to defconfigs.

Signed-off-by: Kuldeep Singh <[email protected]>
[Rebased]
Signed-off-by: Priyanka Jain <[email protected]>
3 years agoboard: kontron: sl28: add myself to ls1028a.dtsi maintainers
Michael Walle [Sun, 31 Oct 2021 22:39:35 +0000 (23:39 +0100)]
board: kontron: sl28: add myself to ls1028a.dtsi maintainers

I'd like to keep informed about ls1028a.dtsi changes. For now, there is
no top-level entry for any layerscape specific files. Instead, add the
file entry to my board MAINTAINERS file.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarmv8: layerscape: use memalign() to allocate spintable code
Michael Walle [Sun, 31 Oct 2021 22:21:56 +0000 (23:21 +0100)]
armv8: layerscape: use memalign() to allocate spintable code

Don't use efi_allocate_pages(). The allocated memory isn't carved out of
the lmb allocations. The memory might then be allocated twice.
Particulary, this might happened with the fdt_high/initrd_high feature
which will relocate the fdt/ramdisk. This might then overlap with the
spin table.

Instead use memalign() which allocates on memory on the heap which is
correctly carved out by lmb.

Please note, that the memory is later reserved in the device tree as
well as in the EFI memory map in ft_fixup_cpu() (in
arch/arm/cpu/armv8/fsl-layerscape/fdt.c).

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoboard: sl28: enable USB periheral support and gadgets
Michael Walle [Fri, 15 Oct 2021 13:15:25 +0000 (15:15 +0200)]
board: sl28: enable USB periheral support and gadgets

Enable support to update the board via the DFU protocol and make it
possible to export the block devices via USB mass storage protocol.

This will not work out of the box, yet. You have to change the dr_mode
of the usb0 controller to peripheral manually to make it work. True, OTG
support will hopefully coming soon.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoboard: sl28: switch to dwc3 driver
Michael Walle [Fri, 15 Oct 2021 13:15:24 +0000 (15:15 +0200)]
board: sl28: switch to dwc3 driver

Now that the DWC3 USB driver has support for the layerscape platform,
use it. This will have the benefit that peripheral mode will work.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agousb: dwc3: add layerscape support
Michael Walle [Fri, 15 Oct 2021 13:15:23 +0000 (15:15 +0200)]
usb: dwc3: add layerscape support

Add support for the proper dwc3 device tree binding support as specified
in the offical device tree spec.

Initially, add support for the LS1028A support. Other SoCs should be
easy to add by just adding the corresponding compatible string.
Unfortunately, the device trees of all other layerscape SoCs are not
converted and uses a wrong compatible string only known in u-boot.

To maintain backwards compatibility with current u-boot device trees,
add the generic "fsl,layerscape-dwc3" compatible string.

OTG mode is not supported yet. The dr_mode in the devicetree will either
have to be set to peripheral or host.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agousb: dwc3: Enable undefined length INCR burst type
Michael Walle [Fri, 15 Oct 2021 13:15:22 +0000 (15:15 +0200)]
usb: dwc3: Enable undefined length INCR burst type

[backport from linux commit d9612c2f0449e24983a8b689603210486a930c90]

Enable the undefined length INCR burst type and set INCRx.
Different platform may has the different burst size type.
In order to get best performance, we need to tune the burst
size to one special value, instead of the default value.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agousb: dwc3: Add frame length adjustment quirk
Michael Walle [Fri, 15 Oct 2021 13:15:21 +0000 (15:15 +0200)]
usb: dwc3: Add frame length adjustment quirk

[backport from linux commit db2be4e9e30c6e43e48c5749d3fc74cee0a6bbb3]

Add adjust_frame_length_quirk for writing to fladj register
which adjusts (micro)frame length to value provided by
"snps,quirk-frame-length-adjustment" property thus avoiding
USB 2.0 devices to time-out over a longer run

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agousb: common: silence dubious errors
Michael Walle [Fri, 15 Oct 2021 13:15:20 +0000 (15:15 +0200)]
usb: common: silence dubious errors

Both dr_mode and maximum-speed properties are usually optional. Drivers
will still try to fetch the properties nonetheless, which leads to error
messages, although they are no errors. Change pr_err() to pr_debug().

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarmv8: fsl-layerscape: rework the dwc3 snooping enable code
Michael Walle [Fri, 15 Oct 2021 13:15:19 +0000 (15:15 +0200)]
armv8: fsl-layerscape: rework the dwc3 snooping enable code

Instead of looking at all USB (host) devices, just search all DWC3
device tree nodes. This will (1) fix a panic if of_match is zero and (2)
also apply the fixup if the controller is in peripheral mode. Both
happen when the DWC3 USB controller driver is used.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agotest: dm: add test for ofnode_for_each_compatible_node()
Michael Walle [Fri, 15 Oct 2021 13:15:18 +0000 (15:15 +0200)]
test: dm: add test for ofnode_for_each_compatible_node()

Check that all matching nodes have the correct compatible and that there
is at least one match.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agodm: core: add ofnode_for_each_compatible_node()
Michael Walle [Fri, 15 Oct 2021 13:15:17 +0000 (15:15 +0200)]
dm: core: add ofnode_for_each_compatible_node()

Add a helper to iterate over all nodes with a given compatible string.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: sl28: sync dtbs
Michael Walle [Wed, 13 Oct 2021 16:14:27 +0000 (18:14 +0200)]
arm: dts: sl28: sync dtbs

Copy the board device tree files from linux v5.14. On top of the v5.14
dtbs the changes of these two patches are included here which are needed
for u-boot:
  https://lore.kernel.org/linux-devicetree/20210831134013.1625527[email protected]/
  https://lore.kernel.org/linux-devicetree/20210831134013.1625527[email protected]/

At the time of this writing the patches were accepted and will be
included in 5.15.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: sync the fsl-ls1028a.dtsi with linux
Michael Walle [Wed, 13 Oct 2021 16:14:26 +0000 (18:14 +0200)]
arm: dts: ls1028a: sync the fsl-ls1028a.dtsi with linux

Now that everything is prepared, copy the fsl-ls1028a.dtsi from the
linux kernel v5.14.12.

Notable changes:
 - second watchdog added
 - the number of chip selects of the SPI controller is now correct and
   reflects what the hardware offers
 - the LPUARTs have the correct clock parent
 - USB controllers are enabled by default, which was already the case
   before this sync because all board enabled all the USB controller
   nodes. A linux patch to fix this is pending.
 - the eSDHC controller changes from big-endian to little-endian, but
   that property seems to be not used at all.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: disable the PCIe controller by default
Michael Walle [Wed, 13 Oct 2021 16:14:25 +0000 (18:14 +0200)]
arm: dts: ls1028a: disable the PCIe controller by default

Disable the PCIe controllers by default, just like in the linux device
tree. But there is one catch, for linux they are enabled in-place by the
bootloader. Obviously, this doesn't work for the bootloader. Thus we
explicitly enable the controllers in the -u-boot.dtsi files.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: move the PCI I/O window to match
Michael Walle [Wed, 13 Oct 2021 16:14:24 +0000 (18:14 +0200)]
arm: dts: ls1028a: move the PCI I/O window to match

To make the synchronization of the u-boot device tree with the one from
linux easier, move the I/O window to the one which is specified in the
linux device tree. The actual value shouldn't matter as long as it
mapped to the corresponding memory window of the PCIe controller which
is a 32GiB window at 80_0000_0000h (first controller) or 88_0000_0000h
(second controller).

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Hou Zhiqiang <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: remove num-lanes in the PCIe controller nodes
Michael Walle [Wed, 13 Oct 2021 16:14:23 +0000 (18:14 +0200)]
arm: dts: ls1028a: remove num-lanes in the PCIe controller nodes

This property is unused in the layerscape PCIe controller driver and not
present in the linux device tree. Remove it to be similarly.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agopci: layerscape: add official ls1028a binding support
Michael Walle [Wed, 13 Oct 2021 16:14:22 +0000 (18:14 +0200)]
pci: layerscape: add official ls1028a binding support

The official bindind of the PCIe controller of the ls1028a has the
following compatible string:
  compatible = "fsl,ls1028a-pcie";

Additionally, the resource names and count are different. Update the
driver to support this binding and change the entry in the ls1028a
device tree.

Cc: Hou Zhiqiang <[email protected]>
Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Hou Zhiqiang <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agousb: xhci: fsl: add new compatible fsl,ls1028a-dwc3
Michael Walle [Wed, 13 Oct 2021 16:14:21 +0000 (18:14 +0200)]
usb: xhci: fsl: add new compatible fsl,ls1028a-dwc3

The official ls1028a binding of the driver uses the following as
compatibles:
  compatible = "fsl,ls1028a-dwc3", "snps,dwc3";

Change the ls1028a device tree and add this new compatible to the fsl
specific xhci driver, otherwise the generic dwc3 driver will be used
with the compatibles above.

Cc: Bin Meng <[email protected]>
Cc: Marek Vasut <[email protected]>
Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoscsi: ceva: rename the resource name to match the linux kernel one
Michael Walle [Wed, 13 Oct 2021 16:14:20 +0000 (18:14 +0200)]
scsi: ceva: rename the resource name to match the linux kernel one

The driver will look for a named resource "ecc-addr", but this isn't the
official binding. In fact, the official device tree binding
documentation doesn't mention any resource names at all. But it is safe
to assume that it's the linux ones we have to use if we want to be
compatible with the linux device tree. Thus rename "ecc-addr" to
"sata-ecc" and convert all the users in u-boot.

While at it, also rename "sata-base" to "ahci" although its not used at
all.

This change doesn't affect the SATA controller on the ZynqMP.

Cc: Michal Simek <[email protected]>
Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoserial: lpuart: add new compatible fsl, ls1028a-lpuart
Michael Walle [Wed, 13 Oct 2021 16:14:19 +0000 (18:14 +0200)]
serial: lpuart: add new compatible fsl, ls1028a-lpuart

The official ls1028a binding of the driver uses the following as
compatibles:
  compatible = "fsl,ls1028a-lpuart";

Add the missing compatible to the driver and update the device tree.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agospi: fsl_dspi: rename num-cs to spi-num-chipselects
Michael Walle [Wed, 13 Oct 2021 16:14:18 +0000 (18:14 +0200)]
spi: fsl_dspi: rename num-cs to spi-num-chipselects

The official devicetree bindings specifies spi-num-chipselects as the
name. Use it.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agospi: fsl_dspi: add new compatible fsl, ls1021a-v1.0-dspi
Michael Walle [Wed, 13 Oct 2021 16:14:17 +0000 (18:14 +0200)]
spi: fsl_dspi: add new compatible fsl, ls1021a-v1.0-dspi

The official ls1028a binding of the driver uses the following as
compatibles:
  compatible = "fsl,ls1028a-dspi", "fsl,ls1021a-v1.0-dspi";

Add the missing compatible to the driver and update the device tree.
We can use the fallback "fsl,ls1021a-v1.0-dspi", because the endianness
is determined by the little-endian property and not by the compatible
string itself. Further, we won't need and specific details on the DMA
configuration (which is different on the LS1021A). If it's ever needed,
we can later add the more specific "fsl,ls1028a-dspi" compatible to the
driver.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agowatchdog: sp805_wdt: use correct compatible string
Michael Walle [Wed, 13 Oct 2021 16:14:16 +0000 (18:14 +0200)]
watchdog: sp805_wdt: use correct compatible string

According to the linux device tree specification the compatible string
is:
  compatible = "arm,sp805", "arm,primecell";

Fix all users in u-boot.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: update the labels
Michael Walle [Wed, 13 Oct 2021 16:14:15 +0000 (18:14 +0200)]
arm: dts: ls1028a: update the labels

Update the labels of the nodes to match the kernel ones.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Tested-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: move the iRC node and its devices into /soc
Michael Walle [Wed, 13 Oct 2021 16:14:14 +0000 (18:14 +0200)]
arm: dts: ls1028a: move the iRC node and its devices into /soc

While inserting them into the new location, keep them sorted by the
register base offset just like in the linux kernel device tree.

While at it fix the indentation.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: move the watchdog node into /soc
Michael Walle [Wed, 13 Oct 2021 16:14:13 +0000 (18:14 +0200)]
arm: dts: ls1028a: move the watchdog node into /soc

While inserting it into the new location, keep it sorted by the
register base offset just like in the linux kernel device tree.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: move the PCIe controller nodes into /soc
Michael Walle [Wed, 13 Oct 2021 16:14:12 +0000 (18:14 +0200)]
arm: dts: ls1028a: move the PCIe controller nodes into /soc

While inserting them into the new location, keep them sorted by the
register base offset just like in the linux kernel device tree.

While at it fix the indentation.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: move SATA and USB controller nodes into /soc
Michael Walle [Wed, 13 Oct 2021 16:14:11 +0000 (18:14 +0200)]
arm: dts: ls1028a: move SATA and USB controller nodes into /soc

While inserting them into the new location, keep them sorted by the
register base offset just like in the linux kernel device tree.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: move the GPIO controller nodes into /soc
Michael Walle [Wed, 13 Oct 2021 16:14:10 +0000 (18:14 +0200)]
arm: dts: ls1028a: move the GPIO controller nodes into /soc

While inserting them into the new location, keep them sorted by the
register base offset just like in the linux kernel device tree.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: move the low-power UART nodes into /soc
Michael Walle [Wed, 13 Oct 2021 16:14:09 +0000 (18:14 +0200)]
arm: dts: ls1028a: move the low-power UART nodes into /soc

While inserting them into the new location, keep them sorted by the
register base offset just like in the linux kernel device tree.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: move the UART controller nodes into /soc
Michael Walle [Wed, 13 Oct 2021 16:14:08 +0000 (18:14 +0200)]
arm: dts: ls1028a: move the UART controller nodes into /soc

While inserting them into the new location, keep them sorted by the
register base offset just like in the linux kernel device tree.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: move the SPI and eSDHC controller nodes into /soc
Michael Walle [Wed, 13 Oct 2021 16:14:07 +0000 (18:14 +0200)]
arm: dts: ls1028a: move the SPI and eSDHC controller nodes into /soc

While inserting them into the new location, keep them sorted by the
register base offset just like in the linux kernel device tree.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: move the FlexSPI controller node
Michael Walle [Wed, 13 Oct 2021 16:14:06 +0000 (18:14 +0200)]
arm: dts: ls1028a: move the FlexSPI controller node

While inserting it into the new location, keep it sorted by the
register base offset just like in the linux kernel device tree.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: move I2C controller nodes into /soc
Michael Walle [Wed, 13 Oct 2021 16:14:05 +0000 (18:14 +0200)]
arm: dts: ls1028a: move I2C controller nodes into /soc

While inserting them into the new location, keep them sorted by the
register base offset just like in the linux kernel device tree.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: move the clockgen node into /soc
Michael Walle [Wed, 13 Oct 2021 16:14:04 +0000 (18:14 +0200)]
arm: dts: ls1028a: move the clockgen node into /soc

Populate the /soc node with the first device node.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: add an empty /soc
Michael Walle [Wed, 13 Oct 2021 16:14:03 +0000 (18:14 +0200)]
arm: dts: ls1028a: add an empty /soc

To keep the device tree similar to the linux kernel one, we need to move
all CCSR related devices into the /soc node. To keep the patches easy to
review, we initially add an empty /soc node and populate it piece by
piece.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a-{rdb, qds}: remove dm-pre-reloc property
Michael Walle [Wed, 13 Oct 2021 16:14:02 +0000 (18:14 +0200)]
arm: dts: ls1028a-{rdb, qds}: remove dm-pre-reloc property

Nowadays, both boards boot using the TF-A BL1/BL2 and SPL isn't used at
all. The property is not needed, remove it.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1028a: remove /memory node
Michael Walle [Wed, 13 Oct 2021 16:14:01 +0000 (18:14 +0200)]
arm: dts: ls1028a: remove /memory node

This node is some hodgepodge between the ddr controller node at SoC
offset 0x1080000 and some static memory size of 2GiB. Remove this bogus
node because it doesn't seem to be used at all.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Tested-by: Vladimir Oltean <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarmv8: ls1028a: use the official compatible string for the GPU
Michael Walle [Wed, 13 Oct 2021 16:14:00 +0000 (18:14 +0200)]
armv8: ls1028a: use the official compatible string for the GPU

There is no "fsl,ls1028a-gpu" compatible string. It is solely for the
proprietary driver which will never be open source. Lately, linux gained
support for the open source etnaviv driver for the GPU (although there
is still support for the DisplayPort PHY missing to get actual graphics
output). Thus, instead of supporting some proprietary driver, switch
over to the open source one, which also have an official device tree
binding.

Cc: Andy Tang <[email protected]>
Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agodrivers: ddr: lc_common_dimm_params.c : Fix Divison by zero issue
Maninder Singh [Sun, 10 Oct 2021 16:12:16 +0000 (09:12 -0700)]
drivers: ddr: lc_common_dimm_params.c : Fix Divison by zero issue

Adds check for memory clock variable before calculating caslat_actual.

Set mclk_ps to slowest DIMM supported if mclk_ps is found zero.

Signed-off-by: Maninder Singh <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agodrivers: net: fsl-mc: add a command which dumps the MC log
Cosmin-Florin Aluchenesei [Thu, 7 Oct 2021 10:07:44 +0000 (13:07 +0300)]
drivers: net: fsl-mc: add a command which dumps the MC log

Extended fsl_mc command adding an extra option dump_log

Signed-off-by: Cosmin-Florin Aluchenesei <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoppc: mpc8xx: Drop -mstring from PLATFORM_CPPFLAGS
Tom Rini [Mon, 4 Oct 2021 18:01:34 +0000 (14:01 -0400)]
ppc: mpc8xx: Drop -mstring from PLATFORM_CPPFLAGS

This has not been supported by toolchains for some time and has been
putting out a warning.  Drop this.

Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarm: dts: ls1088a: Update qspi node properties
Kuldeep Singh [Fri, 1 Oct 2021 10:54:24 +0000 (16:24 +0530)]
arm: dts: ls1088a: Update qspi node properties

Remove "num-cs" property from device-tree as it is no longer used by
qspi driver anymore.

Also, specify status as "disabled" and enable qspi support in respective
board dts files. This will also help in aligning node properties with
other board properties.

Signed-off-by: Kuldeep Singh <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoboard: sl28: add update image documentation
Michael Walle [Wed, 29 Sep 2021 11:39:13 +0000 (13:39 +0200)]
board: sl28: add update image documentation

Document the update image and how to use the EFI UpdateCapsule.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agodoc: board: kontron: sl28: Reduce section levels and change title
Frieder Schrempf [Wed, 29 Sep 2021 11:39:12 +0000 (13:39 +0200)]
doc: board: kontron: sl28: Reduce section levels and change title

In order to add other Kontron boards to the docs alongside the existing sl28 board,
we need to reduce the levels of the sections and change the title.

Cc: Fabio Estevam <[email protected]>
Signed-off-by: Frieder Schrempf <[email protected]>
Acked-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoboard: sl28: enable EFI UpdateCapsule support
Michael Walle [Tue, 9 Nov 2021 09:18:51 +0000 (14:48 +0530)]
board: sl28: enable EFI UpdateCapsule support

Enable support for update over EFI UpdateCapsule mechanism. This board
doesn't support setting EFI variables after ExitBootservices().
Therefore, we are also enabling EFI_IGNORE_OSINDICATIONS.

Signed-off-by: Michael Walle <[email protected]>
[Rebased]
Signed-off-by: Priyanka Jain <[email protected]>
3 years agoboard: sl28: generate FIT update image
Michael Walle [Wed, 29 Sep 2021 11:39:10 +0000 (13:39 +0200)]
board: sl28: generate FIT update image

Generate a FIT update image during build. The image will be called
"u-boot.update" and can be used to build an EFI UpdateCapsule or during
DFU mode. Although, the latter isn't supported because there is no USB
OTG driver yet.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoboard: sl28: enable EFI_SET_TIME support
Michael Walle [Wed, 29 Sep 2021 11:39:09 +0000 (13:39 +0200)]
board: sl28: enable EFI_SET_TIME support

Allow EFI to actually set the time before ExitBootServices().

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoboard: freescale: lx216x : increase fdt blob size
Wasim Khan [Mon, 20 Sep 2021 13:45:33 +0000 (15:45 +0200)]
board: freescale: lx216x : increase fdt blob size

Increase fdt blob size for lx2160 and lx2162 series
to fix below errors/warnings during device tree fixup.

Unable to update property /soc/spi@2100000:status, err=FDT_ERR_NOSPACE
Unable to update property /soc/spi@2110000:status, err=FDT_ERR_NOSPACE
Unable to update property /soc/spi@2120000:status, err=FDT_ERR_NOSPACE
WARNING: could not set reg FDT_ERR_NOSPACE.
WARNING unable to set iommus: FDT_ERR_NOSPACE

Signed-off-by: Wasim Khan <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoboard: fsl_validate: Fix Double free Issue
Kshitiz Varshney [Sun, 19 Sep 2021 15:09:53 +0000 (17:09 +0200)]
board: fsl_validate: Fix Double free Issue

Remove Double free issue from calc_img_key_hash() and
calc_esbchdr_esbc_hash() function.
Verified the secure boot changes using lx2162aqds board.

Signed-off-by: Kshitiz Varshney <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoconfigs: lx2162a: Enable CONFIG_SPI_FLASH_MT35XU for lx2162a-qds
Kuldeep Singh [Wed, 15 Sep 2021 10:04:12 +0000 (15:34 +0530)]
configs: lx2162a: Enable CONFIG_SPI_FLASH_MT35XU for lx2162a-qds

LX2162A-QDS has micron mt35xu512aba flash which requires flag
CONFIG_SPI_FLASH_MT35XU on to probe flash successfully.

Signed-off-by: Kuldeep Singh <[email protected]>
Reviewed-by: Wasim Khan <[email protected]>
Tested-by: Wasim Khan <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoarmv8: fsl-layerscape: Erratum A010315 needs PCIE support
Alban Bedel [Mon, 6 Sep 2021 14:32:56 +0000 (16:32 +0200)]
armv8: fsl-layerscape: Erratum A010315 needs PCIE support

Disabling PCIE support currently lead to a crash because the code for
erratum A010315 is still run. Add a conditional to only select
CONFIG_SYS_FSL_ERRATUM_A010315 when CONFIG_PCIE_LAYERSCAPE is enabled.

Signed-off-by: Alban Bedel <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agolx2162a : Rename emmc boot command variable
Meenakshi Aggarwal [Thu, 26 Aug 2021 10:39:24 +0000 (16:09 +0530)]
lx2162a : Rename emmc boot command variable

Rename emmc_bootcmd environment variable to sd2_bootcmd
to fix emmc boot on lx2162aqds board.

Signed-off-by: Meenakshi Aggarwal <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoboard: freescale: t104xrdb: Set popts->cpo_sample to 0x54 for DDR3
Priyanka Singh [Thu, 19 Aug 2021 07:07:31 +0000 (12:37 +0530)]
board: freescale: t104xrdb: Set popts->cpo_sample to 0x54 for DDR3

Set popts->cpo_sample to 0x54 in t104xrdb/ddr.c to optimize cpo

Signed-off-by: Priyanka Singh <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agodrivers: ddr: main.c: Fix Bad Shift operator issue
Priyanka Singh [Thu, 19 Aug 2021 06:09:03 +0000 (11:39 +0530)]
drivers: ddr: main.c: Fix Bad Shift operator issue

Fix Bad Shift operator issue in step_to_string function
by adding an if check

Signed-off-by: Priyanka Singh <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agodrivers: ddr: fsl_ddr_gen4.c: Fix divide by zero issue
Priyanka Singh [Thu, 19 Aug 2021 06:09:02 +0000 (11:39 +0530)]
drivers: ddr: fsl_ddr_gen4.c: Fix divide by zero issue

Fix possible divide by zero issue in fsl_ddr_set_memctl_regs
by adding an if check

Signed-off-by: Priyanka Singh <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agodrivers: ddr: util.c: Fix divide by zero issue
Priyanka Singh [Thu, 19 Aug 2021 06:09:01 +0000 (11:39 +0530)]
drivers: ddr: util.c: Fix divide by zero issue

Fix possible divide by zero issue in get_memory_clk_period_ps
by adding a check

Signed-off-by: Priyanka Singh <[email protected]>
Reviewed-by: Priyanka Jain <[email protected]>
3 years agoexynos: mmu: use CONFIG_IS_ENABLED
Minkyu Kang [Thu, 4 Nov 2021 07:13:17 +0000 (16:13 +0900)]
exynos: mmu: use CONFIG_IS_ENABLED

to fix following checkpatch warnings.
Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where
possible

Signed-off-by: Minkyu Kang <[email protected]>
Cc: Dzmitry Sankouski <[email protected]>
Reviewed-by: Jaehoon Chung <[email protected]>
3 years agoexynos78x0: pinctrl: set const to structs
Minkyu Kang [Thu, 4 Nov 2021 07:13:15 +0000 (16:13 +0900)]
exynos78x0: pinctrl: set const to structs

to fix following checkpatch warings.
WARNING: struct  should normally be const

Signed-off-by: Minkyu Kang <[email protected]>
Cc: Dzmitry Sankouski <[email protected]>
Reviewed-by: Jaehoon Chung <[email protected]>
3 years agoexynos: pwm: Deal with a PWM at 100%
Simon Glass [Wed, 3 Nov 2021 19:21:33 +0000 (13:21 -0600)]
exynos: pwm: Deal with a PWM at 100%

At present the counter never hits the comparitor in this case. Add a
special case.

This ensures that the snow backlight works when at full brightness.

Fixes: 76c2ff3e5fd video: backlight: fix pwm's duty cycle calculation
Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Minkyu Kang <[email protected]>
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Tue, 9 Nov 2021 02:44:02 +0000 (21:44 -0500)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

3 years agoFix syntax error
Leo Yu-Chi Liang [Wed, 27 Oct 2021 09:00:41 +0000 (17:00 +0800)]
Fix syntax error

This statement has an unmatched parentheses, fix it.

Signed-off-by: Leo Yu-Chi Liang <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
3 years agoriscv: ae350: Use #if defined instead of CONFIG_IS_ENABLED
Leo Yu-Chi Liang [Mon, 1 Nov 2021 09:00:43 +0000 (17:00 +0800)]
riscv: ae350: Use #if defined instead of CONFIG_IS_ENABLED

According to ./include/linux/kconfig.h,
CONFIG_IS_ENABLED(OF_BOARD) expands to 0
when CONFIG_SPL_BUILD is defined because
there is no CONFIG_SPL_OF_BOARD.

Use #if defined instead.

Fixes: 2e8d2f88439d ("riscv: Remove OF_PRIOR_STAGE from RISC-V boards")
Signed-off-by: Leo Yu-Chi Liang <[email protected]>
Reviewed-by: Rick Chen <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
3 years agoriscv: add #define in asm/io.h for some device drivers
Wei Fu [Sat, 23 Oct 2021 16:31:12 +0000 (00:31 +0800)]
riscv: add #define in asm/io.h for some device drivers

This patch adds memcpy_fromio and memcpy_toio definitions for some device
drivers which have these definitions, like cadence_qspi_apb.c

Signed-off-by: Wei Fu <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
3 years agocmd: sbi: show SBI implementation version
Heinrich Schuchardt [Mon, 25 Oct 2021 13:09:35 +0000 (15:09 +0200)]
cmd: sbi: show SBI implementation version

Let the sbi command show the SBI implementation version

Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Leo Yu-Chi Liang <[email protected]>
Reviewed-by: Rick Chen <[email protected]>
3 years agoriscv: function to retrieve SBI implementation version
Heinrich Schuchardt [Mon, 25 Oct 2021 13:09:34 +0000 (15:09 +0200)]
riscv: function to retrieve SBI implementation version

Provide function sbi_get_impl_version() to retrieve the SBI implementation
version.

Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Leo Yu-Chi Liang <[email protected]>
Reviewed-by: Rick Chen <[email protected]>
3 years agoMerge tag 'efi-2022-01-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Mon, 8 Nov 2021 04:00:29 +0000 (23:00 -0500)]
Merge tag 'efi-2022-01-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2022-01-rc2

Documentation:
* improve description of mmc rescan
* remove obsolete PPC documenation

UEFI
* Provide unit test for the EFI_TCG2_PROTOCOL
* Implement add EFI_TCG2_PROTOCOL.SubmitCommand
* Start the implementation of a 64 bit EFI app
* Reduce rcar3_salvator-x image size

3 years agodfu: newline after updating
Heinrich Schuchardt [Fri, 5 Mar 2021 17:36:37 +0000 (18:36 +0100)]
dfu: newline after updating

Currently output of dfu commands ends on a line with leading hash signs
('#'). The succeeding output should be placed on a new line.

After writing updates via dfu print a new line.

Signed-off-by: Heinrich Schuchardt <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
3 years agoARM: renesas: reduce rcar3_salvator-x image size
Heinrich Schuchardt [Sat, 14 Aug 2021 19:07:47 +0000 (21:07 +0200)]
ARM: renesas: reduce rcar3_salvator-x image size

rcar3_salvator-x u-boot.img is very close to the 0x100000 size limit.

Disable support for Unicode capitalization.

Signed-off-by: Heinrich Schuchardt <[email protected]>
3 years agoefi_selftest: add selftest for EFI_TCG2_PROTOCOL and Measured Boot
Masahisa Kojima [Thu, 4 Nov 2021 10:45:46 +0000 (19:45 +0900)]
efi_selftest: add selftest for EFI_TCG2_PROTOCOL and Measured Boot

This commit adds the missing EFI_TCG2_PROTOCOL selftest
and Measured Boot selftest in lib/efi_selftest.

This selftest includes PE/COFF image measurement test, some PCR values are
different in each architecture. With that, this commit also adds pre-built
versions of lib/efi_selftest/efi_miniapp_file_image_exit.c for PE/COFF
image measurement test for 32-bit arm, arm64, ia32, x86_64, riscv32 and
riscv64. Prebuilding avoids the problem of reproducible builds.

Signed-off-by: Masahisa Kojima <[email protected]>
Make the test 'onrequest'.
Add code comments to the includes with the binaries.
Reviewed-by: Heinrich Schuchardt <[email protected]>
3 years agoefi: Add video support to the app
Simon Glass [Thu, 4 Nov 2021 03:09:10 +0000 (21:09 -0600)]
efi: Add video support to the app

The current EFI video driver only works when running in the stub. In that
case the stub calls boot services (before jumping to U-Boot proper) and
copies the graphics info over to the efi table. This is necessary because
the stub exits boot services before jumping to U-Boot.

The app maintains access to boot services throughout its life, so does not
need to do this. Update the driver to support calling boot services
directly.

Enable video output for the app. Note that this uses the
EFI_GRAPHICS_OUTPUT_PROTOCOL protocol, even though it mentions vesa.

A sample qemu command-line for this case is:

   qemu-system-x86_64 -bios /usr/share/edk2.git/ovmf-ia32/OVMF-pure-efi.fd
   -drive id=disk,file=try.img,if=none,format=raw -nic none
   -device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
3 years agoefi: Add a way to obtain boot services in the app
Simon Glass [Thu, 4 Nov 2021 03:09:09 +0000 (21:09 -0600)]
efi: Add a way to obtain boot services in the app

Add a function to return this information along with a stub for the
efi_info_get() function, since calling it otherwise hangs U-Boot.

Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
3 years agox86: Don't duplicate global_ptr in 64-bit EFI app
Simon Glass [Thu, 4 Nov 2021 03:09:08 +0000 (21:09 -0600)]
x86: Don't duplicate global_ptr in 64-bit EFI app

This variable is already defined by the EFI code. Drop the duplicate
definition when building a 64-bit EFI app.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
3 years agoefi: Create a 64-bit app
Simon Glass [Thu, 4 Nov 2021 03:09:07 +0000 (21:09 -0600)]
efi: Create a 64-bit app

Most modern platforms use 64-bit EFI so it is useful to have a U-Boot app
that runs under that. Add a (non-functional) build for this.

Note that --whole-archive causes the gcc 9.2 linker to crash, so disable
this for now. Once this is resolved, things should work.

For now, avoid mentioning the documentation for the 64-bit app, since it
does not work.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
3 years agox86: Create a 32/64-bit selection for the app
Simon Glass [Thu, 4 Nov 2021 03:09:06 +0000 (21:09 -0600)]
x86: Create a 32/64-bit selection for the app

Most EFI implementations use 64-bit but U-Boot only supports running as
a 32-bit app at present. While efi-x86_payload64 does boot from 64-bit
UEFI it immediately changes back to 32-bit before starting U-Boot.

In order to support a 64-bit U-Boot app, update the Kconfig to add an
option for 32/64 bit. Update the prompt for the existing option so it is
clear it relates to the stub. Move both up to just under the choice that
controls them, since this looks better and the menu.

Use CONFIG_EFI_APP in the Makefile instead of CONFIG_TARGET_EFI_APP,
since the latter is specific to a single target and we will have two.

Memory size is set to 32MB for now so that it can run on qemu without
increasing the default memory size. We may need to increase the default
later.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
3 years agoefi: Drop the OF_EMBED warning for EFI
Simon Glass [Thu, 4 Nov 2021 03:09:05 +0000 (21:09 -0600)]
efi: Drop the OF_EMBED warning for EFI

For the EFI app, we must embed the devicetree in the ELF file since that
is the only thing that is run by UEFI. Drop the warning to avoid
confusion.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
3 years agoefi: Enable DM_ETH for the app
Simon Glass [Thu, 4 Nov 2021 03:09:04 +0000 (21:09 -0600)]
efi: Enable DM_ETH for the app

There is no need to avoid driver model for networking. Drop this.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
3 years agoefi: Add a script to build an image for testing on UEFI
Simon Glass [Thu, 4 Nov 2021 03:09:03 +0000 (21:09 -0600)]
efi: Add a script to build an image for testing on UEFI

It is quite complicated to run U-Boot on QEMU since we have four
different builds and they must use different versions of qemu and the
UEFI binaries.

Add a script to help. It requires U-Boot itself to be built. Once that
is done you can use this script to build an image for use with qemu and
optionally run it.

Signed-off-by: Simon Glass <[email protected]>
3 years agoefi_loader: add EFI_TCG2_PROTOCOL.SubmitCommand
Masahisa Kojima [Thu, 4 Nov 2021 13:59:16 +0000 (22:59 +0900)]
efi_loader: add EFI_TCG2_PROTOCOL.SubmitCommand

This commit adds the EFI_TCG2_PROTOCOL.SubmitCommand
required in the TCG PC Client PFP spec.
SubmitCommand enables to send the raw command to the TPM device.

To implement this api, tpm2_submit_command() is added
into tpm-v2.c.

Signed-off-by: Masahisa Kojima <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
3 years agoefi_loader: use byteshift unaligned access helper
Masahisa Kojima [Wed, 3 Nov 2021 02:04:09 +0000 (11:04 +0900)]
efi_loader: use byteshift unaligned access helper

Calling unaligned/access-ok.h version of put_unaligned_le64()
causes data abort in arm 32-bit QEMU.

The similar issue also occurs in linux kernel,
unaligned/access-ok.h is no longer used in linux kernel[1].

This commit uses the unaligned/be_byteshift.h and
unaligned/le_byteshift.h helper instead of unaligned/access-ok.h.

[1]https://lore.kernel.org/all/20210507220813[email protected]/

Signed-off-by: Masahisa Kojima <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
3 years agoefi_loader: capsule: drop __weak from efi_get_public_key_data()
AKASHI Takahiro [Tue, 2 Nov 2021 00:55:01 +0000 (09:55 +0900)]
efi_loader: capsule: drop __weak from efi_get_public_key_data()

As we discussed in ML, currently a device tree is the only place
to store public keys for capsule authentication. So __weak is not
necessary for now.

Signed-off-by: AKASHI Takahiro <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
This page took 0.09284 seconds and 4 git commands to generate.