oweals/u-boot.git
5 years agoARM: uniphier: set loadaddr at boot-time
Masahiro Yamada [Wed, 10 Jul 2019 11:07:48 +0000 (20:07 +0900)]
ARM: uniphier: set loadaddr at boot-time

The base of DRAM will be changed for the next generation SoC.
To support it along with existing SoCs in the single defconfig,
set 'loadaddr' at boot-time by adding the offset to the DRAM base.

CONFIG_SYS_LOAD_ADDR is still hard-coded for compilation, but the
value from environment variable 'loadaddr' should be used.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: turn uniphier_set_fdt_file() into void function
Masahiro Yamada [Wed, 10 Jul 2019 11:07:47 +0000 (20:07 +0900)]
ARM: uniphier: turn uniphier_set_fdt_file() into void function

For consistency with a function that will be added.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: remove CONFIG_SYS_SDRAM_BASE
Masahiro Yamada [Wed, 10 Jul 2019 11:07:46 +0000 (20:07 +0900)]
ARM: uniphier: remove CONFIG_SYS_SDRAM_BASE

The base address of DRAM was 0x80000000 for all the ARM SoCs of this
family in the past. It will be changed to 0x20000000 for a planned new
SoC. To support multiple SoCs by the single uniphier_v8_defconfig, the
base must be run-time determined.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: make mem_map run-time configurable
Masahiro Yamada [Wed, 10 Jul 2019 11:07:45 +0000 (20:07 +0900)]
ARM: uniphier: make mem_map run-time configurable

Currently, mem_map is hard-coded, and it worked well until the last
SoC. For a planned new SoC, the addresses of peripherals and DRAM
will be changed. Set it up run-time.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: make dram_init() more generic
Masahiro Yamada [Wed, 10 Jul 2019 11:07:44 +0000 (20:07 +0900)]
ARM: uniphier: make dram_init() more generic

Make this function work with any channel being empty.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: make dram_init() independent of SG_MEMCONF
Masahiro Yamada [Wed, 10 Jul 2019 11:07:43 +0000 (20:07 +0900)]
ARM: uniphier: make dram_init() independent of SG_MEMCONF

Currently, dram_init() code relies on the fact the DRAM size
configuration exists in the SG_MEMCONF register.

This will no longer be true for a planned new SoC, which will
replace SG_MEMCONF with a different register.

Refactor the hook in a more generic way.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: detect register base addresses run-time
Masahiro Yamada [Wed, 10 Jul 2019 11:07:42 +0000 (20:07 +0900)]
ARM: uniphier: detect register base addresses run-time

Until the last SoC, the register addresses have been hard-coded because
they are always constant. For a planned new SoC, the register bases
will be completely changed. I insist on supporting multiple SoCs/boards
by a single defconfig (uniphier_v8_defconfig) since duplicating similar
defconfig files is a maintenance burden. The base addresses must be
fixed-up at run-time somehow.

Previously, the board init code identified the SoC by reading out the
SG_REVISION register. This is much easier than parsing DT.

You cannot do it any more because the base address of SG will be
changed. The SG_REVISION register exists to read out the SoC ID, but
you never know its address before identifying the SoC. Oh well.

So, the possible solution is to parse the DT, and find out the node
with "*-soc-glue" compatible string. Then, sg_base is set to the value
of the "reg" property. The sc_base is set up likewise.

It is worth noting a pit-fall. Having sc_base and sg_base in the global
scope will make the life easier, but the global variables are poorly
supported before the relocation. In fact, the .bss section overwraps
with DT. Allocating them in the .bss section would break DT. So, I gave
dummy initializers to assign them in the .data section.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: de-couple SC macros into base address and offset
Masahiro Yamada [Wed, 10 Jul 2019 11:07:41 +0000 (20:07 +0900)]
ARM: uniphier: de-couple SC macros into base address and offset

The SC_* macros represent the address of SysCtrl registers.
For a planned new SoC, its base address will be changed.

Turn the SC_* macros into the offset from the base address.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: de-couple SG macros into base address and offset
Masahiro Yamada [Wed, 10 Jul 2019 11:07:40 +0000 (20:07 +0900)]
ARM: uniphier: de-couple SG macros into base address and offset

The SG_* macros represent the address of SoC-glue registers.
For a planned new SoC, its base address will be changed.

Turn the SG_* macros into the offset from the base address.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: detect SD boot mode
Masahiro Yamada [Wed, 10 Jul 2019 11:07:39 +0000 (20:07 +0900)]
ARM: uniphier: detect SD boot mode

The planned new SoC supports the SD boot mode. Detect and display it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: make boot_is_swapped() code optional
Masahiro Yamada [Wed, 10 Jul 2019 11:07:38 +0000 (20:07 +0900)]
ARM: uniphier: make boot_is_swapped() code optional

The planned new SoC does not have SBC (System Bus Controller) block.
Make boot_is_swapped() an optional hook.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: check DT to determine whether to initialize SBC
Masahiro Yamada [Wed, 10 Jul 2019 11:07:37 +0000 (20:07 +0900)]
ARM: uniphier: check DT to determine whether to initialize SBC

If CONFIG_MICRO_SUPPORT_CARD is enabled, U-Boot initialize SBC
(System Bus Controller), which may not be really necessary.

