]> git.sur5r.net Git - u-boot/log
u-boot
7 years agocommon/console.c: ensure GD_FLG_SILENT is set or cleared
Chris Packham [Fri, 23 Sep 2016 03:59:43 +0000 (15:59 +1200)]
common/console.c: ensure GD_FLG_SILENT is set or cleared

When CONFIG_SILENT_CONSOLE is defined and the default environment has
silent=1 it is not possible for a user to make the console un-silent if
the environment is not available when console_init_f() is called (for
example because the environment is in SPI).

Add a new helper function console_update_silent() and call it from both
console_init_f() and console_init_r().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: dra7xx: Move fastboot options to defconfig
Semen Protsenko [Thu, 22 Sep 2016 18:52:07 +0000 (21:52 +0300)]
arm: dra7xx: Move fastboot options to defconfig

Now that fastboot options are available in Kconfig, we can migrate them
from DRA7 header to corresponding DRA7 defconfigs.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoARM: vf610: use strcpy for soc environment variable
Stefan Agner [Wed, 28 Sep 2016 09:29:28 +0000 (11:29 +0200)]
ARM: vf610: use strcpy for soc environment variable

To create the soc environment variable we concatenate two strings
on the stack. So far, strcat has been used for the first string as
well as for the second string. Since the variable on the stack is
not initialized, the first strcat may not start using the first
entry in the character array. This then could lead to an buffer
overflow on the stack.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
7 years agoconfigs: enable device tree for Colibri iMX7
Stefan Agner [Wed, 5 Oct 2016 22:27:12 +0000 (15:27 -0700)]
configs: enable device tree for Colibri iMX7

Enable device tree configuration and specify default device tree
for Toradex Colibri iMX7.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
7 years agocolibri_imx7: use Ricoh RN5T567 to reboot the board
Stefan Agner [Wed, 5 Oct 2016 22:27:11 +0000 (15:27 -0700)]
colibri_imx7: use Ricoh RN5T567 to reboot the board

Use the external PMIC Ricoh RN5T567 to reliably restart the system.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
7 years agoarm: dts: imx7: add Ricoh RN5T567 PMIC node
Stefan Agner [Wed, 5 Oct 2016 22:27:10 +0000 (15:27 -0700)]
arm: dts: imx7: add Ricoh RN5T567 PMIC node

Add device tree node for Ricoh RN5T567. Currently we do not need
the individual DC/DC converters or LDO's (and they are also not
yet supported by the driver).

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
7 years agopower: pmic: add Ricoh RN5T567 PMIC support
Stefan Agner [Wed, 5 Oct 2016 22:27:09 +0000 (15:27 -0700)]
power: pmic: add Ricoh RN5T567 PMIC support

Add device model enabled PMIC driver for Ricoh RN5T567 PMIC used
on Colibri iMX7.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agocolibri_imx7: remove legancy UART platform data
Stefan Agner [Wed, 5 Oct 2016 22:27:08 +0000 (15:27 -0700)]
colibri_imx7: remove legancy UART platform data

We now use device tree to provide SoC data to the UART driver, there
is no need for the legancy UART platform data.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
7 years agocolibri_imx7: remove legancy I2C support
Stefan Agner [Wed, 5 Oct 2016 22:27:07 +0000 (15:27 -0700)]
colibri_imx7: remove legancy I2C support

Remove legancy I2C config and code in favor of upcomming DM/DT
enable I2C support.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
7 years agoarm: dts: imx7: add basic i.MX 7/Colibri iMX7 device tree
Stefan Agner [Wed, 5 Oct 2016 22:27:06 +0000 (15:27 -0700)]
arm: dts: imx7: add basic i.MX 7/Colibri iMX7 device tree

Add base device for NXP i.MX 7Solo/7Dual. The two SoC are very
similar and hence can share the same device tree for boot loaders
purpose.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: dts: imx7: add pinctrl defines
Stefan Agner [Wed, 5 Oct 2016 22:27:05 +0000 (15:27 -0700)]
arm: dts: imx7: add pinctrl defines

Add pinctrl defines for NXP i.MX 7Solo/7Dual SoC. The pinctrl format
is compatible to the Linux kernel, hence this file is a simple copy
from the Linux kernel (commit 97f5c1817b7e).

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
7 years agopinctrl: imx: do not announce driver initialization
Stefan Agner [Wed, 5 Oct 2016 22:27:04 +0000 (15:27 -0700)]
pinctrl: imx: do not announce driver initialization

