project/bcm63xx/u-boot.git
5 years agorockchip: rk3399-puma: enable PWM regulator in Puma defconfig.
Christoph Muellner [Wed, 2 Jan 2019 14:09:17 +0000 (15:09 +0100)]
rockchip: rk3399-puma: enable PWM regulator in Puma defconfig.

This patch enables the PWM regulator driver in the defconfig
for the RK3399-Q7.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agopower: regulator: Allow PWM regulator to be omitted from SPL.
Christoph Muellner [Wed, 2 Jan 2019 14:09:16 +0000 (15:09 +0100)]
power: regulator: Allow PWM regulator to be omitted from SPL.

This patch allows to enable the PWM regulator driver
independent for U-Boot and SPL.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agorockchip: rk3399-puma: Cleanup of vdd_log DTS entry.
Christoph Muellner [Wed, 2 Jan 2019 14:09:15 +0000 (15:09 +0100)]
rockchip: rk3399-puma: Cleanup of vdd_log DTS entry.

This patch eliminates the non-standard entries "rockchip,pwm_id"
and "rockchip,pwm_voltage". They are neither documented nor
read out by any driver.

Additionally it introduces the entry regulator-init-microvolt
and sets it to 900 mV, which is the default target value
for VDD_LOG.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agorockchip: ram: update license for sdram driver
Kever Yang [Thu, 20 Dec 2018 03:33:42 +0000 (11:33 +0800)]
rockchip: ram: update license for sdram driver

Rockchip may use this sdram copy of source code for both open source
and internal project, update the license to use both GPL2.0+ and
BSD-3 Clause.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agorockchip: rk3036: ram: update license
Kever Yang [Thu, 20 Dec 2018 03:33:41 +0000 (11:33 +0800)]
rockchip: rk3036: ram: update license

All the source code of sdram_rk3036.c are from Rockchip, update the
copyright to owned by Rockchip.

Because rockchip may use this copy of code both for open source
project and internal project, update the license to use both
GPL2.0+ and BSD-3 Clause.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agorockchip: sdram-common: fix wrong size for 4GB in 32bit SoC
Kever Yang [Fri, 28 Dec 2018 01:56:48 +0000 (09:56 +0800)]
rockchip: sdram-common: fix wrong size for 4GB in 32bit SoC

This is workaround for issue we can't get correct size for 4GB ram
in 32bit system and available before we really need ram space
out of 4GB, eg.enable ARM LAPE(rk3288 supports 8GB ram).
The size of 4GB is '0x1 00000000', and this value will be truncated
to 0 in 32bit system, and system can not get correct ram size.
Rockchip SoCs reserve a blob of space for peripheral near 4GB,
and we are now setting SDRAM_MAX_SIZE as max available space for
ram in 4GB, so we can use this directly to workaround the issue.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Tested-By: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Wed, 2 Jan 2019 00:55:05 +0000 (19:55 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

5 years agoMerge tag 'u-boot-imx-20190101' of git://www.denx.de/git/u-boot-imx
Tom Rini [Tue, 1 Jan 2019 14:56:41 +0000 (09:56 -0500)]
Merge tag 'u-boot-imx-20190101' of git://denx.de/git/u-boot-imx

imx for 2019.01

- introduce support for i.MX8M
- fix size limit for Vhybrid / pico boards
- several board fixes
- w1 driver for MX2x / MX5x

5 years agopico-imx7d: Increase the CONFIG_ENV_OFFSET size
Fabio Estevam [Fri, 30 Nov 2018 14:52:13 +0000 (12:52 -0200)]
pico-imx7d: Increase the CONFIG_ENV_OFFSET size

U-Boot binary has grown in such a way that it goes beyond the reserved
area for the environment variables.

Running "saveenv" causes U-Boot to hang because of this overlap.

Fix this problem by increasing the CONFIG_ENV_OFFSET size.

Also, in order to prevent this same problem in the future, use
CONFIG_BOARD_SIZE_LIMIT, which will detect the overlap in build-time.

CONFIG_BOARD_SIZE_LIMIT does not accept math expressions, so declare
CONFIG_ENV_OFFSET with its direct value instead.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agonand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)
Lukasz Majewski [Mon, 3 Dec 2018 09:24:51 +0000 (10:24 +0100)]
nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoKconfig: Add entry for VF610 NAND NFC device tree aware driver
Lukasz Majewski [Mon, 3 Dec 2018 09:24:50 +0000 (10:24 +0100)]
Kconfig: Add entry for VF610 NAND NFC device tree aware driver

This commit provides code to add proper entry to Kconfig to enable
support for VF610 device tree aware driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agonand: vybrid: Use calloc() instead of malloc() to allocate struct nfc
Lukasz Majewski [Mon, 3 Dec 2018 09:20:47 +0000 (10:20 +0100)]
nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
5 years agoimx: mx53ppd: fix build error
Peng Fan [Sun, 9 Dec 2018 11:45:02 +0000 (11:45 +0000)]
imx: mx53ppd: fix build error

board/ge/mx53ppd/mx53ppd.c: In function 'board_late_init':
board/ge/mx53ppd/mx53ppd.c:359:23: error: passing argument 2 of 'read_vpd' from incompatible pointer type [-Werror=incompatible-pointer-types]
  res = read_vpd(&vpd, vpd_callback);
                       ^~~~~~~~~~~~
