oweals/u-boot.git
8 years agoPrepare v2016.07-rc2 v2016.07-rc2
Tom Rini [Mon, 20 Jun 2016 15:14:12 +0000 (11:14 -0400)]
Prepare v2016.07-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoautoboot: add CONFIG_AUTOBOOT to allow to not compile autoboot.c
Masahiro Yamada [Mon, 20 Jun 2016 08:33:39 +0000 (17:33 +0900)]
autoboot: add CONFIG_AUTOBOOT to allow to not compile autoboot.c

Since commit bb597c0eeb7e ("common: bootdelay: move CONFIG_BOOTDELAY
into a Kconfig option"), CONFIG_BOOTDELAY is defined for all boards.

Prior to that commit, it was allowed to unset CONFIG_BOOTDELAY to
not compile common/autoboot.c, as described in common/Makefile:

  # This option is not just y/n - it can have a numeric value
  ifdef CONFIG_BOOTDELAY
  obj-y += autoboot.o
  endif

It was a bit odd to enable/disable code with an integer type option,
but it was how this option worked before that commit, and several
boards actually unset it to opt out of the autoboot feature.

This commit adds a new bool option, CONFIG_AUTOBOOT, and makes
CONFIG_BOOTDELAY depend on it.

I chose "default y" for this option because most boards use the
autoboot.  I added "# CONFIG_AUTOBOOT is not set" for the boards that
had not set CONFIG_BOOTDELAY prior to the bad commit.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoMerge git://git.denx.de/u-boot-nand-flash
Tom Rini [Mon, 20 Jun 2016 09:15:52 +0000 (05:15 -0400)]
Merge git://git.denx.de/u-boot-nand-flash

8 years agommc: add MMC_VERSION_5_1
Stefan Wahren [Thu, 16 Jun 2016 17:54:06 +0000 (17:54 +0000)]
mmc: add MMC_VERSION_5_1

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
8 years agodragonboard410c: Increase default environment size.
Mateusz Kulikowski [Sun, 19 Jun 2016 21:05:32 +0000 (23:05 +0200)]
dragonboard410c: Increase default environment size.

Due to changes in distro environment, ENV_SIZE limit was reached on Dragonboard.
This patch increases environment size to 8KiB.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
8 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Mon, 20 Jun 2016 09:14:01 +0000 (05:14 -0400)]
Merge git://git.denx.de/u-boot-dm

8 years agomtd: nand: Patch remaining places where nand_to_mtd() should be used
Boris Brezillon [Wed, 15 Jun 2016 18:56:10 +0000 (20:56 +0200)]
mtd: nand: Patch remaining places where nand_to_mtd() should be used

Some drivers are still directly accessing the chip->mtd field. Patch
them to use nand_to_mtd() instead.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
8 years agonand: doc: fix example ecc scheme calculation
Fabian Mewes [Tue, 14 Jun 2016 00:46:14 +0000 (02:46 +0200)]
nand: doc: fix example ecc scheme calculation

Signed-off-by: Fabian Mewes <architekt@coding4coffee.org>
8 years agonand: extend nand torture
Max Krummenacher [Mon, 13 Jun 2016 08:15:48 +0000 (10:15 +0200)]
nand: extend nand torture

nand torture currently works on exactly one nand block which is specified
by giving the byteoffset to the beginning of the block.

Extend this by allowing for a second parameter specifying the byte size
to be tested.

e.g.
==> nand torture 1000000

NAND torture: device 0 offset 0x1000000 size 0x20000 (block size 0x20000)
 Passed: 1, failed: 0

==> nand torture 1000000 40000

NAND torture: device 0 offset 0x1000000 size 0x40000 (block size 0x20000)
 Passed: 2, failed: 0

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
[scottwood: fix usage to show size as optional, and add misssing braces]
Signed-off-by: Scott Wood <oss@buserror.net>
8 years agonand: nand torture: follow sync with linux v4.6
Max Krummenacher [Mon, 13 Jun 2016 08:15:47 +0000 (10:15 +0200)]
nand: nand torture: follow sync with linux v4.6

follow parameter name change (nand to mtd) to fix compiler error.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
8 years agocommon: fb_nand: won't compile
Sergey Kubushyn [Tue, 7 Jun 2016 21:22:59 +0000 (14:22 -0700)]
common: fb_nand: won't compile

Somehow this got overlooked when getting rid of nand_info.

Small patch, won't affect anything else, no reason to wait for the
next cycle.

Signed-off-by: Sergey Kubushyn <ksi@koi8.net>
8 years agospl: nand: sunxi: add support for NAND config auto-detection
Boris Brezillon [Mon, 6 Jun 2016 08:17:02 +0000 (10:17 +0200)]
spl: nand: sunxi: add support for NAND config auto-detection

NAND chips are supposed to expose their capabilities through advanced
mechanisms like READID, ONFI or JEDEC parameter tables. While those
methods are appropriate for the bootloader itself, it's way to
complicated and takes too much space to fit in the SPL.

Replace those mechanisms by a dumb 'trial and error' mechanism.

With this new approach we can get rid of the fixed config list that was
used in the sunxi NAND SPL driver.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
8 years agospl: nand: sunxi: split 'load page' and 'read page' logic
Boris Brezillon [Mon, 6 Jun 2016 08:17:01 +0000 (10:17 +0200)]
spl: nand: sunxi: split 'load page' and 'read page' logic

Split the 'load page' and 'read page' logic in 2 different functions so
we can later load the page and test different ECC configs without the
penalty of reloading the same page in the NAND cache.

