platform/kernel/u-boot.git
9 years agopower: axp209: VBUS detection support
Paul Kocialkowski [Sun, 22 Mar 2015 17:07:11 +0000 (18:07 +0100)]
power: axp209: VBUS detection support

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: usb: Drop AXP-sepcific VBUS detection and drive logic
Paul Kocialkowski [Sun, 22 Mar 2015 17:07:10 +0000 (18:07 +0100)]
sunxi: usb: Drop AXP-sepcific VBUS detection and drive logic

VBUS detection and enable is now be used with virtual AXP GPIOs, so all the USB
code has to use GPIO in every case and let sunxi_gpio do the heavy lifting.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agopower: axp221: Virtual VBUS detect and enable GPIOs to replace separate logic
Paul Kocialkowski [Sun, 22 Mar 2015 17:07:09 +0000 (18:07 +0100)]
power: axp221: Virtual VBUS detect and enable GPIOs to replace separate logic

This converts the VBUS detection and enable logic to GPIO instead of separate
axp functions and checks that have to be used aside usual GPIO functions.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: gpio: Indentation fix
Paul Kocialkowski [Sun, 22 Mar 2015 17:07:08 +0000 (18:07 +0100)]
sunxi: gpio: Indentation fix

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosun6i: Add support for the Mixtile LOFT-Q board
Han Pengfei [Thu, 12 Mar 2015 03:13:02 +0000 (11:13 +0800)]
sun6i: Add support for the Mixtile LOFT-Q board

The Mixtile LOFT-Q is an A31 based board with 2G RAM, 8G EMMC, sdio wifi,
1Gbit ethernet, HDMI display, toslink audio plug, 4 USB2.0 port, external
USB2SATA connector, sd card plug, 3x60 external fpic expansion connector,
NXP JN5168 zigbee gw, remote support.

Also see http://focalcrest.com/en/pc.html#pro02

Signed-off-by: Han Pengfei <pengphei@sina.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoPrepare v2015.04 v2015.04
Tom Rini [Mon, 13 Apr 2015 14:05:46 +0000 (10:05 -0400)]
Prepare v2015.04

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agobreak build if it would produce broken binary
Pavel Machek [Mon, 13 Apr 2015 12:49:28 +0000 (14:49 +0200)]
break build if it would produce broken binary

Add an error in known-bad case so that we don't produce broken and
hard to debug binaries.