In file included from board/ge/mx53ppd/mx53ppd.c:37:0:
board/ge/mx53ppd/../../ge/common/vpd_reader.h:19:5: note: expected 'int (*)(struct vpd_cache *, u8,  u8,  u8,  size_t,  const u8 *) {aka int (*)(struct vpd_cache *, unsigned char,  unsigned char,  unsigned char,  unsigned int,  const unsigned char *)}' but argument is of type 'int (*)(void *, u8,  u8,  u8,  size_t,  const u8 *) {aka int (*)(void *, unsigned char,  unsigned char,  unsigned char,  unsigned int,  const unsigned char *)}'
int read_vpd(struct vpd_cache *cache,
     ^~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Stefano Babic <sbabic@denx.de>
5 years agopcm058: fix NAND flash not using badblock table
Harald Seiler [Fri, 7 Dec 2018 09:19:36 +0000 (10:19 +0100)]
pcm058: fix NAND flash not using badblock table

Currently, U-Boot ignores the BBT stored in the last 4 blocks of NAND
flash because the NAND_BBT_USE_FLASH flag is not set.  This leads to
two issues:

* U-Boot silently uses a memory-only BBT which is initialized with all
  blocks marked as good.  This means, actual bad blocks are marked good
  and U-Boot might try writing to or reading from them.
* The BBT in flash, which will be created once Linux boots up, is not
  off limits for a driver ontop, like UBI.  While it does not seem to
  consistently produce an error, sometimes UBI will fail to attach
  because the BBT blocks obviously don't contain valid UBI data.

To fix this, this patch sets the CONFIG_SYS_NAND_USE_FLASH_BBT option,
which is used in ./drivers/mtd/nand/raw/mxs_nand.c to decide whether
a BBT in flash is used.

Signed-off-by: Harald Seiler <hws@denx.de>
5 years agoimx8m: ddr: removed unused macros
Peng Fan [Mon, 3 Dec 2018 12:41:09 +0000 (12:41 +0000)]
imx8m: ddr: removed unused macros

Remove unused DDRC register macros.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: add i.MX8MQ EVK support
Peng Fan [Tue, 20 Nov 2018 10:20:00 +0000 (10:20 +0000)]
imx: add i.MX8MQ EVK support

Add i.MX8MQ EVK support. SPL will initialize ddr and load ddr phy
firmware. Then loading FIT image, ATF to OCRAM, U-Boot and DTB to
DRAM.

The boot log with Arm trusted firmware console enabled:
"
U-Boot SPL 2018.11-00142-g9ae14e7274 (Nov 20 2018 - 18:13:16 +0800)
PMIC:  PFUZE100 ID=0x10
Normal Boot
Trying to boot from MMC2
NOTICE:  Configureing TZASC380
NOTICE:  BL31: v1.5(release):p9.0.0_1.0.0-beta-20180928-8-ge09c4b62-dirty
NOTICE:  BL31: Built : 09:28:54, Nov  8 2018
lpddr4 swffc start
NOTICE:  sip svc init

U-Boot 2018.11-00142-g9ae14e7274 (Nov 20 2018 - 18:13:16 +0800)

CPU:   Freescale i.MX8MQ rev2.0 at 1000 MHz
Reset cause: POR
Model: Freescale i.MX8MQ EVK
DRAM:  3 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
In:    serial
Out:   serial
Err:   serial
Net:
Warning: ethernet@30be0000 using MAC address from ROM
eth0: ethernet@30be0000
Hit any key to stop autoboot:  0
"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agodrivers: ddr: introduce DDR driver for i.MX8M
Peng Fan [Tue, 20 Nov 2018 10:19:57 +0000 (10:19 +0000)]
drivers: ddr: introduce DDR driver for i.MX8M

Introduce DDR driver for i.MX8M. The driver will be used by SPL to
initialze DDR PHY and DDR Controller.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: imx8m: add lpddr4 header file
Peng Fan [Tue, 20 Nov 2018 10:19:53 +0000 (10:19 +0000)]
imx: imx8m: add lpddr4 header file

Introduce lpddr4 header file

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: imx8m: not build bootaux when building SPL
Peng Fan [Tue, 20 Nov 2018 10:19:50 +0000 (10:19 +0000)]
imx: imx8m: not build bootaux when building SPL

No need to build bootaux in SPL stage

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: imx8mq: build flash.bin
Peng Fan [Tue, 20 Nov 2018 10:19:46 +0000 (10:19 +0000)]
imx: imx8mq: build flash.bin

Build flash.bin for i.MX8MQ, it will include signed hdmi firmware,
spl, ddr firmware, fit image(bl31.bin, u-boot-nodtb.bin, dtb).
Burn it to 33KB offset of SD card.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: imx8m: introduce imximage cfg file
Peng Fan [Tue, 20 Nov 2018 10:19:43 +0000 (10:19 +0000)]
imx: imx8m: introduce imximage cfg file

imximage.cfg will be used to generate the flash.bin

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: imx8m: introduce script to generate fit image
Peng Fan [Tue, 20 Nov 2018 10:19:39 +0000 (10:19 +0000)]
imx: imx8m: introduce script to generate fit image

Introduce script to generate fit image for i.MX8M

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: imx8m: clock refactor dram pll part
Peng Fan [Tue, 20 Nov 2018 10:19:32 +0000 (10:19 +0000)]
imx: imx8m: clock refactor dram pll part

Refactor dram_pll_init to accept args to configure different pll freq.
Introduce dram_enable_bypass and dram_disable_bypass

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: spl: add MMC BOOT Device for i.MX8M
Peng Fan [Tue, 20 Nov 2018 10:19:29 +0000 (10:19 +0000)]
imx: spl: add MMC BOOT Device for i.MX8M

Add MMC BOOT Device for i.MX8M

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: rename mx8m,MX8M to imx8m,IMX8M
Peng Fan [Tue, 20 Nov 2018 10:19:25 +0000 (10:19 +0000)]
imx: rename mx8m,MX8M to imx8m,IMX8M

Rename mx8m,MX8M to imx8m,IMX8M

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jon Nettleton <jon@solid-run.com>
5 years agoimx: introduce is_imx8mq helper
Peng Fan [Tue, 20 Nov 2018 10:19:22 +0000 (10:19 +0000)]
imx: introduce is_imx8mq helper

Introduce is_imx8mq header macro

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: cpu: add CHIP_REV_2_1 macro
Peng Fan [Tue, 20 Nov 2018 10:19:18 +0000 (10:19 +0000)]
imx: cpu: add CHIP_REV_2_1 macro

Introduce CHIP_REV_2_1 macro.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8m: Enable CONFIG_SPL_FIT_IMAGE_TINY for iMX8M
Ye Li [Tue, 20 Nov 2018 10:19:15 +0000 (10:19 +0000)]
imx8m: Enable CONFIG_SPL_FIT_IMAGE_TINY for iMX8M

If we don't define CONFIG_SPL_FIT_IMAGE_TINY, when loading images from FIT,
the SPL will record all loadables' info to u-boot's FDT. This causes
problem when HAB is enabled, because FDT's content is modified before
we authenticate it.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoIntroduce CONFIG_FIT_EXTERNAL_OFFSET
Peng Fan [Tue, 20 Nov 2018 10:19:11 +0000 (10:19 +0000)]
Introduce CONFIG_FIT_EXTERNAL_OFFSET

Introduce CONFIG_FIT_EXTERNAL_OFFSET to give user a choice to choose
where to put the external data.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoarm: imx8qxp: build u-boot-dtb.cfgout before checking files
Peng Fan [Mon, 5 Nov 2018 10:01:37 +0000 (10:01 +0000)]
arm: imx8qxp: build u-boot-dtb.cfgout before checking files

Build u-boot-dtb.cfgout before checking files, otherwise
u-boot-dtb.cfgout is generated at late stage and cause final image not
generated.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agotools: add i.MX8M image support
Peng Fan [Tue, 20 Nov 2018 10:19:36 +0000 (10:19 +0000)]
tools: add i.MX8M image support

i.MX8M bootable image type is like i.MX6/7, but there is signed HDMI
firmware image in front of A53 bootable image, which is also has an IVT
header.

Here we also include fit image to generate a bootable image.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
5 years agoimx: hab: extend hab_auth_img to calculate ivt_offset
Parthiban Nallathambi [Wed, 21 Nov 2018 13:50:40 +0000 (14:50 +0100)]
imx: hab: extend hab_auth_img to calculate ivt_offset

Current implementation of hab_auth_img command needs ivt_offset to
authenticate the image. But ivt header is placed at the end of image
date after padding.

This leaves the usage of hab_auth_img command to fixed size or static
offset for ivt header. New function "get_image_ivt_offset" is introduced
to find the ivt offset during runtime. The case conditional check in this
function is same as boot_get_kernel in common/bootm.c

With this variable length image e.g. FIT image with any random size can
have IVT at the end and ivt_offset option can be left optional

Can be used as "hab_auth_img $loadaddr $filesize" from u-boot script

Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Reviewed-by: Breno Lima <breno.lima@nxp.com>
5 years agoarm: imx7d: cl-som-imx7: migration to CONFIG_BLK
Yaniv Levinsky [Tue, 20 Nov 2018 15:49:57 +0000 (17:49 +0200)]
arm: imx7d: cl-som-imx7: migration to CONFIG_BLK

Enable driver model for USB, MMC and REGULATOR drivers.
Set run-time configuration via Device Tree.

Signed-off-by: Yaniv Levinsky <yaniv.levinsky@compulab.co.il>
5 years agoARM: DTS: Provide pinfunc definitions for vybrid vf610 from Linux kernel
Lukasz Majewski [Mon, 19 Nov 2018 23:38:08 +0000 (00:38 +0100)]
ARM: DTS: Provide pinfunc definitions for vybrid vf610 from Linux kernel

This file is in sync with v4.20-next tree:
e4dda4f5a4df "x86/kaslr, ACPI/NUMA: avoid including asm/kaslr.h on arm64"

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoARM: DTS: Add iomux node to vf.dtsi for Vybrid devices
Lukasz Majewski [Mon, 19 Nov 2018 23:38:07 +0000 (00:38 +0100)]
ARM: DTS: Add iomux node to vf.dtsi for Vybrid devices

This node is in sync with v4.20-next tree:
e4dda4f5a4df "x86/kaslr, ACPI/NUMA: avoid including asm/kaslr.h on arm64"

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoARM: vybrid: Provide pinctrl driver for Vybrid (vf610)
Lukasz Majewski [Mon, 19 Nov 2018 23:38:06 +0000 (00:38 +0100)]
ARM: vybrid: Provide pinctrl driver for Vybrid (vf610)

This implementation comply with other iMX devices pinctrl drivers already
available in U-boot.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agospl: introduce function prototypes
Peng Fan [Sat, 17 Nov 2018 09:10:31 +0000 (09:10 +0000)]
spl: introduce function prototypes

Introduce function prototypes for board_spl_fit_size_align and
board_spl_fit_post_load

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoSPL: Add HAB image authentication to FIT
Ye Li [Sat, 17 Nov 2018 09:10:25 +0000 (09:10 +0000)]
SPL: Add HAB image authentication to FIT

Introduce two board level callback functions to FIT image loading process, and
a SPL_FIT_FOUND flag to differentiate FIT image or RAW image.

Implement functions in imx common SPL codes to call HAB funtion
to authenticate the FIT image. Generally, we have to sign multiple regions
in FIT image:
1. Sign FIT FDT data (configuration)
2. Sign FIT external data (Sub-images)

Because the CSF supports to sign multiple memory blocks, so that we can use one
signature to cover all regions in FIT image and only authenticate once.
The authentication should be done after the entire FIT image is loaded into
memory including all sub-images.
We use "-p" option to generate FIT image to reserve a space for FIT IVT
and FIT CSF, also this help to fix the offset of the external data (u-boot-nodtb.bin,
ATF, u-boot DTB).

The signed FIT image layout is as below:
--------------------------------------------------
|     |     |     |   |           |     |        |
| FIT | FIT | FIT |   | U-BOOT    | ATF | U-BOOT |
| FDT | IVT | CSF |   | nodtb.bin |     |   DTB  |
|     |     |     |   |           |     |        |
--------------------------------------------------

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: bootaux: fix stack and pc assignment on 64-bit platforms
Gary Bisson [Wed, 14 Nov 2018 16:55:29 +0000 (17:55 +0100)]
imx: bootaux: fix stack and pc assignment on 64-bit platforms

Using ulong is wrong as its size depends on the Host CPU architecture
(32-bit vs. 64-bit) although the Cortex-M4 is always 32-bit.

Without this patch, the stack and PC are obviously wrong and it
generates an abort when used on 64-bit processors such as the i.MX8MQ.

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: mx8m: add memory mapping for CAAM and TCM
Gary Bisson [Wed, 14 Nov 2018 16:55:28 +0000 (17:55 +0100)]
imx: mx8m: add memory mapping for CAAM and TCM

Otherwise can't boot the M4 core as it is impossible to load its
firmware into the TCM memory.

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agotools: improve portability of imx_cntr_image.sh
Martin Husemann [Fri, 9 Nov 2018 13:30:14 +0000 (14:30 +0100)]
tools: improve portability of imx_cntr_image.sh

Replace non-portable operator == with =

The operator == in sh(1) / test(1) is non-POSIX and only implemented by
some shells (like bash). It is equivalent to the standard defined operator =.

5 years agoembestmx6boards: Add SPL support
Fabien Lahoudere [Thu, 8 Nov 2018 10:28:05 +0000 (11:28 +0100)]
embestmx6boards: Add SPL support

In order to boot faster with falcon mode, we need to add SPL
support to riotboard.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
5 years agoimx: imx8qxp_mek: imximage: remove config.h
Peng Fan [Mon, 5 Nov 2018 10:01:34 +0000 (10:01 +0000)]
imx: imx8qxp_mek: imximage: remove config.h

config.h is not needed, remove it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agodoc: imx: fix typos in mxsimage.txt
Michael Heimpold [Fri, 2 Nov 2018 22:12:02 +0000 (23:12 +0100)]
doc: imx: fix typos in mxsimage.txt

This fixes two small typos in mxsimage.txt.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Reviewed-by: Breno Lima <breno.lima@nxp.com>
5 years agodoc: imx: fix typo in imximage.txt
Michael Heimpold [Fri, 2 Nov 2018 22:11:49 +0000 (23:11 +0100)]
doc: imx: fix typo in imximage.txt

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Reviewed-by: Breno Lima <breno.lima@nxp.com>
5 years agoconfigs: mx23_olinuxino_defconfig: disable bootefi command
Michael Heimpold [Mon, 29 Oct 2018 19:21:52 +0000 (20:21 +0100)]
configs: mx23_olinuxino_defconfig: disable bootefi command

CONFIG_CMD_BOOTEFI is enabled by Kconfig default, but rarely
used on this board/platform.
So let's disable it for the boards default config.
This also saves around 16 KiB in the final u-boot.sb.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
5 years agoconfigs: mx23_olinuxino_defconfig: fix status led definition
Michael Heimpold [Mon, 29 Oct 2018 19:21:51 +0000 (20:21 +0100)]
configs: mx23_olinuxino_defconfig: fix status led definition

While migrating individual status led usages to Kconfig stuff,
a (random) value was introduced for this board which does not
work but produces the following error message during boot:

__led_init: failed requesting GPIO59!

Since Kconfig does not seem to accept a define as this point,
but the mxs gpio driver requires not only a simple integer value,
we need to use the plain value of MX23_PAD_SSP1_DETECT__GPIO_2_1.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Fixes: 2d8d190c8394 ("status_led: Kconfig migration")
5 years agow1: Add driver for i.MX bus master controller
Martin Fuzzey [Wed, 24 Oct 2018 08:21:18 +0000 (10:21 +0200)]
w1: Add driver for i.MX bus master controller

Two variants of controllers are supported:
V1 (bitwise only) found in
i.MX21, i.MX27, i.MX31, i.MX51
V2 (byte operations) found in
i.MX25, i.MX35, i.MX50, i.MX53

Only tested on i.MX53 hardware but in both modes
(by modifying the device tree).

Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
5 years agowatchdog: imx: add config to disable wdog reset
Xiaoliang Yang [Thu, 18 Oct 2018 10:27:46 +0000 (18:27 +0800)]
watchdog: imx: add config to disable wdog reset

Add Kconfig option WATCHDOG_RESET_DISABLE to disable watchdog reset
in imx_watchdog driver, so that the watchdog will not be fed in
u-boot if CONFIG_WATCHDOG_RESET_DISABLE is enabled.

Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
5 years agowatchdog: driver support for fsl-lsch2
Xiaoliang Yang [Thu, 18 Oct 2018 10:27:45 +0000 (18:27 +0800)]
watchdog: driver support for fsl-lsch2

Support watchdog driver for fsl-lsch2. It's disabled in default.
If you want to use it, please enable CONFIG_IMX_WATCHDOG.
Define CONFIG_WATCHDOG_TIMEOUT_MSECS to set watchdog timeout.

Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
5 years agoboard: ge: Move VPD reading to the vpd_reader
Denis Zalevskiy [Wed, 17 Oct 2018 08:33:30 +0000 (10:33 +0200)]
board: ge: Move VPD reading to the vpd_reader

Merge functionality duplicated in bx50v3 and mx53ppd: the logic
is the same except that process_vpd is called at different phases.
Also read_vpd could end up in error, so there is no VPD data in this
case - it shouldn't be processed.

Signed-off-by: Denis Zalevskiy <denis.zalevskiy@ge.com>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
5 years agoriscv: bootm: Support booting VxWorks
Bin Meng [Fri, 21 Dec 2018 15:13:41 +0000 (07:13 -0800)]
riscv: bootm: Support booting VxWorks

Register the 'bootm' function for booting VxWorks kernel for
RISC-V architecture.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
5 years agobootm: vxworks: Make do_bootm_vxworks() non-static
Bin Meng [Fri, 21 Dec 2018 15:13:40 +0000 (07:13 -0800)]
bootm: vxworks: Make do_bootm_vxworks() non-static

For future extension to other architectures, make do_bootm_vxworks()
a non-static function.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
5 years agobootm: vxworks: Make do_bootvx_fdt() static
Bin Meng [Fri, 21 Dec 2018 15:13:39 +0000 (07:13 -0800)]
bootm: vxworks: Make do_bootvx_fdt() static

Change the scope of do_bootvx_fdt() to static since it is only
used in common/bootm_os.c.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Mon, 31 Dec 2018 13:08:33 +0000 (08:08 -0500)]
Merge git://git.denx.de/u-boot-x86