We also move common setup to a dedicated function (nand_apply_config()) to
avoid rewriting the same values in NFC registers each time we read a page.

These new functions are passed a pointer to an nfc_config struct to limit
the number of parameters.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
8 years agospl: nand: sunxi: rework status polling loop
Boris Brezillon [Mon, 6 Jun 2016 08:17:00 +0000 (10:17 +0200)]
spl: nand: sunxi: rework status polling loop

check_value_xxx() helpers are using a 1ms delay between each test, which
can be quite long for some operations (like a page read on an SLC NAND).
Since we don't have anything to do but to poll this register, reduce the
delay between each test to 1us.

While we're at it, rename the max_number_of_retries parameters and the
MAX_RETRIES macro into timeout_us and DEFAULT_TIMEOUT_US to reflect that
we're actually waiting a given amount of time and not only a number of
retries.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
8 years agospl: nand: sunxi: stop guessing the redundant u-boot offset
Boris Brezillon [Mon, 6 Jun 2016 08:16:59 +0000 (10:16 +0200)]
spl: nand: sunxi: stop guessing the redundant u-boot offset

Use CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND value instead of trying to guess
where the redundant u-boot image is based on simple (and most of the time
erroneous) heuristics.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
# Conflicts:
# drivers/mtd/nand/sunxi_nand_spl.c

8 years agospl: nand: support redundant u-boot image
Boris Brezillon [Mon, 6 Jun 2016 08:16:58 +0000 (10:16 +0200)]
spl: nand: support redundant u-boot image

On modern NAND it's more than recommended to have a backup copy of the
u-boot binary to recover from corruption: bitflips are quite common on
MLC NANDs, and the read-disturbance will corrupt your u-boot partitition
more quickly than what you would see on an SLC NAND.

Add an extra Kconfig option to specify the offset of the redundant u-boot
image.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
[scottwood: added ifdef to fix build break]
Signed-off-by: Scott Wood <oss@buserror.net>
8 years agospl: nand: rework SYS_NAND_U_BOOT_OFFS Kconfig option dependency
Boris Brezillon [Mon, 6 Jun 2016 08:16:57 +0000 (10:16 +0200)]
spl: nand: rework SYS_NAND_U_BOOT_OFFS Kconfig option dependency

The SYS_NAND_U_BOOT_OFFS is quite generic, but the Kconfig entry is forced
to explicitly depend on platforms that are not already defining it in their
include/configs/<board>.h header.

Add the SYS_NAND_U_BOOT_LOCATIONS option, make the SYS_NAND_U_BOOT_OFFS
depends on it, remove the dependency on NAND_SUNXI and make it dependent
on SPL selection.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
8 years agospl: nand: sunxi: remove support for so-called 'syndrome' mode
Boris Brezillon [Mon, 6 Jun 2016 08:16:56 +0000 (10:16 +0200)]
spl: nand: sunxi: remove support for so-called 'syndrome' mode

The sunxi SPL NAND controller driver supports use 'BootROM'-like configs,
that is, configs where the ECC bytes and real data are interleaved in the
page instead of putting ECC bytes in the OOB area.

Doing that has several drawbacks:
- since you're interleaving data and ECC bytes you can't use the whole page
  otherwise you might override the bad block marker with non-FF bytes.
- to solve the bad block marker problem, the ROM code supports partially
  using the page, but this introduces a huge penalty both in term of read
  speed and NAND memory usage. While this is fine for rather small
  binaries(like the SPL one which is at maximum 24KB large), it becomes
  non-negligible for the bootloader image (several hundred of KB).
- auto-detection of the page size is not reliable (this is in my opinion
  the biggest problem). If you get the page size wrong, you'll end up
  reading data at a different offset than what was specified by the caller
  and the reading may succeed (if valid data were written at this address).

For all those reasons I think it's wiser to completely remove support for
'syndrome' configs. If we ever need to support it again, then I'd recommend
specifying all the config parameters through Kconfig options.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
8 years agoclk: convert API to match reset/mailbox style
Stephen Warren [Fri, 17 Jun 2016 15:44:00 +0000 (09:44 -0600)]
clk: convert API to match reset/mailbox style

The following changes are made to the clock API:
* The concept of "clocks" and "peripheral clocks" are unified; each clock
  provider now implements a single set of clocks. This provides a simpler
  conceptual interface to clients, and better aligns with device tree
  clock bindings.
* Clocks are now identified with a single "struct clk", rather than
  requiring clients to store the clock provider device and clock identity
  values separately. For simple clock consumers, this isolates clients
  from internal details of the clock API.
* clk.h is split so it only contains the client/consumer API, whereas
  clk-uclass.h contains the provider API. This aligns with the recently
  added reset and mailbox APIs.
* clk_ops .of_xlate(), .request(), and .free() are added so providers
  can customize these operations if needed. This also aligns with the
  recently added reset and mailbox APIs.
* clk_disable() is added.
* All users of the current clock APIs are updated.
* Sandbox clock tests are updated to exercise clock lookup via DT, and
  clock enable/disable.
* rkclk_get_clk() is removed and replaced with standard APIs.

Buildman shows no clock-related errors for any board for which buildman
can download a toolchain.

test/py passes for sandbox (which invokes the dm clk test amongst
others).

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoreset: implement a reset test
Stephen Warren [Fri, 17 Jun 2016 15:43:59 +0000 (09:43 -0600)]
reset: implement a reset test

This adds a sandbox reset implementation (provider), a test client
device, instantiates them both from Sandbox's DT, and adds a DM test
that excercises everything.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoAdd a reset driver framework/uclass
Stephen Warren [Fri, 17 Jun 2016 15:43:58 +0000 (09:43 -0600)]
Add a reset driver framework/uclass