Check the "socionext,uniphier-system-bus" node in DT run-time.
If and only if it is found and its "status" property is okay,
initialize the SBC block.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: check DT to determine whether to use support card
Masahiro Yamada [Wed, 10 Jul 2019 11:07:36 +0000 (20:07 +0900)]
ARM: uniphier: check DT to determine whether to use support card

If CONFIG_MICRO_SUPPORT_CARD is enabled, U-Boot tries to get access
to the devices on the support card, which may not actually exist.

Check the DT and search for the on-board devices run-time. If the
nodes are not found in DT, then disable the code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoclk: uniphier: add EMMC clock for LD11, LD20, and PXs3
Masahiro Yamada [Wed, 10 Jul 2019 11:07:35 +0000 (20:07 +0900)]
clk: uniphier: add EMMC clock for LD11, LD20, and PXs3

I also added comments for NAND clocks.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: include <linux/io.h> from boot-device.c
Masahiro Yamada [Wed, 10 Jul 2019 11:07:34 +0000 (20:07 +0900)]
ARM: uniphier: include <linux/io.h> from boot-device.c

This file calls readl(), so needs to include <linux/io.h>.
Currently, it relies on someone else including it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: use bool type for have_internal_stm parameter
Masahiro Yamada [Wed, 10 Jul 2019 11:07:33 +0000 (20:07 +0900)]
ARM: uniphier: use bool type for have_internal_stm parameter

This is boolean logic.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: clean up clk/Makefile
Masahiro Yamada [Wed, 10 Jul 2019 11:07:32 +0000 (20:07 +0900)]
ARM: uniphier: clean up clk/Makefile

Now that 64-bit SoCs of this SoC family no longer support SPL,
this Makefile can be slightly simpler.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: remove unused uniphier_ld11_boot_device_fixup()
Masahiro Yamada [Wed, 10 Jul 2019 11:07:31 +0000 (20:07 +0900)]
ARM: uniphier: remove unused uniphier_ld11_boot_device_fixup()

The .boot_device_fixup() is only called by SPL.

Now that 64-bit SoCs of this SoC family no longer support SPL,
debug-uart-ld20.c is never compiled.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: remove empty #ifdef block
Masahiro Yamada [Wed, 10 Jul 2019 11:07:30 +0000 (20:07 +0900)]
ARM: uniphier: remove empty #ifdef block

This is a remnant of commit f89d6133eef2 ("configs: move
CONFIG_SPL_TEXT_BASE to Kconfig").

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoarm64: dts: uniphier: add reserved-memory for secure memory
Masahiro Yamada [Wed, 10 Jul 2019 11:07:29 +0000 (20:07 +0900)]
arm64: dts: uniphier: add reserved-memory for secure memory

[ Linux commit aa38571246c6ac279ebebd141157297bcb959d76 ]

The memory regions specified by /memreserve/ are passed to
early_init_dt_reserve_memory_arch() with nomap=false, so it is
not suitable for reserving memory for Trusted Firmware-A etc.

Use the more robust /reserved-memory node with the no-map property
to prevent the kernel from mapping it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agospi: Add SPI controller driver for UniPhier SoCs
Kunihiko Hayashi [Fri, 5 Jul 2019 01:03:18 +0000 (10:03 +0900)]
spi: Add SPI controller driver for UniPhier SoCs

Add SPI controller driver implemented in Socionext UniPhier SoCs.
This controller has the SPI master mode only.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
5 years agoARM: uniphier_v8_defconfig: make 64bit SoC image position independent
Masahiro Yamada [Wed, 26 Jun 2019 04:51:47 +0000 (13:51 +0900)]
ARM: uniphier_v8_defconfig: make 64bit SoC image position independent

For a planned new SoC in this SoC family, the base address of the
DRAM will be changed from 0x80000000 to 0x20000000.

The PIE support will be useful to maintain multiple similar SoCs
whose DRAM addresses differ.

Now CONFIG_SYS_TEXT_BASE is not important. I just set it to 0
to ensure CONFIG_POSITION_INDEPENDENT is working.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoarm64: add an option to switch visibility of CONFIG_SYS_INIT_SP_BSS_OFFSET
Masahiro Yamada [Wed, 26 Jun 2019 04:51:46 +0000 (13:51 +0900)]
arm64: add an option to switch visibility of CONFIG_SYS_INIT_SP_BSS_OFFSET

By default, CONFIG_SYS_INIT_SP_BSS_OFFSET was made invisible by not
giving a prompt to it.

The only way to define it is to hard-code an extra entry in SoC/board
Kconfig, like arch/arm/mach-tegra/tegra{186,210}/Kconfig.

Add a prompt to it in order to allow defconfig files to specify the
value of CONFIG_SYS_INIT_SP_BSS_OFFSET.

With this, CONFIG_SYS_INIT_SP_BSS_OFFSET would become always visible.
So, we need a new bool option to turn it off by default.

I move the 'default 524288' to the common place. This value is not too
big, but is big enough to avoid the overwrap of DT in most platforms.
If 512KB is not a suitable choice for your platform, you can change it
from your defconfig or menuconfig etc.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
5 years agoMerge tag 'u-boot-atmel-2019.10-a' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Tue, 9 Jul 2019 12:16:50 +0000 (08:16 -0400)]
Merge tag 'u-boot-atmel-2019.10-a' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmel

First set of u-boot-atmel features and fixes for 2019.10 cycle

This includes the Atmel QSPI driver and support for the at91 boards.
This is the port of the driver from Linux, mostly done by Tudor Ambarus.

