]> git.ipfire.org Git - people/ms/u-boot.git/log
people/ms/u-boot.git
6 years agoMerge git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Thu, 12 Oct 2017 17:36:58 +0000 (13:36 -0400)] 
Merge git://git.denx.de/u-boot-fsl-qoriq

6 years agoMerge git://www.denx.de/git/u-boot-imx
Tom Rini [Thu, 12 Oct 2017 17:36:37 +0000 (13:36 -0400)] 
Merge git://www.denx.de/git/u-boot-imx

6 years agoARM: imx6: Add DHCOM i.MX6 PDK board support
Marek Vasut [Mon, 9 Oct 2017 19:51:10 +0000 (21:51 +0200)] 
ARM: imx6: Add DHCOM i.MX6 PDK board support

Add support for the DHCOM i.MX6 PDK board. This board has:
- FEC ethernet
- EHCI USB host
- 3x SDMMC

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
6 years agoimx: mx7: spl: remove redundant SATA definitionas
Uri Mashiach [Tue, 10 Oct 2017 06:13:10 +0000 (09:13 +0300)] 
imx: mx7: spl: remove redundant SATA definitionas

The i.MX7 SOC doesn't include the SATA interface.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agomx6: sys_proto: Add prototypes for imx6_pcie_toggle() functions
Diego Dorta [Thu, 5 Oct 2017 12:15:58 +0000 (09:15 -0300)] 
mx6: sys_proto: Add prototypes for imx6_pcie_toggle() functions

When compiling with W=1 errors are observed:

drivers/pci/pcie_imx.c:517:12: warning: no previous prototype for ‘imx6_pcie_toggle_power’ [-Wmissing-prototypes] __weak int imx6_pcie_toggle_power(void)

drivers/pci/pcie_imx.c:528:12: warning: no previous prototype for ‘imx6_pcie_toggle_reset’ [-Wmissing-prototypes] __weak int imx6_pcie_toggle_reset(void)

Remove these warnings by adding the functions prototypes on arch-mx6/sys_proto.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
6 years agomx6: clock: Add a prototype for do_mx6_showclocks()
Diego Dorta [Thu, 5 Oct 2017 12:15:57 +0000 (09:15 -0300)] 
mx6: clock: Add a prototype for do_mx6_showclocks()

When compiling with W=1 the following warning is observed:

arch/arm/mach-imx/mx6/clock.c:1268:5: warning: no previous prototype for ‘do_mx6_showclocks’ [-Wmissing-prototypes] int do_mx6_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])

Remove this warning by adding the function prototype into arch-mx6/clock.h file.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
6 years agoi.mx6ul: xpress: update UART init for current board revision
Anatolij Gustschin [Mon, 2 Oct 2017 19:32:55 +0000 (21:32 +0200)] 
i.mx6ul: xpress: update UART init for current board revision

UART pinmux has been changed on the last board revision. Change
board pinmux accordingly. Console is on UART7 now, add pinmux,
base address and update console string in environment.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agomx6slevk: Use PARTUUID to specify the rootfs location
Fabio Estevam [Mon, 2 Oct 2017 13:11:37 +0000 (10:11 -0300)] 
mx6slevk: Use PARTUUID to specify the rootfs location

mx6slevk can run different kernel versions, such as NXP 4.1 or mainline.

Currently the rootfs location is passed via mmcblk number and the
problem with this approach is that the mmcblk number for the SD
card changes depending on the kernel version.

In order to avoid such issue, use the UUID method to specify the
rootfs location.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agodrivers: pci: imx: fix imx_pcie_remove function
Sven-Ola Tuecke [Thu, 5 Oct 2017 11:46:42 +0000 (08:46 -0300)] 
drivers: pci: imx: fix imx_pcie_remove function