It is not usual that drivers announce when they have been initialized.
use dev_dbg to announce device initialization.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodm: imx: serial: support device tree
Stefan Agner [Wed, 5 Oct 2016 22:27:03 +0000 (15:27 -0700)]
dm: imx: serial: support device tree

Support instatiation through device tree. Also parse the fsl,dte-mode
property to determine whether DTE mode shall be used.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoscripts: Add script to extract default environment
Lukasz Majewski [Sat, 17 Sep 2016 04:57:39 +0000 (06:57 +0200)]
scripts: Add script to extract default environment

This script looks for env_common.o object file and extracts from it default
u-boot environment, which is afterwards printed on standard output.

Usage example:
get_default_envs.sh > u-boot-env-default.txt

The generated text file can be used as input for mkenvimage.

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoARM: Add register defines for am33xx ePWM registers
tomas.melin@vaisala.com [Fri, 16 Sep 2016 10:21:39 +0000 (10:21 +0000)]
ARM: Add register defines for am33xx ePWM registers

Register definitions needed for configuring the
ePWM module.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
7 years agodoc: typo fix addess -> address
Jelle van der Waa [Wed, 14 Sep 2016 19:54:53 +0000 (21:54 +0200)]
doc: typo fix addess -> address

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
7 years agoARM: OMAP5+: Override switch_to_hypervisor function
Keerthy [Wed, 14 Sep 2016 05:13:33 +0000 (10:43 +0530)]
ARM: OMAP5+: Override switch_to_hypervisor function

Override the switch_to_hypervisor function to switch cpu to hypervisor
mode using the available ROM code hook early in the boot phase before
the boot loader checks for HYP mode.

Based on the work done by Jonathan Bergsagel jbergsagel@ti.com.

Cc: beagleboard-x15@googlegroups.com
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: Introduce function to switch to hypervisor mode
Keerthy [Wed, 14 Sep 2016 05:13:32 +0000 (10:43 +0530)]
ARM: Introduce function to switch to hypervisor mode

On some of the SoCs one cannot enable hypervisor mode directly from the
u-boot because the ROM code puts the chip to supervisor mode after it
jumps to boot loader. Hence introduce a weak function which can be
overridden based on the SoC type and switch to hypervisor mode in a
custom way.

Cc: beagleboard-x15@googlegroups.com
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoconfigs: dra7xx_evm_defconfig: Enable LPAE mode
Keerthy [Wed, 14 Sep 2016 05:13:31 +0000 (10:43 +0530)]
configs: dra7xx_evm_defconfig: Enable LPAE mode

Enable Linear Physical Address Extension mode which is a
prerequisite for hypervisor mode.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoconfigs: am57xx_evm_defconfig: Enable LPAE mode
Keerthy [Wed, 14 Sep 2016 05:13:30 +0000 (10:43 +0530)]
configs: am57xx_evm_defconfig: Enable LPAE mode

Enable Linear Physical Address Extension mode which is a
prerequisite for hypervisor mode.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoomap: Set appropriate cache configuration for LPAE and non-LAPE cases
Keerthy [Wed, 14 Sep 2016 05:13:29 +0000 (10:43 +0530)]
omap: Set appropriate cache configuration for LPAE and non-LAPE cases

Cache configuration methods is different for LPAE and non-LPAE cases.
Hence the bits and the interpretaion is different for two cases.
In case of non-LPAE mode short descriptor format is used and we need
to set Cache and Buffer bits.

In the case of LPAE the cache configuration happens via MAIR0 lookup.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoomap: Remove hardcoding of mmu section shift to 20
Keerthy [Wed, 14 Sep 2016 05:13:28 +0000 (10:43 +0530)]
omap: Remove hardcoding of mmu section shift to 20

As of now the mmu section shift is hardcoded to 20 but with LPAE
coming into picture this can be different. Hence replacing 20 with
MMU_SECTION_SHIFT macro.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoPWM: Correct misspellings of "module" in context of PWM
Robert P. J. Day [Tue, 13 Sep 2016 12:35:18 +0000 (08:35 -0400)]
PWM: Correct misspellings of "module" in context of PWM

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Acked-by: Heiko Schocher <hs@denx.de>
7 years agoARM64: Add support for some of atomic64 operations
Adam Oleksy [Tue, 13 Sep 2016 06:40:58 +0000 (08:40 +0200)]
ARM64: Add support for some of atomic64 operations

