]> git.ipfire.org Git - people/ms/u-boot.git/log
people/ms/u-boot.git
7 years agocommon: Pass the boot device into spl_boot_mode()
Marek Vasut [Sat, 14 May 2016 21:42:07 +0000 (23:42 +0200)] 
common: Pass the boot device into spl_boot_mode()

The SPL code already knows which boot device it calls the spl_boot_mode()
on, so pass that information into the function. This allows the code of
spl_boot_mode() avoid invoking spl_boot_device() again, but it also lets
board_boot_order() correctly alter the behavior of the boot process.

The later one is important, since in certain cases, it is desired that
spl_boot_device() return value be overriden using board_boot_order().

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
[add newly introduced zynq variant]
Signed-aff-by: Andreas Bießmann <andreas@biessmann.org>
7 years agokbuild: avoid race between dtbs and dt/dt.dtb targets
Masahiro Yamada [Thu, 23 Jun 2016 04:53:46 +0000 (13:53 +0900)] 
kbuild: avoid race between dtbs and dt/dt.dtb targets

If the final targets depend on both "dtbs" and "dts/dt.dtb",
and -j option is given to the command line, multiple threads
descend into the dts/ directory, which causes build error.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Andreas Dannenberg <dannenberg@ti.com>
7 years agoefi_loader: Fix typo in distro script
Alexander Graf [Wed, 22 Jun 2016 23:15:38 +0000 (01:15 +0200)] 
efi_loader: Fix typo in distro script

The distro script is supposed to use the internal fdt as fallback if we
find no viable other option. However, we're missing a space key to actually
make that work.

Add the space, so we can successfully load an EFI blob even when there is
no device tree provided on the target device.

Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agoboard/BuR: rename kwb board to brxre1
Hannes Schmelzer [Wed, 22 Jun 2016 10:36:14 +0000 (12:36 +0200)] 
board/BuR: rename kwb board to brxre1

Rename B&R kwb board to brxre1

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoboard/BuR: rename tseries board to brppt1
Hannes Schmelzer [Wed, 22 Jun 2016 10:36:13 +0000 (12:36 +0200)] 
board/BuR: rename tseries board to brppt1

Rename B&R tseries board to brppt1

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoarm: bcm235xx: update clock framework
Steve Rae [Tue, 21 Jun 2016 23:43:07 +0000 (16:43 -0700)] 
arm: bcm235xx: update clock framework

The handling of the "usage counter" is incorrect, and the clock should
only be disabled when transitioning from 1 to 0.

Reported-by: Chris Brand <chris.brand@broadcom.com>
Signed-off-by: Steve Rae <srae@broadcom.com>
7 years agoarm: bcm235xx: fix kps ccu
Chris Brand [Tue, 21 Jun 2016 23:43:06 +0000 (16:43 -0700)] 
arm: bcm235xx: fix kps ccu

The Kona Peripheral Slave CCU has 4 policy mask registers, not 8.

Signed-off-by: Chris Brand <chris.brand@broadcom.com>
Signed-off-by: Steve Rae <srae@broadcom.com>
7 years agoarm: bcm235xx: implement the boot0 hook code
Steve Rae [Tue, 21 Jun 2016 23:43:05 +0000 (16:43 -0700)] 
arm: bcm235xx: implement the boot0 hook code

Choose the Kconfig boot0 hook option and implement the required code.

Signed-off-by: Steve Rae <srae@broadcom.com>
7 years agoarm: bcm235xx: choose 8-bit phy bus width
Steve Rae [Tue, 21 Jun 2016 23:43:04 +0000 (16:43 -0700)] 
arm: bcm235xx: choose 8-bit phy bus width

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

Signed-off-by: Steve Rae <srae@broadcom.com>
7 years agoclk: sandbox: don't check clk ID against 0
Stephen Warren [Tue, 21 Jun 2016 19:32:07 +0000 (13:32 -0600)] 
clk: sandbox: don't check clk ID against 0

clk->id is unsigned, so it can't be < 0. Remove the check for that.