We have at least a minor count of boards, that failed to re-initialize
PCI express in the Linux kernel. Typical failure rate is 20% on affected
boards. This is mitigated by commit 6ecbe1375671 ("drivers: pci: imx:
add imx_pcie_remove function").

However, at least on some i.MX6 custom boards, when calling
assert_core_reset() as part of the first-time PCIe init, read access
to PCIE_PL_PFLR simply hangs. Surround this readl() with
imx_pcie_fix_dabt_handler() does not help. For this reason, the forced
LTSSM detection is only used on the second assert_core_reset() that is
called shorly before starting the Linux kernel.

Signed-off-by: Sven-Ola Tuecke <sven-ola.tuecke@numberfour.eu>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: David Müller <d.mueller@elsoft.ch>
6 years agowandboard: Add support for the latest revd1 revision
Fabio Estevam [Mon, 2 Oct 2017 18:47:29 +0000 (15:47 -0300)] 
wandboard: Add support for the latest revd1 revision

Latest wandboard hardware revision is revd1, which brings the following
new features:

- PFUZE100 PMIC
- AR8035 Ethernet PHY
- Upgrade Wifi/BT chip to BCM4339/BCM43430.

The detection mechanism is to probe the PMIC and when it is
found, then the revision of the board is revd1.

As the detection is done via PMIC, we need to print the board version
at a later stage via CONFIG_DISPLAY_BOARDINFO_LATE and also need
to disable CONFIG_DISPLAY_BOARDINFO, which is done much earlier.

Make the necessary adjustments for the AR8035 PHY to work on revd1.

Based on Richard Hu's work from Technexion's U-Boot tree.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agodoc: update imx_usb_loader URL
Stefan Agner [Tue, 3 Oct 2017 14:43:26 +0000 (16:43 +0200)] 
doc: update imx_usb_loader URL

The changes required to use U-Boot's Serial Download Protocol
implementation are now available in upstream imx_usb_loader
repository. Update the URL accordingly.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoarm: imx7d: add support for Compulab cl-som-imx7
Ilya Ledvich [Sun, 24 Sep 2017 06:00:25 +0000 (09:00 +0300)] 
arm: imx7d: add support for Compulab cl-som-imx7

Add initial support for Compulab cl-som-imx7 SoM.
The initial support includes:
 - MMC
 - eMMC
 - SPI flash
 - I2C
 - FEC
 - USB
 - Serial console

Signed-off-by: Ilya Ledvich <ilya@compulab.co.il>
6 years agoimx: mx7: SPL support for i.MX7
Uri Mashiach [Sun, 24 Sep 2017 06:00:24 +0000 (09:00 +0300)] 
imx: mx7: SPL support for i.MX7

Add configuration file and spl_boot_device function for the i.MX7 SPL.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
6 years agoimx: mx7: DDR controller configuration for the i.MX7 architecture
Uri Mashiach [Sun, 24 Sep 2017 06:00:23 +0000 (09:00 +0300)] 
imx: mx7: DDR controller configuration for the i.MX7 architecture

The configuration files imximage.cfg are used for the DDR controller
configuration.
Add DDR configuration function to replace the DDR controller
configuration in the imximage.cfg file. The function can be used for
DDR size detection.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
6 years agoimx: mx7: fix the CCM_ macros
Uri Mashiach [Sun, 24 Sep 2017 06:00:22 +0000 (09:00 +0300)] 
imx: mx7: fix the CCM_ macros

The CCM_ macros use the CCM_BASE_ADDRESS macro, which doesn't exist.
Replace the CCM_BASE_ADDRESS macros with CCM_BASE_ADDR.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
6 years agoicorem6_rqs: env: Return mmc devno
Jagan Teki [Thu, 28 Sep 2017 17:59:14 +0000 (23:29 +0530)] 
icorem6_rqs: env: Return mmc devno

Instead of changing mmc devno from dts nodes better
to return the detected devno so-that env trigger the same.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
6 years agoicore: configs: Fix merge conflict issue
Jagan Teki [Thu, 28 Sep 2017 17:59:13 +0000 (23:29 +0530)] 
icore: configs: Fix merge conflict issue

Fix for finding mmc devices on i.MX6Q icore boards
added in below comment
"icorem6: Fix to find MMC devices"
(sha1: a2b137b38d925df91afef52f5122927de024f81a)

which is reverted in during u-boot-imx merge
" Merge git://git.denx.de/u-boot-imx"
(sha1: 6aee2ab68c362ace5a59f89a63abed82e0bf19e5)

This patch, is recreated to fix merge conflict.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
6 years agotopic_miami: Remove CONFIG_CMD_BOOTZ undef
Fabio Estevam [Thu, 28 Sep 2017 19:46:00 +0000 (16:46 -0300)] 
topic_miami: Remove CONFIG_CMD_BOOTZ undef

CONFIG_CMD_BOOTZ option has been converted to defconfig, so there
is no need to undefine it in board config file anymore.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agomx6sabresd: Include <usb/ehci-ci.h> header file
Diego Dorta [Wed, 27 Sep 2017 16:12:40 +0000 (13:12 -0300)] 
mx6sabresd: Include <usb/ehci-ci.h> header file

When compiling with W=1 the following warning is observed:

board/freescale/mx6sabresd/mx6sabresd.c:586:5: warning: no previous prototype for ‘board_ehci_hcd_init’ [-Wmissing-prototypes] int board_ehci_hcd_init(int port)

Remove this warning by including <usb/ehci-ci.h>.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
6 years agousb: ehci-ci: Add a prototype for board_ehci_power()
Diego Dorta [Wed, 27 Sep 2017 16:12:39 +0000 (13:12 -0300)] 
usb: ehci-ci: Add a prototype for board_ehci_power()

When compiling with W=1 the following warning is observed:

board/freescale/mx6sabresd/mx6sabresd.c:601:5: warning: no previous prototype for ‘board_ehci_power’ [-Wmissing-prototypes] int board_ehci_power(int port, int on)

Remove this warning by adding the function prototype into usb/ehci-ci.h file.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
6 years agomx6sabresd: Include <asm/mach-imx/spi.h> header file
Diego Dorta [Wed, 27 Sep 2017 16:12:38 +0000 (13:12 -0300)] 
mx6sabresd: Include <asm/mach-imx/spi.h> header file

When compiling with W=1 the following warning is observed:

board/freescale/mx6sabresd/mx6sabresd.c:680:5: warning: no previous prototype for ‘board_spi_cs_gpio’ [-Wmissing-prototypes] int board_spi_cs_gpio(unsigned bus, unsigned cs)

Remove this warning by including <asm/mach-imx/spi.h>.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
6 years agomx6: soc: Include <asm/bootm.h> header file
Diego Dorta [Wed, 27 Sep 2017 16:12:37 +0000 (13:12 -0300)] 
mx6: soc: Include <asm/bootm.h> header file

When compiling with W=1 the following warning is observed:

arch/arm/mach-imx/mx6/soc.c:213:12: warning: no previous prototype for ‘get_board_rev’ [-Wmissing-prototypes] u32 __weak get_board_rev(void)

Fix the build warning by including <asm/bootm.h>.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
6 years agomx7ulp_evk: Move CONFIG_CMD_BOOTZ to Kconfig
Fabio Estevam [Wed, 27 Sep 2017 18:00:41 +0000 (15:00 -0300)] 
mx7ulp_evk: Move CONFIG_CMD_BOOTZ to Kconfig

CONFIG_CMD_BOOTZ symbol does not work in board config file
anymore, so fix this by moving it to Kconfig.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
6 years agoimx: sys_proto: Add a prototype for board_mmc_get_env_dev()
Diego Dorta [Thu, 21 Sep 2017 18:10:03 +0000 (15:10 -0300)] 
imx: sys_proto: Add a prototype for board_mmc_get_env_dev()

When compiling with W=1 the following warning is observed:

board/freescale/mx6sabresd/mx6sabresd.c:266:5: warning:
no previous prototype for ‘board_mmc_get_env_dev’
[-Wmissing-prototypes] int board_mmc_get_env_dev(int devno)

Remove this warning by adding the function prototype into sys_proto.h file.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agoimx: Include <input.h> header file
Diego Dorta [Fri, 22 Sep 2017 15:12:18 +0000 (12:12 -0300)] 
imx: Include <input.h> header file

When building with W=1 errors like the one below is seen:

board/freescale/mx6sabresd/mx6sabresd.c:546:5: warning:
no previous prototype for ‘overwrite_console’
[-Wmissing-prototypes] int overwrite_console(void)

Fix the build warnings by including <input.h>.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agomx6: toradex: Remove custom CONFIG_SPL_PAD_TO definition
Fabio Estevam [Mon, 25 Sep 2017 18:20:56 +0000 (15:20 -0300)] 
mx6: toradex: Remove custom CONFIG_SPL_PAD_TO definition

CONFIG_SPL_PAD_TO is already defined inside "imx6_spl.h", so there
is no need to redefine it in the board config files.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
6 years agomx25pdk: Remove duplicated define
Otavio Salvador [Sat, 30 Sep 2017 01:55:00 +0000 (22:55 -0300)] 
mx25pdk: Remove duplicated define

The CONFIG_SYS_MMC_ENV_DEV is duplicated, drop it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
6 years agomx25pdk: Use generic filesystem commands
Otavio Salvador [Sat, 30 Sep 2017 01:54:59 +0000 (22:54 -0300)] 
mx25pdk: Use generic filesystem commands

This rework the board to use the generic filesystem commands instead
of forcing the use of FAT for the boot files.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
6 years agoREADME.imx6: Prefer loading SPL via the new SDP mechanism
Fabio Estevam [Wed, 20 Sep 2017 14:21:49 +0000 (11:21 -0300)] 
README.imx6: Prefer loading SPL via the new SDP mechanism

Now that it is possible to load SPL and u-boot.img via imx_usb_loader
tool, mention this method instead of the old one that relied on ymodem.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agomx53loco: Let CONFIG_DISPLAY_CPUINFO be selected
Fabio Estevam [Tue, 19 Sep 2017 17:46:29 +0000 (14:46 -0300)] 
mx53loco: Let CONFIG_DISPLAY_CPUINFO be selected

With CONFIG_DISPLAY_CPUINFO=y we get a "Reset cause" line, which
brings important information of the reboot cause.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx6: disable clock command and print_cpuinfo code in SPL
Anatolij Gustschin [Mon, 28 Aug 2017 19:46:26 +0000 (21:46 +0200)] 
imx6: disable clock command and print_cpuinfo code in SPL

We do not use print_cpuinfo and clock command code in SPL,
disable it when building SPL image.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
6 years agocolibri_imx6: Avoid calling setup_display() from SPL code
Fabio Estevam [Sat, 23 Sep 2017 02:45:33 +0000 (23:45 -0300)] 
colibri_imx6: Avoid calling setup_display() from SPL code

There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoapalis_imx6: Avoid calling setup_display() from SPL code
Fabio Estevam [Sat, 23 Sep 2017 02:45:32 +0000 (23:45 -0300)] 
apalis_imx6: Avoid calling setup_display() from SPL code

There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agomx6cuboxi: Avoid calling setup_display() from SPL code
Fabio Estevam [Sat, 23 Sep 2017 02:45:31 +0000 (23:45 -0300)] 
mx6cuboxi: Avoid calling setup_display() from SPL code

There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agowandboard: Avoid calling setup_display() from SPL code
Fabio Estevam [Sat, 23 Sep 2017 02:45:30 +0000 (23:45 -0300)] 
wandboard: Avoid calling setup_display() from SPL code

There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agocgtqmx6eval: Avoid calling setup_display() from SPL code
Fabio Estevam [Sat, 23 Sep 2017 02:45:29 +0000 (23:45 -0300)] 
cgtqmx6eval: Avoid calling setup_display() from SPL code

There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agomx6sabresd: Avoid calling setup_display() from SPL code
Fabio Estevam [Sat, 23 Sep 2017 02:45:28 +0000 (23:45 -0300)] 
mx6sabresd: Avoid calling setup_display() from SPL code

There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agoMerge git://git.denx.de/u-boot-i2c
Tom Rini [Wed, 11 Oct 2017 12:38:20 +0000 (08:38 -0400)] 
Merge git://git.denx.de/u-boot-i2c

6 years agoi2c: muxes: pca954x: look up width from chip_desc
Chris Packham [Thu, 28 Sep 2017 21:53:36 +0000 (10:53 +1300)] 
i2c: muxes: pca954x: look up width from chip_desc

Commit 8e6eda7cda6c ("drivers/i2c/muxes/pca954x: Add pca9547 I2C mux
support") introduced a chip_desc for the pca954x devices but failed to
update pca954x_ofdata_to_platdata() to be aware of it. Make
pca954x_ofdata_to_platdata() lookup the chip_desc to validate the device
width.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Marek Behun <marek.behun@nic.cz>
6 years agoMerge branch 'rmobile' of git://git.denx.de/u-boot-sh
Tom Rini [Wed, 11 Oct 2017 00:14:38 +0000 (20:14 -0400)] 
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh

6 years agoconfigs: Re-sync CONFIG_CMD_IMLS with moveconfig
Tuomas Tynkkynen [Sun, 8 Oct 2017 18:48:02 +0000 (21:48 +0300)] 
configs: Re-sync CONFIG_CMD_IMLS with moveconfig

The option is specified in Kconfig, but still a few config header files
are overriding the choice by #undef'ing it. Re-sync the option with
moveconfig to rid of the #undefs.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
6 years agocmd: Toggle the default value of CONFIG_CMD_IMLS
Tuomas Tynkkynen [Sun, 8 Oct 2017 18:48:01 +0000 (21:48 +0300)] 
cmd: Toggle the default value of CONFIG_CMD_IMLS

Having this as a 'default y' is rather annoying because it doesn't
actually compile unless other options are defined in the board header:

../cmd/bootm.c: In function 'do_imls_nor':
../cmd/bootm.c:330:7: error: 'CONFIG_SYS_MAX_FLASH_BANKS' undeclared (first use in this function); did you mean 'CONFIG_SYS_MAX_FLASH_SECT'?
   i < CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {

Make it 'default n' so people who develop new boards that start from a
blank defconfig have one less compilation failure to debug.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
6 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Tue, 10 Oct 2017 00:19:39 +0000 (20:19 -0400)] 
Merge git://git.denx.de/u-boot-dm

6 years agoARM: rmobile: dts: Add SDR104/HS200 to Salvator-X
Marek Vasut [Fri, 6 Oct 2017 12:08:00 +0000 (14:08 +0200)] 
ARM: rmobile: dts: Add SDR104/HS200 to Salvator-X

Add DT nodes to enable SDR104/HS200 modes on Salvator-X boards.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Fixup ULCB CPLD support after PFC rework
Marek Vasut [Wed, 4 Oct 2017 01:03:50 +0000 (03:03 +0200)] 
ARM: rmobile: Fixup ULCB CPLD support after PFC rework

The ULCB CPLD support was not updated during the PFC table rework,
fix up the GPIO numbers until the CPLD support is rewritten to a
proper DM capable and DT probing driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoMerge git://git.denx.de/u-boot-video
Tom Rini [Mon, 9 Oct 2017 17:31:33 +0000 (13:31 -0400)] 
Merge git://git.denx.de/u-boot-video

6 years agoarmv8: ls1043ardb_sdcard: prepare falcon boot
York Sun [Thu, 28 Sep 2017 15:42:16 +0000 (08:42 -0700)] 
armv8: ls1043ardb_sdcard: prepare falcon boot

Due to a conflict with recent Primary Protected Application (PPA),
PPA cannot be loaded for SPL stage, falcon boot is not enabled by
default. With compatible PPA image, to enable falcon boot, activate
these Kconfig options in defconfig
CONFIG_SPL_FIT=y
CONFIG_SPL_FSL_LS_PPA=y
CONFIG_SPL_GZIP=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_OS_BOOT=y
CONFIG_SPL_OF_LIBFDT=y

Because environment variables are not avaiable during SPL stage for
SD boot, set "boot_os=y" as default.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoarmv8: ls1043ardb: Enable spl_board_init() function
York Sun [Thu, 28 Sep 2017 15:42:15 +0000 (08:42 -0700)] 
armv8: ls1043ardb: Enable spl_board_init() function

CONFIG_SPL_BOARD_INIT is used for SPL boot. Enable it in defconfig
for LS1043ARDB SPL targets.

Signed-off-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: layerscape: Enable falcon boot
York Sun [Thu, 28 Sep 2017 15:42:14 +0000 (08:42 -0700)] 
armv8: layerscape: Enable falcon boot

Add jump_to_image_linux() for arm64. Add "noreturn" flag to
armv8_switch_to_el2(). Add hooks to fsl-layerscape to enable falcon
boot.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
Tested-by: Łukasz Majewski <lukma@denx.de>
6 years agoarmv8: ls1043ardb: Use static DDR setting for SPL boot
York Sun [Thu, 28 Sep 2017 15:42:13 +0000 (08:42 -0700)] 
armv8: ls1043ardb: Use static DDR setting for SPL boot

This board has soldered DDR chips. To reduce the SPL image size,
use static DDR setting instead of dynamic DDR driver.

Signed-off-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: fsl-layerscape: Avoid running dram_init_banksize again
York Sun [Thu, 28 Sep 2017 15:42:12 +0000 (08:42 -0700)] 
armv8: fsl-layerscape: Avoid running dram_init_banksize again

gd->ram_size is reduced in this function to reserve secure memory.
Avoid running this function again to further reduce memory size.
This fixes issue for SPL boot with PPA image loaded in which case
secure memory is incorrectly allocated due to repeated calling.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agocmd: spl: fix compiling error when CONFIG_CMD_SPL_WRITE_SIZE not defined
York Sun [Thu, 28 Sep 2017 15:42:11 +0000 (08:42 -0700)] 
cmd: spl: fix compiling error when CONFIG_CMD_SPL_WRITE_SIZE not defined

CONFIG_CMD_SPL_WRITE_SIZE is used for writing parameters to non-volatile
storage. So far it is only used for NAND. Fix compiling error when this
macro is not used for SD.

Signed-off-by: York Sun <york.sun@nxp.com>
CC: Anatolij Gustschin <agust@denx.de>
6 years agospl: fix assignment of board info to global data
York Sun [Thu, 28 Sep 2017 15:42:10 +0000 (08:42 -0700)] 
spl: fix assignment of board info to global data

Commit 15eb1d43bf47 ("spl: reorder the assignment of board info to
global data") intended to move assignment of board info earlier,
into board_init_r(). However, function preload_console_init() is
called either from spl_board_init() or from board_init_f(). For the
latter case, the board info assignment is much earlier than proposed
board_init_r(). Create a new function to fill gd->bd and call this
function when needed.

Signed-off-by: York Sun <york.sun@nxp.com>
CC: Lokesh Vutla <lokeshvutla@ti.com>
CC: Ravi Babu <ravibabu@ti.com>
CC: Lukasz Majewski <lukma@denx.de>
CC: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoarmv8: ls1088a: Update MC boot sequence
Bogdan Purcareata [Thu, 5 Oct 2017 06:56:53 +0000 (06:56 +0000)] 
armv8: ls1088a: Update MC boot sequence

The MC boot sequence is contained in mc_env_boot. Update LS1088A
boards to use this function, and hook it to reset_phy so that it's
called late enough, after the ports have been initialized, for
proper DPC / DPL fixup.

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: fsl-layerscape: Allocate Secure memory from first ddr region
Sumit Garg [Tue, 3 Oct 2017 21:50:49 +0000 (03:20 +0530)] 
armv8: fsl-layerscape: Allocate Secure memory from first ddr region

This change is required due to trusted OS (OP-TEE) not being position
independent code, it requires compile time fixed base address.

To take care of this it is assumed that all layerscape armv8 platforms
has minimum 2G ddr in first region. So we can have fixed address
space (66 MB -> (2MB for PPA + 64MB for trusted OS)) allocated from
top of first 2G ddr region and compile trusted OS with this fixed
base address.

But one exception here is ls1012 where we have only 1G (rdb) or 512M
(frdm) ddr memory. For those we can have different fixed compile time
base addresses for trusted OS.

Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoarmv7: ls1021aiot: Move CONFIG_CMD_BOOTZ to Kconfig
Fabio Estevam [Thu, 28 Sep 2017 16:24:30 +0000 (13:24 -0300)] 
armv7: ls1021aiot: Move CONFIG_CMD_BOOTZ to Kconfig

CONFIG_CMD_BOOTZ symbol does not work in board config file
anymore, so fix this by moving it to Kconfig.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: Apply workaround for USB erratum A-009007 to LS1088A
Ran Wang [Fri, 22 Sep 2017 07:21:34 +0000 (15:21 +0800)] 
armv8: Apply workaround for USB erratum A-009007 to LS1088A

Rx Compliance tests may fail intermittently at high jitter
frequencies using default register values.

Program register USB_PHY_RX_OVRD_IN_HI in certain sequence
to make the Rx compliance test pass.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: ls1046aqds: Fix NAND offset for Fman ucode and env
Gong Qianyu [Mon, 18 Sep 2017 08:59:28 +0000 (16:59 +0800)] 
armv8: ls1046aqds: Fix NAND offset for Fman ucode and env

Fix a bug of 'commit 8104deb2d6b7 ("armv8: layerscape: Adjust memory
mapping for Flash/SD card on LS1046A")' as NAND block size is 256KB
on LS1046AQDS.

Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agosandbox: avoid memory leak in os_dirent_ls
Heinrich Schuchardt [Thu, 21 Sep 2017 10:56:07 +0000 (12:56 +0200)] 
sandbox: avoid memory leak in os_dirent_ls

Realloc does not free the old memory area if it fails.

Identified by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodm: ofnode: query correct property in livetree ofnode_get_addr_size
Klaus Goger [Wed, 20 Sep 2017 11:50:41 +0000 (13:50 +0200)] 
dm: ofnode: query correct property in livetree ofnode_get_addr_size

The livetree codepath of ofnode_get_addr_size always used the "reg"
property for of_get_property. Use the property parameter of the function
call instead and check the return value if the property exists.
Otherwise return FDT_ADDR_T_NONE.

This was discoverd while using SPI NOR with livetree.
spi_flash_decode_fdt checks for memory-map and will not fail with
livetree even if the property does not exist.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodm: core: Round up size when allocating so that it is cache line aligned
Faiz Abbas [Tue, 19 Sep 2017 11:23:50 +0000 (16:53 +0530)] 
dm: core: Round up size when allocating so that it is cache line aligned

The size variable may not be always be a mulitple of
ARCH_DMA_MINALIGN and using it to flush cache leads to cache
misaligned warnings.

Therefore, round up the size to a multiple of ARCH_DMA_MINLAIGN
when allocating private data.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodm: gpio: pca953x: Drop pointless data structure checks
Simon Glass [Sun, 17 Sep 2017 22:54:54 +0000 (16:54 -0600)] 
dm: gpio: pca953x: Drop pointless data structure checks

These checks cannot fail since driver model will not call a driver's
method if it cannot fully create the driver data structures.

It is confusing to have these checks and others might copy them. Drop this
code.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agodm: gpio: Correct use of -ENODEV in drivers
Simon Glass [Sun, 17 Sep 2017 22:54:53 +0000 (16:54 -0600)] 
dm: gpio: Correct use of -ENODEV in drivers

In U-Boot -ENODEV means that there is no device. When there is a problem
with the device, drivers should return an error like -ENXIO or -EREMOTEIO.
When the device tree properties cannot be read correct , they should
return -EINVAL.

Update various GPIO drivers to follow this rule, to help with consistency
for future driver writers.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Adam Ford <aford173@gmail.com>
6 years agodm: gpio: Add a comment about not copying some drivers
Simon Glass [Sun, 17 Sep 2017 22:54:52 +0000 (16:54 -0600)] 
dm: gpio: Add a comment about not copying some drivers

These three drivers all use U_BOOT_DEVICE rather than device tree to
create devices, so have to do manual allocation of platform data. This is
not true for new platforms.

Add a more explicit comment so that people do not copy this approach with
new boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Adam Ford <aford173@gmail.com>
6 years agodm: gpio: vybrid_gpio: Correct driver's use of bind() method
Simon Glass [Sun, 17 Sep 2017 22:54:51 +0000 (16:54 -0600)] 
dm: gpio: vybrid_gpio: Correct driver's use of bind() method

It does not look like this driver needs to use a bind() method. It does
not manually create devices with device_bind() nor does it create devices
using U_BOOT_DEVICE(). It seems to only use device tree.

Therefore the manual allocation of platform data is not needed and is
confusing. Also platform data should be set up by the ofdata_to_platdata()
method, not bind().

Update the driver in case others use it as a model in future.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Adam Ford <aford173@gmail.com>
6 years agotest: print_ut: Add test for %ls strings
Rob Clark [Wed, 13 Sep 2017 22:46:54 +0000 (18:46 -0400)] 
test: print_ut: Add test for %ls strings

Add a simple test for long strings.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoconfigs: stm32h743-eval: enable filesystem related flags
Patrice Chotard [Tue, 3 Oct 2017 13:55:02 +0000 (15:55 +0200)] 
configs: stm32h743-eval: enable filesystem related flags

Enable CMD_GPT/EXT2/EXT4/EXT4_WRITE/FAT_FS_GENERIC flags

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoconfigs: stm32h743-disco: enable filesystem related flags
Patrice Chotard [Tue, 3 Oct 2017 13:55:01 +0000 (15:55 +0200)] 
configs: stm32h743-disco: enable filesystem related flags

Enable CMD_GPT/EXT2/EXT4/EXT4_WRITE/FAT_FS_GENERIC flags

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoconfigs: stm32h743-disco: enable SDMMC support
Patrice Chotard [Tue, 3 Oct 2017 13:55:00 +0000 (15:55 +0200)] 
configs: stm32h743-disco: enable SDMMC support

Enable CMD_MMC, DM_MMC and STM32_SDMMC2 flags

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoconfigs: stm32h743-eval: enable SDMMC support
Patrice Chotard [Tue, 3 Oct 2017 13:54:59 +0000 (15:54 +0200)] 
configs: stm32h743-eval: enable SDMMC support

Enable CMD_MMC, DM_MMC and STM32_SDMMC2 flags

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agodm: mmc: remove DM_MMC_OPS for STM32_SDMMC
Patrice Chotard [Tue, 3 Oct 2017 13:54:58 +0000 (15:54 +0200)] 
dm: mmc: remove DM_MMC_OPS for STM32_SDMMC

Since e7881d85 "dm: mmc: Drop CONFIG_DM_MMC_OPS" DM_MMC_OPS
is no more used, remove it from STM32_SDMMC2 dependencies

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoARM: DTS: stm32: add SDMMC support fo stm32h743-eval
Patrice Chotard [Tue, 3 Oct 2017 13:54:57 +0000 (15:54 +0200)] 
ARM: DTS: stm32: add SDMMC support fo stm32h743-eval

Add pinctrl and sdmmc nodes to add MMC support for
STM32H743 evaluation board.

Evaluation board needs a second pinctrl node
"pinctrl_sdmmc1_level_shifter" to drive a level shifter
on MMC bus.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoARM: DTS: stm32: add SDMMC support for stm32h743 disco
Patrice Chotard [Tue, 3 Oct 2017 13:54:56 +0000 (15:54 +0200)] 
ARM: DTS: stm32: add SDMMC support for stm32h743 disco

Add pinctrl and sdmmc nodes to add MMC support for
STM32H743 discovery board.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoconfigs: stm32: update SRAM address for STM32H7 disco and eval
Patrice Chotard [Tue, 3 Oct 2017 13:47:59 +0000 (15:47 +0200)] 
configs: stm32: update SRAM address for STM32H7 disco and eval

As suggested by Vikas Manocha, update embedded SRAM address
to use AXI SRAM available on D1 domain instead of using
AHB SRAM (D2 domain).
On some STM32H743 SoCs, D2 domain SRAM is accessible even if
SRAMxEN bit in AHB2ENR bits are not set whereas on others SoCs
version it's not accessible.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
6 years agoARM: stm32f7: fix prescaler calculation of timer
Bo Shen [Tue, 3 Oct 2017 05:47:59 +0000 (22:47 -0700)] 
ARM: stm32f7: fix prescaler calculation of timer

As the timer 2 is on APB1 bus, the maximum of clock frequency of APB1 timer
clock is half of SYSCLK. Then to calculate the timer prescaler for timer 2
which need to be divided by 2.

Signed-off-by: Bo Shen <voice.shen@gmail.com>
Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
6 years agofs/fat: Check malloc return values and fix memory leaks
Tuomas Tynkkynen [Sat, 30 Sep 2017 23:25:22 +0000 (02:25 +0300)] 
fs/fat: Check malloc return values and fix memory leaks

Check malloc() return values and properly unwind on errors so
memory allocated for fat_itr structures get freed properly.

Also fixes a leak of fsdata.fatbuf in fat_size().

Fixes: 2460098cffacd1 ("fs/fat: Reduce stack usage")
Reported-by: Coverity (CID: 167225, 167233, 167234)
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agofs/fat: Fix 'CACHE: Misaligned operation at range' warnings
Tuomas Tynkkynen [Sat, 30 Sep 2017 23:25:21 +0000 (02:25 +0300)] 
fs/fat: Fix 'CACHE: Misaligned operation at range' warnings

The 'block' field of fat_itr needs to be properly aligned for DMA and
while it does have '__aligned(ARCH_DMA_MINALIGN)', the fat_itr structure
itself needs to be properly aligned as well.

While at it use malloc_cache_aligned() for the other aligned allocations
in the file as well.

Fixes: 2460098cffacd1 ("fs/fat: Reduce stack usage")
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agocmd: Make CMD_LZMA / CMD_UNZIP default y if CMD_BOOTI
Tom Rini [Fri, 29 Sep 2017 18:32:44 +0000 (14:32 -0400)] 
cmd: Make CMD_LZMA / CMD_UNZIP default y if CMD_BOOTI

In the Linux Kernel on ARM64, the Image.COMPRESSION file is not
self-extracting in the way that x86 and ARM images are.  So when
CMD_BOOTI is enabled we should also default to enabling CMD_UNZIP and
CONFIG_LZMA in order for the user to be able to decompress many of the
common compressions that will be done to an Image file.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoscripts: Move Kconfig contents to cmd/Kconfig
Sam Protsenko [Thu, 28 Sep 2017 19:33:45 +0000 (12:33 -0700)] 
scripts: Move Kconfig contents to cmd/Kconfig

On case-insensitive file systems we have collision between
scripts/kconfig/ directory and scripts/Kconfig file. This patch moves
scripts/Kcofnig contents to cmd/Kconfig to fix that.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoserial: stm32x7: remove useless CONFIG_CLK and OF_CONTROL flag
Patrice Chotard [Wed, 27 Sep 2017 13:44:53 +0000 (15:44 +0200)] 
serial: stm32x7: remove useless CONFIG_CLK and OF_CONTROL flag

This driver is currently used by STM32F7 and STM32H7 SoCs.
As CONFIG_CLK and OF_CONTROL flags are set by default for these
2 SoCs, this flag becomes useless in this driver, so remove it.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoserial: stm32x7: add STM32F4 support
Patrice Chotard [Wed, 27 Sep 2017 13:44:52 +0000 (15:44 +0200)] 
serial: stm32x7: add STM32F4 support

stm32f4 doesn't support FIFO and OVERRUN feature.
The enable bit is not at the same location in CR1
register than for STM32F7 and STM32H7.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoserial: stm32x7: add fifo support for STM32H7
Patrice Chotard [Wed, 27 Sep 2017 13:44:51 +0000 (15:44 +0200)] 
serial: stm32x7: add fifo support for STM32H7

Add fifo mode support for rx and tx.
As only STM32H7 supports this feature, add has_fifo flag
to uart configuration to use fifo only when possible.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoserial: stm32x7: prepare the ground to STM32F4 support
Patrice Chotard [Wed, 27 Sep 2017 13:44:50 +0000 (15:44 +0200)] 
serial: stm32x7: prepare the ground to STM32F4 support

STM32F4 serial IP is similar to F7 and H7, but registers
are not located at the same offset and some feature are
only supported by F7 and H7 version.

Registers offset must be added for each version and also
some flags indicated the supported feature.

Update registers name to match with datasheet (sr to isr,
rx_dr to rdr and tx_dr to tdr) and remove unused regs
(cr2, gtpr, rtor, and rqr).

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoserial: stm32x7: remove stm32f7-usart and stm32h7-usart compatible
Patrice Chotard [Wed, 27 Sep 2017 13:44:49 +0000 (15:44 +0200)] 
serial: stm32x7: remove stm32f7-usart and stm32h7-usart compatible

This patch remove the extra compatibility string "st,stm32h7-usart"
and "st,stm32f7-usart" to avoid confusion, save some time & space.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
6 years agoserial: stm32x7: cleanup code
Patrice Chotard [Wed, 27 Sep 2017 13:44:48 +0000 (15:44 +0200)] 
serial: stm32x7: cleanup code

Use BIT() macro and GENMASK() macro

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
6 years agoARMv8: make master CPU checking logic more clear
zijun_hu [Mon, 25 Sep 2017 07:28:50 +0000 (15:28 +0800)] 
ARMv8: make master CPU checking logic more clear

macro branch_if_master checks master CPU via (Aff3 & (Aff2:Aff1:Aff0))
it is simple but a little obscure.

fix by checking Affx fields within MPIDR_EL1 directly.

Signed-off-by: zijun_hu <zijun_hu@htc.com>
6 years agoboard: STiH410-B2260: set ramdisk_addr_r to 0x48000000
Lee Jones [Mon, 25 Sep 2017 07:14:20 +0000 (09:14 +0200)] 
board: STiH410-B2260: set ramdisk_addr_r to 0x48000000

Add missing ramdisk_addr_r param and set it to 0x48000000

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoboard: STiH410-B2260: fix sdram size
Nicolas Le Bayon [Mon, 25 Sep 2017 07:14:19 +0000 (09:14 +0200)] 
board: STiH410-B2260: fix sdram size

32MB are reserved for TrustZone purpose

Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
6 years agoboard: STiH410-B2260: update environment variable
Patrice Chotard [Mon, 25 Sep 2017 07:14:18 +0000 (09:14 +0200)] 
board: STiH410-B2260: update environment variable

Update environment variable by updating:
 _ BOOT_TARGET_DEVICE
 _ CONFIGS_BOOTARGS
 _ kernel_addr_r, fdtfile, fdt_addr_r, scriptaddr, fdt_high, intird_high

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoARMv8: fix error in freeing stack frame
zijun_hu [Sat, 23 Sep 2017 05:30:58 +0000 (13:30 +0800)] 
ARMv8: fix error in freeing stack frame

relocate_code() allocates 32 bytes stack frame but only 16 bytes are
freed before return. it will cause errors to possible previous frames
and doesn't make relocate_code() look like a function.

fix by freeing 32 bytes stack space

Signed-off-by: zijun_hu <zijun_hu@htc.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoARMv8: get new GD address from gd->new_gd directly
zijun_hu [Fri, 22 Sep 2017 06:39:13 +0000 (14:39 +0800)] 
ARMv8: get new GD address from gd->new_gd directly

the new GD address is calculated via board data BD currently
it require the new GD area locates below BD tightly, so a strict
constraint is imposed on memory layout which maybe make special
platform unpleasant.

fix it by getting new GD address from gd->new_gd directly.

Signed-off-by: zijun_hu <zijun_hu@htc.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoTravis-CI: Fix microblaze and xilinx jobs
Tom Rini [Sat, 7 Oct 2017 19:54:18 +0000 (15:54 -0400)] 
Travis-CI: Fix microblaze and xilinx jobs

Given how we handle the ARM toolchain we can't easily combine these two
jobs, so don't.  Give xilinx/ARM a separate build.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agocmd/gpt.c, cmd/nvedit.c, tools/fit_image.c: Rework recent fixes for Coverity
Tom Rini [Sat, 7 Oct 2017 15:27:59 +0000 (11:27 -0400)] 
cmd/gpt.c, cmd/nvedit.c, tools/fit_image.c: Rework recent fixes for Coverity

The recent changes to these files did not completely fix the previous
issues, or introduced different (minor) issues.  In cmd/gpt.c we need to
dereference str_disk_guid to be sure that malloc worked.  In
cmd/nvedit.c we need to be careful that we can also fit in that leading
space when adding to the string.  And in tools/fit_image.c we need to
re-work the error handling slightly in fit_import_data() so that we only
call munmap() once.  We have two error paths here, one where we have an
fd to close and one where we do not.  Adjust labels to match this.

Reported-by: Coverity (CID: 167366, 167367, 167370)
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Sat, 7 Oct 2017 13:12:04 +0000 (09:12 -0400)] 
Merge git://git.denx.de/u-boot-x86

6 years agox86: edison: Bring minimal ACPI support to the board
Andy Shevchenko [Tue, 3 Oct 2017 11:55:08 +0000 (14:55 +0300)] 
x86: edison: Bring minimal ACPI support to the board

This board is based on Intel Tangier SoC (Intel Merrifield platform)
and may utilize ACPI powerfulness.

Bring minimum support by appending initial DSDT table for it.

Note, the addresses for generated tables are carefully chosen to avoid
any conflicts with existing shadowed BIOS data. The user have somewhat
like ~31 kB available for compiled ACPI tables that ought to be enough.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
6 years agox86: tangier: Enable ACPI support for Intel Tangier
Andy Shevchenko [Tue, 3 Oct 2017 11:55:07 +0000 (14:55 +0300)] 
x86: tangier: Enable ACPI support for Intel Tangier

Intel Tangier SoC is a part of Intel Merrifield platform which doesn't
utilize ACPI by default. Here is an attempt to unleash ACPI flexibility
power on Intel Merrifield based platforms.

The change brings minimum support of the devices that found on
Intel Merrifield based end user device.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 years agox86: theadorable-x86-xxx_defconfig: Enable setexpr command
Stefan Roese [Fri, 6 Oct 2017 07:12:28 +0000 (09:12 +0200)] 
x86: theadorable-x86-xxx_defconfig: Enable setexpr command

The setexpr command is useful for scripting, lets enable it for all
x86 based theadorable platforms.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 years agox86: theadorable-x86-common: Move "-generic" into kernel-ver variable
Stefan Roese [Fri, 6 Oct 2017 07:12:27 +0000 (09:12 +0200)] 
x86: theadorable-x86-common: Move "-generic" into kernel-ver variable

This enables the easier usage of "-custom" kernel versions as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 years agox86: theadorable-x86-common: Add further pci hotplug cmdline parameters
Stefan Roese [Fri, 6 Oct 2017 07:12:26 +0000 (09:12 +0200)] 
x86: theadorable-x86-common: Add further pci hotplug cmdline parameters

This is needed for the PCIe hotplug to work correctly on some boards.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 years agoTravis-CI: Split out more vendors from the catch-all ARM job
Tom Rini [Fri, 6 Oct 2017 20:37:06 +0000 (16:37 -0400)] 
Travis-CI: Split out more vendors from the catch-all ARM job

- Move SoCFPGA and K2 boards to their own job
- Expand the microblaze job to cover ARM boards from Xilinx as well.

Signed-off-by: Tom Rini <trini@konsulko.com>