These functions are needed in UBI/UBIFS on ZynqMP platform (ARM64).

Signed-off-by: Adam Oleksy <adam.oleksy@nokia.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
7 years agocmd/onenand.c: block align warning
Ladislav Michl [Tue, 13 Sep 2016 05:40:00 +0000 (07:40 +0200)]
cmd/onenand.c: block align warning

An attempt to write non block aligned data fails silently, add warning and
set result.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
7 years agosearch.h: Numerous grammatical fixes, comment updates
Robert P. J. Day [Fri, 9 Sep 2016 10:22:10 +0000 (06:22 -0400)]
search.h: Numerous grammatical fixes, comment updates

Tweaks (no functional changes) to include/search.h, including:

 * use standard multiple inclusion check
 * fix spelling mistakes
 * have comments match actual names in function prototypes
 * remove obsolete reference to "do_apply"
 * replace "hashing table" with "hash table"

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
7 years agoVarious, accumulated typos collected from around the tree.
Robert P. J. Day [Wed, 7 Sep 2016 18:27:59 +0000 (14:27 -0400)]
Various, accumulated typos collected from around the tree.

Fix various misspellings of:

 * deprecated
 * partition
 * preceding,preceded
 * preparation
 * its versus it's
 * export
 * existing
 * scenario
 * redundant
 * remaining
 * value
 * architecture

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agoARMv8/sec-firmware: fix a compile error
Hou Zhiqiang [Tue, 6 Sep 2016 06:23:07 +0000 (14:23 +0800)]
ARMv8/sec-firmware: fix a compile error

When enabled sec firmware framework, but lack of definition of
the marco SEC_FIRMWARE_FIT_IMAGE, SEC_FIRMEWARE_FIT_CNF_NAME
and SEC_FIRMWARE_TARGET_EL, there will be some build errors,
so give a default definition.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
7 years agoARM: Respect CONFIG_SPL_STACK define in lowlevel_init.S
Siarhei Siamashka [Mon, 5 Sep 2016 03:36:10 +0000 (06:36 +0300)]
ARM: Respect CONFIG_SPL_STACK define in lowlevel_init.S

The SPL and U-Boot proper may use different initial stack
locations, which are configured via CONFIG_SPL_STACK and
CONFIG_SYS_INIT_SP_ADDR defines. The lowlevel_init.S
code needs to handle this in the same way as crt0.S

Without this fix, setting the U-Boot stack location to some
place, which is not safely accessible by the SPL (such as
the DRAM), causes a very early SPL deadlock.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoSuspected Spam: Do not open attachements![PATCH 4/6] tools/env: flash_write_buf:...
Andreas Fenkart [Mon, 29 Aug 2016 21:17:00 +0000 (23:17 +0200)]
Suspected Spam: Do not open attachements![PATCH 4/6] tools/env: flash_write_buf: enforce offset to be start of environment

This allows to take advantage of the environment being block aligned.
This is not a new constraint. Writes always start at the begin of the
environment, since the header with CRC/length as there.
Every environment modification requires updating the header

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
7 years agotools/env: lookup dev_type directly from flash_read_buf/flash_write_buf
Andreas Fenkart [Mon, 29 Aug 2016 21:16:59 +0000 (23:16 +0200)]
tools/env: lookup dev_type directly from flash_read_buf/flash_write_buf

flash_write_buf already looks up size/offset/#sector from struct
envdev_s. It can look up mtd_type as well. Same applies to
flash_read_buf. Makes the interface simpler

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
7 years agotools/env: pass bad block offset by value
Andreas Fenkart [Mon, 29 Aug 2016 21:16:58 +0000 (23:16 +0200)]
tools/env: pass bad block offset by value

the offset is not modified by linux ioctl call
see mtd_ioctl{drivers/mtd/mtdchar.c}
Makes the interface less ambiguous, since the caller can
now exclude a modification of blockstart

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
7 years agotools/env: factor out environment_end function
Andreas Fenkart [Mon, 29 Aug 2016 21:16:57 +0000 (23:16 +0200)]
tools/env: factor out environment_end function

instead of adhoc computation of the environment end,
use a function with a proper name

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
7 years agogunzip: cache-align write buffer memory
Clemens Gruber [Mon, 29 Aug 2016 15:10:36 +0000 (17:10 +0200)]
gunzip: cache-align write buffer memory