5 years agoconfigs: sama5d2_xplained: add support QSPI flash boot
Eugen Hristev [Tue, 18 Jun 2019 08:52:11 +0000 (08:52 +0000)]
configs: sama5d2_xplained: add support QSPI flash boot

The spi-nor flash resides on spi bus 1. Update the CONFIG_ENV_SPI_CS
and CONFIG_BOOTCOMMAND accordingly.

Based on original work by Wenyou Yang.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
[tudor.ambarus@microchip.com: amend the commit message.]
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
5 years agoconfigs: sama5d27_som1_ek: qspi: use common memory layout
Tudor Ambarus [Tue, 18 Jun 2019 08:52:09 +0000 (08:52 +0000)]
configs: sama5d27_som1_ek: qspi: use common memory layout

Use the qspi memory layout defined in at91-sama5_common - it aligns
with the 8 Mbyte flash (sst26vf064b-104i/sn) available in sama5d27_som1_ek.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
5 years agoconfigs: sama5d27_som1_ek: add qspiflash_defconfig
Tudor Ambarus [Tue, 18 Jun 2019 08:52:06 +0000 (08:52 +0000)]
configs: sama5d27_som1_ek: add qspiflash_defconfig

Add the default config file of QSPI media. The config is based on
sama5d27_som1_ek_mmc_defconfig.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoconfigs: sama5d2_xplained: add qspiflash_defconfig
Tudor Ambarus [Tue, 18 Jun 2019 08:52:03 +0000 (08:52 +0000)]
configs: sama5d2_xplained: add qspiflash_defconfig

Add the default config file of QSPI media. The config is based on
sama5d2_xplained_mmc_defconfig.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoARM: at91: sama5: add common environment for QSPI
Cyrille Pitchen [Tue, 18 Jun 2019 08:52:01 +0000 (08:52 +0000)]
ARM: at91: sama5: add common environment for QSPI

Use the same memory layout as we use for the NAND boot on the other boards.

QSPI flashes are present on the following boards:
sama5d2_xplained RevB:  32 Mbyte flash (mx25l3273fm2i-08g)
sama5d2_xplained RevC:   8 Mbyte flash (sst26vf064b-104i/sn)
sama5d27_som1_ek:        8 Mbyte flash (sst26vf064b-104i/sn)
sama5d2_ptc_ek:          8 Mbyte flash (sst26vf064b-104i/sn)

The 8 Mbyte limit is enough to cope with the memory layout used in the NAND
boot. rootfs exceeds the 8 Mbyte limit and will stay in eMMC in the
sama5d2_xplained case. The final scope is to use a single memory layout for
all boot medias.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@microchip.com>
[tudor.ambarus@microchip.com: change memory layout, add commit message]
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
5 years agoARM: dts: at91: sama5d2_xplained: fix QSPI0 node
Cyrille Pitchen [Tue, 18 Jun 2019 08:51:58 +0000 (08:51 +0000)]
ARM: dts: at91: sama5d2_xplained: fix QSPI0 node

Fix the following:
- use "jedec,spi-nor" binding, we use jedec compatible flashes
- set bus width to 4, we use quad capable flashes
- differentiate bewteen data and clk and cs pins
- drop partions as we don't use them in u-boot.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@microchip.com>
[tudor.ambarus@microchip.com: use "jedec,spi-nor", edit commit message]
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
5 years agoconfigs: sama5d27_som1_ek: enable qspi controller and flashes
Tudor Ambarus [Tue, 18 Jun 2019 08:51:55 +0000 (08:51 +0000)]
configs: sama5d27_som1_ek: enable qspi controller and flashes

We use a sst spi-nor flash memory on sama5d27_som1_ek. Select
the others for testing purposes.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoconfigs: sama5d2_xplained: enable qspi controller and flashes
Tudor Ambarus [Tue, 18 Jun 2019 08:51:53 +0000 (08:51 +0000)]
configs: sama5d2_xplained: enable qspi controller and flashes

We have a macronix spi-nor flash on sama5d2_xplained RevB and
a sst spi-nor flash on RevC. Select the rest for testing purposes.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: Add Atmel QuadSPI driver
Tudor Ambarus [Tue, 18 Jun 2019 08:51:50 +0000 (08:51 +0000)]
spi: Add Atmel QuadSPI driver

Backport the driver from linux v5.1-rc5 and adapt it for u-boot.
Tested on sama5d2_xplained Rev B with mx25l25635e spi-nor flash.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoMerge tag 'efi-2019-10-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Mon, 8 Jul 2019 20:02:51 +0000 (16:02 -0400)]
Merge tag 'efi-2019-10-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

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

Fix a possible overflow for GUID partition tables.

For some runtime services we only have implementations valid at boottime.
So we replace them when leaving boottime. Move this from
SetVirtualAddressMap() to ExitBootServices() as SetVirtualAddressMap() is
not called by all operating systems. Adjust the Python tests accordingly.

Bump the supported UEFI specification version to 2.8.

5 years agoMerge tag 'u-boot-amlogic-20190704' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Mon, 8 Jul 2019 20:02:19 +0000 (16:02 -0400)]
Merge tag 'u-boot-amlogic-20190704' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic

- fix khadas-vim README
- add support for unique generated MAC adresses from SoC serial,
  limited to Amlogic GXL/GXM boards for now