A reset controller is a hardware module that controls reset signals that
affect other hardware modules or chips.

This patch defines a standard API that connects reset clients (i.e. the
drivers for devices affected by reset signals) to drivers for reset
controllers/providers. Initially, DT is the only supported method for
connecting the two.

The DT binding specification (reset.txt) was taken from Linux kernel
v4.5's Documentation/devicetree/bindings/reset/reset.txt.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agomailbox: add Tegra186 HSP driver
Stephen Warren [Fri, 17 Jun 2016 15:43:57 +0000 (09:43 -0600)]
mailbox: add Tegra186 HSP driver

Tegra186's HSP module implements doorbells, mailboxes, semaphores, and
shared interrupts. This patch provides a driver for HSP, and hooks it
into the mailbox API. Currently, only doorbells are supported.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agomailbox: rename headers
Stephen Warren [Fri, 17 Jun 2016 15:43:56 +0000 (09:43 -0600)]
mailbox: rename headers

Rename mailbox*.h to match the naming convention requested during review
of the new reset subsystem.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agosandbox: gpio: doc: Fix parameter documentation
mario.six@gdsys.cc [Wed, 25 May 2016 13:18:10 +0000 (15:18 +0200)]
sandbox: gpio: doc: Fix parameter documentation

The documentation of parameters in arch/sandbox/include/asm/gpio.h is
either missing or faulty.

This patch corrects the documentation.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agolib/libfdt/: General aesthetic/style fixes.
Robert P. J. Day [Mon, 23 May 2016 09:40:55 +0000 (05:40 -0400)]
lib/libfdt/: General aesthetic/style fixes.

A number of style fixes across the files in this directory, including:

 * Correct invalid kernel-doc content.
 * Tidy up massive comment in fdt_region.c.
 * Use correct spelling of "U-Boot".
 * Replace tests of "! <var>" with "!<var>".
 * Replace "libfdt_env.h" with <libfdt_env.h>.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agogpio: pca953x: Fix register reading past 8th GPIO
mario.six@gdsys.cc [Mon, 23 May 2016 07:54:56 +0000 (09:54 +0200)]
gpio: pca953x: Fix register reading past 8th GPIO

A bug in the pca953x driver prevents correct reading of GPIO input
values beyond the 8th GPIO; all values are reported as zero. Setting of
GPIO output values is not affected.

This patch fixes the reading behavior.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Peng Fan <van.freenix@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: add manual relocation for devices
Angelo Dureghello [Sat, 21 May 2016 10:05:49 +0000 (12:05 +0200)]
dm: add manual relocation for devices

Some architectures as m68k still need to use CONFIG_NEEDS_MANUAL_RELOC,
and are not still using the device tree.

Signed-off-by: Angelo Dureghello <angelo@sysam.it>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoARM: uniphier: use the default CONFIG_BOOTDELAY=2
Masahiro Yamada [Fri, 17 Jun 2016 10:24:30 +0000 (19:24 +0900)]
ARM: uniphier: use the default CONFIG_BOOTDELAY=2

I do not insist on CONFIG_BOOTDELAY=3. The default value in Kconfig,
CONFIG_BOOTDELAY=2, is just fine for these boards.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: reserve memory for DRAM PHY training on PH1-LD20
Masahiro Yamada [Fri, 17 Jun 2016 10:24:29 +0000 (19:24 +0900)]
ARM: uniphier: reserve memory for DRAM PHY training on PH1-LD20

The DRAM PHY layer on PH1-LD20 is able to calibrate PHY parameters
periodically.  This compensates for the voltage and temperature
deviation and improves the PHY parameter adjustment.  Instead, it
requires 64 byte scratch memory in each DRAM channel for the dynamic
training.  The memory regions must be reserved in DT before jumping
to the kernel.

The scratch area can be anywhere in each DRAM channel, but the DRAM
init code in SPL currently assigns it at the end of each channel.
So, it makes sense to reserve the regions on run-time by U-Boot
instead of statically embedding it in the DT in Linux.  Anyway,
a boot-loader should know much more about memory initialization
than the kernel.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: move CONFIG_ARMV8_MULTIENTRY to Kconfig
Masahiro Yamada [Fri, 17 Jun 2016 10:24:28 +0000 (19:24 +0900)]
ARM: uniphier: move CONFIG_ARMV8_MULTIENTRY to Kconfig

I just did not notice this option had an entry in Kconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: introduce CONFIG_ARM_UNIPHIER_{32, 64}BIT
Masahiro Yamada [Fri, 17 Jun 2016 10:24:27 +0000 (19:24 +0900)]
ARM: uniphier: introduce CONFIG_ARM_UNIPHIER_{32, 64}BIT

This will make it easier to select config options specific to
particular ARM processor generation.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: change CPU_RELEASE_ADDR to the head of DRAM space
Masahiro Yamada [Wed, 15 Jun 2016 05:46:09 +0000 (14:46 +0900)]
ARM: uniphier: change CPU_RELEASE_ADDR to the head of DRAM space

At first, 256 byte of the head of DRAM space was reserved for some
reasons.  However, as the progress of development, it turned out
unnecessary, and it was never used in the end.  Move the CPU release
address to leave no space.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoSPL ext: cosmetic: correct error message in spl_load_image_ext()
Petr Kulhavy [Sat, 18 Jun 2016 10:21:17 +0000 (12:21 +0200)]
SPL ext: cosmetic: correct error message in spl_load_image_ext()

