Merge branch 'tpm' of git://git.denx.de/u-boot-x86
Merge branch 'master' of git://git.denx.de/u-boot-arm
lcd: add functions to set up simplefb device tree

simple-framebuffer is a new device tree binding that describes a pre-
configured frame-buffer memory region and its format. The Linux kernel
contains a driver that supports this binding. Implement functions to
create a DT node (or fill in an existing node) with parameters that
describe the framebuffer format that U-Boot is using.

This will be immediately used by the Raspberry Pi board in U-Boot, and
likely will be used by the Samsung ARM ChromeBook support soon too. It
could well be used by many other boards (e.g. Tegra boards with built-in
LCD panels, which aren't yet supported by the Linux kernel).

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Simon Glass <sjg@chromium.org>
ARM: bcm2835: add simplefb DT node during bootz/m

Add a DT simple-framebuffer node to DT when booting the Linux kernel.
This will allow the kernel to inherit the framebuffer configuration from
U-Boot, and display a graphical boot console, and even run a full SW-
rendered X server.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Simon Glass <sjg@chromium.org>
am33xx/omap4+: Move SRAM_SCRATCH_SPACE_ADDR to <asm/arch/omap.h>

The location of valid scratch space is dependent on SoC, so move that
there.  On OMAP4+ we continue to use SRAM_SCRATCH_SPACE_ADDR.  On
am33xx/ti814x we want to use what the ROM defines as "public stack"
which is the area after our defined download image space.  Correct the
comment about and location of CONFIG_SPL_TEXT_BASE.

Signed-off-by: Tom Rini <trini@ti.com>
checkpatch.pl: Add 'printf' to logFunctions

Signed-off-by: Tom Rini <trini@ti.com>
ARM: imx: Fix incorrect usage of CONFIG_SYS_MMC_ENV_PART

When running the "save" command several times on a mx6qsabresd we see:

U-Boot > save
Saving Environment to MMC...
Writing to MMC(1)... done
U-Boot > save
Saving Environment to MMC...
MMC partition switch failed
U-Boot > save
Saving Environment to MMC...
Writing to MMC(1)... done
U-Boot > save
Saving Environment to MMC...
MMC partition switch failed
U-Boot > save
Saving Environment to MMC...
Writing to MMC(1)... done
U-Boot > save
Saving Environment to MMC...
MMC partition switch failed

This issue is caused by the incorrect usage of CONFIG_SYS_MMC_ENV_PART.

CONFIG_SYS_MMC_ENV_PART should be used to specify the mmc partition that stores
the environment variables.

On some imx boards it is been incorrectly used to pass the partition of kernel
and dtb files for the 'mmcpart' script variable.

Remove the CONFIG_SYS_MMC_ENV_PART usage and configure the 'mmcpart' variable
directly.

Reported-by: Jason Liu <r64343@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>
input: Finish simplifing key_matrix_decode_fdt()

[trini: Applied v1 of the series rather than v2, this commit is the
delta from v1 to v2]

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Rini <trini@ti.com>
vf610twr: Drop unneeded 'status' variable

No need to use the 'status' variable, so just remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
ARM: tegra: only enable SCU on Tegra20

The non-SPL build of U-Boot on Tegra only runs on a single CPU, and
hence there is no need to enable the SCU when running U-Boot. If an
SMP OS is booted, and it needs the SCU enabled, it will enable the SCU
itself. U-Boot doing so is redundant.

The one exception is Tegra20, where an enabled SCU is required for some
aspects of PCIe to work correctly.

Some Tegra SoCs contain CPUs without a software-controlled SCU. In this
case, attempting to turn it on actively causes problems. This is the case
for Tegra114. For example, when running Linux, the first (or at least
some very early) user-space process will trigger the following kernel
message:

Unhandled fault: imprecise external abort (0x406) at 0x00000000

This is typically accompanied by that process receving a fatal signal,
and exiting. Since this process is usually pid 1, this causes total
system boot failure.

Signed-off-by: Tom Warren <twarren@nvidia.com>
[swarren, fleshed out description, ported to upstream chipid APIs]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash
Merge branch 'master' of git://git.denx.de/u-boot-video
spl_mmc: return error from mmc_load_image_{raw, fat} rather than hanging

So we can instead fallback to doing something else on errors.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
spl_mmc: mmc_load_image_fat(): Add filename argument and move fat init out

So we can use it for falcon mode as well.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
devkit8000: Add SPL_OS for MMC support

Signed-off-by: Tom Rini <trini@ti.com>
spl_mmc: add Falcon mode support for FAT variant

If Falcon mode support is enabled (and the system isn't directed into
booting u-boot), it will instead try to load kernel from
CONFIG_SPL_FAT_LOAD_KERNEL_NAME file and kernel argument parameters from
CONFIG_SPL_FAT_LOAD_ARGS_NAME, both from the same partition as u-boot.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
spl_mmc: mmc_load_image_raw(): Add sector argument

So we can use it for falcon mode as well.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
spl_mmc: add Falcon mode support for raw variant

If Falcon mode support is enabled (and the system isn't directed into
booting u-boot), it will instead try to load kernel from sector
CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR and
CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS of kernel argument parameters
starting from sector CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
am335x: enable falcon boot mode for mmc (raw and fat) and nand

Jump into full u-boot mode if a 'c' character is received on the uart.

We need to adjust the spl bss/malloc area to not overlap with the
loadaddr of the kernel (sdram + 32k), so move it past u-boot instead.

For raw mmc, we store the kernel parameter area in the free space after
the MBR (if used). For nand, we use the last sector of the partition
reserved for u-boot.

This also enables the spl command in the full u-boot so the kernel
parameter area snapshot can be created.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
generic_board: reduce the redundancy of gd_t struct members

This commit refactors common/board_f.c and common/board_r.c
in order to delete the dest_addr and dest_addr_sp from
gd_t struct.

As mentioned as follows in include/asm-generic/global_data.h,

  /* TODO: is this the same as relocaddr, or something else? */
  unsigned long dest_addr;        /* Post-relocation address of U-Boot */

dest_addr is the same as relocaddr.
Likewise, dest_addr_sp is the same as start_addr_sp.

It seemed dest_addr/dest_addr_sp was used only as a scratch variable
to calculate relocaddr/start_addr_sp, respectively.

With a little refactoring, we can delete dest_addr and dest_addr_sp.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>