5 years agoMerge tag 'mmc-6-23' of https://github.com/MrVan/u-boot
Tom Rini [Mon, 8 Jul 2019 19:49:50 +0000 (15:49 -0400)]
Merge tag 'mmc-6-23' of https://github.com/MrVan/u-boot

- Pull in the series to split fsl_esdhc for i.MX/non-i.MX cleanly

5 years agoPrepare v2019.07 v2019.07
Tom Rini [Mon, 8 Jul 2019 19:23:28 +0000 (15:23 -0400)]
Prepare v2019.07

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge tag 'mips-fixes-for-2019.07' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Mon, 8 Jul 2019 11:29:33 +0000 (07:29 -0400)]
Merge tag 'mips-fixes-for-2019.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-mips

- mtmips: network stability fixes for gardena-smart-gateway

5 years agoarm: mediatek: remove arch_misc_init
Weijie Gao [Thu, 16 May 2019 09:19:50 +0000 (17:19 +0800)]
arm: mediatek: remove arch_misc_init

The watchdog of mediatek chips is enabled by bootrom before u-boot is
running. Previously we choose to enable the wdt driver only to disable the
watchdog hardware.

Now wdt service is enabled by default. The function arch_misc_init which is
only used to disable wdt is no longer needed.

Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 years agoboard_r: move initr_watchdog to be called after initr_serial
Weijie Gao [Thu, 16 May 2019 09:19:13 +0000 (17:19 +0800)]
board_r: move initr_watchdog to be called after initr_serial

The initr_watchdog is currently placed before initr_serial. The
initr_watchdog calls printf and printf finally calls ops->putc of a serial
driver.

However, gd->cur_serial_dev points to a udevice allocated in board_f. The
gd->cur_serial_dev->driver->ops->putc points the the code region before
relocation.

Some serial drivers call WATCHDOG_RESET() in ops->putc. When DM is enabled
for watchdog, watchdog_reset() is called. watchdog_reset() calls get_timer
to get current timer.

On some platforms the timer driver is also a DM driver. initr_watchdog is
placed right after initr_dm, which means the timer driver hasn't been
initialized. So dm_timer_init() is called. To create a new udevice, calloc
is called.

However start from ops->putc, u-boot execution flow is redirected into the
memory region before relocation (board_f). In board_f, dlmalloc hasn't
been initialized. The call to calloc will fail, and this will cause DM to
print out an error message, and it will call printf again, causing
recursive error outputs.

This patch places initr_watchdog after initr_serial to solve this issue.

Cc: Stefan Roese <sr@denx.de>
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
Tested-by: Suniel Mahesh <sunil.m@techveda.org>
5 years agoMerge tag 'dm-pull-7jul19' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Sun, 7 Jul 2019 20:17:56 +0000 (16:17 -0400)]
Merge tag 'dm-pull-7jul19' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

Fix booting for wandboard

5 years agoMerge tag 'video-for-2019.07' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Sun, 7 Jul 2019 20:17:13 +0000 (16:17 -0400)]
Merge tag 'video-for-2019.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

- fix pwm backlight

5 years agoimx6: wandboard: allow booting from MMC 2
Heinrich Schuchardt [Sun, 23 Jun 2019 07:49:43 +0000 (09:49 +0200)]
imx6: wandboard: allow booting from MMC 2

One of the SD-CARD slots on the Wandboard Quad B1 is MMC 2. Enable it as a
boot device.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Sun, 7 Jul 2019 11:06:03 +0000 (07:06 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usb

- DWC and i.MX6 fixes

5 years agoMerge tag 'rockchip-for-v2019.07-rc5-3' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Sun, 7 Jul 2019 11:05:47 +0000 (07:05 -0400)]
Merge tag 'rockchip-for-v2019.07-rc5-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip

5 years agovideo: backlight: fix pwm inversion
Marc Dietrich [Tue, 2 Jul 2019 20:08:33 +0000 (22:08 +0200)]
video: backlight: fix pwm inversion

set_pwm() will always fail with -ENOSYS if pwm_ops set_invert() is
not implemented, leaving the backlight dark. Fix this by returning
no error if set_invert() is not implemented and no polarity change
is requested.

Fixes: 57e7775413 ("video: backlight: Parse PWM polarity cell")
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoefi_loader: detach runtime in ExitBootServices()
Heinrich Schuchardt [Fri, 5 Jul 2019 15:42:16 +0000 (17:42 +0200)]
efi_loader: detach runtime in ExitBootServices()

