]> git.ipfire.org Git - people/ms/u-boot.git/log
people/ms/u-boot.git
8 years agoKconfig: Move CONFIG_FIT and related options to Kconfig
Simon Glass [Tue, 23 Feb 2016 05:55:43 +0000 (22:55 -0700)] 
Kconfig: Move CONFIG_FIT and related options to Kconfig

There are already two FIT options in Kconfig but the CONFIG options are
still in the header files. We need to do a proper move to fix this.

Move these options to Kconfig and tidy up board configuration:

   CONFIG_FIT
   CONFIG_OF_BOARD_SETUP
   CONFIG_OF_SYSTEM_SETUP
   CONFIG_FIT_SIGNATURE
   CONFIG_FIT_BEST_MATCH
   CONFIG_FIT_VERBOSE
   CONFIG_OF_STDOUT_VIA_ALIAS
   CONFIG_RSA

Unfortunately the first one is a little complicated. We need to make sure
this option is not enabled in SPL by this change. Also this option is
enabled automatically in the host builds by defining CONFIG_FIT in the
image.h file. To solve this, add a new IMAGE_USE_FIT #define which can
be used in files that are built on the host but must also build for U-Boot
and SPL.

Note: Masahiro's moveconfig.py script is amazing.

Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Add microblaze change, various configs/ re-applies]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMove CONFIG_OF_LIBFDT to Kconfig
Simon Glass [Tue, 23 Feb 2016 05:55:42 +0000 (22:55 -0700)] 
Move CONFIG_OF_LIBFDT to Kconfig

Move this option to Kconfig and tidy up existing boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agofreescale: Remove CONFIG_DM from header files
Simon Glass [Tue, 23 Feb 2016 05:55:41 +0000 (22:55 -0700)] 
freescale: Remove CONFIG_DM from header files

Kconfig options must defined in the defconfig files. Since RSA_SOFTWARE_EXP
relies on CONFIG_DM, unless it is set in kconfig we cannot enable RSA.
Remove the hacks which enable CONFIG_DM in header files and update the
defconfig.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoCorrect defconfig ordering
Simon Glass [Tue, 23 Feb 2016 05:55:40 +0000 (22:55 -0700)] 
Correct defconfig ordering

Various boards have the wrong Kconfig ordering now. To avoid a misleading

diff in the next patch, reorder the configuration correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agolibfdt: Add a function to write a property placeholder
Simon Glass [Tue, 23 Feb 2016 05:55:39 +0000 (22:55 -0700)] 
libfdt: Add a function to write a property placeholder

The existing function to add a new property to a tree being built requires
that the entire contents of the new property be passed in. For some
applications it is more convenient to be able to add the property contents
later, perhaps by reading from a file. This avoids double-buffering of the
contents.

Add a new function to support this and adust the existing fdt_property() to
use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agomkimage: Make 'params' static
Simon Glass [Tue, 23 Feb 2016 05:55:38 +0000 (22:55 -0700)] 
mkimage: Make 'params' static

This is not used outside mkimage.c, so make this variable static.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agomkimage: Show an error message when usage() is called
Simon Glass [Tue, 23 Feb 2016 05:55:37 +0000 (22:55 -0700)] 
mkimage: Show an error message when usage() is called

Sometimes incorrect arguments are supplied but the reason is not obvious to
the user. Add some helpful messages.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agomkimage: Move usage() up to the top
Simon Glass [Tue, 23 Feb 2016 05:55:36 +0000 (22:55 -0700)] 
mkimage: Move usage() up to the top

To avoid a forward declaration, move the usage() function higher in the
file.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agomkimage: Sort the option processing code by option
Simon Glass [Tue, 23 Feb 2016 05:55:35 +0000 (22:55 -0700)] 
mkimage: Sort the option processing code by option

Adjust the code so that option alphabetical order matches the order in the
switch() statement. This makes it easier to find options.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agomkimage: Convert to use getopt()
Simon Glass [Tue, 23 Feb 2016 05:55:34 +0000 (22:55 -0700)] 
mkimage: Convert to use getopt()

The current way of parsing arguments is a bit clumsy. It seems better to
use getopt() which is commonly used for this purpose.

Convert the code to use getopt() and make a few minor adjustments as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agomkimage: Move argument processing into its own function
Simon Glass [Tue, 23 Feb 2016 05:55:33 +0000 (22:55 -0700)] 
mkimage: Move argument processing into its own function

At present main() is very long. Split out the argument processing to make
it easier to follow.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agocommon: Add support for environment file in EXT4.
Stuart Longland [Tue, 23 Feb 2016 05:51:26 +0000 (15:51 +1000)] 
common: Add support for environment file in EXT4.

This is an enhancement that permits storing the environment file on an
EXT4 partition such as the root filesystem.  It is based on the existing
FAT environment file code.

8 years agoPrepare v2016.03
Tom Rini [Mon, 14 Mar 2016 14:20:21 +0000 (10:20 -0400)] 
Prepare v2016.03

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agomx6slevk: Fix the power up of the Ethernet PHY
Fabio Estevam [Fri, 11 Mar 2016 13:50:22 +0000 (10:50 -0300)] 
mx6slevk: Fix the power up of the Ethernet PHY

GPIO4_21 is the LAN8720 power pin, not the LAN8720 reset pin.

Fix that, so that we can have Ethernet functional again.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agosf: Correct data types in stm_is_locked_sr()
Marek Vasut [Fri, 11 Mar 2016 02:20:16 +0000 (03:20 +0100)] 
sf: Correct data types in stm_is_locked_sr()