This includes x86 edison defconfig file clean up, and coreboot file
system (cbfs) fixes.

5 years agofs: cbfs: Add missing standard CBFS component types
Bin Meng [Sat, 22 Dec 2018 09:55:51 +0000 (01:55 -0800)]
fs: cbfs: Add missing standard CBFS component types

Current CBFS component type list is incomplete. Add missing ones.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agofs: cbfs: Make all CBFS_TYPE_xxx macros consistent
Bin Meng [Sat, 22 Dec 2018 09:55:50 +0000 (01:55 -0800)]
fs: cbfs: Make all CBFS_TYPE_xxx macros consistent

At present there are 2 macros that are named as CBFS_COMPONENT_xxx.
Change them to CBFS_TYPE_xxx for consistency.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agofs: cbfs: Fix out of bound access during CBFS walking through
Bin Meng [Sat, 22 Dec 2018 09:55:49 +0000 (01:55 -0800)]
fs: cbfs: Fix out of bound access during CBFS walking through

The call to file_cbfs_fill_cache() is given with the parameter
'start' pointing to the offset by the CBFS base address, but
with the parameter 'size' that equals to the whole CBFS size.
During CBFS walking through, it checks files one by one and
after it pass over the end of the CBFS which is 4GiB boundary
it tries to check files from address 0 and so on, until the
overall size the codes checked hits to the given 'size'.