Linux can be called with a command line parameter efi=novamap, cf.
commit 4e46c2a95621 ("efi/arm/arm64: Allow SetVirtualAddressMap() to be
omitted"). In this case SetVirtualAddressMap() is not called after
ExitBootServices().

OpenBSD 32bit does not call SetVirtualAddressMap() either.

Runtime services must be set to an implementation supported at runtime
in ExitBootServices().

Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Suggested-by: Alexander Graf <agraf@csgraf.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: simplify detaching
Heinrich Schuchardt [Fri, 5 Jul 2019 16:12:21 +0000 (18:12 +0200)]
efi_loader: simplify detaching

We do not need any array typed detach list. Let's simply update the
pointers directly.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: decision on EFI_RT_SUPPORTED_RESET_SYSTEM
Heinrich Schuchardt [Fri, 5 Jul 2019 16:12:16 +0000 (18:12 +0200)]
efi_loader: decision on EFI_RT_SUPPORTED_RESET_SYSTEM

Move the logic determining which board supports reset at runtime to Kconfig.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agotest/py: not all boards support UEFI runtime reset
Heinrich Schuchardt [Fri, 5 Jul 2019 16:16:51 +0000 (18:16 +0200)]
test/py: not all boards support UEFI runtime reset

As not all boards support resets at runtime do not test for it in the
Python tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: bump UEFI specification number to 2.8
Heinrich Schuchardt [Fri, 28 Jun 2019 17:31:55 +0000 (19:31 +0200)]
efi_loader: bump UEFI specification number to 2.8

We are implementing UEFI variable RuntimeServicesSupported and set the
unimplemented runtime functions return EFI_UNSUPPORTED as described in UEFI
specification 2.8. So let's also advertise this specification version in
our system table.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Alexander Graf <agraf@csgraf.de>
5 years agoefi_loader: split off detaching SetVirtualAddress()
Heinrich Schuchardt [Sat, 29 Jun 2019 01:32:52 +0000 (03:32 +0200)]
efi_loader: split off detaching SetVirtualAddress()

The runtime services SetVirtualAddress() and ConvertPointer() become
unavailable after SetVirtualAddress(). Other runtime services become
unavailable after ExitBootServices.

Move the update of SetVirtualAddress() and ConvertPointer() to
efi_relocate_runtime_table().

Use functions with the correct signature when detaching.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_selftest: test variable services at runtime
Heinrich Schuchardt [Thu, 20 Jun 2019 14:18:48 +0000 (16:18 +0200)]
efi_selftest: test variable services at runtime

Provide a unit test for the variable services at runtime.

Currently we expect EFI_UNSUPPORTED to be returned as the runtime
implementation is still missing.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: unimplemented runtime services
Heinrich Schuchardt [Thu, 20 Jun 2019 13:40:49 +0000 (15:40 +0200)]
efi_loader: unimplemented runtime services

Unimplemented runtime services should always return EFI_UNSUPPORTED as
described in the UEFI 2.8 spec.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: let the variable driver patch out the runtime
Heinrich Schuchardt [Thu, 20 Jun 2019 13:25:48 +0000 (15:25 +0200)]
efi_loader: let the variable driver patch out the runtime

Our variable services are only provided at boottime. Therefore when
leaving boottime the variable function are replaced by dummy functions
returning EFI_UNSUPPORTED. Move this patching of the runtime table to the
variable services implementation. Executed it in ExitBootServices().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: clean up runtime detaching
Heinrich Schuchardt [Thu, 20 Jun 2019 22:00:02 +0000 (22:00 +0000)]
efi_loader: clean up runtime detaching

The detaching of the runtime will have to move to ExitBootServices() to
encompass operating system that do not call SetVirtualAddressMap().

This patch changes the logic for the relocation of the pointers in the
runtime table such that the relocation becomes independent of the entries
in the detach list.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: remove NULL entries from runtime detach list
Heinrich Schuchardt [Sat, 29 Jun 2019 00:00:16 +0000 (02:00 +0200)]
efi_loader: remove NULL entries from runtime detach list

Some entries in the system table are set to NULL in ExitBootServices(). We
had them in the runtime detach list to avoid relocation of NULL. Let's
instead assign the pointers dynamically in efi_initialize_system_table() to
avoid the relocation entry.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: initialization of variable services
Heinrich Schuchardt [Thu, 20 Jun 2019 11:52:16 +0000 (13:52 +0200)]
efi_loader: initialization of variable services

Provide an initialization routine for variable services.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: move efi_query_variable_info()
Heinrich Schuchardt [Thu, 20 Jun 2019 10:13:05 +0000 (12:13 +0200)]
efi_loader: move efi_query_variable_info()

Let's keep similar things together.

Move efi_query_variable_info() to lib/efi_loader/efi_variable.c

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: remove superfluous spaces in comments
Heinrich Schuchardt [Wed, 3 Jul 2019 18:27:24 +0000 (20:27 +0200)]
efi_loader: remove superfluous spaces in comments

Leave only a single space after * if not aligning.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agotest/py: error message test_efi_selftest_device_tree
Heinrich Schuchardt [Fri, 5 Jul 2019 15:43:13 +0000 (17:43 +0200)]
test/py: error message test_efi_selftest_device_tree

Correct the error message in test_efi_selftest_device_tree().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_selftest: description of CMD_BOOTEFI_SELFTEST
Heinrich Schuchardt [Sun, 30 Jun 2019 05:27:09 +0000 (07:27 +0200)]
efi_selftest: description of CMD_BOOTEFI_SELFTEST

The current short description has a typo. Let it stand out clear that we
provide unit tests.

Improve the description of the CMD_BOOTEFI_SELFTEST configuration option.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Alexander Graf <agraf@csgraf.de>
5 years agodisk: efi: buffer overflow in part_get_info_efi()
Heinrich Schuchardt [Fri, 5 Jul 2019 19:27:13 +0000 (21:27 +0200)]
disk: efi: buffer overflow in part_get_info_efi()

In part_get_info_efi() we use the output of print_efiname() to set
info->name[]. The size of info->name is PART_NAME_LEN = 32 but
print_efiname() returns a string with a maximum length of
PARTNAME_SZ + 1 = 37.

Use snprintf() instead of sprintf() to avoid buffer overflow.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMerge tag 'rpi-next-2019.07' of https://github.com/mbgg/u-boot
Tom Rini [Fri, 5 Jul 2019 22:19:47 +0000 (18:19 -0400)]
Merge tag 'rpi-next-2019.07' of https://github.com/mbgg/u-boot

- fix complation error for CONFIG_USB
- update RPi3 DTBs to v5.1-rc6 state
- add defconfig for RPi3 B+
- Fix BCM2835_MBOX_TAG_TEST_PIXEL_ORDER define

5 years agomips: mt76xx: Implement new d-cache fix in last_stage_init()
Stefan Roese [Tue, 28 May 2019 06:11:37 +0000 (08:11 +0200)]
mips: mt76xx: Implement new d-cache fix in last_stage_init()

With commit 06985289d452 ("watchdog: Implement generic watchdog_reset()
version") the init sequence has changed in arch_misc_init(), resulting
in a re-appearance of the d-cache issue on MT7688 boards (e.g. gardena).
When this happens, the first (or sometimes later ones as well) TFTP
command hangs and does not complete correctly. This leads to the
assumption that the d-cache is not in a clean state once the ethernet
driver is called (d-cache is used here for the buffers). The old work-
around with the cache flush somehow does not work any more now with
the new code change.

Unfortunately adding CONFIG_SYS_MALLOC_CLEAR_ON_INIT also did not fix
this issue. With v2019.07-rc3 it shows again. The time of accessing
the data seems to be very important here. It needs to be "very late"
in the boot process.

Testing has shown, that copying a 64KiB area in DDR at a very late
bootup time, directly before calling into the prompt, fixes this issue.
Flushing of the complete d-cache does not seem to necessary, as this
copy alone seems to fix this problem.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agousb: dwc3: Use UCLASS_NOP instead of UCLASS_MISC for the DWC3 generic glue
Jean-Jacques Hiblot [Fri, 5 Jul 2019 07:33:58 +0000 (09:33 +0200)]
usb: dwc3: Use UCLASS_NOP instead of UCLASS_MISC for the DWC3 generic glue

dwc3-generic has been broken since MISC uclass has been modified to scan DT
sub-nodes after bind.
Fixing it by a using the no-op uclass.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agodm: Add a No-op uclass
Jean-Jacques Hiblot [Fri, 5 Jul 2019 07:33:57 +0000 (09:33 +0200)]
dm: Add a No-op uclass

This uclass is intended for devices that do not need any features from the
uclass, including binding children.
This will typically be used by devices that are used to bind child devices
but do not use dm_scan_fdt_dev() to do it. That is for example the case of
several USB wrappers that have 2 child devices (1 for device and 1 for
host) but bind only one at a any given time.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agousb: dwc3-generic: remove dm_scan_fdt_dev() from the remove() callback
Jean-Jacques Hiblot [Fri, 5 Jul 2019 07:33:56 +0000 (09:33 +0200)]
usb: dwc3-generic: remove dm_scan_fdt_dev() from the remove() callback

There is simply no reason to do that here.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agousb: ehci-mx6: Fix bus enumeration for DM case
Marek Vasut [Mon, 24 Jun 2019 17:05:47 +0000 (19:05 +0200)]
usb: ehci-mx6: Fix bus enumeration for DM case

The EHCI iMX6 driver is only partly converted to DT probing and
still uses a tremendous amount of hard-coded addresses. Worse,
the driver uses hard-coded SoC-model-specific base addresses, which
are derived from values protected by SoC-specific macros, hence the
driver is also compiled for a specific SoC model. Even worse, the
driver depends on specific sequential indexing of the controllers,
from which it derives offsets in the PHY and ANATOP register sets.

However, when the driver is probed from DT, the indexing is not
correct. In fact, each controller has index 0. This patch derives
the index for DT probing case from the controller base addresses,
which is not the way this should be done, however it is the least
intrusive approach, favorable this close to release.

The necessary steps to convert this driver fully to DT probing are
described inside the patch, however this should be done in the next
release and depends on iMX clock driver patches.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Abel Vesa <abel.vesa@nxp.com>
Cc: Adam Ford <aford173@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
5 years agorockchip: make_fit_atf.py: fix loadables property set error
Andy Yan [Thu, 4 Jul 2019 09:44:40 +0000 (17:44 +0800)]
rockchip: make_fit_atf.py: fix loadables property set error

Commit b238e4b00ced ("rockchip: Cleanup of make_fit_atf.py.") set
firmware = "atf_1";
loadables = "uboot","atf_1","atf_2";

Actually it should be:
firmware = "atf_1";
loadables = "uboot","atf_2","atf_3";

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agoboard: amlogic: add mailing-list to MAINTAINERS
Neil Armstrong [Thu, 4 Jul 2019 13:59:38 +0000 (15:59 +0200)]
board: amlogic: add mailing-list to MAINTAINERS

Add missing mailing-list to the amlogic boards MAINTAINERS file.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoMerge tag 'u-boot-imx-20190704' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Thu, 4 Jul 2019 15:35:51 +0000 (11:35 -0400)]
Merge tag 'u-boot-imx-20190704' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

Fixes for 2019.07
-----------------
- Wandboard

5 years agoboard: amlogic: Generate unique MAC address for Q200 and P212 based boards
Neil Armstrong [Wed, 12 Jun 2019 09:49:08 +0000 (11:49 +0200)]
board: amlogic: Generate unique MAC address for Q200 and P212 based boards

Enable unique MAC address generation for boards usins SoCs having
a known functional and valid unique serial number.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoARM: meson: add unique MAC address generation
Neil Armstrong [Wed, 12 Jun 2019 09:49:07 +0000 (11:49 +0200)]
ARM: meson: add unique MAC address generation

Add support for generating an unique MAC address using the SoC internal
serial number from the Secure Monitor interface.

The algorithm generates an unicast locally administered 6bytes minus 2bits
address using an crc16 of the serial for the top 16bits with the lower 2 bits
masked to setup the unicast locally administered property and a crc24 for
the lower 24bits.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoARM: meson: sm: Add secure monitor calls to retrieve SoC serial number
Neil Armstrong [Wed, 12 Jun 2019 09:49:06 +0000 (11:49 +0200)]
ARM: meson: sm: Add secure monitor calls to retrieve SoC serial number

The Secure Monitor interface permits retrieving the SoC Serial Number,
add a function to retrieve it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoboard: amlogic: vim: Fix README
Andreas Färber [Mon, 1 Jul 2019 08:25:08 +0000 (10:25 +0200)]
board: amlogic: vim: Fix README

Unlike the BayLibre repos Khadas' repo defaults to using native gcc,
so specify the CROSS_COMPILE setting matching the prescribed toolchain.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agowandboard: README: Adjust the U-Boot proper binary name
Fabio Estevam [Wed, 12 Jun 2019 15:34:41 +0000 (12:34 -0300)]
wandboard: README: Adjust the U-Boot proper binary name

After the conversion to DM the U-Boot proper binary name
is 'u-boot-dtb.img', so adjust it accordingly.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agowandboard: Add FIT image support
Fabio Estevam [Wed, 12 Jun 2019 15:34:40 +0000 (12:34 -0300)]
wandboard: Add FIT image support

After the transition to DM, only the mx6dl/solo wandboard
is supported.

Add FIT image support so that all the wandboard variants
can be supported, like it was prior to the DM conversion.

Successfully booted Linux on mx6q/solo/qp wandboards.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agowandboard: Add mmc0 alias
Fabio Estevam [Wed, 12 Jun 2019 15:34:39 +0000 (12:34 -0300)]
wandboard: Add mmc0 alias

Add a mmc0 alias so that U-Boot proper can associate mmc0
with the boot SD card.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agowandboard: Import extra wandboard devicetree files
Fabio Estevam [Wed, 12 Jun 2019 15:34:38 +0000 (12:34 -0300)]
wandboard: Import extra wandboard devicetree files

Import wandboard devicetree files so that the mx6q and mx6qp
variants can be properly supported.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agowandboard: Sync with devicetree files from kernel 5.1.9
Fabio Estevam [Wed, 12 Jun 2019 15:34:37 +0000 (12:34 -0300)]
wandboard: Sync with devicetree files from kernel 5.1.9

Udate the wandboard devicetree files with the ones
from kernel 5.1.9.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agomx6: dts: Move dtbs under SoC level
Fabio Estevam [Wed, 12 Jun 2019 15:34:36 +0000 (12:34 -0300)]
mx6: dts: Move dtbs under SoC level

Place dtbs under SoC level rather than board level.

imx6q-novena.dtb and imx6dl-wandboard-revb1.dtb were
placed under the board config option, so move them
to SoC level.

This also aligns with the kernel dts Makefile format.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agomx6: dts: Keep dtb entries sorted
Fabio Estevam [Wed, 12 Jun 2019 15:34:35 +0000 (12:34 -0300)]
mx6: dts: Keep dtb entries sorted

Keep dtb entries sorted to help adding new dtbs
in an organized form.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agoMerge tag 'rockchip-for-v2019.07-rc5-2' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Tue, 2 Jul 2019 12:18:19 +0000 (08:18 -0400)]
Merge tag 'rockchip-for-v2019.07-rc5-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip

- fix for atf bl31_image_info pointer
- fix for rockpro64 vdd_log init
- fix for tinker-rk3288 SPL size too big

5 years agorockchip: rk3288: enable TPL for tinker-board
Kever Yang [Mon, 1 Jul 2019 03:49:15 +0000 (11:49 +0800)]
rockchip: rk3288: enable TPL for tinker-board

All the config for TPL has been update, we can enable the TPL.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: config: tiner-rk3288: extend CONFIG_SYS_MONITOR_LEN to 600KB
Kever Yang [Mon, 1 Jul 2019 03:49:14 +0000 (11:49 +0800)]
rockchip: config: tiner-rk3288: extend CONFIG_SYS_MONITOR_LEN to 600KB

The raw u-boot.bin for tinker board has been about 450KB without
debug option, and 550KB with all debug on, and the default value is 200KB,
which is not enough for run raw u-boot.bin.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: config: update config for TPL support on tinker-rk3288
Kever Yang [Mon, 1 Jul 2019 03:49:13 +0000 (11:49 +0800)]
rockchip: config: update config for TPL support on tinker-rk3288

We need to update TEXT BASE for TPL/SPL/U-Boot;
SPL no need relocate STACK after enable TPL, so remove it;
Don't enable pinctrl names so that SPL can get pinctrl dts;

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: dts: rk3288-tinker: enable sdmmc pinctrl node in spl
Kever Yang [Mon, 1 Jul 2019 03:49:12 +0000 (11:49 +0800)]
rockchip: dts: rk3288-tinker: enable sdmmc pinctrl node in spl