When using gzwrite to eMMC on an i.MX6Q board, the following warning
occurs repeatedly:
CACHE: Misaligned operation at range [4fd633184fe63318]

This patch cache-aligns the memory allocation for the gzwrite writebuf,
therefore avoiding the misaligned dcache flush and the warning from
check_cache_range.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
7 years agoREADME: Fix CONFIG_SYS_NAND_MAX_DEVICE typo
Simon Glass [Mon, 3 Oct 2016 00:01:11 +0000 (18:01 -0600)]
README: Fix CONFIG_SYS_NAND_MAX_DEVICE typo

This should be CONFIG_SYS_MAX_NAND_DEVICE. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Scott Wood <oss@buserror.net>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoREADME: Drop CONFIG_MPC8349ADS
Simon Glass [Mon, 3 Oct 2016 00:01:10 +0000 (18:01 -0600)]
README: Drop CONFIG_MPC8349ADS

This option is not used now.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoREADME: Drop README.imx31
Simon Glass [Mon, 3 Oct 2016 00:01:09 +0000 (18:01 -0600)]
README: Drop README.imx31

The only content of this file is CONFIG options which are no-longer present
in U-Boot. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoatmel: Drop README.at91-soc
Simon Glass [Mon, 3 Oct 2016 00:01:08 +0000 (18:01 -0600)]
atmel: Drop README.at91-soc

This issue covered by this doc appears to be fixed, so let's remove the
README.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Acked-by: Andreas Bießmann <andreas@biessmann.org>
7 years agoREADME: Drop CONFIG_SYS_USE_OSCCLK
Simon Glass [Mon, 3 Oct 2016 00:01:07 +0000 (18:01 -0600)]
README: Drop CONFIG_SYS_USE_OSCCLK

This is not used in U-Boot so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoREADME: Drop CONFIG_SYS_INIT_DATA_SIZE
Simon Glass [Mon, 3 Oct 2016 00:01:06 +0000 (18:01 -0600)]
README: Drop CONFIG_SYS_INIT_DATA_SIZE

This appears to be calculated automatically now. Drop the old reference.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoREADME: i2c: Drop unused i2c CONFIG options
Simon Glass [Mon, 3 Oct 2016 00:01:05 +0000 (18:01 -0600)]
README: i2c: Drop unused i2c CONFIG options

CONFIG_SYS_NUM_I2C_ADAPTERS and CONFIG_SYS_I2C_MULTI_NOPROBES are not used
in U-Boot, so drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoREADME: sh: Drop CONFIG_SYS_I2C_SH_BASE5
Simon Glass [Mon, 3 Oct 2016 00:01:04 +0000 (18:01 -0600)]
README: sh: Drop CONFIG_SYS_I2C_SH_BASE5

This is not used in U-Boot. Drop both the BASE and the SIZE config.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoREADME: Drop CONFIG_SYS_USB_BRG_CLK
Simon Glass [Mon, 3 Oct 2016 00:01:03 +0000 (18:01 -0600)]
README: Drop CONFIG_SYS_USB_BRG_CLK

This is not used in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoREADME: Drop CONFIG_LAN91C96_BASE
Simon Glass [Mon, 3 Oct 2016 00:01:02 +0000 (18:01 -0600)]
README: Drop CONFIG_LAN91C96_BASE

This is not used in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoREADME: Drop CONFIG_OF_BOOT_CPU
Simon Glass [Mon, 3 Oct 2016 00:01:01 +0000 (18:01 -0600)]
README: Drop CONFIG_OF_BOOT_CPU

This is not used in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoREADME: Drop unused CONFIG_SYS_LS_MC_FW_... options
Simon Glass [Mon, 3 Oct 2016 00:01:00 +0000 (18:01 -0600)]
README: Drop unused CONFIG_SYS_LS_MC_FW_... options

Drop a few that are not used in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoREADME: Drop unused JFFS2 options
Simon Glass [Mon, 3 Oct 2016 00:00:59 +0000 (18:00 -0600)]
README: Drop unused JFFS2 options

There appear to be neither implemented nor used. Drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoREADME: Correct CONFIG_ENV_OFFSET_RENDUND typo
Simon Glass [Mon, 3 Oct 2016 00:00:58 +0000 (18:00 -0600)]
README: Correct CONFIG_ENV_OFFSET_RENDUND typo

Change this to CONFIG_ENV_OFFSET_REDUND.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoREADME: Drop CONFIG_COGENT and related options
Simon Glass [Mon, 3 Oct 2016 00:00:57 +0000 (18:00 -0600)]
README: Drop CONFIG_COGENT and related options

