platform/kernel/u-boot.git
8 years agoChange my mailaddress
Andreas Bießmann [Sun, 1 May 2016 01:46:16 +0000 (03:46 +0200)]
Change my mailaddress

I'll switch my mails to my own server, so drop all gmail references.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
8 years agomkimage: fix argument parsing on BSD systems
Andreas Bießmann [Sun, 1 May 2016 01:01:27 +0000 (03:01 +0200)]
mkimage: fix argument parsing on BSD systems

The getopt(3) optstring '-' is a GNU extension which is not available on BSD
systems like OS X.

Remove this dependency by implementing argument parsing in another way. This
will also change the lately introduced '-b' switch behaviour.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarch/arm/imx-common/Makefile: Update u-boot.uim MKIMAGEFLAGS
Tom Rini [Mon, 2 May 2016 22:36:07 +0000 (18:36 -0400)]
arch/arm/imx-common/Makefile: Update u-boot.uim MKIMAGEFLAGS

We need to be passing -T firmware here and aren't.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agofs: ext4: fix symlink read function
Ronald Zachariah [Thu, 28 Apr 2016 05:08:34 +0000 (07:08 +0200)]
fs: ext4: fix symlink read function

The function ext4fs_read_symlink was unable to handle a symlink
which had target name of exactly 60 characters.

Signed-off-by: Ronald Zachariah <rozachar@cisco.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Cc: Tom Rini <trini@konsulko.com>
8 years agoRevert "rockchip: rk3288: correct sdram setting"
Vagrant Cascadian [Fri, 15 Apr 2016 20:43:25 +0000 (13:43 -0700)]
Revert "rockchip: rk3288: correct sdram setting"

This reverts commit b5788dc0dd9570e98552833767f4373db965985d.