Fix this by passing 'start' pointing to the CBFS base address.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agofs: cbfs: remove wrong header validation
Christian Gmeiner [Sat, 22 Dec 2018 09:55:48 +0000 (01:55 -0800)]
fs: cbfs: remove wrong header validation

cbfs_fileheader.len indicates the content size of the file in the
cbfs, and it has nothing to do with cbfs_fileheader.offset which
is the starting address of the file in the cbfs.

Remove such check in file_cbfs_next_file(). Before this change
'cbfsinit' failed with 'Bad CBFS file'. After this change all cbfs
commands are working as expected.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
[bmeng: keep the necessary header sanity check]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agox86: edison: Remove staled comments from configuration header
Andy Shevchenko [Tue, 11 Dec 2018 17:12:27 +0000 (19:12 +0200)]
x86: edison: Remove staled comments from configuration header

Since some options had been moved to defconfig from header,
the leftover comments are not needed anymore. Remove them.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agox86: edison: move CONFIG_BOOTCOMMAND from header file to defconfig
Andy Shevchenko [Tue, 11 Dec 2018 17:12:26 +0000 (19:12 +0200)]
x86: edison: move CONFIG_BOOTCOMMAND from header file to defconfig

Use defconfig instead of header file for CONFIG_BOOTCOMMAND.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agox86: edison: move CONFIG_CMD_PCI from header file to defconfig
Andy Shevchenko [Tue, 11 Dec 2018 17:12:25 +0000 (19:12 +0200)]
x86: edison: move CONFIG_CMD_PCI from header file to defconfig