These are no-longer present in U-Boot. Drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoREADME: Drop old Intel Monahans comment
Simon Glass [Mon, 3 Oct 2016 00:00:56 +0000 (18:00 -0600)]
README: Drop old Intel Monahans comment

This is no longer in the U-Boot source code, so drop this note from the
README.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agospi: fsl_qspi: Preserve endianness of QSPI MCR
York Sun [Wed, 5 Oct 2016 20:19:08 +0000 (13:19 -0700)]
spi: fsl_qspi: Preserve endianness of QSPI MCR

The endianness can be changed by RCW + PBI sequence. It may have
other than power on reset value.

Signed-off-by: York Sun <york.sun@nxp.com>
CC: Yuan Yao <yao.yuan@nxp.com>
CC: Peng Fan <peng.fan@nxp.com>
CC: Alison Wang <alison.wang@nxp.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
7 years agospl: Make spl_boot_list a local variable
Simon Glass [Sun, 25 Sep 2016 00:20:17 +0000 (18:20 -0600)]
spl: Make spl_boot_list a local variable

There is no need for this to be in the BSS region. By moving it we can delay
use of BSS in SPL. This is useful for machines where the BSS region is not
in writeable space. On 64-bit x86, SPL runs from SPI flash and it is easier
to eliminate BSS use than link SPL to run with BSS at a particular
cache-as-RAM (CAR) address.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Update spl_load_simple_fit() to take an spl_image param
Simon Glass [Sun, 25 Sep 2016 00:20:16 +0000 (18:20 -0600)]
spl: Update spl_load_simple_fit() to take an spl_image param

Upda the SPL FIT code to use the spl_image parameter.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Update fat functions to take an spl_image parameter
Simon Glass [Sun, 25 Sep 2016 00:20:15 +0000 (18:20 -0600)]
spl: Update fat functions to take an spl_image parameter

Update the fat loader to avoid using the spl_image global variable.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Update ext functions to take an spl_image parameter
Simon Glass [Sun, 25 Sep 2016 00:20:14 +0000 (18:20 -0600)]
spl: Update ext functions to take an spl_image parameter

Update the ext loader to avoid using the spl_image global variable.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Pass spl_image as a parameter to load_image() methods
Simon Glass [Sun, 25 Sep 2016 00:20:13 +0000 (18:20 -0600)]
spl: Pass spl_image as a parameter to load_image() methods

Rather than having a global variable, pass the spl_image as a parameter.
This avoids BSS use, and makes it clearer what the function is actually
doing.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert spl_board_load_image() to use linker list
Simon Glass [Sun, 25 Sep 2016 00:20:12 +0000 (18:20 -0600)]
spl: Convert spl_board_load_image() to use linker list

Add a linker list declaration for this method and remove the explicit
switch() code. Update existing users.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert spl_net_load_image() to use linker list
Simon Glass [Sun, 25 Sep 2016 00:20:11 +0000 (18:20 -0600)]
spl: Convert spl_net_load_image() to use linker list

Add a linker list declaration for this method and remove the explicit
switch() code. We need two variants - one for BOOT_DEVICE_CPGMAC and one for
BOOT_DEVICE_USBETH.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospi: Move freescale-specific code into a private header
Simon Glass [Sun, 25 Sep 2016 00:20:10 +0000 (18:20 -0600)]
spi: Move freescale-specific code into a private header

At present there are two SPI functions only used by freescale which are
defined in the spi_flash.h header. One function name matches an existing
generic SPL function.

Move these into a private header to avoid confusion.

Arcturus looks like it does not actually support SPI, so drop the SPI code
from that board.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert spl_spi_load_image() to use linker list
Simon Glass [Sun, 25 Sep 2016 00:20:09 +0000 (18:20 -0600)]
spl: Convert spl_spi_load_image() to use linker list

Add a linker list declaration for this method and remove the explicit
switch() code. Also set up the sunxi function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: spi: Move the generic SPI loader into common/spl
Simon Glass [Sun, 25 Sep 2016 00:20:08 +0000 (18:20 -0600)]
spl: spi: Move the generic SPI loader into common/spl

All the other SPL loaders are in this directory, so move the SPI one in
there too.