Correct the error message in spl_load_image_ext() when image parsing
fails. Instead of "ext4fs_read failed" print "failed to parse image
header".

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
CC: Guillaume GARDET <guillaume.gardet@free.fr>
CC: Tom Rini <trini@konsulko.com>
8 years agofs: cbfs: Fix build of fs/cbfs/cbfs.c when building u-boot sandbox on x86 32-bit
Guillaume GARDET [Fri, 17 Jun 2016 09:45:37 +0000 (11:45 +0200)]
fs: cbfs: Fix build of fs/cbfs/cbfs.c when building u-boot sandbox on x86 32-bit

Fix the following build errors when building sandbox on x86 32-bit:

In file included from fs/cbfs/cbfs.c:8:0:
include/malloc.h:364:7: error: conflicting types for 'memset'
void* memset(void*, int, size_t);
^
In file included from include/compiler.h:123:0,
from include/cbfs.h:10,
from fs/cbfs/cbfs.c:7:
include/linux/string.h:78:15: note: previous declaration of 'memset' was here
extern void * memset(void *,int,__kernel_size_t);
^
In file included from fs/cbfs/cbfs.c:8:0:
include/malloc.h:365:7: error: conflicting types for 'memcpy'
void* memcpy(void*, const void*, size_t);
^
In file included from include/compiler.h:123:0,
from include/cbfs.h:10,
from fs/cbfs/cbfs.c:7:
include/linux/string.h:81:15: note: previous declaration of 'memcpy' was here
extern void * memcpy(void *,const void *,__kernel_size_t);
^
scripts/Makefile.build:280: recipe for target 'fs/cbfs/cbfs.o' failed

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agotest/py: fix printenv signon message disable code
Stephen Warren [Thu, 16 Jun 2016 18:59:34 +0000 (12:59 -0600)]
test/py: fix printenv signon message disable code

CONFIG_VERSION_VARIABLE isn't always defined, so we can't simply look up
its value directly, or an exception will occur if it isn't defined.
Instead, we must use .get() to supply a default value if the variable
isn't defined.