The stm_is_locked_sr() function is picked from Linux kernel. For reason
unknown, the 64bit data types used by the function and present in Linux
were replaced with 32bit unsigned ones, which causes trouble.

The testcase performed was done using ST M25P80 chip.
The command used was:
 => sf protect unlock 0 0x10000

The call chain starts in stm_unlock(), which calls stm_is_locked_sr()
with negative ofs argument. This works fine in Linux, where the "ofs"
is loff_t, which is signed long long, while this fails in U-Boot, where
"ofs" is u32 (unsigned int). Because of this signedness problem, the
expression past the return statement to be incorrectly evaluated to 1,
which in turn propagates back to stm_unlock() and results in -EINVAL.

The correction is very simple, just use the correctly sized data types
with correct signedness in the function to make it work as intended.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agodm: ti_qspi: Fix conversion of address to a pointer
Lokesh Vutla [Sat, 5 Mar 2016 11:13:06 +0000 (16:43 +0530)] 
dm: ti_qspi: Fix conversion of address to a pointer

TI QSPI driver directly typecasts fdt_addr_t to a pointer. This is
not strictly correct, as it gives a build warning when fdt_addr_t is u64.
So, use map_physmem for a proper typecasts.

This is inspired by commit 167efe01bc5a9 ("dm: ns16550: Use an address
instead of a pointer for the uart base")

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
8 years agoexynos5: common: Enable CONFIG_USB_ETHER_RTL8152 ethernet support
Anand Moon [Sat, 5 Mar 2016 09:08:23 +0000 (19:38 +1030)] 
exynos5: common: Enable CONFIG_USB_ETHER_RTL8152 ethernet support

Enable CONFIG_USB_ETHER_RTL8152 support for Odroid XU4 which
has support for RTL8153-CG gigabit Ethernet adapter,
connected over USB 3.0.

commit 9dc8ba19c50fc0b1623c654bcfe6caa903a4c36c added support
for Realtek 8152/8153 driver.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
8 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Thu, 10 Mar 2016 15:55:06 +0000 (10:55 -0500)] 
Merge git://git.denx.de/u-boot-rockchip

8 years agorockchip: rk3288: correct sdram setting
Chris Zhong [Mon, 7 Mar 2016 06:51:13 +0000 (14:51 +0800)] 
rockchip: rk3288: correct sdram setting

The DMC driver in v3.14 kernel[0] get the ddr setting from PMU_SYS_REG2,
and it expects uboot to store the value using a same protocol. But now
the ddr setting value is different with DMC, so if you enable the DMC,
system would crash in kernel. Correct the sdram setting here, according
to the requirements of kernel.

[0]
https://chromium.googlesource.com/chromiumos/third_party/kernel/+/
chromeos-3.14/drivers/clk/rockchip/clk-rk3288-dmc.c

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agorockchip: make configure_emmc() empty for Firefly-RK3288
FUKAUMI Naoki [Sat, 5 Mar 2016 13:32:02 +0000 (13:32 +0000)] 
rockchip: make configure_emmc() empty for Firefly-RK3288

on v2016.03-rc3, size of SPL image compiled by gcc 5.3.0 is too large for
Firefly-RK3288. (it's fine for Rock2)

$ gcc --version
gcc (Ubuntu/Linaro 5.3.0-3ubuntu1~14.04) 5.3.0 20151204
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ ./tools/mkimage -n rk3288 -T rksd -d spl/u-boot-spl-dtb.bin u-boot-spl-dtb.img
Warning: SPL image is too large (size 0x80d0) and will not boot

to reduce size of SPL image, this patch makes configure_emmc() empty for
Firefly-RK3288 as same as Rock2.

Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-By: Vagrant Cascadian <vagrant@debian.org>
8 years agorockchip: rk3036: change ddr frequency to 400M
Lin Huang [Wed, 17 Feb 2016 07:55:05 +0000 (15:55 +0800)] 
rockchip: rk3036: change ddr frequency to 400M

emac may use dpll as clock parent, and it request the clock frequency
multiples of 50, so change ddr frequency to 400M.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoMIPS: pic32mzdask: use CONFIG_USE_PRIVATE_LIBGCC=y
Daniel Schwierzeck [Wed, 9 Mar 2016 10:30:00 +0000 (11:30 +0100)] 
MIPS: pic32mzdask: use CONFIG_USE_PRIVATE_LIBGCC=y

MIPS EL boards should define CONFIG_USE_PRIVATE_LIBGCC=y to work
with EB-only toolchains like the one from kernel.org. If one do
not globally set CONFIG_USE_PRIVATE_LIBGCC=y, the build fails with:

/opt/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-ld.bfd: /opt/gcc-4.9.0-nolibc/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o): compiled for a big endian system and target is little endian
/opt/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-ld.bfd: /opt/gcc-4.9.0-nolibc/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o): endianness incompatible with that of the selected emulation
/opt/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-ld.bfd: failed to merge target specific data of file /opt/gcc-4.9.0-nolibc/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o)
/opt/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-ld.bfd: /opt/gcc-4.9.0-nolibc/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o): compiled for a big endian system and target is little endian
/opt/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-ld.bfd: /opt/gcc-4.9.0-nolibc/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o): endianness incompatible with that of the selected emulation
/opt/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-ld.bfd: failed to merge target specific data of file /opt/gcc-4.9.0-nolibc/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o)
/work/git-trees/u-boot-mips/Makefile:1171: recipe for target 'u-boot' failed

One example for a failing build is Travis CI.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Purna Chandra Mandal <purna.mandal@microchip.com>
8 years agoMIPS: fix mips_cache fallback without __builtin_mips_cache
Matthias Schiffer [Sat, 5 Mar 2016 03:15:40 +0000 (04:15 +0100)] 
MIPS: fix mips_cache fallback without __builtin_mips_cache