rockchip pinctrl driver has update to use dts, so we need
to add the pinctrl config in SPL for sdmmc.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: dts: tinker: migrate the dm-pre-reloc tag into -u-boot dts
Kever Yang [Mon, 1 Jul 2019 03:49:11 +0000 (11:49 +0800)]
rockchip: dts: tinker: migrate the dm-pre-reloc tag into -u-boot dts

Migrate all the "u-boot,dm-pre-reloc" tag from rk3288-tinker.dts
into rk3288-tinker-u-boot.dtsi.
When both board level and soc level '-u-boot.dtsi' files exist,
we need to include the soc level 'rk3288-u-boot.dtsi' manually.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: dts: rk3288: move reloc tag into -u-boot dts
Kever Yang [Mon, 1 Jul 2019 03:49:10 +0000 (11:49 +0800)]
rockchip: dts: rk3288: move reloc tag into -u-boot dts

Move all the tag "u-boot,dm-pre-reloc" from rk3288.dtsi
into rk3288-u-boot.dtsi.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3288: add separate TPL STACK address
Kever Yang [Tue, 2 Jul 2019 03:43:06 +0000 (11:43 +0800)]
rockchip: rk3288: add separate TPL STACK address

TPL is at SRAM while other stage is at SDRAM, so it needs
separate STACK.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agorockchip: rk3288: enable TPL configs to chip level
Kever Yang [Tue, 2 Jul 2019 03:43:05 +0000 (11:43 +0800)]
rockchip: rk3288: enable TPL configs to chip level