There are two board-specific SPI loaders (fsl and sunxi). These remain in
the drivers/mtd/spi directory, since they do not contain generic code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert spl_sata_load_image() to use linker list
Simon Glass [Sun, 25 Sep 2016 00:20:07 +0000 (18:20 -0600)]
spl: Convert spl_sata_load_image() to use linker list

Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert spl_usb_load_image() to use linker list
Simon Glass [Sun, 25 Sep 2016 00:20:06 +0000 (18:20 -0600)]
spl: Convert spl_usb_load_image() to use linker list

Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert spl_ymodem_load_image() to use linker list
Simon Glass [Sun, 25 Sep 2016 00:20:05 +0000 (18:20 -0600)]
spl: Convert spl_ymodem_load_image() to use linker list

Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert spl_nor_load_image() to use linker list
Simon Glass [Sun, 25 Sep 2016 00:20:04 +0000 (18:20 -0600)]
spl: Convert spl_nor_load_image() to use linker list

Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert spl_onenand_load_image() to use linker list
Simon Glass [Sun, 25 Sep 2016 00:20:03 +0000 (18:20 -0600)]
spl: Convert spl_onenand_load_image() to use linker list

Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert spl_nand_load_image() to use linker list
Simon Glass [Sun, 25 Sep 2016 00:20:02 +0000 (18:20 -0600)]
spl: Convert spl_nand_load_image() to use linker list

Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert spl_ubi_load_image() to use linker list
Simon Glass [Sun, 25 Sep 2016 00:20:01 +0000 (18:20 -0600)]
spl: Convert spl_ubi_load_image() to use linker list

Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert spl_mmc_load_image() to use linker list
Simon Glass [Sun, 25 Sep 2016 00:20:00 +0000 (18:20 -0600)]
spl: Convert spl_mmc_load_image() to use linker list

Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert spl_ram_load_image() to use linker list
Simon Glass [Sun, 25 Sep 2016 00:19:59 +0000 (18:19 -0600)]
spl: Convert spl_ram_load_image() to use linker list

Add a linker list declaration for this method and remove the explicit
switch() code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
[trini: Include updating the DFU case]
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agospl: Add a way to declare an SPL image loader
Simon Glass [Sun, 25 Sep 2016 00:19:58 +0000 (18:19 -0600)]
spl: Add a way to declare an SPL image loader

Add a linker list macro which can be used to declare an SPL image loader.
Update spl_load_image() to search available loaders for the correct one.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert boot_device into a struct
Simon Glass [Sun, 25 Sep 2016 00:19:57 +0000 (18:19 -0600)]
spl: Convert boot_device into a struct

At present some spl_xxx_load_image() functions take a parameter and some
don't. Of those that do, most take an integer but one takes a string.

Convert this parameter into a struct so that we can pass all functions the
same thing. This will allow us to use a common function signature.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Kconfig: Move SPL_DISPLAY_PRINT to Kconfig
Simon Glass [Sun, 25 Sep 2016 00:19:56 +0000 (18:19 -0600)]
spl: Kconfig: Move SPL_DISPLAY_PRINT to Kconfig

Move this option to Kconfig and tidy up existing uses. Also add a function
comment to the header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Add function comments to spl_start_uboot()
Simon Glass [Sun, 25 Sep 2016 00:19:55 +0000 (18:19 -0600)]
spl: Add function comments to spl_start_uboot()

Add some comments to describe this function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Add a parameter to jump_to_image_linux()
Simon Glass [Sun, 25 Sep 2016 00:19:54 +0000 (18:19 -0600)]
spl: Add a parameter to jump_to_image_linux()

Instead of using the global spl_image variable, pass the required struct in
as an argument.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Add a parameter to spl_parse_image_header()
Simon Glass [Sun, 25 Sep 2016 00:19:53 +0000 (18:19 -0600)]
spl: Add a parameter to spl_parse_image_header()

Instead of using the global spl_image variable, pass the required struct in
as an argument.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Add a parameter to spl_set_header_raw_uboot()
Simon Glass [Sun, 25 Sep 2016 00:19:52 +0000 (18:19 -0600)]
spl: Add a parameter to spl_set_header_raw_uboot()

Rather than act on the global variable, pass the required struct in as a
parameter.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Move spl_board_load_image() into a generic header
Simon Glass [Sun, 25 Sep 2016 00:19:51 +0000 (18:19 -0600)]
spl: Move spl_board_load_image() into a generic header