The "R" constraint supplies the address of an variable in a register. Use
"r" instead and adjust asm to supply the content of addr in a register
instead.

Fixes: 2b8bcc5a ("MIPS: avoid .set ISA for cache operations")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agomalloc: remove !gd handling
Stephen Warren [Sat, 5 Mar 2016 17:30:53 +0000 (10:30 -0700)] 
malloc: remove !gd handling

Following the previous patch, malloc() is never called before gd is set,
so we can remove the special-case check for this condition.

This reverts commit 854d2b9753e4 "dlmalloc: ensure gd is set for early
alloc".

Cc: Rabin Vincent <rabin@rab.in>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agomalloc: use hidden visibility
Stephen Warren [Sat, 5 Mar 2016 17:30:52 +0000 (10:30 -0700)] 
malloc: use hidden visibility

When running sandbox, the following phases occur, each with different
malloc implementations or behaviors:

1) Dynamic linker execution, using the dynamic linker's own malloc()
implementation. This is fully functional.

2) After U-Boot's malloc symbol has been hooked into the GOT, but before
any U-Boot code has run. This phase is entirely non-functional, since
U-Boot's gd symbol is NULL and U-Boot's initf_malloc() and
mem_malloc_init() have not been called.

At least on Ubuntu Xenial, the dynamic linker does make both malloc() and
free() calls during this phase. Currently these free() calls crash since
they dereference gd, which is NULL.

U-Boot itself makes no use of malloc() during this phase.

3) U-Boot execution after gd is set and initf_malloc() has been called.
This is fully functional, albeit via a very simple malloc()
implementation.

4) U-Boot execution after mem_malloc_init() has been called. This is fully
functional with a complete malloc() implementation.

Furthermore, if code that called malloc() during phase 1 calls free() in
phase 3 or later, it is likely that heap corruption will occur, since
U-Boot's malloc implementation will assume the pointer is part of its own
heap, although it isn't. I have not actively observed this happening.

To prevent phase 2 from happening, this patch makes all of U-Boot's malloc
library public symbols have hidden visibility. This prevents them from
being hooked into the GOT, so only code in the U-Boot binary itself
actually calls them; any other code will call into the standard C library
malloc(). This also avoids the "furthermore" issue mentioned above.

I have seen references to this GCC pragma in blog posts from 2008, and
RHEL5's ancient gcc appears to accept it fine, so I believe it's quite
safe to use it without checking gcc version.

Cc: Rabin Vincent <rabin@rab.in>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agosandbox: Fix building with LLVM
Tom Rini [Sat, 5 Mar 2016 19:07:44 +0000 (14:07 -0500)] 
sandbox: Fix building with LLVM

- The macro __BIGGEST_ALIGNMENT__ is gcc-specific.  If it is not defined
  we'll just assume 16.  This is correct for at least the common cases
  and LLVM does not provide an equivalent macro.
- When linking U-Boot we're passing -T to the linker, and while gcc will
  just pass this along with LLVM we need to be specific.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoomap3: Use raw SPL by default for mmc1
Alexander Graf [Tue, 1 Mar 2016 08:56:34 +0000 (09:56 +0100)] 
omap3: Use raw SPL by default for mmc1

Now that we fall back to the FS code path when we don't find u-boot
at the raw sector offset, there is no good reason to not default to
raw boot.

With this patch, I can successfully boot u-boot from a raw sector
offset on beagle-xm.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoapi: Export API structure address as an environment variable
Stanislav Galabov [Tue, 1 Mar 2016 12:19:04 +0000 (14:19 +0200)] 
api: Export API structure address as an environment variable

This patch makes the U-Boot api export its structure address as an environment
variable, so it can be used to directly hint FreeBSD's loader of api's location.

The relevant FreeBSD loader change is currently under review at:
https://reviews.freebsd.org/D5492

Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
8 years agoOMAP3: am3517_evm: Add NAND MTD partitions with UBI/UBIFS support
Derald D. Woods [Sat, 5 Mar 2016 19:19:59 +0000 (13:19 -0600)] 
OMAP3: am3517_evm: Add NAND MTD partitions with UBI/UBIFS support

- Add required UBI/UBIFS config definitions
- Add reasonable MTD partition layout
- Remove JFFS2 config definitions
- Drop some CFI verbage and definitions
- Make comment 'one-liners' truly one line
- Improve readability and content arrangement

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoOMAP3: am3517_evm: Use BCH8 ECC for NAND
Derald D. Woods [Sat, 5 Mar 2016 19:19:58 +0000 (13:19 -0600)] 
OMAP3: am3517_evm: Use BCH8 ECC for NAND

Select 8-bit BCH ecc-scheme with s/w based error correction
- OMAP_ECC_BCH8_CODE_HW_DETECTION_SW

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: uniphier: allow debug_ll_init() to do nothing for unknown SoCs
Masahiro Yamada [Mon, 7 Mar 2016 11:29:41 +0000 (20:29 +0900)] 
ARM: uniphier: allow debug_ll_init() to do nothing for unknown SoCs

This function should just return for unknown SoCs rather than writing
unexpected values to registers.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agopinctrl: uniphier: guard uniphier directory with CONFIG_PINCTRL_UNIPHIER
Masahiro Yamada [Fri, 4 Mar 2016 06:56:31 +0000 (15:56 +0900)] 
pinctrl: uniphier: guard uniphier directory with CONFIG_PINCTRL_UNIPHIER