FWIW, this issue was introduced when the clock API converted e.g.
clk_get_rate()'s clock ID parameter from an int to an unsigned long
(with a struct clk), without removing this check.

Fixes: 135aa9500264 ("clk: convert API to match reset/mailbox style")
Reported-by: Coverity Scan
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agocommon: Fix support for environment file in EXT4
Andrej Rosano [Tue, 21 Jun 2016 15:54:25 +0000 (17:54 +0200)] 
common: Fix support for environment file in EXT4

Signed-off-by: Andrej Rosano <andrej@inversepath.com>
7 years agoARM: armv7: refactor Makefile slightly
Masahiro Yamada [Tue, 21 Jun 2016 12:30:09 +0000 (21:30 +0900)] 
ARM: armv7: refactor Makefile slightly

Use Kbuild standard style where possible.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agohush: complete renaming CONFIG_SYS_HUSH_PARSER to CONFIG_HUSH_PARSER
Masahiro Yamada [Mon, 20 Jun 2016 17:11:19 +0000 (02:11 +0900)] 
hush: complete renaming CONFIG_SYS_HUSH_PARSER to CONFIG_HUSH_PARSER

There is no more define of CONFIG_SYS_HUSH_PARSER.  Rename some
remaining references and drop the backward compatible Kconfig entry.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoMove CONFIG_SYS_HUSH_PARSER to Kconfig for last 4 boards
Masahiro Yamada [Mon, 20 Jun 2016 17:11:18 +0000 (02:11 +0900)] 
Move CONFIG_SYS_HUSH_PARSER to Kconfig for last 4 boards

I still see some defines of this config in board headers.  Move them
to defconfigs (+ renaming to CONFIG_HUSH_PARSER) to complete this
migration.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agomtd: nand: Drop a blank line in nand_wait()
Andre Renaud [Mon, 20 Jun 2016 01:25:25 +0000 (19:25 -0600)] 
mtd: nand: Drop a blank line in nand_wait()

This empty line should not be there. Remove it.
Signed-off-by: Andre Renaud <andre@designa-electronics.com>
Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoARM: move #ifdef to match the error handling code
Masahiro Yamada [Fri, 17 Jun 2016 12:51:48 +0000 (21:51 +0900)] 
ARM: move #ifdef to match the error handling code

Match the #ifdef ... #endif and the code,

   ret = do_something();
   if (ret)
           return ret;

This will make it easier to add more #ifdef'ed code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoarm64: optimize smp_kick_all_cpus
Masahiro Yamada [Fri, 17 Jun 2016 09:32:47 +0000 (18:32 +0900)] 
arm64: optimize smp_kick_all_cpus

gic_kick_secondary_cpus can directly return to the caller of
smp_kick_all_cpus.  We do not have to use x29 register here.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agolib/lzo: bugfix when input data is not compressed
Joris Lijssens [Fri, 17 Jun 2016 08:46:58 +0000 (10:46 +0200)] 
lib/lzo: bugfix when input data is not compressed

When the input data is not compressed at all,
lzo1x_decompress_safe will fail, so call memcpy()
instead.

Signed-off-by: Joris Lijssens <joris.lijssens@gmail.com>
7 years agoenv: avoid build error for boards without CONFIG_SYS_{CPU, BOARD}
Masahiro Yamada [Fri, 17 Jun 2016 05:24:07 +0000 (14:24 +0900)] 
env: avoid build error for boards without CONFIG_SYS_{CPU, BOARD}

If CONFIG_ENV_VARS_UBOOT_CONFIG is enabled (it is by distro), this
code causes build error for boards without CONFIG_SYS_{CPU,_BOARD}.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoRespect SOURCE_DATE_EPOCH when building FIT images.
Vagrant Cascadian [Thu, 16 Jun 2016 19:28:40 +0000 (12:28 -0700)] 
Respect SOURCE_DATE_EPOCH when building FIT images.

Embedding timestamps in FIT images results in unreproducible builds
for targets that generate a fit image, such as dra7xx_evm.

