oweals/u-boot.git
8 years agoconfigs: Re-sync HUSH options
Tom Rini [Fri, 22 Apr 2016 01:37:19 +0000 (21:37 -0400)]
configs: Re-sync HUSH options

Move all cases of CONFIG_SYS_HUSH_PARSER out of the config.h files.  Remove
all cases of CONFIG_SYS_PROMPT_HUSH_PS2 as everyone uses the default.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-uniphier
Tom Rini [Mon, 25 Apr 2016 17:45:32 +0000 (13:45 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-uniphier

8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-usb
Tom Rini [Mon, 25 Apr 2016 17:43:22 +0000 (13:43 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-usb

8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Mon, 25 Apr 2016 17:34:42 +0000 (13:34 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Mon, 25 Apr 2016 17:32:58 +0000 (13:32 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-ubi
Tom Rini [Mon, 25 Apr 2016 17:32:18 +0000 (13:32 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-ubi

8 years agodfu: ram: fix number base of RAM entity parameters
Stephen Warren [Fri, 22 Apr 2016 19:34:16 +0000 (13:34 -0600)]
dfu: ram: fix number base of RAM entity parameters

U-Boot typically interprets unprefixed numbers as base 16, and DFU RAM
entity parsing has historically done so. Reverse the change to default
to base 10, so that values in previously working command-lines aren't
mis-parsed, causing RAM corruption, crashes, hangs, etc.

Fixes: 6aeb877afef0 ("drivers: dfu: ram: fix a crash with dfu ram with invalid dfu_alt_info env")

Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
[Test HW: AM335x BBB]

8 years agodrivers: dfu: ram: fix a crash with dfu ram with invalid dfu_alt_info env
Mugunthan V N [Fri, 22 Apr 2016 08:49:25 +0000 (14:19 +0530)]
drivers: dfu: ram: fix a crash with dfu ram with invalid dfu_alt_info env

U-Boot crashes when an invalid dfu_alt_info is set and tried
using dfu command. Fixing this as it is handled in dfu-mmc.

=> dfu 0 ram 0
data abort
pc : [<9ff893d6>]          lr : [<9ff6edb9>]
reloc pc : [<808323d6>]    lr : [<80817db9>]
sp : 9ef36cf0  ip : 00000158     fp : 9ffbc0b8
r10: 9ffbc0b8  r9 : 9ef36ed8     r8 : 00000000
r7 : 00000000  r6 : 9ffbc0c8     r5 : 9ef36cfc  r4 : 9ef392c8
r3 : 00000004  r2 : 00000000     r1 : 9ff9a985  r0 : ffffffff
Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

resetting ...

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agousb: s3c-otg: Fix remaining bytes in debug messages
Roger Quadros [Fri, 22 Apr 2016 09:02:06 +0000 (11:02 +0200)]
usb: s3c-otg: Fix remaining bytes in debug messages

Remaining bytes means bytes that are not yet transferred
and not the bytes that were transferred in the last transfer.

Reported-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Tested-by: Steve Rae <srae@broadcom.com>
[Test HW: bcm28155_ap board]

8 years agousb: s3c-otg: Fix short packet for request size > ep.maxpacket
Roger Quadros [Tue, 19 Apr 2016 12:20:39 +0000 (15:20 +0300)]
usb: s3c-otg: Fix short packet for request size > ep.maxpacket

Request size can be greater than ep.packet and still end in a
short packet. We need to tackle this case as end of transfer
(if short_not_ok is not set) as indicated in USB 2.0 Specification [1],
else we get stuck up on certain protocols like fastboot.

[1] - USB2.0 Specification, Section 5.3.2 Pipes

Reported-by: Steve Rae <steve.rae@broadcom.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Tested-by: Steve Rae <steve.rae@broadcom.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agofastboot: Clean up bulk-out logic
Roger Quadros [Tue, 19 Apr 2016 07:16:59 +0000 (10:16 +0300)]
fastboot: Clean up bulk-out logic

Just use ep->maxpacket to get the maxpacket size
and simplify the bulk-out maxpacket alignment.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Tested-by: Steve Rae <srae@broadcom.com>
8 years agofastboot: Enable the respective speed endpoints at runtime
Roger Quadros [Wed, 13 Apr 2016 08:30:00 +0000 (11:30 +0300)]
fastboot: Enable the respective speed endpoints at runtime

In a dual speed configuration we need to check at runtime if
we want to enable the Full-Speed or High-Speed endpoint.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Steve Rae <srae@broadcom.com>
[Test HW: bcm235xx board]

8 years agofastboot: Fix wMaxPacketSize for High-Speed IN endpoint
Roger Quadros [Tue, 12 Apr 2016 12:51:48 +0000 (15:51 +0300)]
fastboot: Fix wMaxPacketSize for High-Speed IN endpoint

wMaxPacketSize for IN endpoing in High-Speed must be 512 and not 64.
While fixing that we do some clean ups like

- use cpu_to_le16(decimal_length) instead of hexadecimal length.
- No need to initialize bInterval to 0. Static variables are 0 initialized.
- Move descriptor setting from fastboot_add to to fastboot_bind.
- check for dual speed configuration before setting the high speed descriptors.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Tested-by: Steve Rae <srae@broadcom.com>
Tested-by: Steve Rae <srae@broadcom.com> [Test HW: bcm235xx board]
8 years agotests: py: dfu: Provide functionality to set test and dummy files alt settings
Lukasz Majewski [Wed, 20 Apr 2016 08:57:08 +0000 (10:57 +0200)]
tests: py: dfu: Provide functionality to set test and dummy files alt settings

After concatenation of "dfu_alt_info" variable from "dfu_alt_boot" and
"dfu_alt_system" it may happen that test and dummy files alt settings
are different than default 0 and 1.

This patch provides the ability to set different values for them.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
---
Changes for v3:
- replace variables declarations with ones read from configuration file
- remove not necessary str() conversion at DFU host command generation

Changes for v2:
- generate "alt_info" automatically
- use file names as alt settings instead of numerical values
- extend in-code documentation

8 years agotests: py: dfu: Add functionality to set different u-boot's dfu env variable
Lukasz Majewski [Mon, 18 Apr 2016 15:01:15 +0000 (17:01 +0200)]
tests: py: dfu: Add functionality to set different u-boot's dfu env variable

By default (on almost all systems) the dfu env variable, which defines
available alt settings, is named as "dfu_alt_info".

However on some platforms (i.e. Odroid XU3), the 'dfu_alt_info' is concatenated
from other variables - namely 'dfu_alt_boot' and 'dfu_alt_system' at run time
(when one types 'dfu 0 mmc 0' for first time).

'dfu_alt_boot' describes alt settings which depend on boot medium - for example
boot loader's LBA sectors which are different on eMMC and SD card because of e.g.
MBR/GPT.

'dfu_alt_system' describes board agnostic alt settings - like rootfs, kernel.
On such system we can only append/modify this env variable.

Because of the above, we must have way to modify other than "dfu_ale_info"
variable to perform tests.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
---
Changes for v3:
- None

Changes for v2:
- Rewrite of "alt_info_env_name" variable description
- Use of get() method on python's dictionary to easily obtain default
  value

8 years agotests: py: dfu: Add variables to store dfu alt numbers for test and dummy files
Lukasz Majewski [Wed, 20 Apr 2016 08:36:32 +0000 (10:36 +0200)]
tests: py: dfu: Add variables to store dfu alt numbers for test and dummy files

This patch replaces hardcoded (i.e. 0 and 1) values passed to dfu_{read|write}
with variables.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
---
Changes for v3:
- Replace per module global variables with ones defined inside a function
Changes for v2:
- None

8 years agoi2c: designware_i2c: Add support for PCI(e) based I2C cores (x86)
Stefan Roese [Thu, 21 Apr 2016 06:19:42 +0000 (08:19 +0200)]
i2c: designware_i2c: Add support for PCI(e) based I2C cores (x86)

This patch adds support for the PCI(e) based I2C cores. Which can be
found for example on the Intel Bay Trail SoC. It has 7 I2C controllers
implemented as PCI devices.

This patch also adds the fixed values for the timing registers for
BayTrail which are taken from the Linux designware I2C driver.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoi2c: designware_i2c: Add DM support
Stefan Roese [Thu, 21 Apr 2016 06:19:41 +0000 (08:19 +0200)]
i2c: designware_i2c: Add DM support

This patch adds DM support to the designware I2C driver. It currently
supports DM and the legacy I2C support. The legacy support should be
removed, once all platforms using it have DM enabled.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
8 years agoi2c: designware_i2c: Prepare for DM driver conversion
Stefan Roese [Thu, 21 Apr 2016 06:19:40 +0000 (08:19 +0200)]
i2c: designware_i2c: Prepare for DM driver conversion

This patch prepares the designware I2C driver for the DM conversion.
This is mainly done by removing struct i2c_adapter from the functions
that shall be used by the DM driver version as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
8 years agoi2c: designware_i2c: Integrate set_speed() into dw_i2c_set_bus_speed()
Stefan Roese [Thu, 21 Apr 2016 06:19:39 +0000 (08:19 +0200)]
i2c: designware_i2c: Integrate set_speed() into dw_i2c_set_bus_speed()

Integrating set_speed() into dw_i2c_set_bus_speed() will make the
conversion to DM easier for this driver.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
8 years agoi2c: designware_i2c: Add dw_i2c_enable() helper function
Stefan Roese [Thu, 21 Apr 2016 06:19:38 +0000 (08:19 +0200)]
i2c: designware_i2c: Add dw_i2c_enable() helper function

dw_i2c_enable() is used to dis-/en-able the I2C controller. It makes
sense to add such a function, as the controller is dis-/en-abled
multiple times in the code. Additionally, this function now checks,
if the controller is really dis-/en-abled. This code is copied
from the Linux I2C driver version.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoi2c: designware_i2c: Add ic_enable_status to ic_regs struct
Stefan Roese [Thu, 21 Apr 2016 06:19:37 +0000 (08:19 +0200)]
i2c: designware_i2c: Add ic_enable_status to ic_regs struct

Add the ic_enable_status register to the i2c_regs struct. Additionally
the register offsets are added, to better check, if the offset matches
the register description in the datasheet.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
8 years agodm: core: Add dev_get_addr_ptr() to return a pointer to the reg address
Stefan Roese [Thu, 21 Apr 2016 05:11:34 +0000 (07:11 +0200)]
dm: core: Add dev_get_addr_ptr() to return a pointer to the reg address

On some platforms (e.g. x86), the return value of dev_get_addr() can't
be assigned to a pointer type variable directly. As there might be a
difference between the size of fdt_addr_t and the pointer type. On
x86 for example, "fdt_addr_t" is 64bit but "void *" only 32bit. So
assigning the register base directly in dev_get_addr() results in this
compilation warning:
  warning: cast to pointer from integer of different size

This patch introduces the new function dev_get_addr_ptr() that
returns a pointer to the 'reg' address that can be used by drivers
in this case.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoARM: uniphier: speed up loading kernel image from NOR device
Masahiro Yamada [Thu, 21 Apr 2016 05:43:22 +0000 (14:43 +0900)]
ARM: uniphier: speed up loading kernel image from NOR device

Copy the kernel image double-word-wise rather than byte-wise.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoclk: uniphier: add Media I/O clock driver support for PH1-LD20
Masahiro Yamada [Thu, 21 Apr 2016 05:43:21 +0000 (14:43 +0900)]
clk: uniphier: add Media I/O clock driver support for PH1-LD20

PH1-LD20 needs this for its SD card controller.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: dts: uniphier: add SD controller node for PH1-LD20
Masahiro Yamada [Thu, 21 Apr 2016 05:43:20 +0000 (14:43 +0900)]
ARM: dts: uniphier: add SD controller node for PH1-LD20

PH1-LD20 does not support 1.8V signaling for SD card; only Default
Speed and High Speed (up to 50MHz) with 3.3V signaling is supported.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: reserve the last 64 byte of SDRAM
Masahiro Yamada [Thu, 21 Apr 2016 05:43:19 +0000 (14:43 +0900)]
ARM: uniphier: reserve the last 64 byte of SDRAM

The last 64 byte of each DDR channel of PH1-LD20 is periodically
used as a scratch area for the DDR PHY training.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add PH1-LD20 SoC support
Masahiro Yamada [Thu, 21 Apr 2016 05:43:18 +0000 (14:43 +0900)]
ARM: uniphier: add PH1-LD20 SoC support

This is the first ARMv8 SoC from Socionext Inc.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: rework uniphier_set_fdt_file()
Masahiro Yamada [Thu, 21 Apr 2016 05:43:17 +0000 (14:43 +0900)]
ARM: uniphier: rework uniphier_set_fdt_file()

The current table look-up for the DTB file name turned out bothersome
in terms of maintainability; I ended up adding a new entry every time
a new board is supported.

There is a common pattern between the DT compatible string and the
corresponding file name; drop the vendor prefix "socionext," and
prefix it with "uniphier-" and suffix it with ".dtb".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: carry on booting for Unknown boot mode
Masahiro Yamada [Thu, 21 Apr 2016 05:43:16 +0000 (14:43 +0900)]
ARM: uniphier: carry on booting for Unknown boot mode

No need to stop booting U-Boot even if boot mode is unknown.
Setting the "bootmode" environment is only useful for booting
Linux Kernel.  Anyway, U-Boot has already booted by this point.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add sg_set_iectrl_range()
Masahiro Yamada [Thu, 21 Apr 2016 05:43:15 +0000 (14:43 +0900)]
ARM: uniphier: add sg_set_iectrl_range()

For PH1-LD20 or later, per-pin input-enable control is supported,
that is, we need to set-up IECTRL registers for a group of pins.
This helper function will be useful for a bunch of register settings.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: dts: uniphier: move aliases node up to satisfy fdtgrep
Masahiro Yamada [Thu, 21 Apr 2016 05:43:14 +0000 (14:43 +0900)]
ARM: dts: uniphier: move aliases node up to satisfy fdtgrep

Currently, fdtgrep would not accept uniphier-ph1-ld20-ref.dtb
and uniphier-ph1-ld11-ref.dtb unless the aliases node comes
the first in the root node.

$ make -s uniphier_pxs2_ld6b_defconfig
$ make CROSS_COMPILE=arm-linux-gnueabi- DEVICE_TREE=uniphier-ph1-ld20-ref
  [snip]
  LDS     spl/u-boot-spl.lds
  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl-nodtb.bin
  FDTGREP spl/u-boot-spl.dtb
Error at 'fdt_find_regions': FDT_ERR_BADLAYOUT
/aliases node must come before all other nodes
Error: FDT_ERR_BADMAGIC
make[1]: *** [spl/u-boot-spl.dtb] Error 1
make: *** [spl/u-boot-spl] Error 2

This commit moves the aliases node as the error message from the
fdtgrep tool suggests, although this requirement does not sound
reasonable to me.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: dts: uniphier: use Ref Daughter board on PH1-LD20 Ref board
Masahiro Yamada [Thu, 21 Apr 2016 05:43:13 +0000 (14:43 +0900)]
ARM: dts: uniphier: use Ref Daughter board on PH1-LD20 Ref board

This makes the EEPROM device on the Reference Daughter board
available.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: avoid unaligned access to DT on 64bit SoC
Masahiro Yamada [Thu, 21 Apr 2016 05:43:12 +0000 (14:43 +0900)]
ARM: uniphier: avoid unaligned access to DT on 64bit SoC

Because DT properties are 4-byte aligned, the pointer access
*(fdt64_t *) in this code causes unaligned access.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agopinctrl: uniphier: fix NAND and SD pin-mux settings for PH1-LD11/LD20
Masahiro Yamada [Thu, 21 Apr 2016 05:43:11 +0000 (14:43 +0900)]
pinctrl: uniphier: fix NAND and SD pin-mux settings for PH1-LD11/LD20

I found many mistakes in the initial version.

Fixes: 8a3328c209d0 ("pinctrl: uniphier: support UniPhier PH1-LD20 pinctrl driver")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agopinctrl: uniphier: rename function/array names
Masahiro Yamada [Thu, 21 Apr 2016 05:43:10 +0000 (14:43 +0900)]
pinctrl: uniphier: rename function/array names

Make function/array names match the file names for consistency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Tom Rini [Fri, 22 Apr 2016 11:25:18 +0000 (07:25 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

8 years agoubifs: fix memory corruption in super.c
Heiko Schocher [Thu, 21 Apr 2016 10:16:58 +0000 (12:16 +0200)]
ubifs: fix memory corruption in super.c

In list "super_blocks" ubifs collects allocated super_block
structs. U-Boot frees on unmount the allocated struct,
so the pointer stored in this list is free after the umount.
On a new ubifs mount, the new allocated super_block struct
get inserted into the super_blocks list ... which contains
now a freed pointer, and the list_add_tail() corrupts the
freed memory ...

2 solutions are possible:
- remove the super_block from the super_blocks list
  on umount

- as U-Boot does not use the super_blocks list ...
  remove it complete for U-Boot.

Both solutions should not introduce problems for porting
to newer linux version, so this patch removes the unused
super_blocks list, as it saves code size and execution
time.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agomtd, ubi: set free_count to zero before walking through erase list
Heiko Schocher [Tue, 2 Feb 2016 10:54:35 +0000 (11:54 +0100)]
mtd, ubi: set free_count to zero before walking through erase list

Set free_count to zero before walking through ai->erase list
in wl_init().

As U-Boot has no workqueue/threads, it immediately calls
erase_worker(), which increase for each erased block
free_count. Without this patch, free_count gets after
this initialized to zero in wl_init(), so the free_count
variable always has the maybe wrong value 0.

Detected this behaviour on the dxr2 board, where the
UBI fastmap gets not written when attaching/dettaching
on an empty NAND. It drops instead the error message:

could not find any anchor PEB

With this patch, fastmap gets written on dettach.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
8 years agox86: Correct typo of Miao Yan's email address
Bin Meng [Wed, 13 Apr 2016 08:00:51 +0000 (01:00 -0700)]
x86: Correct typo of Miao Yan's email address

Miao Yan's email address is wrong in fw_cfg.c. Fix it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: qemu: Drop our own ACPI implementation
Bin Meng [Wed, 13 Apr 2016 07:52:49 +0000 (00:52 -0700)]
x86: qemu: Drop our own ACPI implementation

Our own ACPI implementation (when CONFIG_QEMU_ACPI_TABLE is not set)
does not build anymore after x86 has been fully converted to DM PCI.
Instead of trying to fix the build errors, given we now have the ACPI
support via QEMU's fw_cfg interface, which is a more reliable way to
generate correct ACPI tables than by ourselves, hence drop our own
ACPI implementation.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarc/cache: really do flush_dcache_all() even if IOC exists
Alexey Brodkin [Sat, 16 Apr 2016 12:28:30 +0000 (15:28 +0300)]
arc/cache: really do flush_dcache_all() even if IOC exists

flush_dcache_all() is used in the very end of U-Boot self relocation
to write back all copied and then patched code and data to their
new location in the very end of available memory space.

Since that has nothing to do with IO (i.e. no external DMA happens
here) IOC won't help here and we need to write back data cache contents
manually.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
8 years agoPrepare v2016.05-rc2 v2016.05-rc2
Tom Rini [Thu, 21 Apr 2016 13:37:33 +0000 (09:37 -0400)]
Prepare v2016.05-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: Update some Xilinx configs
Tom Rini [Wed, 20 Apr 2016 19:33:05 +0000 (15:33 -0400)]
configs: Update some Xilinx configs

As part of 3457bba these configs didn't get updated.  Update them now.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agocmd/usb_mass_storage.c: Rework ums_init() ret logic slightly
Tom Rini [Wed, 20 Apr 2016 14:59:32 +0000 (10:59 -0400)]
cmd/usb_mass_storage.c: Rework ums_init() ret logic slightly

Previously, ret could be used uninitialized if
blk_get_device_part_str() failed.  Default to ret being set to -1 so
that we always return an err up if we have a problem and then invert the
logic on testing ums_count as when that is non-zero is the time we can
return 0.

Cc: John Tobias <john.tobias.ph@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Wed, 20 Apr 2016 13:31:58 +0000 (09:31 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

Conflicts:
configs/bcm28155_ap_defconfig
configs/dra72_evm_defconfig
configs/dra74_evm_defconfig
configs/ma5d4evk_defconfig

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Wed, 20 Apr 2016 13:23:42 +0000 (09:23 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

8 years agousb: gadget Move: CONFIG_G_DNL_* to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:30 +0000 (14:20 +0300)]
usb: gadget Move: CONFIG_G_DNL_* to Kconfig

And also reformat defconfigs using "make savedefconfig" rule.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: dwc3: Move CONFIG_USB_DWC3_PHY_* to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:29 +0000 (14:20 +0300)]
usb: dwc3: Move CONFIG_USB_DWC3_PHY_* to Kconfig

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: dwc3: Move CONFIG_USB_DWC3_OMAP to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:28 +0000 (14:20 +0300)]
usb: dwc3: Move CONFIG_USB_DWC3_OMAP to Kconfig

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: dwc3: Move CONFIG_USB_DWC3_GADGET/HOST to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:27 +0000 (14:20 +0300)]
usb: dwc3: Move CONFIG_USB_DWC3_GADGET/HOST to Kconfig

Description was borrowed from kernel dwc3 Kconfig.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: gadget: Move CONFIG_USB_GADGET_DOWNLOAD to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:26 +0000 (14:20 +0300)]
usb: gadget: Move CONFIG_USB_GADGET_DOWNLOAD to Kconfig

While at it, remove obsolete CONFIG_USBDOWNLOAD_GADGET option from some
config headers. This is also probably fixes am335x_baltos board.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: gadget: Move CONFIG_USB_GADGET_DUALSPEED to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:25 +0000 (14:20 +0300)]
usb: gadget: Move CONFIG_USB_GADGET_DUALSPEED to Kconfig

Move CONFIG_USB_GADGET_DUALSPEED option to Kconfig and
make all UDC controllers select USB_GADGET_DUALSPEED:
  - add next options to Kconfig selecting USB_GADGET_DUALSPEED:
    - USB_GADGET_ATMEL_USBA
    - USB_GADGET_DWC2_OTG
    - USB_DWC3
    - CI_UDC
  - make USB_MUSB_GADGET select USB_GADGET_DUALSPEED

While at it, make some related fixes:
  - remove DUALSPEED from configs that don't enable gadget support:
    - kwb.h
    - tseries.h
  - add missing USB_GADGET option to next configs:
    - novena_defconfig
    - pcm051_rev*_defconfig
    - xfi3_defconfig

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:24 +0000 (14:20 +0300)]
usb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig

The description was borrowed from kernel. Definitions were added to
defconfig files in a way that "make savedefconfig" generates exactly
the same file as used defconfig.

Boards using 0 mA as CONFIG_USB_GADGET_VBUS_DRAW value were moved to use
2 mA (as minimal allowed by Kconfig).

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: ums - expose selected partition/s
John Tobias [Wed, 13 Apr 2016 19:06:51 +0000 (12:06 -0700)]
usb: ums - expose selected partition/s

By applying this patch, it will give us some flexibility to expose
a selected partition/s.

e.g:
1. To expose several partitions
ums 0 mmc 0:1,0:6

2. To expose the all partitions
ums 0 mmc 0:0

3. To expose multiple partititions on several devices
ums 0 mmc 0:1,1:6

4. It support legacy format
ums 0 mmc 0

Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
8 years agoUSB: g_dnl: Change device class
John Tobias [Thu, 7 Apr 2016 23:49:03 +0000 (16:49 -0700)]
USB: g_dnl: Change device class

The USB Mass Storage (ums) works in Windows, Linux and OS X (EL Capitan).
But, not in OS X (Yosemite). By applying the said patch, it extends
the ums support.

Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Test HW: Odroid XU3 (./test/py UMS + DFU tests)

Tested-by: John Tobias <john.tobias.ph@gmail.com>
Linux:
    - Run ums to expose all my eMMC partition - shows all correctly
    - Run ums to expose only 1 partition of my eMMC - show correctly

Windows:
    - Run ums to expose all my eMMC partition - it detects but it prompts,
    if I want to format it (due to a non windows partition)
    - Run ums to expose only the FAT32 partition - it show the partition
      correctly.

8 years agoarm: socfpga: socrates: Add eth0 alias to enable ethernet
Stefan Roese [Mon, 18 Apr 2016 12:22:05 +0000 (14:22 +0200)]
arm: socfpga: socrates: Add eth0 alias to enable ethernet

This enables full ethernet usage, including U-Boot to write the board
specific MAC address (ethaddr) into the DT blob before passing it to
Linux.

Without this, the ethaddr is not detected in U-Boot at all, resulting
in this error upon bootup:

...
Model: EBV SOCrates
Net:
Error: ethernet@ff702000 address not set.
No ethernet found.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoarm: socfpga: Fix typos in DT files (environmnet -> environment)
Stefan Roese [Mon, 18 Apr 2016 12:22:04 +0000 (14:22 +0200)]
arm: socfpga: Fix typos in DT files (environmnet -> environment)

Fix a small typo in some of the SoCFPGA dts files that has spread via
copy-and-paste.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Repair DQ window centering code
Marek Vasut [Tue, 5 Apr 2016 21:17:35 +0000 (23:17 +0200)]
ddr: altera: Repair DQ window centering code

The code uses a lot of signed numbers, which ended up in variables
of unsigned type, which resulted in all sorts of underflows. This
in turn caused incorrect calibration on certain boards. Moreover,
repair the readout of the DQ delay, which was being pulled from
wrong register.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Staticize global variables
Marek Vasut [Tue, 5 Apr 2016 09:18:38 +0000 (11:18 +0200)]
ddr: altera: Staticize global variables

Just staticize global variables in sequencer, since there is no
point in having these symbols available outside of the DDR code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Make DLEVEL behavior inclusive
Marek Vasut [Mon, 4 Apr 2016 19:21:05 +0000 (21:21 +0200)]
ddr: altera: Make DLEVEL behavior inclusive

Originally, the DLEVEL selects the debug level within the sequencer code,
but only displays the messages on that particular debug level. Tweak the
handling such that for particular debug level, debug messages on that
level and lower are displayed. This allows better regulation of debug
message verbosity.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Zero DM IN delay in scc_mgr_zero_group()
Marek Vasut [Mon, 4 Apr 2016 19:16:18 +0000 (21:16 +0200)]
ddr: altera: Zero DM IN delay in scc_mgr_zero_group()

This one last set of delay configuration registers was not properly
zeroed out originally, fix it and zero them out.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Remove unnecessary ODT mode config
Marek Vasut [Mon, 4 Apr 2016 17:10:12 +0000 (19:10 +0200)]
ddr: altera: Remove unnecessary ODT mode config

There is no point in resetting the ODT setting if the write test
failed, since the code will always retry the calibration and thus
reconfigure the ODT anyway OR the code will fail calibration and
halt.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Remove unnecessary update of the SCC
Marek Vasut [Mon, 4 Apr 2016 16:41:53 +0000 (18:41 +0200)]
ddr: altera: Remove unnecessary update of the SCC

Every invocation of the scc_mgr_set_dqs_en_delay_all_ranks() is
followed by SCC manager update. Moreover, only this function
triggers the SCC manager update internally. Thus, remove the
internal invocation to avoid triggering the update twice.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Fix DRAM end value in protection rule
Marek Vasut [Mon, 4 Apr 2016 15:52:21 +0000 (17:52 +0200)]
ddr: altera: Fix DRAM end value in protection rule

The hi address bitfield in the protection rule must be set to
the last address in the region which the rule represents. The
behavior is now in-line with code generated by Quartus 15.1 .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Fix scc_mgr_set() argument order
Marek Vasut [Mon, 4 Apr 2016 15:28:16 +0000 (17:28 +0200)]
ddr: altera: Fix scc_mgr_set() argument order

The code should be setting registers to zero, not one register to value.
Swap the order of arguments to correct the behavior. The behavior is now
in-line with code generated by Quartus 15.1 .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Tweak DQS tracking enable handling
Marek Vasut [Tue, 5 Apr 2016 21:41:56 +0000 (23:41 +0200)]
ddr: altera: Tweak DQS tracking enable handling

In the most unlikely case the DQS tracking was to be disabled,
make sure we do not errornously re-enable it. Note that DQS
tracking is enabled on all systems observed thus far.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Replace ad-hoc constant with macro
Marek Vasut [Mon, 4 Apr 2016 14:07:11 +0000 (16:07 +0200)]
ddr: altera: Replace ad-hoc constant with macro

The bit 22 is in fact DQS tracking enable bit (dqstrken) and there
is a macro for this bit already, so use it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoAdd initial support for Technexion's PICO-IMX6UL-EMMC board
Fabio Estevam [Mon, 18 Apr 2016 12:56:16 +0000 (09:56 -0300)]
Add initial support for Technexion's PICO-IMX6UL-EMMC board

Add support for Technexion's PICO-IMX6UL-EMMC board.

For information about this board, please visit:
http://www.technexion.com/products/pico/pico-som/pico-imx6-emmc

Signed-off-by: Richard Hu <richard.hu@technexion.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoMX6UL: Add definition for UART6 base address
Fabio Estevam [Mon, 18 Apr 2016 12:56:15 +0000 (09:56 -0300)]
MX6UL: Add definition for UART6 base address

Define the UART6_BASE_ADDR for MX6UL.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoboard: ge: bx50v3: Fix to meet LVDS display power on timing
Akshay Bhat [Tue, 12 Apr 2016 22:14:00 +0000 (18:14 -0400)]
board: ge: bx50v3: Fix to meet LVDS display power on timing

On a reset/reboot, the display power needs to be off for atleast 500ms
before turning it back on. So add a delay to the boot process to meet
the display timing requirement.

Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoboard: ge: bx50v3: Use pwm for display backlight
Akshay Bhat [Tue, 12 Apr 2016 22:13:59 +0000 (18:13 -0400)]
board: ge: bx50v3: Use pwm for display backlight

Setup the LCD backlight brightness control pin to use PWM

Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoboard: ge: bx50v3: Setup LDB_DI_CLK source
Akshay Bhat [Tue, 12 Apr 2016 22:13:58 +0000 (18:13 -0400)]
board: ge: bx50v3: Setup LDB_DI_CLK source

To generate accurate pixel clocks required by the displays we need to
set the ldb_di_clk source on bx50v3 to PLL3 and b850v3 to PLL5. Since
PLL5 is disabled on reset, we need to enable PLL5.

Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoboard: ge: bx50v3: Split display setup function
Akshay Bhat [Tue, 12 Apr 2016 22:13:57 +0000 (18:13 -0400)]
board: ge: bx50v3: Split display setup function

B450v3/B650v3 uses single channel LVDS and does not support HDMI.
B850v3 uses dual channel LVDS and supports HDMI. Hence split the display
setup into two different functions.

Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: mx6: Fix procedure to switch the parent of LDB_DI_CLK
Akshay Bhat [Tue, 12 Apr 2016 22:13:56 +0000 (18:13 -0400)]
imx: mx6: Fix procedure to switch the parent of LDB_DI_CLK

Due to incorrect placement of the clock gate cell in the ldb_di[x]_clk tree,
the glitchy parent mux of ldb_di[x]_clk can cause a glitch to enter the
ldb_di_ipu_div divider. If the divider gets locked up, no ldb_di[x]_clk is
generated, and the LVDS display will hang when the ipu_di_clk is sourced from
ldb_di_clk.

To fix the problem, both the new and current parent of the ldb_di_clk should
be disabled before the switch. This patch ensures that correct steps are
followed when ldb_di_clk parent is switched in the beginning of boot.

This patch was ported from the 3.10.17 NXP kernel
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_3.10.17_1.0.1_ga&id=eecbe9a52587cf9eec30132fb9b8a6761f3a1e6d

NXP errata number: ERR009219, EB821

Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoarm: mx5: Fix NAND image generation
Marek Vasut [Tue, 5 Apr 2016 08:54:06 +0000 (10:54 +0200)]
arm: mx5: Fix NAND image generation

The echo -ne "\xNN" does not work in certain bourne-compatible shells, like
dash. The recommended way of hex->char conversion is using printf(1), but
there is a pitfall here. The GNU printf does support "\xNN" format, but
according to the opengroup documentation, this is not part of POSIX. The
POSIX printf only defines "\NNN" where N is octal. Thus, for the sake of
compatibility, we use that.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoboard: ge: bx50v3: Disable unused pins
Justin Waters [Wed, 13 Apr 2016 21:03:18 +0000 (17:03 -0400)]
board: ge: bx50v3: Disable unused pins

Certain pins are not used on the i.MX6, and should have a neutral
pad configuration in order to reduce electrical interference on
the board. This commit defines these pins with a default value
rather than relying on the system defaults.

Signed-off-by: Justin Waters <justin.waters@timesys.com>
Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Tue, 19 Apr 2016 12:07:41 +0000 (08:07 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

8 years agoMIPS: bootm: Add fixup of '/memory' node.
Purna Chandra Mandal [Mon, 18 Apr 2016 13:01:38 +0000 (18:31 +0530)]
MIPS: bootm: Add fixup of '/memory' node.

MIPS arch do not update 'reg' property of /memory node.
As a result Linux bootup will not work unless board.dts
file contains right /memory offset-size information or
board implements required memory fixup.
Fixing by renaming (unused) _arch_fixup_memory_node_ to
_arch_fixup_fdt_ in arch/mips/lib/bootm.c inline with ARM arch.

Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoKconfig: Simple aesthetic/grammar fixes to top-level Kconfig
Robert P. J. Day [Sat, 16 Apr 2016 09:53:07 +0000 (05:53 -0400)]
Kconfig: Simple aesthetic/grammar fixes to top-level Kconfig

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
8 years agoARM: always perform per-CPU GIC init
Stephen Warren [Fri, 15 Apr 2016 20:40:37 +0000 (14:40 -0600)]
ARM: always perform per-CPU GIC init

The current code in ARMv8's lowlevel_init() skips the per-CPU GIC
initialization ifndef CONFIG_ARMV8_MULTIENTRY. However, the per-CPU init
should always occur; it's just the one-time init that should only happen
on the master.

Once this consideration is taken into account, the only difference between
the paths when CONFIG_ARMV8_MULTIENTRY is undefined/defined is the use of
branch_if_slave. Naively, any unified code would need to invoke this
conditionally upon ifdef CONFIG_ARMV8_MULTIENTRY. However, branch_if_slave
already checks CONFIG_ARMV8_MULTIENTRY and does nothing if it isn't
defined, so we don't even need that ifdef at the call site.

Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agobx50v3: Enable CONFIG_OF_LIBFDT in defconfig
Akshay Bhat [Thu, 14 Apr 2016 17:55:08 +0000 (13:55 -0400)]
bx50v3: Enable CONFIG_OF_LIBFDT in defconfig

As of commit 69e173eb57d1f4848f070c83456096ba5d2ba1b4, CONFIG_OF_LIBFDT
needs to be selected in defconfig instead of board specific header file.
Hence enable CONFIG_OF_LIBFDT in defconfig.

Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
8 years agoefi_loader: Fall back to fdtfile naming convention
Alexander Graf [Thu, 14 Apr 2016 14:07:54 +0000 (16:07 +0200)]
efi_loader: Fall back to fdtfile naming convention

When there is no $fdtfile variable set, we still have a good chance
that on 32bit arm the fdtfile really is just called $soc-$board.dtb.

Enable the exports for $soc and $board in our distr defaults and make
use of them in the efi boot script.

Reported-by: Andreas Faerber <afaerber@suse.de>
Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
8 years agoefi_loader: Pass fdt address directly to bootefi cmd
Alexander Graf [Thu, 14 Apr 2016 14:07:53 +0000 (16:07 +0200)]
efi_loader: Pass fdt address directly to bootefi cmd

The bootefi cmd today fetches its device tree pointer from either the
location appointed by "fdt addr" with a fallback to the U-Boot control
fdt.

This integration is unusual for U-Boot and diverges from the way we
usually handle parameters to boot commands. So let's pass the fdt
directly into the bootefi command instead and move the control fdt
logic into the distro boot script.

Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
8 years agosandbox: Set CONFIG_SYS_CPU
Tom Rini [Mon, 18 Apr 2016 17:57:42 +0000 (13:57 -0400)]
sandbox: Set CONFIG_SYS_CPU

Give a valid value here as well to allow things which want
CONFIG_ENV_VARS_UBOOT_CONFIG to build

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoboard: Remove overlooked vestiges of "dave" board.
Robert P. J. Day [Thu, 14 Apr 2016 10:15:07 +0000 (06:15 -0400)]
board: Remove overlooked vestiges of "dave" board.

Apparently, all "dave"-related vendor content was removed in commit
5344cc1a82fcc2817d4671696b3939b0dfa4323e; remove remaining directory
board/dave/, which consists solely of board/dave/common/flash.c.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
8 years agoahci: flush dcache before issuing command
Tang Yuantian [Thu, 14 Apr 2016 08:21:00 +0000 (16:21 +0800)]
ahci: flush dcache before issuing command

Ensure data the following sata command used is flushed out of dcache
and written to physical memory or timeout error may happen.

Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com>
8 years agoserial: bcm283x_mu: make pending values more explicit
Stephen Warren [Thu, 14 Apr 2016 04:29:52 +0000 (22:29 -0600)]
serial: bcm283x_mu: make pending values more explicit

dm_serial_ops.pending should return the number of characters, not just a
valid C Boolean integer value. The existing code does already does this,
but only as an accident since BCM283X_MU_LSR_RX_READY happens to be
BIT(0). Enhance the code to be more explicit about the values it returns.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agodoc: Updated README.ext4
Robert P. J. Day [Wed, 13 Apr 2016 22:30:16 +0000 (18:30 -0400)]
doc: Updated README.ext4

Clean up the ext4 README file.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
8 years agoRemove references to CONFIG_CMD_EXT3, no such command
Robert P. J. Day [Wed, 13 Apr 2016 15:40:01 +0000 (11:40 -0400)]
Remove references to CONFIG_CMD_EXT3, no such command

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
8 years agodragonboard410c: Fix environment variables
Andreas Färber [Wed, 13 Apr 2016 12:16:22 +0000 (14:16 +0200)]
dragonboard410c: Fix environment variables

Some variables for the distro boot commands were missing, using some
custom name instead. Rename them.

Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
8 years agoefi_loader: Handle memory overflows
Andreas Färber [Wed, 13 Apr 2016 12:04:38 +0000 (14:04 +0200)]
efi_loader: Handle memory overflows

jetson-tk1 has 2 GB of RAM at 0x80000000, causing gd->ram_top to be zero.
Handle this by either avoiding ram_top or by using the same type as
ram_top to reverse the overflow effect.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
8 years agoARM: AM43xx: Fix BOOT_DEVICE_USB ID
Lokesh Vutla [Wed, 13 Apr 2016 04:27:04 +0000 (09:57 +0530)]
ARM: AM43xx: Fix BOOT_DEVICE_USB ID

commit 62c5674ea136a ("omap: SPL boot devices cleanup and completion")
cleans up the boot device ids for amx3xx soc. But mistakenly updates wrong
device IDs for AM43xx USB. Fixing the same here.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: ks2: move CMD_NAND to defconfigs
Lokesh Vutla [Wed, 13 Apr 2016 04:21:00 +0000 (09:51 +0530)]
configs: ks2: move CMD_NAND to defconfigs

NAND is not yet enabled on all Keystone2 platforms. So enabled
CMD_NAND in the respective defconfigs only if available.

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agomemory: Move TI_AEMIF config to KCONFIG
Lokesh Vutla [Wed, 13 Apr 2016 04:20:59 +0000 (09:50 +0530)]
memory: Move TI_AEMIF config to KCONFIG

Not all Keystone2 devices has AEMIF NAND controller. So adding Kconfig
entry for CONFIG_TI_AEMIF and enabling it in respective defconfigs on
platforms with AEMIF controller.

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodrivers/power/pmic/pm8916.c: Make usid be uint32_t
Tom Rini [Tue, 12 Apr 2016 19:11:24 +0000 (15:11 -0400)]
drivers/power/pmic/pm8916.c: Make usid be uint32_t

If get_dev_addr fails it will return FDT_ADDR_T_NONE and:
>>>     "priv->usid == 4294967295U" is always false regardless of the values of its operands. This occurs as the logical operand of if.

Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Reported-by: Coverity (CID: 143914)
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agodrivers/gpio/pm8916_gpio.c: Make pid be uint32_t
Tom Rini [Tue, 12 Apr 2016 19:11:23 +0000 (15:11 -0400)]
drivers/gpio/pm8916_gpio.c: Make pid be uint32_t

If get_dev_addr fails it will return FDT_ADDR_T_NONE and:
>>>     "priv->pid == 4294967295U" is always false regardless of the values of its operands. This occurs as the logical operand of if.

Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Reported-by: Coverity (CID: 143913)
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agom68k: fix broken buildman m68k
angelo@sysam.it [Mon, 11 Apr 2016 22:30:59 +0000 (00:30 +0200)]
m68k: fix broken buildman m68k

fix 19/48 broken board compilations, due to a now too smal 16-bit
relative jump

Signed-off-by: Angelo Dureghello <angelo@sysam.it>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
8 years agogunzip.c: use block layer for writes
Eric Nelson [Mon, 11 Apr 2016 22:21:37 +0000 (15:21 -0700)]
gunzip.c: use block layer for writes

Call blk_dwrite to ensure that the block cache is notified
if enabled and remove build breakage when CONFIG_BLK is enabled.

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
8 years agoefi_loader: Expose ascending efi memory map
Alexander Graf [Mon, 11 Apr 2016 21:51:02 +0000 (23:51 +0200)]
efi_loader: Expose ascending efi memory map

The EFI memory map does not need to be in a strict order, but 32bit
grub2 does expect it to be ascending. If it's not, it may try to
allocate memory inside the U-Boot data memory region.

We already sort the memory map in descending order, so let's just
reverse it when we pass it to a payload.

Signed-off-by: Alexander Graf <agraf@suse.de>
Tested-by: Andreas Färber <afaerber@suse.de>