CONFIG_PINCTRL_UNIPHIER is more suitable than CONFIG_ARCH_UNIPHIER
to guard the drivers/pinctrl/uniphier directory.

The current CONFIG_PINCTRL_UNIPHIER_CORE is a bit long, so rename it
into CONFIG_PINCTRL_UNIPHIER.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agopinctrl: uniphier: set input-enable before pin-muxing
Masahiro Yamada [Fri, 4 Mar 2016 06:56:16 +0000 (15:56 +0900)] 
pinctrl: uniphier: set input-enable before pin-muxing

While IECTRL is disabled, input signals are pulled-down internally.
If pin-muxing is set up first, glitch signals (Low to High transition)
might be input to hardware blocks.

Bad case scenario:
[1] The hardware block is already running before pinctrl is handled.
   (the reset is de-asserted by default or by a firmware, for example)
[2] The pin-muxing is set up.  The input signals to hardware block
   are pulled-down by the chip-internal biasing.
[3] The pins are input-enabled.  The signals from the board reach the
    hardware block.

Actually, one invalid character is input to the UART blocks for such
SoCs as PH1-LD4, PH1-sLD8, where UART devices start to run at the
power on reset.

To avoid such problems, pins should be input-enabled before muxing.

[ ported from Linux commit bac7f4c1bf5e7c6ccd5bb71edc015b26c77f7460 ]

Fixes: 5dc626f83619 ("pinctrl: uniphier: add UniPhier pinctrl core support")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: fix build error when CONFIG_CMD_DDRMPHY_DUMP=y
Masahiro Yamada [Fri, 4 Mar 2016 06:54:29 +0000 (15:54 +0900)] 
ARM: uniphier: fix build error when CONFIG_CMD_DDRMPHY_DUMP=y

The build fails if compiled with CONFIG_CMD_DDRMPHY_DUMP=y since commit
46abfcc99e04 ("ARM: uniphier: rework struct uniphier_board_data").