Use defconfig instead of header file for CONFIG_CMD_PCI.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoRevert "sunxi: board: Print error after power initialization fails"
From: Karl Palsson [Wed, 19 Dec 2018 13:00:39 +0000 (13:00 +0000)]
Revert "sunxi: board: Print error after power initialization fails"

Commit a8011eb84dfa("sunxi: board: Print error after power initialization
fails") moved the DRAM init after the increase of the CPU clock
frequency. This lead to various DRAM initialisation failures on some
boards (hangs or wrong size reported, on a NanoPi Duo2 and OrangePi
Zero, for instance). Lowering the CPU frequency significantly (for instance
to 408 MHz) seems to work around the problem, so this points to some timing
issues in the DRAM code.

Debugging this sounds like a larger job, so let's just revert this patch
to bring back those boards.
Beside this probably unintended change the patch just moved the error
message around, so reverting this is not a real loss.

This reverts commit a8011eb84dfac5187cebf00ed8bc981bdb5c1fa1.

Tested-By: Priit Laes <plaes@plaes.org>
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Sat, 29 Dec 2018 03:00:24 +0000 (22:00 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

Please pull UniPhier updates v2019.01

- import DIV_ROUND_CLOSEST_ULL macro from Linux
- import improvement and fix of Denali NAND driver from Linux
- add NAND 200MHz clock to clk driver
- allow CONFIG_BOOTCOMMAND to run custom boot command/script
- sync DT with Linux 4.20

5 years agoARM: uniphier: dts: sync with Linux 4.20
Masahiro Yamada [Wed, 19 Dec 2018 11:03:21 +0000 (20:03 +0900)]
ARM: uniphier: dts: sync with Linux 4.20

Currently, the DWC3 USB node is out of sync because the bindings
for the UniPhier DWC3 PHY diverged between Linux and U-Boot.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoclk: uniphier: add NAND 200MHz clock
Masahiro Yamada [Wed, 19 Dec 2018 11:03:20 +0000 (20:03 +0900)]
clk: uniphier: add NAND 200MHz clock

The Denali NAND controller IP needs three clocks:

 - clk: controller core clock

 - clk_x: bus interface clock

 - ecc_clk: clock at which ECC circuitry is run

Currently, only the first one (50MHz) is provided.  The rest of the
two clock ports must be connected to the 200MHz clock line.  Add this.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agomtd: rawnand: denali: fix a race condition when DMA is kicked
Masahiro Yamada [Wed, 19 Dec 2018 11:03:19 +0000 (20:03 +0900)]
mtd: rawnand: denali: fix a race condition when DMA is kicked

Based on Linux commit cf51e4b9c34407bf0c3d9b582b7837e047e1df47

Add the register read-back, commenting why this is necessary.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agomtd: rawnand: denali: optimize timing parameters for data interface
Masahiro Yamada [Wed, 19 Dec 2018 11:03:18 +0000 (20:03 +0900)]
mtd: rawnand: denali: optimize timing parameters for data interface

Based on Linux commit 1dfac31a5a63ac04a9b5fbc3f5105a586560f191

This commit improves the ->setup_data_interface() hook.

The denali_setup_data_interface() needs the frequency of clk_x
and the ratio of clk_x / clk.

The latter is currently hardcoded in the driver, like this:

  #define DENALI_CLK_X_MULT       6

The IP datasheet requires that clk_x / clk be 4, 5, or 6.  I just
chose 6 because it is the most defensive value, but it is not optimal.
By getting the clock rate of both "clk" and "clk_x", the driver can
compute the timing values more precisely.

To not break the existing platforms, the fallback value, 50 MHz is
provided.  It is true for all upstreamed platforms.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agomtd: rawnand: denali_dt: add more clocks based on IP datasheet
Masahiro Yamada [Wed, 19 Dec 2018 11:03:17 +0000 (20:03 +0900)]
mtd: rawnand: denali_dt: add more clocks based on IP datasheet

Based on Linux commit 6f1fe97bec349a1fd6c5a8c7c5998d759fe721d5

Currently, denali_dt.c requires a single anonymous clock, but
the Denali User's Guide requires three clocks for this IP:

 - clk: controller core clock

 - clk_x: bus interface clock

 - ecc_clk: clock at which ECC circuitry is run

This commit supports these named clocks to represent the real hardware.

For the backward compatibility, the driver still accepts a single clock
just as before.  The clk_x_rate is taken from the clock driver again if
the named clock "clk_x" is available.  This will happen only for future
DT, hence the existing DT files are not affected.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agolinux/kernel.h: import DIV_ROUND_CLOSEST_ULL from Linux
Masahiro Yamada [Wed, 19 Dec 2018 11:03:16 +0000 (20:03 +0900)]
linux/kernel.h: import DIV_ROUND_CLOSEST_ULL from Linux

Copied from Linux v4.20-rc7.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: add CONFIG_PREBOOT
Masahiro Yamada [Wed, 19 Dec 2018 11:03:15 +0000 (20:03 +0900)]
ARM: uniphier: add CONFIG_PREBOOT

For more boot-flow flexibility,

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: allow to source boot script before distro-boot
Masahiro Yamada [Wed, 19 Dec 2018 11:03:14 +0000 (20:03 +0900)]
ARM: uniphier: allow to source boot script before distro-boot

Some users might need additional setups before booting the kernel.
If there is found a file 'boot.scr', run it before invoking the
distro boot command.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: do not modify bootcmd environment variable at run-time
Masahiro Yamada [Wed, 19 Dec 2018 11:03:13 +0000 (20:03 +0900)]
ARM: uniphier: do not modify bootcmd environment variable at run-time

Some users might want to modify 'bootcmd' at compile-time by editing
include/configs/uniphier.h, but overwriting it at run-time makes it
impossible.

Instead, set 'bootdev' at run-time, which contains the boot device the
system is booting from, then indirectly reference it from 'bootcmd'.

It is up to users whether to override 'bootcmd'.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoMerge tag 'signed-efi-2019.01' of git://github.com/agraf/u-boot
Tom Rini [Thu, 27 Dec 2018 17:59:01 +0000 (12:59 -0500)]
Merge tag 'signed-efi-2019.01' of git://github.com/agraf/u-boot

Patch queue for efi v2019.01 - 2018-12-27

Three tiny last minute bug fixes:

  - Fix RTS relocation
  - Avoid read after free
  - Fix RTS data positioning (affects BBB)

5 years agoMerge branch '2018-12-26-master-imports'
Tom Rini [Thu, 27 Dec 2018 12:50:24 +0000 (07:50 -0500)]
Merge branch '2018-12-26-master-imports'

- Misc TI platform fixes
- mt7629 fix for Linux compatible SMP support
- Other small regression fixes

5 years agopower: regulator: Return success on attempt to disable an always-on regulator
Lokesh Vutla [Mon, 24 Dec 2018 11:07:41 +0000 (16:37 +0530)]
power: regulator: Return success on attempt to disable an always-on regulator

commit 4f86a724e82c0 ("power: regulator: denied disable on always-on
regulator") throws an error when requested to disable an always-on
regulator. It is right that an always-on regulator should not be
attempted to be disabled. But at the same time regulator framework
should not return an error when such request is received. Instead
it should just return success without attempting to disable the
specified regulator. This is because the requesting driver will
not have the idea if the regulator is always-on or not. The
requesting driver will always try to enable/disable regulator as
per the required flow. So it is upto regulator framework to not
break such scenarios.

Fixes: 4f86a724e82c0 ("power: regulator: denied disable on always-on regulator")
Reported-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agodoc: README.commands: sub-commands
Heinrich Schuchardt [Fri, 21 Dec 2018 01:57:03 +0000 (02:57 +0100)]
doc: README.commands: sub-commands

Describe the implementation of sub-commands.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agomt7629: use linux kernel compatible SMP initialization
Weijie Gao [Thu, 20 Dec 2018 08:12:50 +0000 (16:12 +0800)]
mt7629: use linux kernel compatible SMP initialization

This patch changes mt7629 to use the compatible platform SMP initialization
method of linux kernel.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 years agomt7623: fix a typo in include/configs/mt7623.h
Weijie Gao [Thu, 20 Dec 2018 08:12:49 +0000 (16:12 +0800)]
mt7623: fix a typo in include/configs/mt7623.h

Fix typo: neede -> needed

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 years agophy: Fix u-boot coruption when fixed-phy is used
Michal Simek [Wed, 19 Dec 2018 15:57:38 +0000 (16:57 +0100)]
phy: Fix u-boot coruption when fixed-phy is used

When fixed-link phy is used subnode offset is used as phy address. This
number is bigger then space allocated for bus structure (allocated via
mdio_alloc).
bus->phymap[] array has PHY_MAX_ADDR size (32).
That's why writing bus->phymap[addr] where addr is < 0 or > PHY_MAX_ADDR
is causing write to memory which can caused full U-Boot crash.

The patch is checking if address is in correct range.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm: K3: Fix usage of CONFIG_SYS_K3_KEY
Lokesh Vutla [Wed, 19 Dec 2018 07:23:31 +0000 (12:53 +0530)]
arm: K3: Fix usage of CONFIG_SYS_K3_KEY

For signing the tiboot3.bin image, an optional KEY file can be passed
using CONFIG_SYS_K3_KEY. Right now, Makefile scripts directly takes
the config value and uses it for signing. This is okay if the build
directory is a sub-directory of source tree, otherwise it fails.
Fix it by using the path relative to the source tree.

Reported-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoapi: storage: Fix enumeration of storage devices
Cristian Ciocaltea [Tue, 18 Dec 2018 18:03:49 +0000 (20:03 +0200)]
api: storage: Fix enumeration of storage devices

dev_stor_get() is not able to find the next available device in the current
storage group when the previous enumerated device belongs to a different
group or class (e.g. network).

The root cause is the device group iterator not being reset after an
unsuccessful search for the last returned device so that the following
search for the next available device will start from beginning.

The issue has been identified by loading and booting GRUB in a QEMU
vexpress-a9 environment.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@iquestgroup.com>
5 years agodm: pinctrl: Prevent (re-)configuring pins when already done before relocation
Lukasz Majewski [Tue, 18 Dec 2018 11:30:50 +0000 (12:30 +0100)]
dm: pinctrl: Prevent (re-)configuring pins when already done before relocation

This commit prevents from re-configuring pins if those were configured
before relocation.

Some pins - like UART or DDR must be setup before relocation
(as they have 'u-boot,dm-pre-reloc' property set in DTS). Without this
change, those pins are re-configured after relocation (pre_reloc_only = 0,
so we do not "continue").
Such behavior may be a problem for DDR PAD configuration, as they might
be already leveled/tuned with original setup).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoARM: mach-omap2: omap3: Fix GPIO clocking in SPL
Adam Ford [Fri, 14 Dec 2018 22:28:30 +0000 (16:28 -0600)]
ARM: mach-omap2: omap3: Fix GPIO clocking in SPL

OMAP3_GPIO_x is needed to enable each GPIO bank on the OMAP3
boards. At one point, the #ifdef's were replaced with
if CONFIG_IS_ENABLED but this won't work for people who need
OMAP3_GPIO_x in SPL since the SPL prefix for this option isn't
used in Kconfig.  This patch moves the check to #if defined and
also makes Kconfig select the banks if CMD_GPIO is used which
makes the checks in the code less cumbersome.

Fixes: bd8a9c14c91c ("arm: mach-omap2/omap3/clock.c: Enable
all GPIO with CMD_GPIO")

Reported-by: Liam O'Shaughnessy <liam.o.shaughnessy@gumstix.com>
Signed-off-by: Adam Ford <aford173@gmail.com>
[trini: Migrate omap3_igep00x0.h]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agotests: enable DT overlay tests by default
Heinrich Schuchardt [Fri, 14 Dec 2018 21:43:48 +0000 (22:43 +0100)]
tests: enable DT overlay tests by default

Enable device tree overlay tests by default if unit tests are selected
and the runtime is configured via device tree.

Overlays have been mainlined in the device tree compiler so there is no
reason anymore to disable the tests by default.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoscripts/check-config.sh: Add usage()
Andy Shevchenko [Tue, 11 Dec 2018 16:22:28 +0000 (18:22 +0200)]
scripts/check-config.sh: Add usage()

When arguments are not supplied the error message is misleading and
doesn't tell what exactly has to be done.

Fix this by adding usage() and call it if above circumstance occurs.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoefi_loader: Make RTS relocation more robust
Alexander Graf [Tue, 11 Dec 2018 09:00:42 +0000 (10:00 +0100)]
efi_loader: Make RTS relocation more robust

While changing the RTS alignment to 64KB in commit 7a82c3051c8f
("efi_loader: Align runtime section to 64kb") the relocation code
started to break.

The reason for that is that we didn't actually look at the real
relocation data. We merely took the RUNTIME_CODE section as a
hint and started to relocate based on self calculated data from
that point on. That calculation was now out of sync though.

To ensure we're not running into such a situation again, this patch
makes the runtime relocation code a bit more robust. We can just
trust the phys/virt hints from the payload. We also should check that
we really only have a single section, as the code doesn't handle
multiple code relocations yet.

Fixes: 7a82c3051c8f ("efi_loader: Align runtime section to 64kb")
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reported-by: Loic Devulder <ldevulder@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Loic Devulder <ldevulder@suse.de>
Tested-by: Jonathan Gray <jsg@jsg.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
5 years agolib: crc32: mark static variable as __efi_runtime_data
Heinrich Schuchardt [Tue, 18 Dec 2018 17:06:14 +0000 (18:06 +0100)]
lib: crc32: mark static variable as __efi_runtime_data

In commit 483dbab9f931 ("lib: crc32: mark function crc32() as
__efi_runtime") one local static variable was missed. It did not end up in
the __efi_runtime_data section as it should.

If CONFIG_DYNAMIC_CRC_TABLE=y a data abort execption may occur when the
UEFI payload calls the SetVirtualAddressMap() runtime service.

Reported-by: Dominik Adamski <dominik.adamski@northerntech.community>
Fixes: 483dbab9f931 ("lib: crc32: mark function crc32() as __efi_runtime")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
5 years agoefi_selftest: block device: avoid read after free
Heinrich Schuchardt [Fri, 21 Dec 2018 23:37:41 +0000 (00:37 +0100)]
efi_selftest: block device: avoid read after free

Reading the position in a file after closing the same results in a read
after free.

Correct the sequence in the test.

Reported-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
5 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Fri, 21 Dec 2018 18:38:09 +0000 (13:38 -0500)]
Merge git://git.denx.de/u-boot-marvell

- Fix breakage in helios4: Change U-Boot offset on SPI Flash
- Enable CONFIG_BLK for db-88f6820-amc

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Fri, 21 Dec 2018 18:37:34 +0000 (13:37 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

- stratix10 updates

5 years agoMerge tag 'u-boot-amlogic-20181219' of git://git.denx.de/u-boot-amlogic
Tom Rini [Fri, 21 Dec 2018 18:37:09 +0000 (13:37 -0500)]
Merge tag 'u-boot-amlogic-20181219' of git://git.denx.de/u-boot-amlogic

A single fix to properly enable eMMC on the AXG S400 board.

5 years agoMerge tag 'mips-updates-for-2019.11' of git://git.denx.de/u-boot-mips
Tom Rini [Fri, 21 Dec 2018 18:36:51 +0000 (13:36 -0500)]
Merge tag 'mips-updates-for-2019.11' of git://git.denx.de/u-boot-mips

- mips: fix some DTC warnings
- bmips: bcm6348: add DMA driver
- bmips: bcm5348: add ethernet driver
- bmips: bcm6368: add ethernet driver
- mips: mt76xx: fix DMA problems, disable CONFIG_OF_EMBED
- mips: mscc: add support for Microsemi Ocelot and Luton SoCs
- mips: mscc: add support for Ocelot and Luton evaluation boards
- mips: jz47xx: add basic support for Ingenic JZ4780 SoC
- mips: jz47xx: add support for Imgtec Creator CI20 board

5 years agoMerge git://git.denx.de/u-boot-riscv
Tom Rini [Fri, 21 Dec 2018 18:36:08 +0000 (13:36 -0500)]
Merge git://git.denx.de/u-boot-riscv

- Add DM drivers to support RISC-V CPU and timer, plus some bug fixes.
- Support SiFive UART
- Rename ax25-ae350 defconfig

5 years agoarm: mvebu: configs: helios4: Change U-Boot offset on SPI Flash
Aditya Prayoga [Wed, 19 Dec 2018 04:08:50 +0000 (12:08 +0800)]
arm: mvebu: configs: helios4: Change U-Boot offset on SPI Flash

SPI flash support on Helios4 [1] has been merge to u-boot/master on
commit 8cb8c0c6a83bef ("Merge git://git.denx.de/u-boot-marvell")

However, the SPI image build failed after the merge with following
message:

COPY    spl/u-boot-spl.bin
MKIMAGE u-boot-spl.kwb
Error: Image header (incl. SPL image) too big!
header=0x20816 CONFIG_SYS_U_BOOT_OFFS=0x20000!
Increase CONFIG_SYS_U_BOOT_OFFS!
Error: Image header (incl. SPL image) too big!
header=0x20816 CONFIG_SYS_U_BOOT_OFFS=0x20000!
Increase CONFIG_SYS_U_BOOT_OFFS!
Could not create image
Makefile:1162: recipe for target 'u-boot-spl.kwb' failed
make: *** [u-boot-spl.kwb] Error 1

Let's increase the u-boot offset to 0x30000 to accommodate SPL changes
and leave some margin for future changes.

[1] https://patchwork.ozlabs.org/patch/1007762/

Signed-off-by: Aditya Prayoga <aditya@kobol.io>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agoARM: mvebu: remove out of date comment
Chris Packham [Fri, 14 Dec 2018 03:27:57 +0000 (16:27 +1300)]
ARM: mvebu: remove out of date comment

The Marvell DDR3 training code is now part of the U-Boot SPL so the
comment saying it needs porting is no longer correct.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agoARM: mvebu: define CONFIG_BLK for db-88f6820-amc
Chris Packham [Fri, 7 Dec 2018 03:19:42 +0000 (16:19 +1300)]
ARM: mvebu: define CONFIG_BLK for db-88f6820-amc

db-88f6820-amc uses CONFIG_DM_USB and CONFIG_USB_STORAGE already so
define CONFIG_BLK to prepare it for full conversion to DM.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agoarm: socfpga: stratix10: Enable Stratix10 FPGA Reconfiguration
Ang, Chee Hong [Thu, 20 Dec 2018 02:35:16 +0000 (18:35 -0800)]
arm: socfpga: stratix10: Enable Stratix10 FPGA Reconfiguration

Select CONFIG_FPGA_STRATIX10 for CONFIG_TARGET_SOCFPGA_STRATIX10.

Signed-off-by: Ang, Chee Hong <chee.hong.ang@intel.com>
5 years agoarm: socfpga: stratix10: Add Stratix10 FPGA into FPGA device table
Ang, Chee Hong [Thu, 20 Dec 2018 02:35:15 +0000 (18:35 -0800)]
arm: socfpga: stratix10: Add Stratix10 FPGA into FPGA device table

Enable 'fpga' command in u-boot. User will be able to use the FPGA
command to program the FPGA on Stratix10 SoC.

Signed-off-by: Ang, Chee Hong <chee.hong.ang@intel.com>
5 years agoarm: socfpga: stratix10: Add Stratix 10 FPGA Reconfiguration Driver
Ang, Chee Hong [Thu, 20 Dec 2018 02:35:14 +0000 (18:35 -0800)]
arm: socfpga: stratix10: Add Stratix 10 FPGA Reconfiguration Driver

Enable FPGA reconfiguration support for Stratix 10 SoC.

Signed-off-by: Ang, Chee Hong <chee.hong.ang@intel.com>