This patch uses the SOURCE_DATE_EPOCH environment variable, when set,
to use specified value for the date.

Thanks to HW42 for debugging the issue and providing the patch:

  https://lists.alioth.debian.org/pipermail/reproducible-builds/Week-of-Mon-20160606/005722.html

For more information about reproducible builds and the
SOURCE_DATE_EPOCH specification:

  https://reproducible-builds.org/specs/source-date-epoch/
  https://reproducible-builds.org/

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoUse C locale when setting CC_VERSION_STRING and LD_VERSION_STRING.
Vagrant Cascadian [Sun, 12 Jun 2016 13:07:07 +0000 (06:07 -0700)] 
Use C locale when setting CC_VERSION_STRING and LD_VERSION_STRING.

The output reported may be locale-dependent, which results in
unreproducible builds.

  $ LANG=C ld --version | head -n 1
    GNU ld (GNU Binutils for Debian) 2.26

  $ LANG=it_CH.UTF-8 ld --version | head -n 1
    ld di GNU (GNU Binutils for Debian) 2.26

Forcing LC_ALL=C ensures the output is consistant regardless of the
build environment.

Thanks to HW42 for debugging the issue:

  https://lists.alioth.debian.org/pipermail/reproducible-builds/Week-of-Mon-20160606/005722.html

For more information about reproducible builds:

  https://reproducible-builds.org/

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoboard: amlogic: Rename folder for Amlogic boards
Carlo Caione [Fri, 10 Jun 2016 18:18:23 +0000 (20:18 +0200)] 
board: amlogic: Rename folder for Amlogic boards

s/hardkernel/amlogic/ to have a single place for all the amlogic-based
boards.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Carlo Caione <carlo@endlessm.com>
Acked-by: Beniamino Galvani <b.galvani@gmail.com>
7 years agoconfigs: gxbb: Introduce a common config header file
Carlo Caione [Fri, 10 Jun 2016 18:18:22 +0000 (20:18 +0200)] 
configs: gxbb: Introduce a common config header file

Introduce a meson-gxbb-common.h header file and derive the
configuration for Hardkernel Odroid-C2 board from that.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Carlo Caione <carlo@endlessm.com>
Acked-by: Beniamino Galvani <b.galvani@gmail.com>
7 years agocommon: image: minimal android image iminfo support
Michael Trimarchi [Fri, 10 Jun 2016 17:54:37 +0000 (19:54 +0200)] 
common: image: minimal android image iminfo support

We already support iminfo for other images. The idea
of this patch is start to have a minimal support for
android image format. We still need to print id[] array

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomkimage: fit: spl: Add an optional static offset for external data
Teddy Reed [Fri, 10 Jun 2016 02:38:02 +0000 (19:38 -0700)] 
mkimage: fit: spl: Add an optional static offset for external data

When building a FIT with external data (-E), U-Boot proper may require
absolute positioning for executing the external firmware. To acheive this
use the (-p) switch, which will replace the amended 'data-offset' with
'data-position' indicating the absolute position of external data.

It is considered an error if the requested absolute position overlaps with the
initial data required for the compact FIT.

Signed-off-by: Teddy Reed <teddy.reed@gmail.com>
7 years agocmd: bootefi: cosmetic
Sergey Kubushyn [Tue, 7 Jun 2016 18:14:31 +0000 (11:14 -0700)] 
cmd: bootefi: cosmetic

Short help (description) in bootefi command has a trailing "\n" that
breaks the "help" command output (empty line after "bootefi").

Nothing important, doesn't affect anything but better be fixed in the
upcoming release.

Still working on i.MX6 and their siblings NAND U-Boot update -- it
works here but not ready for a submission yet. Anyway it is for the
next cycle, not going to go into this release because it is too big
and may affect something else.

Also have some thoughts about fastboot (using multiple devices) but
this will go into separate email with RFC.