Fixes: 46abfcc99e04 ("ARM: uniphier: rework struct uniphier_board_data")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: document how-to-build for Ace and Sanji boards
Masahiro Yamada [Tue, 1 Mar 2016 04:10:37 +0000 (13:10 +0900)] 
ARM: uniphier: document how-to-build for Ace and Sanji boards

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Sat, 5 Mar 2016 01:53:50 +0000 (20:53 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-usb

8 years agousb: dwc2: disable erroneous overcurrent condition
Dinh Nguyen [Sat, 5 Mar 2016 00:57:04 +0000 (18:57 -0600)] 
usb: dwc2: disable erroneous overcurrent condition

For the case where an external VBUS is used, we should enable the external
VBUS comparator in the driver. This would prevent an unnecessary overcurrent
error which would then disable the host port.

The overcurrent condition was happening on the SoCFPGA Cyclone5 devkit, thus
USB was not working on the devkit. This patch fixes that problem.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
8 years agoboard: tbs2910: Fix eMMC BOOTCFG value
Soeren Moch [Tue, 9 Feb 2016 15:53:27 +0000 (16:53 +0100)] 
board: tbs2910: Fix eMMC BOOTCFG value

Fix the BOOTCFG value for eMMC in the same way as commit
  214c3f0f9921250eb336c7effadcc16158ea9df5
  [imx: MX6DQ{P}/DL:SABRESD Fix bmode eMMC failure]
did for sabresd.

Signed-off-by: Soeren Moch <smoch@web.de>
8 years agomx53ard: Move to booting zImage
Fabio Estevam [Tue, 23 Feb 2016 18:18:54 +0000 (15:18 -0300)] 
mx53ard: Move to booting zImage

Move to booting a zImage kernel by default to align with the other
i.MX boards.

While at it, adjust the fdt_addr so that we can boot a standard
mainline kernel.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agomx6qarm2: Update maintainer's emails
Fabio Estevam [Mon, 22 Feb 2016 17:52:55 +0000 (14:52 -0300)] 
mx6qarm2: Update maintainer's emails

Use the new NXP emails.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoMAINTAINERS: Update Peng Fan's email address
Fabio Estevam [Sun, 21 Feb 2016 12:57:23 +0000 (09:57 -0300)] 
MAINTAINERS: Update Peng Fan's email address

Use Peng Fan's new NXP email address in MAINTAINERS files.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
8 years agocolibri-vf: Disable pull-up configuration in GPIO pin mux
Bhuvanchandra DV [Wed, 24 Feb 2016 08:33:24 +0000 (14:03 +0530)] 
colibri-vf: Disable pull-up configuration in GPIO pin mux

During very early boot-ROM execution the pinmux
configuration isi in Hi-Z state. If pull-up is enabled
on GPIO pad's there will be a short period of toggle
from high to low on the IO when GPIO is set low during
boot. To avoid this glitch, disable pull-up configuration
in GPIO pinmux.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
8 years agousb: gadget: composite: Correct recovery path for register
Sam Protsenko [Tue, 16 Feb 2016 17:59:19 +0000 (19:59 +0200)] 
usb: gadget: composite: Correct recovery path for register

In case when usb_composite_register() failed once (for whatever reason),
it will fail further even if all conditions are correct. Example:

    => fastboot 2
    Invalid Controller Index
    couldn't find an available UDC
    g_dnl_register: failed!, error: -19
    exit not allowed from main input shell.

    => fastboot 0
    g_dnl_register: failed!, error: -22
    exit not allowed from main input shell.

Despite that 0 is correct index for USB controller, "fastboot 0" command
will fail, because "composite" structure wasn't cleared properly on
previous fail (on "fastboot 2" command).

This patch fixes that erroneous behavior, allowing us to use composite
even after previous failure.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agoPrepare v2016.03-rc3
Tom Rini [Mon, 29 Feb 2016 22:44:13 +0000 (17:44 -0500)] 
Prepare v2016.03-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarm: dra7xx: Define Android partition table
Sam Protsenko [Fri, 26 Feb 2016 19:37:52 +0000 (21:37 +0200)] 
arm: dra7xx: Define Android partition table

"fastboot oem format" command reuses "gpt write" command, which in turn
requires correct partitions defined in $partitions variable. This patch
adds such definition of Android partitions for DRA7XX EVM board.

By default $partitions variable contains Linux partition table. In order
to prepare Android environment one can run next commands from U-Boot
shell:

    => env set partitions $partitions_android
    => env save

After those operations one can go to fastboot mode and perform
"fastboot oem format" to create Android partition table.

While at it, enable CONFIG_RANDOM_UUID to spare user from providing
UUIDs for each partition manually.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agosniper: Various minor cleanups, missing Kconfig configs and reorganisation
Paul Kocialkowski [Fri, 26 Feb 2016 12:18:47 +0000 (13:18 +0100)] 
sniper: Various minor cleanups, missing Kconfig configs and reorganisation

This introduces some minor cleanups, regarding aspects such as board name, code
and headers organization as well as deprecated and missing config options.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: start.S: fix typo
Yuichiro Goto [Thu, 25 Feb 2016 01:23:34 +0000 (10:23 +0900)] 
ARM: start.S: fix typo

Fix typo in comment about position of 'A' bit in several start.S.

Signed-off-by: Yuichiro Goto <goto.yuichiro@espark.co.jp>
8 years agoamcc-common.h: Disable CONFIG_SYS_LONGHELP
Tom Rini [Mon, 29 Feb 2016 19:47:47 +0000 (14:47 -0500)] 
amcc-common.h: Disable CONFIG_SYS_LONGHELP

There are a number of AMCC platforms which are close to, or with some
toolchains exceeding, the size constraints.  Disable CONFIG_SYS_LONGHELP
to get us room to build with again.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agocompiler*.h: sync include/linux/compiler*.h with Linux 4.5-rc6
Tom Rini [Mon, 29 Feb 2016 16:34:15 +0000 (11:34 -0500)] 
compiler*.h: sync include/linux/compiler*.h with Linux 4.5-rc6

Copy these from Linux v4.5-rc6 tag.

This is needed so that we can keep up with newer gcc versions.  Note
that we don't have the uapi/ hierarchy from the kernel so continue to
use <linux/types.h>

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Mon, 29 Feb 2016 15:50:01 +0000 (10:50 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

8 years agoARM: uniphier: fix warnings reported by aarch64 compiler
Masahiro Yamada [Fri, 26 Feb 2016 09:59:45 +0000 (18:59 +0900)] 
ARM: uniphier: fix warnings reported by aarch64 compiler

The UniPhier SoC family has not supported ARMv8 yet, but these would
cause warnings if they were compiled with a 64bit compiler.  Before
adding the ARMv8 support really, fix them now.

Because UniPhier SoCs do not support Large Physical Address Extension,
casting "phys_addr_t" into "unsigned long" would carry the address
as is.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: prepare directory structure for ARMv8 SoC support
Masahiro Yamada [Fri, 26 Feb 2016 09:59:44 +0000 (18:59 +0900)] 
ARM: uniphier: prepare directory structure for ARMv8 SoC support

Before adding ARMv8 support, this commit refactors the directory
structure.  Move ARMv7 specific files to arch/arm/mach-uniphier/arm32
to avoid a mess by mixture of ARMv7 and ARMv8 code.  Also move the
"select CPU_V7" to the lower-level menu because we will have to
select ARM64 instead of CPU_V7 for ARMv8 SoCs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoRevert "dm: ns16550: Add support for reg-offset property"
Tom Rini [Mon, 29 Feb 2016 15:26:20 +0000 (10:26 -0500)] 
Revert "dm: ns16550: Add support for reg-offset property"

This reverts commit d9a3bec682f9756621615f4306718a356a3230e3.

While this is a correct change to do long term it unfortunately breaks a
number of platforms that are using pdata and not named struct members so
they are getting all of their data after 'base' incorrect.

Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoARM: uniphier: rename PH1-LD10/PH1-sLD11 to PH1-LD20/PH1-LD11
Masahiro Yamada [Fri, 26 Feb 2016 09:59:43 +0000 (18:59 +0900)] 
ARM: uniphier: rename PH1-LD10/PH1-sLD11 to PH1-LD20/PH1-LD11

Due to the company's awful projecting, PH1-LD10 and PH1-sLD11 have
been renamed to PH1-LD20 and PH1-LD11, respectively.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: rework UniPhier SoC select in Kconfig
Masahiro Yamada [Fri, 26 Feb 2016 09:59:42 +0000 (18:59 +0900)] 
ARM: uniphier: rework UniPhier SoC select in Kconfig

The chains of "depends on <SoC_name>" in the current Kconfig is
clumsy.  The idea here is to allow users to choose a SoC group first
(SoC group consists of some SoCs that can coexist in one binary).
Then, allow to enable/disable each SoC support in the selected SoC
group.  This makes the Kconfig menu clearer.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: merge two defconfig files
Masahiro Yamada [Fri, 26 Feb 2016 09:59:41 +0000 (18:59 +0900)] 
ARM: uniphier: merge two defconfig files

PH1-Pro5 support and ProXstream2/PH1-LD6b support can coexist in one
image and there is bit more room in SPL to accommodate all of them.
Merge uniphier_pro5_defconfig into uniphier_pxs2_defconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: rename variable for DRAM controller base address
Masahiro Yamada [Fri, 26 Feb 2016 05:21:53 +0000 (14:21 +0900)] 
ARM: uniphier: rename variable for DRAM controller base address

Rename the variable that contains the base address for consistency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: deprecate umc_dram_init_{start, poll}
Masahiro Yamada [Fri, 26 Feb 2016 05:21:52 +0000 (14:21 +0900)] 
ARM: uniphier: deprecate umc_dram_init_{start, poll}

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: remove unused macros for UMC base addresses
Masahiro Yamada [Fri, 26 Feb 2016 05:21:51 +0000 (14:21 +0900)] 
ARM: uniphier: remove unused macros for UMC base addresses

These macros are no longer used.  These base addresses are
SoC-dependent, so they should not be placed in the header.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: rework DRAM size handling in UMC init code
Masahiro Yamada [Fri, 26 Feb 2016 05:21:50 +0000 (14:21 +0900)] 
ARM: uniphier: rework DRAM size handling in UMC init code

Currently, DRAM size is converted twice:
  size in byte -> size in Gbit -> enum

Optimize the code by converting the "size in byte" into enum directly.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: optimize PH1-Pro4 UMC init code with "for" loop
Masahiro Yamada [Fri, 26 Feb 2016 05:21:49 +0000 (14:21 +0900)] 
ARM: uniphier: optimize PH1-Pro4 UMC init code with "for" loop

Now this code can be re-written with a "for" statement instead of
calling the same function multiple times.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: optimize PH1-LD4 UMC init code with "for" loop
Masahiro Yamada [Fri, 26 Feb 2016 05:21:48 +0000 (14:21 +0900)] 
ARM: uniphier: optimize PH1-LD4 UMC init code with "for" loop

Now this code can be re-written with a "for" statement instead of
calling the same function multiple times.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: optimize PH1-sLD8 UMC init code with "for" loop
Masahiro Yamada [Fri, 26 Feb 2016 05:21:47 +0000 (14:21 +0900)] 
ARM: uniphier: optimize PH1-sLD8 UMC init code with "for" loop

Now this code can be re-written with a "for" statement instead of
calling the same function multiple times.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: refactor UMC init code for PH1-LD4
Masahiro Yamada [Fri, 26 Feb 2016 05:21:46 +0000 (14:21 +0900)] 
ARM: uniphier: refactor UMC init code for PH1-LD4

Move frequency-dependent register settings to arrays for clean-up.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: support more DRAM use cases for PH1-sLD8
Masahiro Yamada [Fri, 26 Feb 2016 05:21:45 +0000 (14:21 +0900)] 
ARM: uniphier: support more DRAM use cases for PH1-sLD8

Support DDR3-1600 / 512MB DDR size.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: refactor UMC init code for PH1-sLD8
Masahiro Yamada [Fri, 26 Feb 2016 05:21:44 +0000 (14:21 +0900)] 
ARM: uniphier: refactor UMC init code for PH1-sLD8

Move frequency-dependent register settings to arrays for clean-up.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: refactor DDR-PHY init code
Masahiro Yamada [Fri, 26 Feb 2016 05:21:43 +0000 (14:21 +0900)] 
ARM: uniphier: refactor DDR-PHY init code

The if-else statements for the frequency-dependent register settings
seem clumsy.  Moving them to arrays would make it cleaner.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: remove unused argument of ph1_ld4_ddrphy_init()
Masahiro Yamada [Fri, 26 Feb 2016 05:21:42 +0000 (14:21 +0900)] 
ARM: uniphier: remove unused argument of ph1_ld4_ddrphy_init()

The DDR PHY settings no longer depend on the DRAM size.  Drop the
argument from the init function.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: merge DDR PHY init code for 3 SoCs
Masahiro Yamada [Fri, 26 Feb 2016 05:21:41 +0000 (14:21 +0900)] 
ARM: uniphier: merge DDR PHY init code for 3 SoCs

Now these three are almost the same.  The only difference is the DTPR1
register dependency on the DRAM size, but it can be ignored.  (It has
already been ignored in PH1-sLD8 and PH1-Pro4.)

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add a field to specify DDR3+
Masahiro Yamada [Fri, 26 Feb 2016 05:21:40 +0000 (14:21 +0900)] 
ARM: uniphier: add a field to specify DDR3+

Add a field to distinguish DDR3+ from (standard) DDR3.  It also
allows to delete CONFIG_DDR_STANDARD (this is not a software
configuration, but a board attribute).

Default DDR3 spec for each SoC:

  PH1-LD4, PH1-sLD8: DDR3+
  Others: DDR3

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: disable debug circuit clocks for PH1-Pro4
Masahiro Yamada [Fri, 26 Feb 2016 05:21:39 +0000 (14:21 +0900)] 
ARM: uniphier: disable debug circuit clocks for PH1-Pro4

These settings control the clocks around the memory controller.
The debug ability is unneeded once it works properly.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: remove UMC_INITCTL* and UMC_DRMR* settings
Masahiro Yamada [Fri, 26 Feb 2016 05:21:38 +0000 (14:21 +0900)] 
ARM: uniphier: remove UMC_INITCTL* and UMC_DRMR* settings

These settings were used only for the PH1-sLD3 and older SoCs.  The
PH1-LD4 and newer one just ignore them because their DDR-PHY take
care of such timing parameters instead.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: refactor UMC init code for ProXstream2
Masahiro Yamada [Fri, 26 Feb 2016 05:21:37 +0000 (14:21 +0900)] 
ARM: uniphier: refactor UMC init code for ProXstream2

Currently, a dummy value is defined for the UMC_SPCCTLA register
when the DRAM size is zero.  This seems weird because the controller
does not need setting in the first place if the size is zero.

Also, redefine enum dram_size to represent the DRAM size per 16-bit
unit.  This makes things simpler because the channel 0 and 1 are
connected with 32-bit width DRAM, while the channel 2 is connected
with 16-bit width one.

I am renaming SIZE_* into DRAM_SZ_* (and also FREQ_* to DRAM_FREQ_*
for consistency) while I am here because SIZE_* might be easily
mixed-up with the macros in include/linux/sizes.h.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: use pr_err() where possible
Masahiro Yamada [Fri, 26 Feb 2016 05:21:36 +0000 (14:21 +0900)] 
ARM: uniphier: use pr_err() where possible

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: optimize ProXstream2 UMC init code with "for" loop
Masahiro Yamada [Fri, 26 Feb 2016 05:21:35 +0000 (14:21 +0900)] 
ARM: uniphier: optimize ProXstream2 UMC init code with "for" loop

Now this code can be re-written with a "for" statement instead of
calling the same function multiple times.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: rework struct uniphier_board_data
Masahiro Yamada [Fri, 26 Feb 2016 05:21:34 +0000 (14:21 +0900)] 
ARM: uniphier: rework struct uniphier_board_data

This commit reworks "struct uniphier_board_data" with an array of
DRAM channel data in it.  It will allow further cleanups by means of
"for" statements that iterate over the DDR channels.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: remove unused umc_polling()
Masahiro Yamada [Fri, 26 Feb 2016 05:21:33 +0000 (14:21 +0900)] 
ARM: uniphier: remove unused umc_polling()

This function is unused.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: default to environment in eMMC
Masahiro Yamada [Tue, 16 Feb 2016 08:08:42 +0000 (17:08 +0900)] 
ARM: uniphier: default to environment in eMMC

Of the several boot devices supported, it looks like the eMMC is the
most commonly used.  Enable CONFIG_ENV_IS_IN_MMC by default.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add emmcupdate command
Masahiro Yamada [Tue, 16 Feb 2016 08:08:41 +0000 (17:08 +0900)] 
ARM: uniphier: add emmcupdate command

The Boot ROM expects the boot image (SPL) in the Boot Partition 1.
So, updating images involves the hardware partition switch.  It might
be a bit advanced for some users.

To be user-friendly, this commit adds a useful command to update the
images; just put SPL and U-Boot proper into the public directory of
the TFTP server and execute "run emmcupdate" from the command line.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add a command to find the first MMC (non-SD) device
Masahiro Yamada [Tue, 16 Feb 2016 08:08:40 +0000 (17:08 +0900)] 
ARM: uniphier: add a command to find the first MMC (non-SD) device

UniPhier SoC family supports both (e)MMC boot and SD card boot;
however, both of them are handled in the same uclass.

When booting from the eMMC, we want to know the device number
of the (e)MMC, not SD.  This command is useful to find the first
MMC (non-SD) device.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add eMMC boot support
Masahiro Yamada [Tue, 16 Feb 2016 08:08:39 +0000 (17:08 +0900)] 
ARM: uniphier: add eMMC boot support

Export device nodes needed for eMMC boot (eMMC node, pinctrl, and
clock) to the SPL DTB.  CONFIG_SUPPORT_EMMC_BOOT is also necessary
to use "mmc partconf" command.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: dts: uniphier: add SD/MMC host controller nodes
Masahiro Yamada [Thu, 18 Feb 2016 10:52:50 +0000 (19:52 +0900)] 
ARM: dts: uniphier: add SD/MMC host controller nodes

This host controller is available for all UniPhier SoCs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: enable UniPhier SD/MMC host driver
Masahiro Yamada [Thu, 18 Feb 2016 10:52:49 +0000 (19:52 +0900)] 
ARM: uniphier: enable UniPhier SD/MMC host driver

Enable the driver in all UniPhier defconfig files and add some
needed defines to the common files.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agommc: uniphier: add driver for UniPhier SD/MMC host controller
Masahiro Yamada [Thu, 18 Feb 2016 10:52:48 +0000 (19:52 +0900)] 
mmc: uniphier: add driver for UniPhier SD/MMC host controller

Add a driver for the on-chip SD/eMMC host controller used by
UniPhier SoC family.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: dts: uniphier: add GPIO controller nodes
Masahiro Yamada [Tue, 16 Feb 2016 08:03:51 +0000 (17:03 +0900)] 
ARM: dts: uniphier: add GPIO controller nodes

Make the GPIO driver really active.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: enable GPIO command and driver for UniPhier SoCs
Masahiro Yamada [Tue, 16 Feb 2016 08:03:50 +0000 (17:03 +0900)] 
ARM: uniphier: enable GPIO command and driver for UniPhier SoCs

This allows to use the "gpio" command.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agogpio: do not include <asm/arch/gpio.h> for UniPhier
Masahiro Yamada [Tue, 16 Feb 2016 08:03:49 +0000 (17:03 +0900)] 
gpio: do not include <asm/arch/gpio.h> for UniPhier

I implemented a GPIO driver based on Driver Model for the UniPhier
SoC family, but I could not find any good reason why such SoC
specific GPIO headers are needed.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agogpio: uniphier: add driver for UniPhier GPIO controller
Masahiro Yamada [Tue, 16 Feb 2016 08:03:48 +0000 (17:03 +0900)] 
gpio: uniphier: add driver for UniPhier GPIO controller

This GPIO controller device is used on UniPhier SoCs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoARM: dts: uniphier: rework System Bus nodes
Masahiro Yamada [Tue, 16 Feb 2016 08:00:22 +0000 (17:00 +0900)] 
ARM: dts: uniphier: rework System Bus nodes

Follow the changes of DTS in Linux.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Fri, 26 Feb 2016 23:08:43 +0000 (18:08 -0500)] 
Merge git://git.denx.de/u-boot-usb

8 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Fri, 26 Feb 2016 21:22:28 +0000 (16:22 -0500)] 
Merge git://git.denx.de/u-boot-dm

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Fri, 26 Feb 2016 19:56:23 +0000 (14:56 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-net

8 years agonet: bootp: Add environment variable for timeout period
Alexandre Messier [Mon, 1 Feb 2016 22:08:57 +0000 (17:08 -0500)] 
net: bootp: Add environment variable for timeout period

There is currently one config option (CONFIG_NET_RETRY_COUNT) that
is available to tune the retries of the network stack.
Unfortunately, it is global to all protocols, and the value is
interpreted differently in all of them.

Add a new environment variable that directly sets the retry period for
BOOTP timeouts. If this new value is not set, the period is still derived
from the default number of retries, or from CONFIG_NET_RETRY_COUNT if
defined. When both the new variable is set and CONFIG_NET_RETRY_COUNT
is defined, the variable has precedence.

Signed-off-by: Alexandre Messier <amessier@tycoint.com>
8 years agonet: phy: atheros: Fix problem with phy_reset() clearing BMCR
Alison Wang [Fri, 19 Feb 2016 07:52:28 +0000 (15:52 +0800)] 
net: phy: atheros: Fix problem with phy_reset() clearing BMCR

In commit <a058052c358c> [net: phy: do not read configuration register on
reset], phy_reset() will clear the BMCR register. Bit 12(AUTO_NEGOTIATION)
is cleared too. It causes auto-negotiation timeout error on Atheros's
PHY AR8033.

To fix this problem, genphy_config_aneg() and genphy_restart_aneg()
needs to be called in ar8035_config() to enable and restart
auto-negotiation.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Acked-by: Stefan Agner <stefan@agner.ch>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agopowerpc/t208xqds: fix esdhc peripheral clock support
Yangbo Lu [Thu, 28 Jan 2016 08:33:07 +0000 (16:33 +0800)] 
powerpc/t208xqds: fix esdhc peripheral clock support

The patch that enabled eSDHC peripheral clock support had an
obvious error as below. This patch is used to fix it.

+#define define CONFIG_FSL_ESDHC_USE_PERIPHERAL_CLK

Fixes: 3285e6cbcc1b ("powerpc/t2080qds: enable eSDHC peripheral clock support")
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agousb: ehci: Fix warning on aarch64
Marek Vasut [Fri, 26 Feb 2016 18:23:27 +0000 (19:23 +0100)] 
usb: ehci: Fix warning on aarch64

Fix the following warning on aarch64 introduced by using p2v/v2p
functions in the code:

In file included from ./arch/arm/include/asm/byteorder.h:29:0,
                 from include/compiler.h:125,
                 from include/image.h:19,
                 from include/common.h:88,
                 from drivers/usb/host/ehci-hcd.c:10:
drivers/usb/host/ehci-hcd.c: In function ‘ehci_td_buffer’:
drivers/usb/host/ehci-hcd.c:250:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   td->qt_buffer[idx] = cpu_to_hc32(virt_to_phys((void *)addr));
                                                 ^
include/linux/byteorder/little_endian.h:34:51: note: in definition of macro ‘__cpu_to_le32’
 #define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
                                                   ^
drivers/usb/host/ehci-hcd.c:250:24: note: in expansion of macro ‘cpu_to_hc32’
   td->qt_buffer[idx] = cpu_to_hc32(virt_to_phys((void *)addr));

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tom Rini <trini@konsulko.com>
8 years agopci: Fix compiler warnings in dm_pciauto_setup_device()
Bin Meng [Thu, 18 Feb 2016 07:14:47 +0000 (23:14 -0800)] 
pci: Fix compiler warnings in dm_pciauto_setup_device()

Fix the following compiler warnings when DEBUG is on.

warning: 'bar_res' may be used uninitialized in this function.
drivers/pci/pci_auto.c:101:21:
   if (!enum_only && pciauto_region_allocate(bar_res, bar_size,
                        ^

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agospi: Re-enable the SPI flash tests
Simon Glass [Wed, 24 Feb 2016 16:14:57 +0000 (09:14 -0700)] 
spi: Re-enable the SPI flash tests

These are working correctly again, so re-enable them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Tested-by: Jagan Teki <jteki@openedev.com>
8 years agospi: Correct two error return values
Simon Glass [Wed, 24 Feb 2016 16:14:56 +0000 (09:14 -0700)] 
spi: Correct two error return values

When an error number is provided we should use it, not change it. This fixes
the SPI and SPI flash tests.

One of these is long-standing. The other seems to have been introduced by
commit 1e90d9fd (sf: Move read_id code to sf_ops).

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 1e90d9fd (sf: Move read_id code to sf_ops)
Reviewed-by: Jagan Teki <jteki@openedev.com>
Tested-by: Jagan Teki <jteki@openedev.com>
8 years agosandbox: spi: Remove an incorrect free()
Simon Glass [Wed, 24 Feb 2016 16:14:55 +0000 (09:14 -0700)] 
sandbox: spi: Remove an incorrect free()

We must not free data that is managed by driver mode. Remove this line,
which is a hangover from the pre-driver-model code.

This fixes a problem where 'sf probe' crashes U-Boot if the backing file
for the SPI flash cannot be found.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Tested-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Tom Rini <trini@konsulko.com>