More boards other than vyasa needs TPL, so enable the TPL configs
at chip level instead of board level.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: dts: rk3399: rockpro64: Provide init voltage
Mark Kettenis [Fri, 21 Jun 2019 21:16:45 +0000 (23:16 +0200)]
rockchip: dts: rk3399: rockpro64: Provide init voltage

Add missing regulator-init-microvolt property to vdd_log regulator.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
(Rebase on latest u-boot-rockchip master)
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I13b24fb81e8ad269d7dbb0c7b67f5f4795d2e775

5 years agospl: atf: Fix uninitialized pointer to bl31_image_info
Frieder Schrempf [Thu, 27 Jun 2019 07:03:16 +0000 (07:03 +0000)]
spl: atf: Fix uninitialized pointer to bl31_image_info

The pointer to struct atf_image_info in
bl31_params_mem.bl31_params.bl31_image_info is not initialized before
being dereferenced. This can cause U-Boot to crash right before jumping
to the BL31 ATF binary.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Fixes: bcc1726a7bdd ("spl: add support to booting with ATF")
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agopoplar: increase SYS_MALLOC_F_LEN for DM_FLAG_PRE_RELOC support
Shawn Guo [Mon, 17 Jun 2019 03:08:34 +0000 (11:08 +0800)]
poplar: increase SYS_MALLOC_F_LEN for DM_FLAG_PRE_RELOC support

There is a regression seen on Poplar platform, which doesn't even show
a U-Boot version banner on booting.  It turns out that due to landing
of commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to
simple-bus driver"), we need to increase SYS_MALLOC_F_LEN from its
default size 0x400, as pre-relocation requires more memory there.  Let's
increase SYS_MALLOC_F_LEN to 0x4000 to fix the regression.

Thanks to Andreas Färber <afaerber@suse.de> for reporting, and Bin Meng
<bmeng.cn@gmail.com> for trouble shooting.

Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Andreas Färber <afaerber@suse.de>
5 years agoMerge tag 'u-boot-atmel-fixes-2019.07-b' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 1 Jul 2019 11:31:26 +0000 (07:31 -0400)]
Merge tag 'u-boot-atmel-fixes-2019.07-b' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmel

Second set of u-boot-atmel fixes for 2019.07 cycle

5 years agoMerge tag 'uniphier-v2019.07' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Sat, 29 Jun 2019 16:09:23 +0000 (12:09 -0400)]
Merge tag 'uniphier-v2019.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-uniphier

UniPhier SoC updates for v2019.07

- Add SPI pin-mux data for pinctrl driver

- Remove unused code

- Trivial bug-fix and clean-up

5 years agoMerge tag 'efi-2019-07-rc5-4' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 29 Jun 2019 13:58:08 +0000 (09:58 -0400)]
Merge tag 'efi-2019-07-rc5-4' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for v2019.07-rc5 (4)

The definition of an unimplemented function is corrected.

5 years agoARM: uniphier: move sg_set_{pinsel, iectrl} to more relevant places
Masahiro Yamada [Fri, 28 Jun 2019 17:38:06 +0000 (02:38 +0900)]
ARM: uniphier: move sg_set_{pinsel, iectrl} to more relevant places

Move the sg_set_pinsel macro to arch/arm/mach-uniphier/arm32/debug_ll.S
since it is not used anywhere else.

Move the C functions sg_set_{pinsel,iectrl} to debug-uart.c since they
are not used anywhere else.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: remove unused init code for CONFIG_DEBUG_UART
Masahiro Yamada [Fri, 28 Jun 2019 17:38:05 +0000 (02:38 +0900)]
ARM: uniphier: remove unused init code for CONFIG_DEBUG_UART

debug_uart_init() is called from spl_board_init(), which is only
compiled for SPL. For U-boot proper, _debug_uart_init() is unreachable,
so dropped by the dead code elimination.

Now that 64-bit SoCs of this SoC family no longer support SPL,
debug-uart-ld20.c is never compiled.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>