Signed-off-by: Sergey Kubushyn <ksi@koi8.net>
7 years agoomap3: bugfix in timer on rollover
Daniel Gorsulowski [Mon, 6 Jun 2016 07:40:11 +0000 (09:40 +0200)] 
omap3: bugfix in timer on rollover

Signed-off-by: Daniel Gorsulowski <daniel.gorsulowski@esd.eu>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Wed, 22 Jun 2016 00:43:21 +0000 (20:43 -0400)] 
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

7 years agotools: moveconfig: show suspicious boards with possible misconversion
Masahiro Yamada [Wed, 15 Jun 2016 05:33:54 +0000 (14:33 +0900)] 
tools: moveconfig: show suspicious boards with possible misconversion

There are some cases where config options are moved, but they are
ripped off at the final savedefconfig stage:

  - The moved option is not user-configurable, for example, due to
    a missing prompt in the Kconfig entry

  - The config was not defined in the original config header despite
    the Kconfig specifies it as non-bool type

  - The config define in the header contains reference to another
    macro, for example:
        #define CONFIG_CONS_INDEX     (CONFIG_SYS_LPC32XX_UART - 2)
    The current moveconfig does not support recursive macro expansion.

In these cases, the conversion is very likely to be an unexpected
result.  That is why I decided to display the log in yellow color
in commit 5da4f857beac ("tools: moveconfig: report when CONFIGs are
removed by savedefconfig").

It would be nice to display the list of suspicious boards when the
tool finishes processing.  It is highly recommended to check the
defconfigs once again when this message is displayed.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agotools: moveconfig: simplify show_failed_boards() and show more info
Masahiro Yamada [Wed, 15 Jun 2016 05:33:53 +0000 (14:33 +0900)] 
tools: moveconfig: simplify show_failed_boards() and show more info

Since commit 1d085568b3de ("tools: moveconfig: display log atomically
in more readable format"), the function color_text() is clever enough
to exclude LF from escape sequences.  Exploit it for removing the
"for" loops from Slots.show_failed_boards().

Also, display "(the list has been saved in moveconfig.failed)" if
there are failed boards.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agotools: moveconfig: simplify source tree switching
Masahiro Yamada [Wed, 15 Jun 2016 05:33:52 +0000 (14:33 +0900)] 
tools: moveconfig: simplify source tree switching

The subprocess.Popen() does not change the child process's working
directory if cwd=None is given.  Let's exploit this fact to refactor
the source directory handling.

We no longer have to pass "-C <reference_src_dir>" to the sub-process
because self.current_src_dir tracks the source tree against which we
want to run defconfig/autoconf.

The flag self.use_git_ref is not necessary either because we can know
the current state by checking whether the self.current_src_dir is a
valid string or None.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agotools: moveconfig: change class WorkDir to class ReferenceSource
Masahiro Yamada [Wed, 15 Jun 2016 05:33:51 +0000 (14:33 +0900)] 
tools: moveconfig: change class WorkDir to class ReferenceSource

The class WorkDir can be used in a very generic way, but currently
it is only used for containing a reference source directory.

This commit changes it for a more dedicated use.  The move_config
function can be more readable by enclosing the git-clone and git-
checkout in the class constructor.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agotools: moveconfig: fix needless move for config with default 1
Masahiro Yamada [Wed, 15 Jun 2016 05:33:50 +0000 (14:33 +0900)] 
tools: moveconfig: fix needless move for config with default 1

When moving an integer type option with default value 1, the tool
moves configs with the same value as the default (, and then removed
by the later savedefconfig).  This is a needless operation.

The KconfigParser.parse_one_config() should compare the config after
the "=y -> =1" fixup.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agoNFS: Add error message when U-Boot NFS version (V2) is not supported by NFS server
Guillaume GARDET [Mon, 6 Jun 2016 13:11:45 +0000 (15:11 +0200)] 
NFS: Add error message when U-Boot NFS version (V2) is not supported by NFS server

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: joe.hershberger@ni.com
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agonet: phy: marvell: Do not reset 88e1310 after autoneg
Nathan Rossi [Fri, 3 Jun 2016 13:16:17 +0000 (23:16 +1000)] 
net: phy: marvell: Do not reset 88e1310 after autoneg

Commit a058052c "net: phy: do not read configuration register on reset",
changes the behaviour of the phy_reset function such that the state of
the BMCR register is not preserved during reset.

Change the config function for the m88e1310 so that it does not do a
reset after configuring auto-negotiation.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agonet: phy: micrel: add support for KSZ886x switches in MIIM mode
Alexey Firago [Thu, 26 May 2016 13:28:44 +0000 (16:28 +0300)] 
net: phy: micrel: add support for KSZ886x switches in MIIM mode

This patch adds a phy driver for the Micrel KSZ886x switches.

Similarly to the KSZ8895, SoC MAC is directly connected to the switch
MAC on the switch CPU port, so the link to the switch is always up.

KSZ886x switches can be used in the following configuration modes:
- Unmanaged mode with config stored in external EEPROM
- Managed mode over SPI
- Managed mode over I2C
- Managed mode over mdio/mdc (aka MIIM or SMI)

This patch supports only unmanaged and MIIM modes.

Based on Micrel KSZ886x driver from Linux kernel and
Micrel KSZ8895 driver from U-Boot.

Verified with the KSZ8863MLL.

Signed-off-by: Alexey Firago <alexey_firago@mentor.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agonet: rtl8169: fix switching between adapters
Stephen Warren [Tue, 26 Apr 2016 21:29:00 +0000 (15:29 -0600)] 
net: rtl8169: fix switching between adapters

The rtl8169 driver uses a global variable to store the register address
of the adapter being operated upon. This is updated to point at the
correct adapter when sending or receiving a packet, or shutting down the
adapter, but not when initializing the adapter. Consequently, switching
between different adapters within the same U-Boot runtime does not work
correctly since the driver programs the wrong registers during
rtl8169_eth_start() -> rtl8169_common_start() -> rtl8169_hw_start().

Note that since rtl8169_eth_stop() does set the global variable, the
second consecutive attempt to use the "new" adapter did work even before
this patch, because each time network usage is shut down, the network
core calls stop, which sets the variable so that the next start does
actually initialize the hardware, and the adapter works.

Equally, rtl8169_eth_probe() calls rtl_init() which sets the global, so
if using only a single device, or if picking the "right" device (based on
probe order) when multiple devices are present, ioaddr will already be set
correctly from the get-go, so the issue does not occur.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agoKconfig: Add a new DISTRO_DEFAULTS Kconfig option
Hans de Goede [Mon, 20 Jun 2016 21:16:28 +0000 (23:16 +0200)] 
Kconfig: Add a new DISTRO_DEFAULTS Kconfig option

DISTRO_DEFAULTS is intended to mirror / replace
include/config_distro_defaults.h.

The intend is for boards which include this file to select this from
their Kconfig files and when moving setting to Kconfig which are #define-ed
in config_distro_defaults.h to select this from DISTRO_DEFAULTS so that
boards which have selected DISTRO_DEFAULTS will keep the same configuration
as before without needing any defconfig file changes.

The initial list of selected things matches all settings recently removed
from config_distro_defaults.h because they have been converted to Kconfig,
with the exception of CMD_ELF and CMD_NET, which have a default of y, if
the default of these ever changes they should be selected by DISTRO_DEFAULTS
too.

For testing and example purposes this commit also converts ARCH_SUNXI
to use DISTRO_DEFAULT instead of selecting everything it needs itself.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agosunxi: Add PSCI implementation in C
Chen-Yu Tsai [Tue, 7 Jun 2016 02:54:34 +0000 (10:54 +0800)] 
sunxi: Add PSCI implementation in C

To make the PSCI backend more maintainable and easier to port to newer
SoCs, rewrite the current PSCI implementation in C.

Some inline assembly bits are required to access coprocessor registers.
PSCI stack setup is the only part left completely in assembly. In theory
this part could be split out of psci_arch_init into a separate common
function, and psci_arch_init could be completely in C.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agosunxi: Add base address for GIC
Chen-Yu Tsai [Tue, 7 Jun 2016 02:54:33 +0000 (10:54 +0800)] 
sunxi: Add base address for GIC

Instead of hardcoding the GIC addresses in the PSCI implementation,
provide a base address in the cpu header.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agosunxi: Add CPUCFG debug lock and sun7i cpu power controls
Chen-Yu Tsai [Tue, 7 Jun 2016 02:54:32 +0000 (10:54 +0800)] 
sunxi: Add CPUCFG debug lock and sun7i cpu power controls

CPUCFG has an unlisted debug control register, which is used to disable
external debug access.

Also, sun7i secondary core power controls are in CPUCFG, as there's no
separate PRCM block.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agosunxi: Group cpu core related controls together
Chen-Yu Tsai [Tue, 7 Jun 2016 02:54:31 +0000 (10:54 +0800)] 
sunxi: Group cpu core related controls together

Instead of listing individual registers for controls to each processor
core, list them as an array of registers. This makes accessing controls
by core index easier.

Also rename "cpucfg_sun6i.h" (which was unused anyway) to the more generic
"cpucfg.h", and add packed attribute to struct sunxi_cpucfg.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agosunxi: Add missing linux/types.h header for cpucfg_sun6i.h
Chen-Yu Tsai [Tue, 7 Jun 2016 02:54:30 +0000 (10:54 +0800)] 
sunxi: Add missing linux/types.h header for cpucfg_sun6i.h

cpucfg_sun6i.h includes a register definition for the CPUCFG register
block. The types used are u32 and u8, which are defined in linux/types.h.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agosunxi: Add packed attribute to struct sunxi_prcm_reg
Chen-Yu Tsai [Tue, 7 Jun 2016 02:54:29 +0000 (10:54 +0800)] 
sunxi: Add packed attribute to struct sunxi_prcm_reg

struct sunxi_prcm_reg is a representation of the PRCM registers. Add
the packed attribute to prevent the compiler from doing funny things.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agosunxi: Make CPUCFG_BASE macro names the same across families
Chen-Yu Tsai [Tue, 7 Jun 2016 02:54:28 +0000 (10:54 +0800)] 
sunxi: Make CPUCFG_BASE macro names the same across families

Use SUNXI_CPUCFG_BASE across all families. This makes writing common
PSCI code easier.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agoARM: allocate extra space for PSCI stack in secure section during link phase
Chen-Yu Tsai [Tue, 7 Jun 2016 02:54:27 +0000 (10:54 +0800)] 
ARM: allocate extra space for PSCI stack in secure section during link phase

The PSCI implementation expects at most 2 pages worth of space reserved
at the end of the secure section for its stacks. If PSCI is relocated to
secure SRAM, then everything is fine. If no secure SRAM is available,
and PSCI remains in main memory, the reserved memory space doesn't cover
the space used by the stack.

If one accesses PSCI after Linux has fully booted, the memory that should
have been reserved for the PSCI stacks may have been used by the kernel
or userspace, and would be corrupted. Observed after effects include the
system hanging or telinit core dumping when trying to reboot. It seems
the init process gets hit the most on my test bed.

This fix allocates the space used by the PSCI stacks in the secure
section by skipping pages in the linker script, but only when there is
no secure SRAM, to avoid bloating the binary.

This fix is only a stop gap. It would be better to rework the stack
allocation mechanism, maybe with proper usage of CONFIG_ macros and an
explicit symbol.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agoARM: PSCI: export common PSCI function declarations for C code
Chen-Yu Tsai [Tue, 7 Jun 2016 02:54:26 +0000 (10:54 +0800)] 
ARM: PSCI: export common PSCI function declarations for C code

Some common PSCI functions are written in assembly, but it should be
possible to use them from C code.

Add function declarations for C code to consume.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agoARM: PSCI: save and restore clobbered registers in v7_flush_dcache_all
Chen-Yu Tsai [Tue, 7 Jun 2016 02:54:25 +0000 (10:54 +0800)] 
ARM: PSCI: save and restore clobbered registers in v7_flush_dcache_all

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agoARM: PSCI: use only r0 and r3 in psci_get_cpu_stack_top()
Chen-Yu Tsai [Tue, 7 Jun 2016 02:54:24 +0000 (10:54 +0800)] 
ARM: PSCI: use only r0 and r3 in psci_get_cpu_stack_top()

For psci_get_cpu_stack_top() to be usable in C code, it must adhere to
the ARM calling conventions. Since it could be called when the stack
is still unavailable, and the entry code to linux also expects r1 and
r2 to remain unchanged, stick to r0 and r3.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agosunxi: Revert "sunxi: make SoC variant choice mandatory"
Hans de Goede [Sun, 12 Jun 2016 09:57:07 +0000 (11:57 +0200)] 
sunxi: Revert "sunxi: make SoC variant choice mandatory"

This reverts commit 1a5f0de08e86("sunxi: make SoC variant choice
mandatory").

With the optional marking in the Kconfig "make savedefconfig"
will drop CONFIG_MACH_SUN4I=y from all the A10 boards, making it
hard to see at a glance which family of sunxi chips the defconfig
is for.

This commit therefore restores the optional, and restores
CONFIG_MACH_SUN4I=y to all defconfig's which had it dropped
because of this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
7 years agosunxi: Add defconfig and dts file for inet86dz board
Hans de Goede [Sun, 12 Jun 2016 17:44:42 +0000 (19:44 +0200)] 
sunxi: Add defconfig and dts file for inet86dz board

The inet86dz board is a board used in 7" tablets from various oems.

These tablets are a23 based 7" tablets featuring a 1024x600 LCD,
512MB RAM, 4G NAND, rtl8188etv usb wifi, gsl1680 touchschreen,
micro-sd slot, 3.5mm headphone jack and a micro-usb otg connector
which doubles as charging port.

The dts file this commit adds is identical to the one submitted to
the upstream kernel.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
7 years agosunxi: Add defconfig and dts file for Polaroid MID2407PXE03 tablet
Hans de Goede [Sat, 11 Jun 2016 13:19:38 +0000 (15:19 +0200)] 
sunxi: Add defconfig and dts file for Polaroid MID2407PXE03 tablet

The Polaroid MID2407PXE03 is an a23 based 7" tablet based on a M86_MB V2.0
PCB, featuring a 800x480 LCD, 512MB RAM, 4G NAND, esp8089 wifi, gsl1680
touchschreen, micro-sd slot, 3.5mm headphone jack and a micro-usb otg
connector which doubles as charging port.

The dts file is identical to the one submitted to the upstream kernel.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
7 years agosunxi: Select USE_TINY_PRINTF
Hans de Goede [Fri, 10 Jun 2016 10:19:40 +0000 (12:19 +0200)] 
sunxi: Select USE_TINY_PRINTF

This gives us a bit more breathing room wrt our SPL size.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agotinyprintf: Add vprintf implementation
Hans de Goede [Fri, 10 Jun 2016 19:03:34 +0000 (21:03 +0200)] 
tinyprintf: Add vprintf implementation

vprintf is used by panic() which is used in various SPL paths on some
boards.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoPrepare v2016.07-rc2
Tom Rini [Mon, 20 Jun 2016 15:14:12 +0000 (11:14 -0400)] 
Prepare v2016.07-rc2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

e.g.
==> nand torture 1000000

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

==> nand torture 1000000 40000

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

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

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

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

Somehow this got overlooked when getting rid of nand_info.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This patch corrects the documentation.

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

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

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

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

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

This patch fixes the reading behavior.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Currently DFU is not working.

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

=> dfu 0 mmc 0

In the host PC:

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

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

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

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

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

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

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

Based on the imx7dsabresd code.

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Marco Franchi <marco.franchi@nxp.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Tested-by: Fabio Estevam <fabio.estevam@nxp.com>