Fixes: da37f006e7c5 ("tests: py: disable main_signon check for printenv cmd")
Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Sun, 19 Jun 2016 03:46:43 +0000 (23:46 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Sun, 19 Jun 2016 03:46:21 +0000 (23:46 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

Signed-off-by: Tom Rini <trini@konsulko.com>
Conflicts:
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h

8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Sun, 19 Jun 2016 03:44:22 +0000 (23:44 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

8 years agowarp7: Fix DFU support
Fabio Estevam [Thu, 9 Jun 2016 17:54:30 +0000 (14:54 -0300)]
warp7: Fix DFU support

Currently DFU is not working.

Adjust CONFIG_SYS_MALLOC_LEN and dfu_alt_info so that we are
able to flash u-boot.imx into the eMMC via dfu using the
following method:

=> dfu 0 mmc 0

In the host PC:

dfu-util -D u-boot.imx -a boot

This is the same approach done in the mx6sl warp board.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agowarp7: Add README file
Marco Franchi [Fri, 10 Jun 2016 17:56:23 +0000 (14:56 -0300)]
warp7: Add README file

Add a README file for helping users to install U-Boot into the eMMC.

Signed-off-by: Marco Franchi <marco.franchi@nxp.com>
Acked-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agowarp7: Fix watchdog reset
Marco Franchi [Fri, 10 Jun 2016 17:45:28 +0000 (14:45 -0300)]
warp7: Fix watchdog reset

The latest version of warp7 board provides the connection of the
WDOG1_B pin to the PMIC.

Program the watchdog to enable the WDOG1_B output which causes
a POR reset.

Based on the imx7dsabresd code.

Signed-off-by: Marco Franchi <marco.franchi@nxp.com>
Acked-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoimx: mx6ulevk: change QSPI PAD DSE to 120ohm
Peng Fan [Wed, 15 Jun 2016 06:18:39 +0000 (14:18 +0800)]
imx: mx6ulevk: change QSPI PAD DSE to 120ohm

The current pad DSE for QSPI is 60ohm. This setting cause
too strong drive to clock and data signals. Need to change
the DSE to 120ohm for better signal quality.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoimx6ulevk: fix LCD_nPWREN setting
Peng Fan [Wed, 15 Jun 2016 06:18:38 +0000 (14:18 +0800)]
imx6ulevk: fix LCD_nPWREN setting

Q901 is PMOS, LCD_nPWREN should be at low voltage then output is 3V3.
If LCD_nPWREN is high, output is 2.4V which is not correct.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoimx6ulevk: fix 74LV OE usage
Peng Fan [Wed, 15 Jun 2016 06:18:37 +0000 (14:18 +0800)]
imx6ulevk: fix 74LV OE usage

Fix 74LV OE gpio index. gpio index is wrong,
so gpio output will not have effect, since we
use wrong GPIO5_IO18, but not correct GPIO5_IO8.

And at the end of the initialization of 74lv init, should
keep OE voltage level at LOW to make 74lv output the correct
voltage.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agomx7dsabresd: Fix LCD_PWR_EN output setting
Ye Li [Wed, 15 Jun 2016 06:18:36 +0000 (14:18 +0800)]
mx7dsabresd: Fix LCD_PWR_EN output setting

LCD_PWR_EN controls the G pin of Q13 PMOS which needs low voltage to connect
D to S for outputting LCD 3.3V. If LCD_PWR_EN is high, we measured the LCD 3v3
is actually 1.2V.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agomx6sabresd: Allow LVDS backlight to be functional after a kernel reboot
Marco Franchi [Wed, 8 Jun 2016 18:05:31 +0000 (15:05 -0300)]
mx6sabresd: Allow LVDS backlight to be functional after a kernel reboot

Currently the LVDS backlight does not work in U-Boot after a “reboot” comand
in the kernel.

This problem occurs because the kernel uses this pin in PWM mode and U-Boot
does not configure the backlight pin as GPIO functionality.

So fix the problem by explicitly configuring the backlight pin as GPIO in
U-Boot.

Signed-off-by: Marco Franchi <marco.franchi@nxp.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot
Stefano Babic [Sat, 18 Jun 2016 08:24:54 +0000 (10:24 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot

Signed-off-by: Stefano Babic <sbabic@denx.de>
8 years agousb: ehci: only shutdown opened controller
Peng Fan [Wed, 15 Jun 2016 05:15:46 +0000 (13:15 +0800)]
usb: ehci: only shutdown opened controller

If the usb controller is not running, no need to shutdown it,
otherwise `usb stop` complains about:
"EHCI failed to shut down host controller".

To i.MX7D SDB, there are two usb ports, one Host, one OTG.
If we only plug one udisk to the Host port and then `usb start`,
the OTG controller for OTG port does not run actually. Then,
if `usb stop`, the OTG controller for OTG port will also be
shutdown, but it is not running.

This patch adds a check to only shutdown the running controller.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Stefan Brüns" <stefan.bruens@rwth-aachen.de>
Cc: Stephen Warren <swarren@nvidia.com>
8 years agocmd: usb: check if_type before using this device
Peng Fan [Fri, 17 Jun 2016 06:18:11 +0000 (14:18 +0800)]
cmd: usb: check if_type before using this device

For legacy usb storage driver, USB_MAX_STOR_DEV is defined as 7.
If we only have one usb disk on board, `usb dev 0` is ok.
But if `usb dev 1`, still ok, then `usb read xxx` will trigger
system fault and reboot.

So check if_type before using this device.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stephen Warren <swarren@nvidia.com>
8 years agoarm: Fix setjmp
Alexander Graf [Mon, 13 Jun 2016 12:01:07 +0000 (14:01 +0200)]
arm: Fix setjmp

The setjmp/longjmp implementation did not work on thumb1 implementations
because it used instruction encodings that don't exist on thumb1 yet.

This patch limits itself to thumb1 instruction set for 32bit arm and
removes a superfluous printf along the way.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoarm, am335x: siemens: enable DM/DTS support
Heiko Schocher [Mon, 13 Jun 2016 13:16:01 +0000 (15:16 +0200)]
arm, am335x: siemens: enable DM/DTS support

enable basic DM/DTS support for the siemens am335x based boards.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agoarm, am335x: siemens: update etamin defconfig
Heiko Schocher [Mon, 13 Jun 2016 13:16:00 +0000 (15:16 +0200)]
arm, am335x: siemens: update etamin defconfig

add missing USB_MUSB_* and CONFIG_G_DNL_*
board configuration.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agoARM: AM57xx: Enable FIT for HS Devices
Andreas Dannenberg [Mon, 13 Jun 2016 23:25:16 +0000 (18:25 -0500)]
ARM: AM57xx: Enable FIT for HS Devices

Enable FIT support for AM57xx platforms using the high-security (HS)
device variant.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoOMAP3: fix twister board
Stefano Babic [Tue, 14 Jun 2016 07:13:37 +0000 (09:13 +0200)]
OMAP3: fix twister board

twister board was not updated after changing
SPL defines, resulting in a broken board.

Signed-off-by: Stefano Babic <sbabic@denx.de>
8 years agoOrphan dbau1x00 boards
Thomas Lange [Tue, 14 Jun 2016 09:04:37 +0000 (11:04 +0200)]
Orphan dbau1x00 boards

I no longer have access to such a board

Signed-off-by: Thomas Lange <thomas@corelatus.se>
8 years agoSPL: ext: remove redundant ifdef statement
Petr Kulhavy [Tue, 14 Jun 2016 10:06:36 +0000 (12:06 +0200)]
SPL: ext: remove redundant ifdef statement

Remove redundant #if defined(CONFIG_SPL_OS_BOOT) statement around
getenv() calls in spl_load_image_ext_os().

The whole function is surrounded by #ifdef CONFIG_SPL_OS_BOOT.

No functional change.

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
CC: Guillaume GARDET <guillaume.gardet@free.fr>
Acked-by: Guillaume GARDET <guillaume.gardet@free.fr>
8 years agocommon: image-fit: Cleanup spelling mistakes
Andreas Dannenberg [Wed, 15 Jun 2016 22:00:19 +0000 (17:00 -0500)]
common: image-fit: Cleanup spelling mistakes

The comments in the source file are riddled with spelling mistakes. Be
a good citizen and take a stab at cleaning up some of the more obvious
ones.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoARM: AM437x: Enable FIT for hs platforms
Srinivas, Madan [Thu, 16 Jun 2016 19:42:32 +0000 (15:42 -0400)]
ARM: AM437x: Enable FIT for hs platforms

Adds FIT support to the SPL and u-boot for AM437x HS devices.

Signed-off-by: Madan Srinivas <madans@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: AM437x: Sync defconfig between GP and HS EVM
Srinivas, Madan [Thu, 16 Jun 2016 19:42:31 +0000 (15:42 -0400)]
ARM: AM437x: Sync defconfig between GP and HS EVM

Adds missing NAND option to CONFIG_SYS_EXTRA_OPTIONS for
AM437x HS EVMs. This syncs up the config options between
GP and HS EVMs.

Signed-off-by: Madan Srinivas <madans@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoconfigs: Re-sync BOOTDELAY changes
Tom Rini [Mon, 13 Jun 2016 13:45:14 +0000 (09:45 -0400)]
configs: Re-sync BOOTDELAY changes

With updated moveconfig.py and an better default, re-generate
the migration of BOOTDELAY to the defconfig.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agocommon/Kconfig: Change the default BOOTDELAY to 2
Tom Rini [Mon, 13 Jun 2016 13:00:30 +0000 (09:00 -0400)]
common/Kconfig: Change the default BOOTDELAY to 2

The value of 0 is fairly uncommon while 2 is one of the more common ones
so switch.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-ubi
Tom Rini [Fri, 17 Jun 2016 13:33:06 +0000 (09:33 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-ubi

8 years agosplash_source: add support for ubifs formatted nand
Eran Matityahu [Tue, 7 Jun 2016 07:38:37 +0000 (10:38 +0300)]
splash_source: add support for ubifs formatted nand

Add support for loading splash image from NAND Flash formatted with a (UBI) filesystem.

Signed-off-by: Eran Matityahu <eran.m@variscite.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agousb: xhci: fsl: Add workaround for USB erratum A008751
Sriram Dash [Mon, 13 Jun 2016 04:28:36 +0000 (09:58 +0530)]
usb: xhci: fsl: Add workaround for USB erratum A008751

This patch is doing the following:
1. Implementing the errata for LS2080.
2. Adding fixup for fdt for LS2080.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
8 years agoarmv8/ls2080: Remove workaround for erratum A008751
Sriram Dash [Mon, 13 Jun 2016 04:28:35 +0000 (09:58 +0530)]
armv8/ls2080: Remove workaround for erratum A008751

This errata a008751 is applied on Soc specific file currently.This will be
moved to a file where all the errata implementation will take place for usb
for fsl. This patch removes the errata workaround from soc specific file
for LS2080.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
8 years agofsl: usb: make errata function common for PPC and ARM
Sriram Dash [Mon, 13 Jun 2016 04:28:34 +0000 (09:58 +0530)]
fsl: usb: make errata function common for PPC and ARM

This patch does the following things:
1. Makes the errata checking code common for PPC and ARM
2. Moves all these static inline functions into a dedicated C file

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
8 years agousb: xhci: fsl: code cleanup for device tree fixup for fsl usb controllers
Sriram Dash [Mon, 13 Jun 2016 04:28:33 +0000 (09:58 +0530)]
usb: xhci: fsl: code cleanup for device tree fixup for fsl usb controllers

Performs code cleanup for device tree fixup for fsl usb controllers by
making functions to handle these similar errata checking code.

Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
8 years agoarm64: fsl-layerscape: add get_svr and IS_SVR_REV helper
Sriram Dash [Mon, 13 Jun 2016 04:28:32 +0000 (09:58 +0530)]
arm64: fsl-layerscape: add get_svr and IS_SVR_REV helper

Adds get_svr and IS_SVR_REV helpers for ARMv8 platforms,
similar to PPC and ARMv7.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
8 years agoarm: bcm281xx: choose 8-bit phy bus width
Steve Rae [Tue, 7 Jun 2016 22:35:22 +0000 (15:35 -0700)]
arm: bcm281xx: choose 8-bit phy bus width

The Kona PHY supports an 8-bit wide UTMI interface,
therefore, choose this Kconfig setting.

Signed-off-by: Steve Rae <srae@broadcom.com>
8 years agousb: dwc2_udc_otg: support 8-bit interface
Steve Rae [Tue, 7 Jun 2016 22:35:21 +0000 (15:35 -0700)]
usb: dwc2_udc_otg: support 8-bit interface

Define CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8 to allow the
physical interface to be 8-bit (rather than 16-bit).

Signed-off-by: Steve Rae <srae@broadcom.com>
8 years agoboard: am437x-hs: spl: Select right dtb from fit
Lokesh Vutla [Fri, 10 Jun 2016 05:14:47 +0000 (10:44 +0530)]
board: am437x-hs: spl: Select right dtb from fit

Select a right dtb from FIT for am437x-hs platform.

Reported-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoti_omap5_common: Add right dtb file for AM572x-IDK
Lokesh Vutla [Fri, 10 Jun 2016 04:05:46 +0000 (09:35 +0530)]
ti_omap5_common: Add right dtb file for AM572x-IDK

Add proper dtb file name for AM572x-IDK in env.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: dts: AM572x-IDK Initial Support
Schuyler Patton [Fri, 10 Jun 2016 04:05:45 +0000 (09:35 +0530)]
ARM: dts: AM572x-IDK Initial Support

Add initial DTS support for AM572-IDK evm.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Schuyler Patton <spatton@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: AM57xx: Enable FIT
Lokesh Vutla [Fri, 10 Jun 2016 04:05:44 +0000 (09:35 +0530)]
ARM: AM57xx: Enable FIT

Enable FIT support for AM57xx platforms

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoboard: am57xx: fit: add support for selecting dtb dynamically
Lokesh Vutla [Fri, 10 Jun 2016 04:05:43 +0000 (09:35 +0530)]
board: am57xx: fit: add support for selecting dtb dynamically

FIT allows for a multiple dtb in a single image. SPL needs away to
detect the right dtb to be used. Adding support for the same for am57xx
platforms.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoboard: am57xx: Rename TARGET_BEAGLE_X15 as TARGET_AM57XX_EVM
Lokesh Vutla [Fri, 10 Jun 2016 04:05:42 +0000 (09:35 +0530)]
board: am57xx: Rename TARGET_BEAGLE_X15 as TARGET_AM57XX_EVM

board/am57xx supports all boards based on am57xx. Rename the taget
as TARGET_AM57XX_EVM.

Fixes: 74cc8b097d9af ("board: ti: beagle_x15: Rename to indicate support for TI am57xx evms")
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoarmv8: s32v234: Introduce basic support for s32v234evb
Eddy Petrișor [Sun, 5 Jun 2016 00:43:00 +0000 (03:43 +0300)]
armv8: s32v234: Introduce basic support for s32v234evb

Add initial support for NXP's S32V234 SoC and S32V234EVB board.

The S32V230 family is designed to support computation-intensive applications
for image processing. The S32V234, as part of the S32V230 family, is a
high-performance automotive processor designed to support safe
computation-intensive applications in the area of vision and sensor fusion.

Code originally writen by:
Original-signed-off-by: Stoica Cosmin-Stefan <cosminstefan.stoica@freescale.com>
Original-signed-off-by: Mihaela Martinas <Mihaela.Martinas@freescale.com>
Original-signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
Signed-off-by: Eddy Petrișor <eddy.petrisor@nxp.com>
8 years agoserial: Introduce linflex uart support
Stoica Cosmin-Stefan [Sun, 5 Jun 2016 00:42:59 +0000 (03:42 +0300)]
serial: Introduce linflex uart support

The Linflex module is integrated on some NXP automotive SoCs part of the former
Freescale portfolio, like S32V234, an SoC for Advanced Driver Assistance
Systems.

Original-signed-off-by: Stoica Cosmin-Stefan <cosminstefan.stoica@freescale.com>
Original-signed-off-by: Chircu Bogdan <Bogdan.Chircu@freescale.com>
Original-signed-off-by: Depons Eric <eric.depons@freescale.com>
Original-signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
8 years agoboard: arm:: Add support for Broadcom BCM23550
Steve Rae [Thu, 2 Jun 2016 22:10:56 +0000 (15:10 -0700)]
board: arm:: Add support for Broadcom BCM23550

Add support for the Broadcom BCM23550 board.

Signed-off-by: Steve Rae <srae@broadcom.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-arc
Tom Rini [Mon, 13 Jun 2016 12:51:50 +0000 (08:51 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arc

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-ubi
Tom Rini [Mon, 13 Jun 2016 12:51:21 +0000 (08:51 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-ubi

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-atmel
Tom Rini [Mon, 13 Jun 2016 12:50:58 +0000 (08:50 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-atmel

8 years agoaxs103: Bump CPU frequency from 50MHz to 100MHz
Alexey Brodkin [Fri, 10 Jun 2016 15:19:25 +0000 (18:19 +0300)]
axs103: Bump CPU frequency from 50MHz to 100MHz

In the upcoming release of axs103 v1.1 CPU will
run @100MHz which we support with that change.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
8 years agoarc: Update data accessors with use of memory barriers
Alexey Brodkin [Wed, 8 Jun 2016 05:24:54 +0000 (08:24 +0300)]
arc: Update data accessors with use of memory barriers

Memory barriers are proven to be a requirement for both compiler and
real hardware to properly serialize access to critical data.

For example if CPU or data bus it uses may do reordering of data
accesses absence of memory barriers might easily lead to very subtle and
hard to debug data corruptions.

This implementation was heavily borrowed from up to date Linux kernel.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
8 years agoboard: axs10x: Flush entire cache after programming reset vector
Alexey Brodkin [Wed, 8 Jun 2016 05:19:33 +0000 (08:19 +0300)]
board: axs10x: Flush entire cache after programming reset vector

Now when we have support of IOC (IO-Coherency block) cahce operations
on regions are tuned to not be dummy stubs if IOC was found and enabled
in the core. That makes flush_dcache_range() useless for our purposes
here. And since we do need to flush modified reset vector to at least L2
cache (AKA SLC) so other cores will see it via its L1 instruction cache
we're using always functional flush_dcache_all() here.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Marek Vasut <marex@denx.de>
8 years agoarc/cache: Flush & invalidate all caches right before enabling IOC
Alexey Brodkin [Wed, 8 Jun 2016 05:04:03 +0000 (08:04 +0300)]
arc/cache: Flush & invalidate all caches right before enabling IOC

According to ARC HS databook it is required to flush and disable
caches prior programming IOC registers. Otherwise ongoing coherent
memory operations may not observe the coherency protocols as
expected.

But since in ARC HS v2.1 there's no way to disable SLC (AKA L2 cache)
we're doing our best flushing and invalidating it.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
8 years agoarc/cache: really do invalidate_dcache_all() even if IOC exists
Alexey Brodkin [Wed, 8 Jun 2016 04:57:19 +0000 (07:57 +0300)]
arc/cache: really do invalidate_dcache_all() even if IOC exists

invalidate_dcache_all() could be used in different use-cases
and what is especially important most of those cases won't be
related to DMAed data to or from peripherals, i.e. we'll be doing
invalidation of data used purely by CPU cores.

Given that IOC engine only snoops data that goes through DMA
we need to care ourselves about data used only by CPU cores
and so remove dependency on IOC from invalidate_dcache_all()
and always do real invalidation.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
8 years agocommon: env_ubi: Clear environment buffer before reading
Marcin Niestroj [Tue, 24 May 2016 12:59:55 +0000 (14:59 +0200)]
common: env_ubi: Clear environment buffer before reading

In case we have restarted u-boot there is a chance that environment
buffer contains old environment (from the previous boot). If UBI volume
is zero size, ubi_volume_read() doesn't modify the buffer and exits
successfully.

We need to clear buffer manually before reading it from UBI, so the
invalid CRC will cause setting default environment in case that the UBI
volume is zero size.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Mon, 13 Jun 2016 03:28:57 +0000 (23:28 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

8 years agoautoboot: follow-up cleanup after CONFIG_BOOTDELAY moves
Masahiro Yamada [Sat, 11 Jun 2016 09:44:09 +0000 (18:44 +0900)]
autoboot: follow-up cleanup after CONFIG_BOOTDELAY moves

Tidy up garbage left by commit bb597c0eeb7e ("common: bootdelay: move
CONFIG_BOOTDELAY into a Kconfig option").

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: stm32: remove unused CONFIG_AUTOBOOT
Masahiro Yamada [Sat, 11 Jun 2016 09:44:08 +0000 (18:44 +0900)]
ARM: stm32: remove unused CONFIG_AUTOBOOT

At this point, this is not referenced from anywhere, so remove it
(but it will be re-added later for a different meaning).

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agotools: fix define2mk.sed to not add quotes around negative integers
Masahiro Yamada [Sat, 11 Jun 2016 09:44:10 +0000 (18:44 +0900)]
tools: fix define2mk.sed to not add quotes around negative integers

The sed script, tools/scripts/define2mk.sed, converts config defines
from C headers into include/autoconf.mk for the use in Makefiles.

I found the tool adds quotes around negative integer values.

For example, at the point of the v2016.07-rc1 tag,
include/configs/microblaze-generic.h defines
  #define CONFIG_BOOTDELAY         -1     /* -1 disables auto-boot */

Because it is an integer option, it should be converted to:
  CONFIG_BOOTDELAY=-1

But, the script actually converts it to:
  CONFIG_BOOTDELAY="-1"

This is a fatal problem for the tools/moveconfig.py because it parses
include/autoconf.mk for the config defines from the board headers.
CONFIG_BOOTDELAY="-1" is considered as a string type option and it
is dropped due to the type mismatch from the entry in Kconfig.

This commit fixes the script so that the tools/moveconfig.py can
correctly convert integer options with a negative value.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agotools: moveconfig: Add a new --git-ref option
Joe Hershberger [Fri, 10 Jun 2016 19:53:32 +0000 (14:53 -0500)]
tools: moveconfig: Add a new --git-ref option

This option allows the 'make autoconf.mk' step to run against a former
repo state, while the savedefconfig step runs against the current repo
state. This is convenient for the case where something in the Kconfig
has changed such that the defconfig is no longer complete with the new
Kconfigs. This feature allows the .config to be built assuming those old
Kconfigs, but then savedefconfig based on the new state of the Kconfigs.

If in doubt, always specify this switch. It will always do the right
thing even if not required, but if it was required and you don't use it,
the moved configs will be incorrect. When not using this switch, you
must very carefully evaluate that all moved configs are correct.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agotools: moveconfig: New color used for changed defconfig
Joe Hershberger [Fri, 10 Jun 2016 19:53:30 +0000 (14:53 -0500)]
tools: moveconfig: New color used for changed defconfig

The old color blends in with similar messages and makes them not stand
out.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agotools: moveconfig: Fix another typo
Joe Hershberger [Fri, 10 Jun 2016 19:53:29 +0000 (14:53 -0500)]
tools: moveconfig: Fix another typo

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agotools: moveconfig: make Slot.poll() more readable with helper methods
Masahiro Yamada [Wed, 8 Jun 2016 02:47:37 +0000 (11:47 +0900)]
tools: moveconfig: make Slot.poll() more readable with helper methods

The Slot.poll() method is already complicated and a new feature
we are going to add will make it more difficult to understand
the execution flow.

Refactor it with helper methods, .handle_error(), .do_defconfig(),
.do_autoconf(), .do_savedefconfig, and .update_defconfig().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agotools: moveconfig: allow to run without any CONFIG specified
Masahiro Yamada [Thu, 19 May 2016 06:52:09 +0000 (15:52 +0900)]
tools: moveconfig: allow to run without any CONFIG specified

I found "tools/moveconfig -s" might be useful for defconfig re-sync.
I could optimize it for re-sync if I wanted, but I do not want to
make the code complex for this feature.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: add --force-sync option
Masahiro Yamada [Thu, 19 May 2016 06:52:08 +0000 (15:52 +0900)]
tools: moveconfig: add --force-sync option

Now, this tools invokes "make savedefconfig" only when it needs to
do so, but there might be cases where a user wants the tool to do
savedefconfig forcibly, for example, some defconfigs were already
out of sync and the user wants to fix it as well.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: report when defconfig is updated
Masahiro Yamada [Thu, 19 May 2016 06:52:07 +0000 (15:52 +0900)]
tools: moveconfig: report when defconfig is updated

There are various factors that determine if the given defconfig is
updated, and it is probably what users are more interested in.

Show the log when the defconfig is updated.  Also, copy the file
only when the file content was really updated to avoid changing
the time stamp needlessly.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agotools: moveconfig: report when CONFIGs are removed by savedefconfig
Masahiro Yamada [Thu, 19 May 2016 06:52:06 +0000 (15:52 +0900)]
tools: moveconfig: report when CONFIGs are removed by savedefconfig

This is a rare case, but there is still possibility that some CONFIG
is moved to the .config, but it is removed by "make savedefconfig".
(For example, it happens when the specified CONFIG has no prompt in
the Kconfig entry, i.e. it is not user-configurable.)

It might be an unexpected case.  So, display the log in this case
(in yellow color to gain user's attention if --color option is given).

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>