At present this is only used on ARM and sandbox, but it is just as
applicable to other architectures. Move the function prototype into the
generic SPL header.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoarmv7: ls1021a: Move DDR config options to Kconfig
York Sun [Wed, 5 Oct 2016 01:04:37 +0000 (18:04 -0700)]
armv7: ls1021a: Move DDR config options to Kconfig

Move DDR3, DDR4 and related config options to Kconfig and clean up
existing uses.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarmv8: fsl-layerscape: Move DDR config options to Kconfig
York Sun [Wed, 5 Oct 2016 01:03:08 +0000 (18:03 -0700)]
armv8: fsl-layerscape: Move DDR config options to Kconfig

Move DDR3, DDR4 and realted options to Kconfig and clean up existing
uses.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: Move SYS_FSL_SRDS_* and SYS_HAS_SERDES to Kconfig
York Sun [Wed, 5 Oct 2016 01:01:34 +0000 (18:01 -0700)]
arm: Move SYS_FSL_SRDS_* and SYS_HAS_SERDES to Kconfig

Move these options to Kconfig and clean up existing uses.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: Move FSL_HAS_DP_DDR and NUM_DDR_CONTROLLERS to Kconfig
York Sun [Tue, 4 Oct 2016 21:46:50 +0000 (14:46 -0700)]
arm: Move FSL_HAS_DP_DDR and NUM_DDR_CONTROLLERS to Kconfig

Move this option to Kconfig and clean up existing uses.
NUM_DDR_CONTROLLERS is also used by PowerPC SoCs.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: Move SYS_FSL_IFC_BANK_COUNT to Kconfig
York Sun [Tue, 4 Oct 2016 21:45:54 +0000 (14:45 -0700)]
arm: Move SYS_FSL_IFC_BANK_COUNT to Kconfig

Move this option to Kconfig and clean up existing uses.
This option is also used by PowerPC SoCs.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: Move MAX_CPUS to Kconfig
York Sun [Tue, 4 Oct 2016 21:45:01 +0000 (14:45 -0700)]
arm: Move MAX_CPUS to Kconfig

Move MAX_CPUS option to Kconfig and clean up existing uses for ARM. This
option is used by Freescale Layerscape SoCs.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: Move FSL_LSCH2 FSL_LSCH3 to Kconfig
York Sun [Tue, 4 Oct 2016 21:31:48 +0000 (14:31 -0700)]
arm: Move FSL_LSCH2 FSL_LSCH3 to Kconfig

Move these options to Kconfig and create a sub-menu to avoid name
conflict with other architectures.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: Fix Kconfig for proper display menu
York Sun [Tue, 4 Oct 2016 21:31:47 +0000 (14:31 -0700)]
arm: Fix Kconfig for proper display menu

Some config options should not have prompt. They are selected by choosing
target.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarmv8: fsl: Enable USB only when SYSCLK is 100 MHz
Sriram Dash [Mon, 3 Oct 2016 10:54:46 +0000 (16:24 +0530)]
armv8: fsl: Enable USB only when SYSCLK is 100 MHz

SYSCLK is used as a reference clock for USB. When the USB controller
is used, SYSCLK must meet the additional requirement of 100 MHz.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: ls1043: Add USB node in dts for ls1043
Sriram Dash [Fri, 30 Sep 2016 05:36:27 +0000 (11:06 +0530)]
armv8: ls1043: Add USB node in dts for ls1043

Add the USB node for LS1043 in dts.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: ls1043: Enable CONFIG_DM_USB in defconfigs
Sriram Dash [Fri, 30 Sep 2016 05:36:26 +0000 (11:06 +0530)]
armv8: ls1043: Enable CONFIG_DM_USB in defconfigs

Enables driver model flag CONFIG_DM_USB for LS1043A
platform defconfigs.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8/fsl-lsch2: Implement workaround for PIN MUX erratum A010539
Hou Zhiqiang [Thu, 29 Sep 2016 04:42:44 +0000 (12:42 +0800)]
armv8/fsl-lsch2: Implement workaround for PIN MUX erratum A010539