Ram size is incorrectly reported as 512MB on a firefly-rk3288 board
with 2GB of ram. Reverting this patch displays the full amount of ram.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Mon, 2 May 2016 16:18:43 +0000 (12:18 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

8 years agoRevert "omap3: Use raw SPL by default for mmc1"
Tom Rini [Mon, 2 May 2016 14:52:51 +0000 (10:52 -0400)]
Revert "omap3: Use raw SPL by default for mmc1"

Unfortunately with this change we now are unable to do FS mode boots
from MMC1 as with the way the code works today we will always load and
assume that the hard-coded raw location contains U-Boot.  Further, we
cannot fix this by just changing other logic to try FS-then-RAW as it
would also make us have to ignore what order the ROM is telling us to
try.

This reverts commit 22d90d560a2b01c47f180e196e6c6485eb8e65db.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoRevert "ti_armv7_common.h: Fix U-Boot location on eMMC"
Tom Rini [Mon, 2 May 2016 12:49:53 +0000 (08:49 -0400)]
Revert "ti_armv7_common.h: Fix U-Boot location on eMMC"

We cannot change the long standing hard-coded offset for raw boot mode
for everyone to accommodate how Android expects things to be done here.

This reverts commit ef5ebe951bec72631cdbc7cef9079e6c684e5d0b.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoARM: uniphier: move pin-mux code into pin_init function
Masahiro Yamada [Thu, 28 Apr 2016 06:37:16 +0000 (15:37 +0900)]
ARM: uniphier: move pin-mux code into pin_init function

The code in uniphier_sld3_sbc_init() is pin-muxing, so it would
be a better fit in uniphier_sld3_early_pin_init().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: allow to use System Bus for ROM boot mode of PH1-LD20
Masahiro Yamada [Thu, 28 Apr 2016 06:37:15 +0000 (15:37 +0900)]
ARM: uniphier: allow to use System Bus for ROM boot mode of PH1-LD20

The System Bus is not available by default on the ROM boot mode of
PH1-LD20.  To use devices connected to the System Bus, such as the
Micro Support Card, it is necessary to set up pin-muxing and some
System Bus Controller register.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: enable Peripherl clock to use UART in SPL
Masahiro Yamada [Thu, 28 Apr 2016 06:37:14 +0000 (15:37 +0900)]
ARM: uniphier: enable Peripherl clock to use UART in SPL

This is needed to use UART on SPL.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: fix boot mode table of PH1-LD20
Masahiro Yamada [Thu, 28 Apr 2016 06:37:13 +0000 (15:37 +0900)]
ARM: uniphier: fix boot mode table of PH1-LD20

PH1-LD20 does not have the dedicated boot swap select latch.
Instead, it is controlled from the boot mode select.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Thu, 28 Apr 2016 17:15:52 +0000 (13:15 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-video

8 years agoMerge branch 'master' of http://git.denx.de/u-boot-sunxi
Tom Rini [Thu, 28 Apr 2016 17:15:41 +0000 (13:15 -0400)]
Merge branch 'master' of git.denx.de/u-boot-sunxi

8 years agodrivers/video/am335x-fb: Properly point framebuffer behind palette
Martin Pietryka [Wed, 27 Apr 2016 19:39:16 +0000 (21:39 +0200)]
drivers/video/am335x-fb: Properly point framebuffer behind palette

The DMA was outputting the palette on the screen because the base
for the DMA was not after the palette. In addition to that, the ceiling was
also too high, this led that the output on the screen was shifted.

NOTE: According to the TRM, even in 16/24bit mode a palette is required
in the first 32 bytes of the framebuffer.

See also:
https://e2e.ti.com/support/arm/sitara_arm/f/791/p/234967/834483#834483

"In this mode, the LCDC will assume all information is data and thus you
need to ensure that the DMA points to the first pixel of data and not the
first entry in the frame buffer which is the beginning of the 512 byte
palette."

Signed-off-by: Martin Pietryka <martin.pietryka@chello.at>
Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at>
8 years agodrivers/video/am335x-fb: Add support for 16bpp format
Martin Pietryka [Wed, 27 Apr 2016 19:39:15 +0000 (21:39 +0200)]
drivers/video/am335x-fb: Add support for 16bpp format

To support 16bpp we just need to change the raster_ctrl register
accordingly. Also 32bpp mode should work as well, but was not tested.
According to the TRM the uppermost byte will be ignored when
LCD_TFT_24BPP_UNPACK is set.

The switch logic is based on the Linux kernel tilcdc driver:
drivers/gpu/drm/tilcdc/tilcdc_crtc.c: lines 407 through 419
(kernel was checked out at commit: bcc981e9ed8)

Signed-off-by: Martin Pietryka <martin.pietryka@chello.at>
Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at>
8 years agoomap3: Reduce logic/overo SPL max image size
Tom Rini [Wed, 27 Apr 2016 22:44:32 +0000 (18:44 -0400)]
omap3: Reduce logic/overo SPL max image size

While the OMAP3 has 64KiB of SRAM, per the TRM the download area is only
from 0x40200000 to 0x4020F000 and exceeding that will cause failure to
boot.  Further, we need to make sure that we don't run into
SRAM_SCRATCH_SPACE_ADDR as once SPL is running we will write values
there and would corrupt our running image.

Cc: Adam Ford <aford173@gmail.com>
Cc: Steve Sakoman <sakoman@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agosunxi: Enable LDO3 at 3.3V on A13-OLinuXino board
Hans de Goede [Thu, 14 Apr 2016 14:49:47 +0000 (16:49 +0200)]
sunxi: Enable LDO3 at 3.3V on A13-OLinuXino board

LDO3 is used for the VGA output, this fixes a regression where the VGA
output on these boards would no longer work.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: mctl_mem_matches: Add missing memory barrier
Hans de Goede [Thu, 14 Apr 2016 16:53:32 +0000 (18:53 +0200)]
sunxi: mctl_mem_matches: Add missing memory barrier

We are running with the caches disabled when mctl_mem_matches gets called,
but the cpu's write buffer is still there and can still get in the way,
add a memory barrier to fix this.

This avoids mctl_mem_matches always returning false in some cases, which
was resulting in:

U-Boot SPL 2015.07 (Apr 14 2016 - 18:47:26)
DRAM: 1024 MiB

U-Boot 2015.07 (Apr 14 2016 - 18:47:26 +0200) Allwinner Technology

CPU:   Allwinner A23 (SUN8I)
DRAM:  512 MiB

Where 512 MiB is the right amount, but the DRAM controller would be
initialized for 1024 MiB.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agoARM64: zynqmp: Cleanup config file after CMD move
Michal Simek [Tue, 26 Apr 2016 14:12:06 +0000 (16:12 +0200)]
ARM64: zynqmp: Cleanup config file after CMD move

The patch:
"configs: Re-sync almost all of cmd/Kconfig"
(sha1: 78d1e1d0a157c8b48ea19be6170b992745d30f38)
doesn't remove empty if-endif. This patch is fixing it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: uniphier: revive some commands lost by Kconfig re-sync
Masahiro Yamada [Tue, 26 Apr 2016 02:23:39 +0000 (11:23 +0900)]
ARM: uniphier: revive some commands lost by Kconfig re-sync

The recently added uniphier_ld20_defconfig missed the tree-wide
re-sync by commit 89cb2b5f8be4 ("configs: Re-sync with cmd/Kconfig").

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

8 years agoPrepare v2016.05-rc3 v2016.05-rc3
Tom Rini [Mon, 25 Apr 2016 23:27:37 +0000 (19:27 -0400)]
Prepare v2016.05-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agopico-imx6ul: Update the defconfig
Tom Rini [Mon, 25 Apr 2016 22:03:48 +0000 (18:03 -0400)]
pico-imx6ul: Update the defconfig

The defconfig/config.h file were merged but were already out of sync
with mainline.  This brings them further into line now.

Cc: Richard Hu <richard.hu@technexion.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Mon, 25 Apr 2016 20:23:51 +0000 (16:23 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-video

8 years agodrivers/video/am335x-fb: Fix bits for LCD_PALMODE_RAWDATA definition
Martin Pietryka [Mon, 25 Apr 2016 19:25:07 +0000 (21:25 +0200)]
drivers/video/am335x-fb: Fix bits for LCD_PALMODE_RAWDATA definition

According to the TRM you have to set bits [21:20] to 0b10 for RAW mode, so
(0x10 << 20) is obviously wrong here.

Signed-off-by: Martin Pietryka <martin.pietryka@chello.at>
8 years agopci: Device scanning range fix
Yoshinori Sato [Mon, 25 Apr 2016 06:41:01 +0000 (15:41 +0900)]
pci: Device scanning range fix

The terminal condition in the area where a PCI device is scanned is wrong,
and 1f.7 isn't scanned.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agommc: sdhci: add const qualifier to the name of struct sdhci_host
Masahiro Yamada [Fri, 22 Apr 2016 11:59:31 +0000 (20:59 +0900)]
mmc: sdhci: add const qualifier to the name of struct sdhci_host

This allows to drop annoying (char *) casts when setting the host
name of struct sdhci_host.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: DRA7: Add ABB setup for all domains
Nishanth Menon [Thu, 21 Apr 2016 19:34:25 +0000 (14:34 -0500)]
ARM: DRA7: Add ABB setup for all domains

ABB should be initialized for all required domains voltage domain
for DRA7: IVA, GPU, EVE in addition to the existing MPU domain. If
we do not do this, kernel configuring just the frequency using the
default boot loader configured voltage can fail on many corner lot
units and has been hard to debug. This specifically is a concern with
DRA7 generation of SoCs since other than VDD_MPU, all other domains
are only permitted to setup the voltages to required OPP only at boot.

Reported-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
8 years agoARM: OMAP5: Enable ABB configuration for MM voltage domain
Nishanth Menon [Thu, 21 Apr 2016 19:34:24 +0000 (14:34 -0500)]
ARM: OMAP5: Enable ABB configuration for MM voltage domain

Since we setup the voltage and frequency for the MM domain, we *must*
setup the ABB configuration needed for the domain as well. If we do not
do this, kernel configuring just the frequency using the default boot
loader configured voltage can fail on many corner lot units.

Reported-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
8 years agoARM: OMAP5/DRA7: Move ABB TXDONE mask to voltage structure
Nishanth Menon [Thu, 21 Apr 2016 19:34:23 +0000 (14:34 -0500)]
ARM: OMAP5/DRA7: Move ABB TXDONE mask to voltage structure

ABB TX_DONE mask will vary depending on ABB module. For example,
3630 never had ABB on IVA domain, while OMAP5 does use ABB on MM domain,
DRA7 has it on all domains with the exception of CORE, RTC.

Hence, move the txdone mask definition over to structure describing
voltage domain.

Signed-off-by: Nishanth Menon <nm@ti.com>
8 years agoARM: OMAP5/DRA7: Get rid of control_std_fuse_opp_vdd_mpu_2
Nishanth Menon [Thu, 21 Apr 2016 19:34:22 +0000 (14:34 -0500)]
ARM: OMAP5/DRA7: Get rid of control_std_fuse_opp_vdd_mpu_2

This information is already available under vcores->volts.efuse.reg.
There is no reason for duplicating the information since AVS Class 0
definitions are common for OMAP5 and DRA7 and defined with
STD_FUSE_OPP_* macros. This allows a central location of defining
the ABB and voltage definitions especially since they are reused.

This also makes it simpler to prevent mistakes involved when changing
the boot OPP for the device.

Signed-off-by: Nishanth Menon <nm@ti.com>
8 years agocommon/dlmalloc.c: Delete content that was moved to malloc.h
Robert P. J. Day [Thu, 21 Apr 2016 11:35:55 +0000 (07:35 -0400)]
common/dlmalloc.c: Delete content that was moved to malloc.h

Remove several hundred lines of content surrounded by:

#if 0  /* Moved to malloc.h */
... moved stuff ...
#endif /* 0 */                 /* Moved to malloc.h */

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agospl: spl_mmc: Disambiguate error message
Fabio Estevam [Thu, 21 Apr 2016 02:12:04 +0000 (23:12 -0300)]
spl: spl_mmc: Disambiguate error message

The error message "spl: mmc block read error" may come from two
different functions, so we should better annotate the function name
where the error comes from to help debugging.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: hikey: Simplify README instructions.
Peter Griffin [Wed, 20 Apr 2016 16:14:03 +0000 (17:14 +0100)]
ARM: hikey: Simplify README instructions.

This patch updates and simplifies the hikey README. The old
instructions were hard to follow, and convoluted.

This patch also updates the link to the mcuimage.bin which was outdated.

Using an outdated mcuimage.bin results in the additional a53 cores
not coming online when the kernel issues PSCI requests to
arm trusted firmware (ATF).

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: hisilicon: hikey: Align memory node with upstream kernel
Peter Griffin [Wed, 20 Apr 2016 16:14:02 +0000 (17:14 +0100)]
ARM: hisilicon: hikey: Align memory node with upstream kernel

The memory node gets automatically generated by U-Boot
in arch_fixup_fdt(), before passing control to the kernel
using U-Boots representation of the dram banks.

However the upstream kernel uses the memory node to carve-out
regions of RAM for various purposes. To make this work without
changing arch_fixup_fdt() which will effect many platforms
we replicate the upstream memory node layout using the dram
banks.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: hisilicon: hikey: dts: Add pl011 additional clock binding.
Peter Griffin [Wed, 20 Apr 2016 16:14:01 +0000 (17:14 +0100)]
ARM: hisilicon: hikey: dts: Add pl011 additional clock binding.

This is a binding which only exists in U-Boot, but is
required to get working serial in U-Boot.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: hisilicon: hikey: Implement reset_cpu() for hikey.
Peter Griffin [Wed, 20 Apr 2016 16:14:00 +0000 (17:14 +0100)]
ARM: hisilicon: hikey: Implement reset_cpu() for hikey.

This allows the reset command to reset the board from
u-boot.

=> reset
resetting ...
INFO:    BL1: 0xf9810000 - 0xf9818000 [size = 32768]
NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v1.1(debug):7fb9b0e
NOTICE:  BL1: Built : 17:06:41, Apr 19 2016

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: hisilicon: hikey: Enable OF_CONTROL for hikey board.
Peter Griffin [Wed, 20 Apr 2016 16:13:59 +0000 (17:13 +0100)]
ARM: hisilicon: hikey: Enable OF_CONTROL for hikey board.

Currently only the serial pl01x driver is using DT,
and the other drivers still use platform data but
as more DT lands in the upstream kernel the aim is
to migrate the other drivers over to DT as well to
have a fully DT configured hikey u-boot.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoMAINTAINERS: Add myself as maintainer for hikey
Peter Griffin [Wed, 20 Apr 2016 16:13:58 +0000 (17:13 +0100)]
MAINTAINERS: Add myself as maintainer for hikey

This patch adds myself as maintainer for the hikey
U-Boot port.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: hisilicon: hikey: Add hikey & hi6220 dts from v4.6-rc3.
Peter Griffin [Wed, 20 Apr 2016 16:13:57 +0000 (17:13 +0100)]
ARM: hisilicon: hikey: Add hikey & hi6220 dts from v4.6-rc3.

Import the upstream kernel dts into U-Boot. Currently
only serial is supported, but a lot more DT changes are
queued for v4.7.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agosf: fix timebase data type in _wait_ready()
Stephen Warren [Mon, 4 Apr 2016 17:03:52 +0000 (11:03 -0600)]
sf: fix timebase data type in _wait_ready()

get_timer() returns an unsigned 64-bit value, but is currently assigned to
a signed 32-bit variable. Due to sign extension and data truncation, this
causes the timeout loop in spi_flash_cmd_wait_ready() to immediately (and
incorrectly) fire for about 50% of all time values, based on whether bit
31 is set. In sandbox at least, this causes the test to pass or fail based
on system uptime, as opposed to time since the U-Boot binary was started.

Fixes: 4efad20a1751 ("sf: Update status reg check in spi_flash_cmd_wait_ready")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agoti_armv7_common.h: Fix U-Boot location on eMMC
Semen Protsenko [Wed, 20 Apr 2016 09:05:59 +0000 (12:05 +0300)]
ti_armv7_common.h: Fix U-Boot location on eMMC

According to common eMMC partition table for Android boot (see
PARTS_DEFAULT definition in include/configs/dra7xx_evm.h), "bootloader"
partition (where u-boot.img is stored) starts at 256 KiB. Which is equal
to 512 sectors (as 1 MMC sector size is 512 bytes).

This patch fixes CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR constant so that
it points to correct address of "bootloader" partition and SPL is able to
read, parse and run u-boot.img correctly.

This change was originally done as part of patch [1] in omapzoom u-boot.
Without this patch, SPL fails to parse U-Boot header with next error:

    mkimage signature not found - ih_magic = 4814325a

While at it, also fix U-Boot partition size, which is 384 KiB (as stated in
include/configs/dra7xx_evm.h).

[1] http://omapzoom.org/?p=repo/u-boot.git;a=commit;h=742b82d0c0aa0ed8096c2225a00e9f350212efa9

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: Re-sync with cmd/Kconfig
Tom Rini [Sun, 24 Apr 2016 21:29:26 +0000 (17:29 -0400)]
configs: Re-sync with cmd/Kconfig

Update the config.h and defconfig files for the commands that 8e3c036
converted over to Kconfig

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agocmd: Kconfig: Add a Kconfig options for a few CMD
Dinh Nguyen [Thu, 21 Apr 2016 14:05:23 +0000 (09:05 -0500)]
cmd: Kconfig: Add a Kconfig options for a few CMD

Add the following CMD options to Kconfig:

CMD_BOOTZ
CMD_ASKENV
CMD_GREPENV
CMD_USB_MASS_STORAGE
CMD_FAT
CMD_MII
CMD_CACHE
CMD_DFU
CMD_EXT2
CMD_EXT4
CMD_EXT4_WRITE
CMD_FS_GENERIC
CMD_MMC

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
[trini: Don't make CMD_USB_MASS_STORAGE nor CMD_DFU depend on CMD_USB]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoinclude/configs: Whitespace fixup
Tom Rini [Sun, 24 Apr 2016 14:24:59 +0000 (10:24 -0400)]
include/configs: Whitespace fixup

A number of moveconfig.py runs have left a instances of multiple empty
lines in a row.  Correct this to a single empty line.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: Re-sync almost all of cmd/Kconfig
Tom Rini [Fri, 22 Apr 2016 20:41:25 +0000 (16:41 -0400)]
configs: Re-sync almost all of cmd/Kconfig

This syncs up the current cmd/Kconfig and include/configs/ files with the
only exception being CMD_NAND.  Due to how we have used this historically
we need to take further care here when converting.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: Re-sync CONFIG_USB_MUSB_HOST
Tom Rini [Fri, 22 Apr 2016 18:01:08 +0000 (14:01 -0400)]
configs: Re-sync CONFIG_USB_MUSB_HOST

Now that CONFIG_USB_MUSB_HOST is part of Kconfig, migrate that over to
the defconfig files.

Signed-off-by: Tom Rini <trini@konsulko.com>
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>