Signed-off-by: Pavel Machek <pavel@denx.de>
9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Mon, 13 Apr 2015 14:52:46 +0000 (10:52 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

9 years agoARM: rpi: add a couple more revision IDs
Stephen Warren [Mon, 13 Apr 2015 03:43:25 +0000 (21:43 -0600)]
ARM: rpi: add a couple more revision IDs

According to Gordon Henderson's WiringPi library, there are some more
Pi revision IDs out there. Add support for them.

http://git.drogon.net/?p=wiringPi;a=blob_plain;f=wiringPi/wiringPi.c;hb=5edd177112c99416f68ba3e8c6c4db6ed942e796

At least ID 0x13 is out in the wild:

Reported-by: Chee-Yang Chau <cychau@gmail.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
9 years agoARM: fix arch/arm/Makefile for Tegra
Masahiro Yamada [Sat, 11 Apr 2015 15:58:14 +0000 (00:58 +0900)]
ARM: fix arch/arm/Makefile for Tegra

Since commit 79d75d752717 (ARM: move -march=* and -mtune= options to
arch/arm/Makefile), all the Tegra boards are broken because the SPL
is built for ARMv7.

Insert Tegra-specific code to arch/arm/Makefile to set compiler
flags for an earlier ARM architecture.

Note:
The v1 patch for commit 79d75d752717 *was* correct when it was
submitted.  Notice it was originally written for multi .config
configuration where Kconfig set CONFIG_CPU_V7/CONFIG_CPU_ARM720T for
Tegra U-Boot Main/SPL, respectively.  But, until it was merged into
the mainline, commit e02ee2548afe (kconfig: switch to single .config
configuration) had been already applied there.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reported-by: Stephen Warren <swarren@nvidia.com>
Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
Tested-by: Jan Kiszka <jan.kiszka@siemens.com>
9 years agoarm: armada-xp: Fix SPL for AXP by using save_boot_params_ret
Stefan Roese [Wed, 11 Mar 2015 11:05:04 +0000 (12:05 +0100)]
arm: armada-xp: Fix SPL for AXP by using save_boot_params_ret

Patch e11c6c27 (arm: Allow lr to be saved by board code) introduced
a different method to return from save_boot_params(). The SPL support
for AXP has been pulled and changing to this new method is now
required for SPL to work correctly.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoMerge git://git.denx.de/u-boot-arc
Tom Rini [Fri, 10 Apr 2015 16:39:13 +0000 (12:39 -0400)]
Merge git://git.denx.de/u-boot-arc

9 years agoarc: fix separate compilation of start.o
Alexey Brodkin [Fri, 10 Apr 2015 16:22:40 +0000 (19:22 +0300)]
arc: fix separate compilation of start.o

While testing "arc: make sure _start is in the beginning of .text
section" I haven't done proper clean-up of built binaries and so missed
another tiny bit that lead to the following error:
 --->8---
    LD      u-boot
 arc-linux-ld.bfd: cannot find arch/arc/lib/start.o
 Makefile:1107: recipe for target 'u-boot' failed
 make: *** [u-boot] Error 1
 --->8---

Fix is trivial: put "start.o" in "extra-y".

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agointegrator: consolidate flash info
Linus Walleij [Sat, 4 Apr 2015 23:48:33 +0000 (01:48 +0200)]
integrator: consolidate flash info

This consolidates the flash settings for the Integrator
and activates the new ARM flash image support for them
so images can be loaded by name from flash.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 years agovexpress64: juno: add default NOR flash boot
Linus Walleij [Sat, 4 Apr 2015 23:48:32 +0000 (01:48 +0200)]
vexpress64: juno: add default NOR flash boot

This modifies the vexpress64 Juno configuration so that
it will by default load and boot a kernel and a device tree
from the images stored in the NOR flash. When we are
at it, also define the proper command line for the Juno and
indicate that the USB stick (/dev/sda1) is the default
root file system.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 years agocommon/armflash: Support for ARM flash images
Linus Walleij [Sat, 4 Apr 2015 23:48:31 +0000 (01:48 +0200)]
common/armflash: Support for ARM flash images

The ARM reference designs all use a special flash image format
that stores a footer (two versions exist) at the end of the last
erase block of the image in flash memory.

Version one of the footer is indicated by the magic number
0xA0FFFF9F at 12 bytes before the end of the flash block and
version two is indicated by the magic number 0x464F4F54 0x464C5348
(ASCII for "FLSHFOOT") in the very last 8 bytes of the erase block.

This command driver implements support for both versions of the
AFS images (the name comes from the Linux driver in drivers/mtd/afs.c)
and makes it possible to list images and load an image by name into
the memory with these commands:

afs - lists flash contents
afs load <image> - loads image to address indicated in the image
afs load <image> <addres> - loads image to a specified address

This image scheme is used on the ARM Integrator family, ARM
Versatile family, ARM RealView family (not yet supported in U-Boot)
and ARM Versatile Express family up to and including the new
Juno board for 64 bit development.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-fdt
Tom Rini [Fri, 10 Apr 2015 14:32:50 +0000 (10:32 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-fdt

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Fri, 10 Apr 2015 13:38:38 +0000 (09:38 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agocommon, ubi: use positive return values for ubi check
Stefan Agner [Fri, 10 Apr 2015 09:25:43 +0000 (11:25 +0200)]
common, ubi: use positive return values for ubi check

The ubi check command is expected to not fail and just check whether
a volume exist or not. Currently, when a volume does not exist, the
command fails which leads to an error:
"exit not allowed from main input shell."

Use 1 to indicate that a volume does not exist. This allows to use
ubi check in an if statement, e.g.
if ubi check rootfs; then; echo "exists"; else; echo "not there"; fi

9 years agoarc: make sure _start is in the beginning of .text section
Alexey Brodkin [Fri, 10 Apr 2015 15:41:58 +0000 (18:41 +0300)]
arc: make sure _start is in the beginning of .text section

This is important to have entry point in the beginning of .text section
because it allows simple loading and execution of U-Boot.

For example pre-bootloader loads U-Boot in memory starting from offset
0x81000000 and then just jumps to the same address.

Otherwise pre-bootloader would need to find-out where entry-point is. In
its turn if it deals with binary image of U-Boot there's no way for
pre-bootloader to get required value.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agofdt: nios: Fix warning in ft_cpu_setup()
Simon Glass [Fri, 3 Apr 2015 23:57:24 +0000 (17:57 -0600)]
fdt: nios: Fix warning in ft_cpu_setup()

This function should not return a value.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
9 years agolpc32xx: add support for board work_92105
Albert ARIBAUD \(3ADEV\) [Tue, 31 Mar 2015 09:40:51 +0000 (11:40 +0200)]
lpc32xx: add support for board work_92105

Work_92105 from Work Microwave is an LPC3250-
based board with the following features:
- 64MB or 128MB SDR DRAM
- 1 GB SLC NAND, managed through MLC controller.
- Ethernet
- Ethernet + PHY SMSC8710
- I2C:
  - EEPROM (24M01-compatible)
  - RTC (DS1374-compatible)
  - Temperature sensor (DS620)
  - DACs (2 x MAX518)
- SPI (through SSP interface)
  - Port expander MAX6957
- LCD display (HD44780-compatible), controlled
  through the port expander and DACs

This board has SPL support, and uses the LPC32XX boot
image format.

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
9 years agoIntroduce CONFIG_SPL_PANIC_ON_RAW_IMAGE
Albert ARIBAUD \(3ADEV\) [Tue, 31 Mar 2015 09:40:50 +0000 (11:40 +0200)]
Introduce CONFIG_SPL_PANIC_ON_RAW_IMAGE

introduce CONFIG_SPL_PANIC_ON_RAW_IMAGE.
An SPL which define this will panic() if the
image it has loaded does not have a mkimage
signature.

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
9 years agolpc32xx: add lpc32xx-spl.bin boot image target
Albert ARIBAUD \(3ADEV\) [Tue, 31 Mar 2015 09:40:49 +0000 (11:40 +0200)]
lpc32xx: add lpc32xx-spl.bin boot image target

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
9 years agodtt: add ds620 support
Albert ARIBAUD \(3ADEV\) [Tue, 31 Mar 2015 09:40:48 +0000 (11:40 +0200)]
dtt: add ds620 support

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
9 years agolpc32xx: add LPC32xx SSP support (SPI mode)
Albert ARIBAUD \(3ADEV\) [Tue, 31 Mar 2015 09:40:47 +0000 (11:40 +0200)]
lpc32xx: add LPC32xx SSP support (SPI mode)

Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
9 years agolpc32xx: add GPIO support
Albert ARIBAUD \(3ADEV\) [Tue, 31 Mar 2015 09:40:46 +0000 (11:40 +0200)]
lpc32xx: add GPIO support

This driver only supports Driver Model, not legacy model.

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
9 years agolpc32xx: i2c: add LPC32xx I2C interface support
Albert ARIBAUD \(3ADEV\) [Tue, 31 Mar 2015 09:40:45 +0000 (11:40 +0200)]
lpc32xx: i2c: add LPC32xx I2C interface support

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
9 years agolpc32xx: mtd: nand: add MLC NAND controller
Albert ARIBAUD \(3ADEV\) [Tue, 31 Mar 2015 09:40:44 +0000 (11:40 +0200)]
lpc32xx: mtd: nand: add MLC NAND controller

The controller's Reed-Solomon ECC hardware is
used except of course for raw reads and writes.
It covers in- and out-of-band data together.

The SPL framework is supported.

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
9 years agolpc32xx: add Ethernet support
Albert ARIBAUD \(3ADEV\) [Tue, 31 Mar 2015 09:40:43 +0000 (11:40 +0200)]
lpc32xx: add Ethernet support

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
9 years agoMerge branch 'u-boot/master'
Albert ARIBAUD [Fri, 10 Apr 2015 12:22:23 +0000 (14:22 +0200)]
Merge branch 'u-boot/master'

9 years agoomap3: pandora: use common configuration
Grazvydas Ignotas [Wed, 8 Apr 2015 23:14:33 +0000 (02:14 +0300)]
omap3: pandora: use common configuration

This allows to clean up the config a good deal and also converts
pandora to Generic Board.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
9 years agoodroid-XU3: update board maintainer
Przemyslaw Marczak [Wed, 8 Apr 2015 16:12:20 +0000 (18:12 +0200)]
odroid-XU3: update board maintainer

At present Hyungwon can't take care of this board in U-Boot,
so I will keep it working.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Hyungwon Hwang <human.hwang@samsung.com>
9 years agomcx: update maintainer and convert to generic board
Anatolij Gustschin [Wed, 8 Apr 2015 11:49:41 +0000 (13:49 +0200)]
mcx: update maintainer and convert to generic board

Remove obsolete email address from MAINTAINERS.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Tom Rini <trini@konsulko.com>
9 years agoMAINTAINERS: fix TI DaVinci directory path and add KeyStone
Masahiro Yamada [Wed, 8 Apr 2015 09:23:23 +0000 (18:23 +0900)]
MAINTAINERS: fix TI DaVinci directory path and add KeyStone

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoboard: axs10x - support v3 mother-board
Alexey Brodkin [Thu, 9 Apr 2015 16:50:58 +0000 (19:50 +0300)]
board: axs10x - support v3 mother-board

There're 2 versions of motherboards that could be used in ARC SDP.
The only important difference for U-Boot is different NAND IC in use:
 [1] v2 board (we used to support up until now) sports MT29F4G08ABADAWP
while
 [2] v3 board sports MT29F4G16ABADAWP

They are almost the same except data bus width 8-bit in [1] and 16-bit
in [2]. And for proper support of 16-bit data bus we have to pass
NAND_BUSWIDTH_16 option to NAND driver core - which we do now knowing
board type we're running on.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agoARM: mx5: add support for USB armory board
Andrej Rosano [Wed, 8 Apr 2015 16:56:30 +0000 (18:56 +0200)]
ARM: mx5: add support for USB armory board

Add support for Inverse Path USB armory board, an open source
flash-drive sized computer based on Freescale i.MX53 SoC.

http://inversepath.com/usbarmory

Signed-off-by: Andrej Rosano <andrej@inversepath.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Chris Kuethe <chris.kuethe@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Vagrant Cascadian <vagrant@debian.org>
Tested-By: Vagrant Cascadian <vagrant@debian.org>
Tested-by: Chris Kuethe <chris.kuethe@gmail.com>
9 years agoARM: mx5: move to a standard arch/board approach
Andrej Rosano [Wed, 8 Apr 2015 16:56:29 +0000 (18:56 +0200)]
ARM: mx5: move to a standard arch/board approach

Move the MX5 based boards to arch/arm/cpu/armv7/mx5, following the
commit: 89ebc82137bebb11a8191f8b9cbf08f2533ae8bc

Signed-off-by: Andrej Rosano <andrej@inversepath.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
Tested-by: Chris Kuethe <chris.kuethe@gmail.com>
9 years agoARM: zynq: Remove Jagan from list of maintainers
Michal Simek [Wed, 8 Apr 2015 08:07:20 +0000 (10:07 +0200)]
ARM: zynq: Remove Jagan from list of maintainers

Email address is not longer valid that's why remove it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot
Masahiro Yamada [Wed, 8 Apr 2015 05:25:50 +0000 (14:25 +0900)]
ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot

Since commit 326a682358c1 (malloc_f: enable SYS_MALLOC_F by default
if DM is on), Zynq MMC boot hangs up after printing the following:

    U-Boot SPL 2015.04-rc5-00053-gadcc570 (Apr 08 2015 - 12:59:11)
    mmc boot
    reading system.dtb

Prior to commit 326a682358c1, Zynq boards enabled CONFIG_DM, but
not CONFIG_SYS_MALLOC_F.  That commit forcibly turned on
CONFIG_SYS_MALLOC_F.  I have not figured out the root cause, but
anyway it looks like CONFIG_SYS_MALLOC_F gave a bad impact on the
Zynq MMC boot.

We are planning to have the v2015.04 release in a few days.
I know this is a defensive fixup, but what I can do now is to add
   # CONFIG_SYS_MALLOC_F is not set
to every Zynq defconfig file to get back the original behavior.

Tested on:
  - Zedboard
  - ZC706 board

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Cc: Simon Glass <sjg@chromium.org>
9 years agoFix mxc_hab documenation for DEK blob generation
Ulises Cardenas [Fri, 27 Mar 2015 14:08:57 +0000 (08:08 -0600)]
Fix mxc_hab documenation for DEK blob generation

Include/fsl_sec.h defines sec_in and sec_out, according to the
platform's endianess. Therefore, CONFIG_SYS_FSL_LE needs to be
declared in the configuration file of the target, in order to use
enable the DEK blob generation command. This requirement is not
explicit in the README.mxc_hab.

Signed-off-by: Ulises Cardenas <Ulises.Cardenas@freescale.com>
9 years agomx53loco: Disable printing cpuinfo
Fabio Estevam [Mon, 6 Apr 2015 14:23:07 +0000 (11:23 -0300)]
mx53loco: Disable printing cpuinfo

Since commit 32df39c741788e ("mx5: fix get_reset_cause") we have the following
boot messages on a mx53qsb:

U-Boot 2015.04-rc5-00029-gd68df02 (Apr 06 2015 - 11:15:39)

CPU:   Freescale i.MX53 rev2.1 at 800 MHz
Reset cause: POR
Board: MX53 LOCO
I2C:   ready
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
In:    serial
Out:   serial
Err:   serial
CPU:   Freescale i.MX53 rev2.1 at 1000 MHz
Reset cause: unknown reset
Net:   FEC [PRIME]

The CPU and Reset cause lines appear twice.

Initially mx53 boots at 800MHz, then at a later point the PMIC is configured via
I2C to raise the CPU voltage so that it can run at 1GHz.

To avoid such misleading double printings, disable printing cpu info for now.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>
9 years agocmd_mem.c: Update 'iteration_limit' to unsigned long
Tom Rini [Tue, 7 Apr 2015 13:38:54 +0000 (09:38 -0400)]
cmd_mem.c: Update 'iteration_limit' to unsigned long

With e37f1eb we now use strict_strtoul() in do_mem_mtest() and this
gives us a warning:
../include/vsprintf.h:38:5: note: expected 'long unsigned int *' but
argument is of type 'int *'

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agofix makefiles to respect DTC setting
Pavel Machek [Mon, 6 Apr 2015 13:46:44 +0000 (15:46 +0200)]
fix makefiles to respect DTC setting

Top-level Makefile has option to select dtc binary, but it is ignored
due to bug in Makefile.lib. Fix it.

Signed-off-by: Pavel Machek <pavel@denx.de>
9 years agoMAKEALL: fix get_target_arch() to adjust to '-' in Status field
Masahiro Yamada [Mon, 6 Apr 2015 02:12:28 +0000 (11:12 +0900)]
MAKEALL: fix get_target_arch() to adjust to '-' in Status field

Since the Kconfig conversion, boards.cfg scanned by MAKEALL is
generated by tools/genboardscfg.py.  Every board is supposed to have
its own MAINTAINERS that contains maintainer and status information,
but, in fact, MAINTAINERS is missing from some boards.

For such boards, the first field, Status, is filled with '-'.
It causes a problem for "set" command, which ignores '-' in its
arguments.  Consequently, get_target_arch() returns a wrong field
and MAKEALL fails to get a correct toolchain.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agokbuild: include config.mk when auto.conf is not older than .config
Masahiro Yamada [Fri, 3 Apr 2015 03:30:25 +0000 (12:30 +0900)]
kbuild: include config.mk when auto.conf is not older than .config

Since the Kconfig conversion, config.mk has been included only when
include/config/auto.conf is newer than the .config file.

It causes build error if both files have the same time-stamps.
It is actually possible because EXT* file systems have a 1s time-stamp
resolution.

The config.mk should be included when include/config/auto.conf is
*not older* than the .config file.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reported-by: Tom Rini <trini@konsulko.com>
Reported-by: York Sun <yorksun@freescale.com>
Reported-by: Stephen Warren <swarren@nvidia.com>
Reported-by: Matthew Gerlach <mgerlach@opensource.altera.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
9 years agoam33xx/ddr.c: Fix regression on DDR2 platforms
Tom Rini [Thu, 2 Apr 2015 20:01:33 +0000 (16:01 -0400)]
am33xx/ddr.c: Fix regression on DDR2 platforms

Back in fc46bae a "clean up" was introduced that intended to reconcile
some of the AM335x codepaths based on how AM43xx operates.
Unfortunately this introduced a regression on the DDR2 platforms.  This
was un-noticed on DDR3 (everything except for Beaglebone White) as we
had already populated sdram_config correctly in sequence.  This change
brings us back to the older behavior and is fine on all platforms.

Tested on Beaglebone White, Beaglebone Black and AM335x GP EVM

Reported-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agocmd_mem: cleanups, catch bad usage
Pavel Machek [Wed, 1 Apr 2015 11:50:41 +0000 (13:50 +0200)]
cmd_mem: cleanups, catch bad usage

Currently, memtest will silently accept bad data. Perform error
checking on user intput.

Signed-off-by: Pavel Machek <pavel@denx.de>
9 years agoahci: Fix a wrong parameter pass
Tang Yuantian [Tue, 31 Mar 2015 07:02:43 +0000 (15:02 +0800)]
ahci: Fix a wrong parameter pass

In stead of user_buffer_size, transfer_size should be used to pass to
ahci_device_data_io(). transfer_size is the length that we want the
low level function to transfer each time.
If we use user_buffer_size which is the totally data length as parameter,
low level function will actually create many SGs to transfer as many data
as possible each time. That will produce many redundant data transfer.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoenv_sf: Fix recovery default
Mario Schuknecht [Tue, 24 Mar 2015 07:59:00 +0000 (08:59 +0100)]
env_sf: Fix recovery default

The u-boot environment is redundantly stored in a NOR flash on our boards.
Redundant means that there are two places to store the environment. But only
one of the two is active. I discovered that on one board the u-boot (env_sf)
uses the environment from the second place and the Kernel (fw_printenv) uses
the environment from the first place.
To decide which is the active environment there is a byte inside the
environment. 1 means active and 0 means obsolete. But on that board both
environments had have a 1. This can happen if a power loss or reset occurs
during writing the environment. In this situation the u-boot (env_sf)
implementation uses the second environment as default. But the Kernel
(fw_printenv) implementation uses the first environment as default.

This commit corrects the default in the u-boot env_sf implementation when a
problem was detected. Now the recovery default is the same like in all other
environment implementations. E.g. fw_printenv and env_flash. This ensures that
u-boot and Kernel use the same environment.

Signed-off-by: Mario Schuknecht <mario.schuknecht@dresearch-fe.de>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-samsung
Tom Rini [Mon, 6 Apr 2015 10:57:15 +0000 (06:57 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-samsung

9 years agoconfig: exynos: trats2: Enable support for Image.itb at trats2 device
Łukasz Majewski [Wed, 1 Apr 2015 10:34:30 +0000 (12:34 +0200)]
config: exynos: trats2: Enable support for Image.itb at trats2 device

After this change it is possible to boot trats2 device with Image.itb,
which facilitates automated testing, since only one file is necessary.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoconfig: exynos: trats: Enable support for Image.itb at trats device
Łukasz Majewski [Wed, 1 Apr 2015 10:34:29 +0000 (12:34 +0200)]
config: exynos: trats: Enable support for Image.itb at trats device

After this change it is possible to boot trats device with Image.itb,
which facilitates automated testing, since only one file is necessary.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoconfig: exynos: common: Provide env variables to support Image.itb
Łukasz Majewski [Wed, 1 Apr 2015 10:34:28 +0000 (12:34 +0200)]
config: exynos: common: Provide env variables to support Image.itb

This change allows using Image.itb image format with Exynos4 devices
(especially trats and trats2).
Such change facilitates automated testing since only one binary needs
to be prepared.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agosmdk5420: Remove GPIO enums
Ajay Kumar [Wed, 4 Mar 2015 13:35:31 +0000 (19:05 +0530)]
smdk5420: Remove GPIO enums

Remove GPIOs from smdk5420 board file and because the same
is already specified via DT.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agodts: peach_pi: Add DT properties needed for display
Ajay Kumar [Wed, 4 Mar 2015 13:35:30 +0000 (19:05 +0530)]
dts: peach_pi: Add DT properties needed for display

Add backlight enable GPIO, and delay needed for panel powerup
via FIMD DT node.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agodts: peach_pit: Add SLP and RST GPIO properties in parade DT node
Ajay Kumar [Wed, 4 Mar 2015 13:35:29 +0000 (19:05 +0530)]
dts: peach_pit: Add SLP and RST GPIO properties in parade DT node

Now that parade driver supports reading SLP and RST GPIO
from DT, specify the same in parade DT node.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agodts: exynos54xx: Add samsung, pwm-out-gpio property to FIMD node
Ajay Kumar [Wed, 4 Mar 2015 13:35:28 +0000 (19:05 +0530)]
dts: exynos54xx: Add samsung, pwm-out-gpio property to FIMD node

Now that the exynos_fb driver supports handling backlight GPIO
via DT, specify pwm output property via FIMD DT node.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agovideo: parade: configure SLP and RST GPIOs if specified in DT
Ajay Kumar [Wed, 4 Mar 2015 13:35:27 +0000 (19:05 +0530)]
video: parade: configure SLP and RST GPIOs if specified in DT

Add support to configure EDP_RST GPIO and EDP_SLP GPIO,
if provided in parade DT node.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agovideo: exynos_fb: configure backlight GPIOs if specified in DT
Ajay Kumar [Wed, 4 Mar 2015 13:35:26 +0000 (19:05 +0530)]
video: exynos_fb: configure backlight GPIOs if specified in DT

Add support to configure PWM_OUT(PWM output) GPIO and
BL_EN(backlight enable) GPIO, if provided in FIMD DT node.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoExynos5: Fix rpll_sdiv to support both peach-pit and peach-pi panels
Ajay Kumar [Wed, 4 Mar 2015 13:35:25 +0000 (19:05 +0530)]
Exynos5: Fix rpll_sdiv to support both peach-pit and peach-pi panels

The existing setting for rpll_sdiv generates 70.5Mhz RPLL
video clock to drive 1366x768 panel on peach_pit.

This clock rate is not sufficient to drive 1920x1080 panel on peach-pi.
So, we adjust rpll_sdiv to 3 so that it generates 141Mhz pixel clock
which can drive peach-pi LCD.

This change doesn't break peach-pit LCD since 141/2=70.5Mhz, i.e FIMD
divider at IP level will get set to 1(the required divider setting
will be calculated and set by exynos_fimd_set_clock()) and hence
peach-pit LCD still works fine.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoarm: exynos: add display clocks for Exynos5800
Ajay Kumar [Wed, 4 Mar 2015 13:35:24 +0000 (19:05 +0530)]
arm: exynos: add display clocks for Exynos5800

Add get_lcd_clk and set_lcd_clk callbacks for Exynos5800 needed by
exynos video driver.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoconfig: peach: Correct memory layout environment settings
Sjoerd Simons [Thu, 12 Mar 2015 21:33:29 +0000 (22:33 +0100)]
config: peach: Correct memory layout environment settings

The peach boards have their SDRAM start address at 0x20000000 instead of
0x40000000 which seems common for all other exynos5 based boards. This
means the layout set in exynos5-common.h causes the kernel be loaded
more then 128MB (at 0x42000000) away from memory start which breaks
booting kernels with CONFIG_AUTO_ZRELADDR

Define a custom MEM_LAYOUT_ENV_SETTINGS for both peach boards which uses
the same offsets from start of memory as the common exynos5 settings.

This fixes booting via bootz and PXE

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoexynos5: add trace feature #ifdef in exynos5-common.h
Inha Song [Fri, 13 Mar 2015 08:48:35 +0000 (17:48 +0900)]
exynos5: add trace feature #ifdef in exynos5-common.h

We can enable / disable trace feature from the FTRACE config options.
To enable, compile U-Boot with FTRACE=1.

This patch add #ifdef FTRACE in exynos5-common.h for enable/disable
to use FTRACE configs instead of having to change board config files.

Signed-off-by: Inha Song <ideal.song@samsung.com>
Acked-by: Simon Glass <sjg@chroimum.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoExynos: Clock: Fix exynos5_get_periph_rate for I2C.
Guillaume GARDET [Wed, 11 Mar 2015 09:34:27 +0000 (10:34 +0100)]
Exynos: Clock: Fix exynos5_get_periph_rate for I2C.

Commit 2e82e9252695a612ab0cbf40fa0c7368515f6506 'Exynos: Clock: Cleanup
soc_get_periph_rate' introduced a bug in I2C config. This patch makes cros_ec
keyboard working again on Samsung Chromebook (snow).

Changes in V2: reorder lines as requested by Joonyoung Shim.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Akshay Saraswat <akshay.s@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Reviewed-by: Simon Glass <sjg@chroimum.org>
Tested-by: Simon Glass <sjg@chroimum.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agosunxi: Fix Orangepi_mini dtb filename
Hans de Goede [Sat, 4 Apr 2015 08:37:44 +0000 (10:37 +0200)]
sunxi: Fix Orangepi_mini dtb filename

The Orangepi_mini is different enough from the regular Orangepi that it needs
its own dtb, but when it got added a copy and paste error was made and it
got the same dtb filename, fix this.

While at it also add a short description of both Orangepi boards to the
defconfig files for them.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoMerge git://git.denx.de/u-boot-arc
Tom Rini [Fri, 3 Apr 2015 13:14:44 +0000 (09:14 -0400)]
Merge git://git.denx.de/u-boot-arc

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Fri, 3 Apr 2015 13:14:38 +0000 (09:14 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra

Conflicts:
board/armltd/vexpress64/vexpress64.c

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoboard: AXS10x - update SDIO clock value
Alexey Brodkin [Thu, 2 Apr 2015 07:19:12 +0000 (10:19 +0300)]
board: AXS10x - update SDIO clock value

With the most recent board firmware correct SDIO clock is 50MHz as
opposed to 25 MHz before.

Also set max frequency of MMC data exchange equal to SDIO clock -
because there's no way to transfer data faster than interface clock.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agoarc: add support for SLC (System Level Cache, AKA L2-cache)
Alexey Brodkin [Mon, 30 Mar 2015 10:36:04 +0000 (13:36 +0300)]
arc: add support for SLC (System Level Cache, AKA L2-cache)

ARCv2 cores may have built-in SLC (System Level Cache, AKA L2-cache).
This change adds functions required for controlling SLC:
 * slc_enable/disable
 * slc_flush/invalidate

For now we just disable SLC to escape DMA coherency issues until either:
 * SLC flush/invalidate is supported in DMA APIin U-Boot
 * hardware DMA coherency is implemented (that might be board specific
   so probably we'll need to have a separate Kconfig option for
   controlling SLC explicitly)

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agoboard: Switch Abilis TB-100 board to Driver Model for serial port
Alexey Brodkin [Fri, 27 Mar 2015 10:24:35 +0000 (13:24 +0300)]
board: Switch Abilis TB-100 board to Driver Model for serial port

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Simon Glass <sjg@chromium.org>
9 years agoserial-arc: switch to DM
Alexey Brodkin [Tue, 17 Mar 2015 11:55:14 +0000 (14:55 +0300)]
serial-arc: switch to DM

Now when all infrastructure in ARC is ready for it let's switch ARC UART
to driver model.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Simon Glass <sjg@chromium.org>
9 years agoarc: minor fixes in Kconfig
Alexey Brodkin [Tue, 17 Mar 2015 11:26:43 +0000 (14:26 +0300)]
arc: minor fixes in Kconfig

 [1] Fix misspeling in ARC_CACHE_LINE_SHIFT dependency, now cache-line
lenth selection is correctly enabled if either I$ or D$ are enabled.

 [2] Add dummy entry to target list to make sure target type is always
mentioned in defconfig. Otherwise defconfig for the first target in the
list will not have target name and later on with addition of the new
target on top of the list in Kconfig will lead to corrupted
configuration expanded from defconfig.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agoarc: get rid of CONFIG_SYS_GENERIC_GLOBAL_DATA
Alexey Brodkin [Wed, 25 Feb 2015 15:10:18 +0000 (18:10 +0300)]
arc: get rid of CONFIG_SYS_GENERIC_GLOBAL_DATA

As discussed on mailing list we're drifting away from
CONFIG_SYS_GENERIC_GLOBAL_DATA in favour to use of board_init_f_mem()
for global data.

So do this for ARC architecture.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agoarc: re-generate defconfigs
Alexey Brodkin [Tue, 17 Mar 2015 11:30:59 +0000 (14:30 +0300)]
arc: re-generate defconfigs

Before that moment our defconfigs were manually modified with addition
of new options. That means once anybody wants to add another option and
re-genarate defconfig with "make defconfig" there will be lots of
differences. So to make future modifications more clean we'll do bulk
re-generation right away.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agoarc: clean-up init procedure
Alexey Brodkin [Tue, 24 Feb 2015 16:40:36 +0000 (19:40 +0300)]
arc: clean-up init procedure

Intention behind this work was elimination of as much assembly-written
code as it is possible.

In case of ARC we already have relocation fix-up implemented in C so why
don't we use C for U-Boot copying, .bss zeroing etc.

It turned out x86 uses pretty similar approach so we re-used parts of
code in "board_f.c" initially implemented for x86.

Now assembly usage during init is limited to stack- and frame-pointer
setup before and after relocation.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
9 years agoarc: move low-level interrupt and exception handlers in a separate file
Alexey Brodkin [Tue, 24 Feb 2015 14:08:44 +0000 (17:08 +0300)]
arc: move low-level interrupt and exception handlers in a separate file

This separation makes maintenance of code easier because those low-level
interrupt- or exception handling routines are pretty static and usually
require not much care while start-up code is a subject of modifications
and enhancements.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agoarc: merge common start-up code between ARC and ARCv2
Alexey Brodkin [Thu, 19 Feb 2015 15:40:58 +0000 (18:40 +0300)]
arc: merge common start-up code between ARC and ARCv2

Even though ARCompact and ARCv2 are not binary compatible most of
assembly instructions are used in both. With this change we'll get rid
of duplicate code.

Still IVTs are implemented differently so we're keeping them in separate
files.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agoarc: cache - build invalidate_icache_all() and invalidate_dcache_all()
Alexey Brodkin [Fri, 27 Mar 2015 09:47:29 +0000 (12:47 +0300)]
arc: cache - build invalidate_icache_all() and invalidate_dcache_all()
always

Make both invalidate_icache_all() and invalidate_dcache_all() available
even if U-Boot is configured with CONFIG_SYS_DCACHE_OFF and/or
CONFIG_SYS_ICACHE_OFF.

This is useful because configuration of U-Boot may not match actual
hardware features. Real board may have cache(s) but for some reason we
may want to run U-Boot with cache(s) disabled (for example if some
peripherals work improperly with existing drivers if data cache is
enabled). So board may start with cache(s) enabled (that's the case for
ARC cores with built-in caches) but early in U-Boot we disable cache(s)
and make sure all contents of data cache gets flushed in RAM.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agoserial/serial_arc: set registers address during compilation
Alexey Brodkin [Tue, 24 Feb 2015 16:31:51 +0000 (19:31 +0300)]
serial/serial_arc: set registers address during compilation

Being global variable with 0 value it falls into .bss area which we may
only use after relocation to RAM. And right afetr relocation we zero
.bss - effectively cleaing register address set for early console.

Now with pre-set value "regs" variable is no longer in .bss and this way
safely survives relocation.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agoPrepare v2015.04-rc5 v2015.04-rc5
Tom Rini [Wed, 1 Apr 2015 00:53:59 +0000 (20:53 -0400)]
Prepare v2015.04-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-atmel
Tom Rini [Tue, 31 Mar 2015 23:15:59 +0000 (19:15 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-atmel

9 years agoARM: at91: sama5: move the common part of configurations to at91-sama5_common.h
Wu, Josh [Mon, 30 Mar 2015 06:51:19 +0000 (14:51 +0800)]
ARM: at91: sama5: move the common part of configurations to at91-sama5_common.h

Create a new configuration file: at91-sama5_common.h. Which includes the
configurations that reused by all SAMA5 chips.

at91-sama5_common.h includes:
- hw macros (clock, text_base and etc.)
- default commands.
- BOOTARGS
- U-Boot common configs.
NOTE: NOR flash definition should be put before including the common header.

For sama5d3-xplained:
- add CMD_SETEXPR

For sama5d3xek:
- add CMD_SETEXPR
- change CONFIG_SYS_MALLOC_LEN to (4*1024*1024)

Signed-off-by: Josh Wu <josh.wu@atmel.com>
9 years agoARM: atmel: at91sam9n12ek: enable spl support
Bo Shen [Fri, 27 Mar 2015 06:23:36 +0000 (14:23 +0800)]
ARM: atmel: at91sam9n12ek: enable spl support

Enable SPL support for at91sam9n12ek boards, now it supports
boot up from NAND flash, serial flash.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
9 years agoARM: atmel: at91sam9x5ek: enable spl support
Bo Shen [Fri, 27 Mar 2015 06:23:35 +0000 (14:23 +0800)]
ARM: atmel: at91sam9x5ek: enable spl support

Enable SPL support for at91sam9x5ek board. Now, it supports
boot up from NAND flash and SPI flash.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
9 years agoARM: atmel: at91sam9m10g45ek: enable spl support
Bo Shen [Fri, 27 Mar 2015 06:23:34 +0000 (14:23 +0800)]
ARM: atmel: at91sam9m10g45ek: enable spl support

Supports boot up from NAND flash with software ECC eanbled.
And supports boot up from SD/MMC card with FAT file system.

As the boot from SD/MMC card with FAT file system, the BSS
segment is too big to fit into SRAM, so, use the lds to put
it into SDRAM.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
9 years agoARM: atmel: arm926ejs: fix clock configuration
Bo Shen [Fri, 27 Mar 2015 06:23:33 +0000 (14:23 +0800)]
ARM: atmel: arm926ejs: fix clock configuration

Config MCKR according to the datasheet sequence, or else it
will cause the MCKR configuration failed.

Remove timeout checking for clock configuration, if configure
the clock failed, let the system hang while not run in wrong
clock configuration.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Heiko Schocher <hs@denx.de>
9 years agoARM: at91: at91sam9n12ek: save the environment to a fat file in MMC card
Wu, Josh [Tue, 24 Mar 2015 09:07:22 +0000 (17:07 +0800)]
ARM: at91: at91sam9n12ek: save the environment to a fat file in MMC card

Insteading in mmc's raw sectors, this patch will save the environment
in a fat file (uboot.env) in mmc card's first FAT patition by default.

If you want to save in mmc's raw sectors, you only need to define
CONFIG_ENV_IS_IN_MMC.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
9 years agoARM: at91: atmel_nand: Support flash based BBT
David Dueck [Fri, 20 Mar 2015 09:52:49 +0000 (10:52 +0100)]
ARM: at91: atmel_nand: Support flash based BBT

Add support for on-flash bad block table. This makes U-Boot handle an existing
BBT correctly.

Signed-off-by: David Dueck <davidcdueck@googlemail.com>
Reviewed-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
CC: Boris BREZILLON <boris.brezillon@free-electrons.com>
CC: Josh Wu <josh.wu@atmel.com>
CC: Andreas Bießmann <andreas.devel@googlemail.com>
CC: Scott Wood <scottwood@freescale.com>
Acked-by: Josh Wu <josh.wu@atmel.com>
9 years agoarm, at91: corvus: move MACH_TYPE to defconfig
Heiko Schocher [Tue, 17 Mar 2015 07:26:11 +0000 (08:26 +0100)]
arm, at91: corvus: move MACH_TYPE to defconfig

move MACH_TYPE into defconfig

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agospl_atmel.c: Switch s_init to board_init_f
Tom Rini [Wed, 11 Feb 2015 00:07:22 +0000 (19:07 -0500)]
spl_atmel.c: Switch s_init to board_init_f

To facilitate changing lowlevel_init to become s_init, move the current
contents of s_init into board_init_f and add the rest of what
board_init_f does here.
In order to compile clean without CONFIG_SKIP_LOWLEVEL_INIT set, leave an
empty stub of s_init(). It can be removed when lowlevel_init becomes s_init.

Cc: Bo Shen <voice.shen@atmel.com>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Tested-by: Matt Porter <mporter@konsulko.com> on sama5d3_xplained
Signed-off-by: Tom Rini <trini@ti.com>
[rebased on current master, leave s_init() as empty stub]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: atmel: armv7: switch to use common timer functions
Bo Shen [Wed, 4 Feb 2015 07:53:02 +0000 (15:53 +0800)]
ARM: atmel: armv7: switch to use common timer functions

The commit 8dfafdd (Introduce common timer functions), add common
timer functions, we can use them directly.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
[rebase on current master]
Sigend-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: atmel: arm9: switch to use common timer functions
Bo Shen [Wed, 4 Feb 2015 07:53:01 +0000 (15:53 +0800)]
ARM: atmel: arm9: switch to use common timer functions

Signed-off-by: Bo Shen <voice.shen@atmel.com>
[rebase on current master]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: at91: sama5d4: display the U-Boot version on LCD
Wu, Josh [Wed, 4 Feb 2015 03:03:32 +0000 (11:03 +0800)]
ARM: at91: sama5d4: display the U-Boot version on LCD

This patch will display the U-Boot version on LCD.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
9 years agoMerge git://git.denx.de/u-boot-nand-flash
Tom Rini [Tue, 31 Mar 2015 21:17:06 +0000 (17:17 -0400)]
Merge git://git.denx.de/u-boot-nand-flash

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-imx
Tom Rini [Tue, 31 Mar 2015 15:45:36 +0000 (11:45 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-imx

9 years agomtd: vf610_nfc: specify transfer size before each transfer
Stefan Agner [Tue, 24 Mar 2015 16:54:20 +0000 (17:54 +0100)]
mtd: vf610_nfc: specify transfer size before each transfer

Testing showed, that commands like STATUS made the buffer dirty
when executed with NFC_SECSZ set to the page size. It looks
like the controller transfers bogus data when this register
is configured. When setting it to 0, the buffer does not get
altered while the status command still seems to work flawless.

Signed-off-by: Stefan Agner <stefan@agner.ch>
9 years agomtd: vf610_nfc: mark page as dirty on block erase
Stefan Agner [Tue, 24 Mar 2015 16:54:19 +0000 (17:54 +0100)]
mtd: vf610_nfc: mark page as dirty on block erase

The driver tries to re-use the page buffer by storing the page
number of the current page in the buffer. The page is only read
if the requested page number is not currently in the buffer. When
a block is erased, the page number is marked as invalid if the
erased page equals the one currently in the cache. However, since
a erase block consists of multiple pages, also other page numbers
could be affected.

The commands to reproduce this issue (on a written page):
> nand dump 0x800
> nand erase 0x0 0x20000
> nand dump 0x800

The second nand dump command returns the data from the buffer,
while in fact the page is erased (0xff).

Avoid the hassle to calculate whether the page is affected or not,
but set the page buffer unconditionally to invalid instead.

Signed-off-by: Stefan Agner <stefan@agner.ch>
9 years agonand: yaffs: Remove the "nand write.yaffs" command
Peter Tyser [Tue, 3 Feb 2015 17:58:16 +0000 (11:58 -0600)]
nand: yaffs: Remove the "nand write.yaffs" command

This command is only enabled by one board, complicates the NAND code,
and doesn't appear to have been functioning properly for several
years.  If there are no bad blocks in the NAND region being written
nand_write_skip_bad() will take the shortcut of calling nand_write()
which bypasses the special yaffs handling.  This causes invalid YAFFS
data to be written. See
http://lists.denx.de/pipermail/u-boot/2011-September/102830.html for
an example and a potential workaround.

U-Boot still retains the ability to mount and access YAFFS partitions
via CONFIG_YAFFS2.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
9 years agonand: Remove CONFIG_MTD_NAND_VERIFY_WRITE
Peter Tyser [Tue, 3 Feb 2015 17:58:15 +0000 (11:58 -0600)]
nand: Remove CONFIG_MTD_NAND_VERIFY_WRITE

The CONFIG_MTD_NAND_VERIFY_WRITE has been removed from Linux for some
time and a more generic method of NAND verification now exists in U-Boot.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>