Pin mux logic has 2 options in priority order, one is through RCW_SRC
and then through RCW_Fields. In case of QSPI booting, RCW_SRC logic
takes the priority for SPI pads and do not allow RCW_BASE and SPI_EXT
to control the SPI muxing. But actually those are DSPI controller's
pads instead of QSPI controller's, so this workaround allows RCW
fields SPI_BASE and SPI_EXT to control relevant pads muxing.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[York Sun: Reformatted commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoARMv7: LS102xA: Move two macros from header files to Kconfig
Hongbo Zhang [Wed, 21 Sep 2016 10:31:04 +0000 (18:31 +0800)]
ARMv7: LS102xA: Move two macros from header files to Kconfig

Following commits 217f92b and 1544698, these two config
CPU_V7_HAS_NONSEC and CPU_V7_HAS_VIRT are moved to Kconfig,
for correctly select ARMV7_PSCI.

Signed-off-by: Hongbo Zhang <hongbo.zhang@nxp.com>
[York Sun: Reformatted commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: fsl-layerscape: Fix "cpu status" command
York Sun [Tue, 13 Sep 2016 19:40:30 +0000 (12:40 -0700)]
armv8: fsl-layerscape: Fix "cpu status" command

The core position is not continuous for some SoCs. For example,
valid cores may present at position 0, 1, 4, 5, 8, 9, etc. Some
registers (including boot release register) only count existing
cores. Current implementation of cpu_mask() complies with the
continuous numbering. However, command "cpu status" queries the
spin table with actual core position. Add functions to calculate
core position from core number, to correctly calculate offsets.

Tested on LS2080ARDB and LS1043ARDB.

Signed-off-by: York Sun <york.sun@nxp.com>
7 years agoarmv8/fsl-layerscape: print SoC revsion number
Wenbin Song [Tue, 13 Sep 2016 08:13:54 +0000 (16:13 +0800)]
armv8/fsl-layerscape: print SoC revsion number

The exact SoC revsion number can be recognized from U-Boot log.

Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agofsl_sfp : Modify macros as per changes in SFP v3.4
Sumit Garg [Wed, 7 Sep 2016 16:17:34 +0000 (12:17 -0400)]
fsl_sfp : Modify macros as per changes in SFP v3.4

SFP v3.4 supports 8 keys in SRK table which leads to corresponding
changes in OSPR key revocation field. So modify OSPR_KEY_REVOC_XXX
macros accordingly.

Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv7: LS1021a: enable i-cache in start.S
Xiaoliang Yang [Wed, 14 Sep 2016 03:36:14 +0000 (11:36 +0800)]
armv7: LS1021a: enable i-cache in start.S

Delete CONFIG_SKIP_LOWLEVEL_INIT define in ls1021atwr.h and
ls1021aqds.h can let it run cpu_init_cp15 to enable i-cache. First
stage of u-boot can run faster after that. There is a description
about skip lowlevel init in board/freescale/ls1021atwr/README.

Signed-off-by: Xiaoliang Yang <xiaoliang.yang@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agofsl_sec_mon: Update driver for Security Monitor
Sumit Garg [Wed, 31 Aug 2016 12:54:15 +0000 (08:54 -0400)]
fsl_sec_mon: Update driver for Security Monitor

Update the API's for transition of Security Monitor states. Instead
of providing both initial and final states for transition, just
provide final state for transition as Security Monitor driver will
take care of it internally.

Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
[York Sun: Reformatted commit message slightly]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: fsl-lsch2: enable snoopable sata read and write
Tang Yuantian [Mon, 8 Aug 2016 07:07:20 +0000 (15:07 +0800)]
armv8: fsl-lsch2: enable snoopable sata read and write

By default the SATA IP on the ls1043a/ls1046a SoCs does not
generating coherent/snoopable transactions.  This patch enable
it in the SCFG_SNPCNFGCR register along with sata axicc register.
In addition, the dma-coherent property must be set on the SATA
controller nodes.

Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com>
[York Sun: Reformatted commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: fsl-lsch2: adjust sata parameter
Tang Yuantian [Mon, 8 Aug 2016 07:07:19 +0000 (15:07 +0800)]
armv8: fsl-lsch2: adjust sata parameter

The default values for Port Phy2Cfg register and
Port Phy3Cfg register are better, no need to overwrite them.

Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoserial: ns16550: Handle -ENOENT when requesting clock
Alexandre Courbot [Fri, 30 Sep 2016 08:37:00 +0000 (17:37 +0900)]
serial: ns16550: Handle -ENOENT when requesting clock

When calling clk_get_by_index(), fall back to the legacy method of
getting the clock if -ENOENT is returned.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
7 years agoudoo: Add a README file
Fabio Estevam [Wed, 5 Oct 2016 18:00:58 +0000 (15:00 -0300)]
udoo: Add a README file

Add a README file to explain how to build and flash the SD card
for Udoo boards.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>