]> git.sur5r.net Git - u-boot/log
u-boot
9 years agoMerge git://git.denx.de/u-boot-sunxi
Tom Rini [Sun, 22 Feb 2015 03:01:09 +0000 (22:01 -0500)]
Merge git://git.denx.de/u-boot-sunxi

9 years agosunxi: Machine id hack to prevent loading buggy sunxi-3.4 kernels
Siarhei Siamashka [Sat, 21 Feb 2015 05:34:09 +0000 (07:34 +0200)]
sunxi: Machine id hack to prevent loading buggy sunxi-3.4 kernels

Right now U-Boot supports the CONFIG_OLD_SUNXI_KERNEL_COMPAT option,
which makes it go out of its way in limiting the selection of PLL clock
frequencies and PMIC voltages in order not to upset outdated buggy
sunxi-3.4 kernel releases. And if the CONFIG_OLD_SUNXI_KERNEL_COMPAT
option is not set, then booting such old kernels exhibits various
failures at runtime. This is very user unfriendly, and there were
already several incidents when people wasted their time being hit
by these runtime failures and trying to debug them.

The right solution is not to add hacks and workarounds to the mainline
U-Boot, but to fix these bugs in the sunxi-3.4 kernel. And in fact,
the updated sunxi-3.4 kernels already exist. Still we need to follow
the 'Principle of Least Surprise' and U-Boot needs to ensure that
the old buggy kernels are not getting happily booted when the
CONFIG_OLD_SUNXI_KERNEL_COMPAT option is not set. And this patch
addresses this particular issue.

This patch makes U-Boot store the 'compatibility revision' number in
the top 4 bits of the machine id and pass it to the kernel. The old
buggy kernels will fail to load with a very much googlable error
message on the serial console (the "r1 = 0x100010bb" part of it):

  "Error: unrecognized/unsupported machine ID (r1 = 0x100010bb)"

This error message can be documented in the linux-sunxi wiki with
proper explanations about how to resolve this situation and where
to get the necessary bugfixes for the sunxi-3.4 kernel.

The fixed sunxi-3.4 kernels implement a revision compatibility check
and clear the top 4 bits of the machine id if everything is alright.
By accepting the machine id with the bits 31:28 set to 1, the sunxi-3.4
kernel effectively certifies that it has the PLL5 clock speed and
AXP209 DCDC3 voltage fixes applied.

It is still possible to set the CONFIG_OLD_SUNXI_KERNEL_COMPAT option
in U-Boot if the user desires to use an outdated unpatched sunxi-3.4
kernel.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: Set the /chosen/stdout-path fdt property for sunxi boards
Hans de Goede [Fri, 20 Feb 2015 15:55:12 +0000 (16:55 +0100)]
sunxi: Set the /chosen/stdout-path fdt property for sunxi boards

While discussing with some people how to get the Linux kernel to do the
right thing wrt sending output to both the serial console and the
hdmi out / lcd screen when booting on ARM devices, Grant Likely pointed out
that there already is a solution for this.

All we need to do is set the /chosen/stdout-path fdt property, and if no
console= arguments were specified on the kernel commandline the kernel
will honor this and add this device as a console (next to the primary
video output on hdmi).

And u-boot already has support for setting this, all we need to do is
define OF_STDOUT_PATH and then everything will just work ootb, without
people needing to meddle with adding console= arguments in extlinux.conf .

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agosunxi: Fix sun5i mbus speed when booting old kernels
Hans de Goede [Thu, 19 Feb 2015 13:46:44 +0000 (14:46 +0100)]
sunxi: Fix sun5i mbus speed when booting old kernels

Older linux-sunxi-3.4 kernels override our PLL6 setting with 300 MHz,
halving the mbus frequency, so set it to 300 MHz ourselves and base the
mbus divider on that.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: musb: Check Vbus-det before enabling otg port power
Hans de Goede [Mon, 16 Feb 2015 21:13:43 +0000 (22:13 +0100)]
sunxi: musb: Check Vbus-det before enabling otg port power

Sending out 5V when there is a charger connected to the otg port is not a
good idea, so check for this and error out.

Note this commit currently breaks otg support on the q8h tablets, as we need
to do some magic with the pmic there to get vbus info, this is deliberate
(better safe then sorry), fixing this is on my TODO list.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Add support for the UTOO P66 tablet
Hans de Goede [Mon, 16 Feb 2015 18:47:43 +0000 (19:47 +0100)]
sunxi: Add support for the UTOO P66 tablet

The UTOO P66 is a 6" A13 tablet / lcd ereader. It features a 6" 480x800 ips
lcd screen, 512MB RAM & 4GB emmc.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: mmc: Always declare High Capacity capability
Hans de Goede [Thu, 19 Feb 2015 19:34:32 +0000 (20:34 +0100)]
sunxi: mmc: Always declare High Capacity capability

High Capacity (e)MMC cards work fine on sun4i / sun5i, and not having this
capability set causes u-boot to not recognize the eMMC on an Utoo P66 A13
tablet, so always set it thereby fixing this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agorpi: add support for Raspberry Pi 2 model B
Stephen Warren [Mon, 16 Feb 2015 19:16:15 +0000 (12:16 -0700)]
rpi: add support for Raspberry Pi 2 model B

USB doesn't seem to work yet; the controller detects the on-board Hub/
Ethernet device but can't read the descriptors from it. I haven't
investigated yet.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
9 years agobcm2836 SoC support (used in Raspberry Pi 2 model B)
Stephen Warren [Mon, 16 Feb 2015 19:16:14 +0000 (12:16 -0700)]
bcm2836 SoC support (used in Raspberry Pi 2 model B)

The bcm2835 and bcm2836 are essentially identical, except:
- The CPU is an ARM1176 v.s. a quad-core Cortex-A7.
- The physical address of many IO controllers has moved.

Rather than introducing a whole new bcm2836 value for $(SOC) or $(ARCH),
update the existing bcm2835 code to handle the minor differences, and
plumb it into the ARMv7 CPU architecture.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
9 years agobcm2835/rpi: add SPDX license tags for some files
Stephen Warren [Mon, 16 Feb 2015 19:16:13 +0000 (12:16 -0700)]
bcm2835/rpi: add SPDX license tags for some files

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
9 years agoARM: prepare for including <mach/*.h>
Masahiro Yamada [Fri, 20 Feb 2015 08:04:19 +0000 (17:04 +0900)]
ARM: prepare for including <mach/*.h>

This commit adds $(srctree)/arch/arm/$(machdirs)/include/mach to
the headers search path.

It allows us to replace "#include <asm/arch/foo.h>" with
"#include <mach/foo.h>".  As "#include <asm/arch/foo.h>" is still
supported, we can modify each file one by one.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: keystone: move SoC headers to mach-keystone/include/mach
Masahiro Yamada [Fri, 20 Feb 2015 08:04:18 +0000 (17:04 +0900)]
ARM: keystone: move SoC headers to mach-keystone/include/mach

Move arch/arm/include/asm/arch-keystone/*
  -> arch/arm/mach-keystone/include/mach/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
9 years agoARM: orion5x: move SoC headers to mach-orion5x/include/mach
Masahiro Yamada [Fri, 20 Feb 2015 08:04:17 +0000 (17:04 +0900)]
ARM: orion5x: move SoC headers to mach-orion5x/include/mach

Move arch/arm/include/asm/arch-orion5x/*
  -> arch/arm/mach-orion5x/include/mach/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
9 years agoARM: nomadik: move SoC headers to mach-nomadik/include/mach
Masahiro Yamada [Fri, 20 Feb 2015 08:04:16 +0000 (17:04 +0900)]
ARM: nomadik: move SoC headers to mach-nomadik/include/mach

Move arch/arm/include/asm/arch-nomadik/*
  -> arch/arm/mach-nomadik/include/mach/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nomadik Linux Team <STN_WMM_nomadik_linux@list.st.com>
Cc: Alessandro Rubini <rubini@unipv.it>
9 years agoARM: kirkwood: move SoC headers to mach-kirkwood/include/mach
Masahiro Yamada [Fri, 20 Feb 2015 08:04:15 +0000 (17:04 +0900)]
ARM: kirkwood: move SoC headers to mach-kirkwood/include/mach

Move arch/arm/include/asm/arch-kirkwood/*
  -> arch/arm/mach-kirkwood/include/mach/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Stefan Roese <sr@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoARM: davinci: move SoC headers to mach-davinci/include/mach
Masahiro Yamada [Fri, 20 Feb 2015 08:04:14 +0000 (17:04 +0900)]
ARM: davinci: move SoC headers to mach-davinci/include/mach

Move arch/arm/include/asm/arch-davinci/*
  -> arch/arm/mach-davinci/include/mach/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
9 years agoARM: at91: move SoC headers to mach-at91/include/mach
Masahiro Yamada [Fri, 20 Feb 2015 08:04:13 +0000 (17:04 +0900)]
ARM: at91: move SoC headers to mach-at91/include/mach

Move arch/arm/include/asm/arch-at91/*
  -> arch/arm/mach-at91/include/mach/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agokbuild: prepare for moving headers into mach-*/include/mach
Masahiro Yamada [Fri, 20 Feb 2015 08:04:12 +0000 (17:04 +0900)]
kbuild: prepare for moving headers into mach-*/include/mach

In U-Boot, SoC-specific headers are placed in
arch/$(ARCH)/include/asm/arch-$(SOC) and a symbolic link to that
directory is created at the early stage of the build process.

Creating and removing a symbolic link during the build is not
preferred.  In fact, Linux Kernel did away with include/asm-$(ARCH)
directories a long time time ago.

As for ARM, now it is possible to collect SoC sources into
arch/arm/mach-$(SOC).  It is also reasonable to move SoC headers
into arch/arm/mach-$(SOC)/include/mach.

This commit prepares for that.
If the directory arch/$(ARCH)/mach-$(SOC)/include/mach exists,
a symbolic to that directory is created.  Otherwise, a symbolic link
to arch/$(ARCH)/include/asm/arch-$(SOC) or arch-$(CPU) is created.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: keystone: move SoC sources to mach-keystone
Masahiro Yamada [Fri, 20 Feb 2015 08:04:11 +0000 (17:04 +0900)]
ARM: keystone: move SoC sources to mach-keystone

Move
arch/arm/cpu/armv7/keystone/* -> arch/arm/mach-keystone/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
9 years agoARM: versatile: move SoC sources to mach-versatile
Masahiro Yamada [Fri, 20 Feb 2015 08:04:10 +0000 (17:04 +0900)]
ARM: versatile: move SoC sources to mach-versatile

Move
arch/arm/cpu/arm926ejs/versatile/* -> arch/arm/mach-versatile/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: orion5x: move SoC sources to mach-orion5x
Masahiro Yamada [Fri, 20 Feb 2015 08:04:09 +0000 (17:04 +0900)]
ARM: orion5x: move SoC sources to mach-orion5x

Move
arch/arm/cpu/arm926ejs/orion5x/* -> arch/arm/mach-orion5x/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
9 years agoARM: highbank: move SoC sources to mach-highbank
Masahiro Yamada [Fri, 20 Feb 2015 08:04:08 +0000 (17:04 +0900)]
ARM: highbank: move SoC sources to mach-highbank

Move
arch/arm/cpu/armv7/highbank/* -> arch/arm/mach-highbank/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Rob Herring <robh@kernel.org>
9 years agoARM: nomadik: move SoC sources to mach-nomadik
Masahiro Yamada [Fri, 20 Feb 2015 08:04:07 +0000 (17:04 +0900)]
ARM: nomadik: move SoC sources to mach-nomadik

Move
arch/arm/cpu/arm926ejs/nomadik/* -> arch/arm/mach-nomadik/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nomadik Linux Team <STN_WMM_nomadik_linux@list.st.com>
Cc: Alessandro Rubini <rubini@unipv.it>
9 years agoARM: kirkwood: move SOC sources to mach-kirkwood
Masahiro Yamada [Fri, 20 Feb 2015 08:04:06 +0000 (17:04 +0900)]
ARM: kirkwood: move SOC sources to mach-kirkwood

Move
arch/arm/cpu/arm926ejs/kirkwood/* -> arch/arm/mach-kirkwood/*

Note:
 Perhaps, can we merge arch/arm/mach-kirkwood and
 arch/arm/mvebu-common into arch/arm/mach-mvebu, like Linux?

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Stefan Roese <sr@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoARM: davinci: move SoC sources to mach-davinci
Masahiro Yamada [Fri, 20 Feb 2015 08:04:05 +0000 (17:04 +0900)]
ARM: davinci: move SoC sources to mach-davinci

Move
arch/arm/cpu/arm926ejs/davinci/* -> arch/arm/mach-davinci/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
9 years agoARM: tegra: collect SoC sources into mach-tegra
Masahiro Yamada [Fri, 20 Feb 2015 08:04:04 +0000 (17:04 +0900)]
ARM: tegra: collect SoC sources into mach-tegra

This commit moves files as follows:

 arch/arm/cpu/arm720t/tegra20/*      -> arch/arm/mach-tegra/tegra20/*
 arch/arm/cpu/arm720t/tegra30/*      -> arch/arm/mach-tegra/tegra30/*
 arch/arm/cpu/arm720t/tegra114/*     -> arch/arm/mach-tegra/tegra114/*
 arch/arm/cpu/arm720t/tegra124*      -> arch/arm/mach-tegra/tegra124/*
 arch/arm/cpu/arm720t/tegra-common/* -> arch/arm/mach-tegra/*
 arch/arm/cpu/armv7/tegra20/*        -> arch/arm/mach-tegra/tegra20/*
 arch/arm/cpu/armv7/tegra30/*        -> arch/arm/mach-tegra/tegra30/*
 arch/arm/cpu/armv7/tegra114/*       -> arch/arm/mach-tegra/tegra114/*
 arch/arm/cpu/armv7/tegra124/*       -> arch/arm/mach-tegra/tegra124/*
 arch/arm/cpu/armv7/tegra-common/*   -> arch/arm/mach-tegra/*
 arch/arm/cpu/tegra20-common/*       -> arch/arm/mach-tegra/tegra20/*
 arch/arm/cpu/tegra30-common/*       -> arch/arm/mach-tegra/tegra30/*
 arch/arm/cpu/tegra114-common/*      -> arch/arm/mach-tegra/tegra114/*
 arch/arm/cpu/tegra124-common/*      -> arch/arm/mach-tegra/tegra124/*
 arch/arm/cpu/tegra-common/*         -> arch/arm/mach-tegra/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Simon Glass <sjg@chromium.org> [ on nyan-big ]
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
9 years agoARM: at91: collect SoC sources into mach-at91
Masahiro Yamada [Fri, 20 Feb 2015 08:04:03 +0000 (17:04 +0900)]
ARM: at91: collect SoC sources into mach-at91

This commit moves source files as follows:

  arch/arm/cpu/arm920t/at91/*   -> arch/arm/mach-at91/arm920t/*
  arch/arm/cpu/arm926ejs/at91/* -> arch/arm/mach-at91/arm926ejs/*
  arch/arm/cpu/armv7/at91/*     -> arch/arm/mach-at91/armv7/*
  arch/arm/cpu/at91-common/*    -> arch/arm/mach-at91/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.co>
9 years agoARM: prepare for moving SoC sources into mach-*
Masahiro Yamada [Fri, 20 Feb 2015 08:04:02 +0000 (17:04 +0900)]
ARM: prepare for moving SoC sources into mach-*

In U-boot, the directory structure, arch/$(ARCH)/cpu/$(CPU)/$(SOC)/
has been adopted except that $(CPU) is missing from some
architectures and $(SOC) is missing from some CPUs.

This structure did not fit very well in some cases.

[1] AT91

AT91 SoC family have been developed across some ARM processor
generations.  Generally speaking, some IPs are often re-used in the
same SoC family (same SoC vendor) even when the main processor is
updated.  As a result, a SoC-common directory is needed in the upper
level.  Currently, AT91 source files are placed as follows:

  arch/arm/cpu/arm920t/at91/*
  arch/arm/cpu/arm926ejs/at91/*
  arch/arm/cpu/armv7/at91/*
  arch/arm/cpu/at91-common/*

Once directories are split, the motivation for refactorings across
CPU directories is lost.  Some files in arm920t/at91/ and
arm926ejs/at91/ are so similar that they could be merged.

[2] Tegra

Tegra is a little bit special case where different CPUs are used for
SPL and the main U-boot.  To obey the arch/$(ARCH)/cpu/$(CPU)/$(SOC)
structure, the source files must be placed across the CPUs,
again SoC-common directory is necessary in the upper level.

Moreover, there are several families in Tegra: Tegra20, Tegra30,
Tegra114, Tegra124.  Here again, the tegra-common directory is needed
to contain commonly-used files.

Tegra directories have been sprinkled in the directory structure.

  arch/arm/cpu/arm720t/tegra20
  arch/arm/cpu/arm720t/tegra30
  arch/arm/cpu/arm720t/tegra114
  arch/arm/cpu/arm720t/tegra124
  arch/arm/cpu/arm720t/tegra-common
  arch/arm/cpu/armv7/tegra20
  arch/arm/cpu/armv7/tegra30
  arch/arm/cpu/armv7/tegra114
  arch/arm/cpu/armv7/tegra124
  arch/arm/cpu/armv7/tegra-common
  arch/arm/cpu/tegra20-common
  arch/arm/cpu/tegra30-common
  arch/arm/cpu/tegra114-common
  arch/arm/cpu/tegra124-common
  arch/arm/cpu/tegra-common

As you see, splitting SoC code by the CPU is not going well,
especially for ARM.
Why don't we collect SoC-specific files into a single place?

A good example we can follow is Linux's arch/arm/mach-* structure.

This item was discussed in the following thread:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/188548/

Looks like I got some positive responses and we are almost ready to
start this movement.

This commit prepares arch/arm/Makefile for describing machdirs in it.

After this commit, we can move SoC directory to arch/arm/mach-$(SOC)
in simple steps although some cases such as AT91 and Tegra need more
fixes.

What we generally have to do is:

[1] Move files arch/arm/cpu/$(CPU)/$(SOC)/* to arch/arm/mach-$(SOC)/*
[2] Add machine entry into arch/arm/Makefile
[3] Remove "obj-y += $(SOC)" from arch/arm/cpu/$(CPU)/Makefile
[4] Fix the Kconfig file path in arch/arm/Kconfig
[5] Modify MAINTAINERS if necessary

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: at91: move board select menu and common settings
Masahiro Yamada [Fri, 20 Feb 2015 08:04:01 +0000 (17:04 +0900)]
ARM: at91: move board select menu and common settings

The board select menu in arch/arm/Kconfig is still big.
To slim down it, this commit moves AT91 boards to
arch/arm/mach-at91/Kconfig.
Also, consolidate "config SYS_SOC" in each board Kconfig.

The Kconfig files under board/ directory were modified with the
following command:

    find board -name Kconfig | xargs sed -i -e '
    /config SYS_SOC/ {
        N
        /default "at91"/ {
            N
            d
        }
    }
    '

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.co>
9 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Sat, 21 Feb 2015 13:22:23 +0000 (08:22 -0500)]
Merge git://git.denx.de/u-boot-dm

9 years agosunxi: video: Add support for tl059wv5c0 lcd panels
Hans de Goede [Mon, 16 Feb 2015 16:49:47 +0000 (17:49 +0100)]
sunxi: video: Add support for tl059wv5c0 lcd panels

Add support for the 6" 480x800 tl059wv5c0 panel used on e.g. Utoo P66 and
Aigo M60/M608/M606 tablets.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: video: Add support for LCD panels which need to be configured via i2c
Hans de Goede [Mon, 16 Feb 2015 16:23:25 +0000 (17:23 +0100)]
sunxi: video: Add support for LCD panels which need to be configured via i2c

This commits adds support for configuring a a bitbang i2c controller, which
is used on some boards to configure the LCD panel (via i2c).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: video: Add support for LCD reset pin
Hans de Goede [Mon, 16 Feb 2015 16:26:41 +0000 (17:26 +0100)]
sunxi: video: Add support for LCD reset pin

On some boards there is a gpio to reset the LCD panel, add support for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agodm: Protect device_unbind() with CONFIG_DM_DEVICE_REMOVE
Marek Vasut [Wed, 18 Feb 2015 21:36:18 +0000 (22:36 +0100)]
dm: Protect device_unbind() with CONFIG_DM_DEVICE_REMOVE

Since device_unbind() is also defined in device-remove.c,
which is compiled in only in case CONFIG_DM_DEVICE_REMOVE
is defined, protect the device_unbind() prototype with the
same CONFIG_DM_DEVICE_REMOVE check.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoserial: ns16550: Support debug UART
Simon Glass [Tue, 27 Jan 2015 01:27:09 +0000 (18:27 -0700)]
serial: ns16550: Support debug UART

Add debug UART functions to permit ns16550 to provide an early debug UART.
Try to avoid using the stack so that this can be called from assembler before
a stack is set up (at least on ARM and PowerPC).

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoserial: ns16550: Add access functions that don't need platdata
Simon Glass [Tue, 27 Jan 2015 01:27:08 +0000 (18:27 -0700)]
serial: ns16550: Add access functions that don't need platdata

For the debug UART we need to be able to provide any parameters before
driver model is set up. Add parameters to the low-level access functions
to make this possible.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoserial: Support an early UART for debugging
Simon Glass [Tue, 27 Jan 2015 01:27:07 +0000 (18:27 -0700)]
serial: Support an early UART for debugging

This came up in a discussion on the mailing list here:

https://patchwork.ozlabs.org/patch/384613/

My concerns at the time were:
- it doesn't need to be written in assembler
- it doesn't need to be ARM-specific

This patch provides a possible alternative. It works by allowing any serial
driver to export one init function and provide a putc() function. These
can be used to output debug data before the real serial driver is available.

This implementation does not depend on driver model, and it is possible for
it to operate without a stack on some architectures (e.g. PowerPC, ARM). It
provides the same features as the ARM-specific debug.S but with more UART
and architecture support.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoDocumentation: gpio: fix bindings document
Masahiro Yamada [Thu, 12 Feb 2015 09:49:33 +0000 (18:49 +0900)]
Documentation: gpio: fix bindings document

[ imported from Linux Kernel, commit 74981fb81d83 ]
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: mx6: Adjust mx6sxsabresd to use Kconfig for DM_THERMAL
Simon Glass [Fri, 13 Feb 2015 19:20:49 +0000 (12:20 -0700)]
dm: mx6: Adjust mx6sxsabresd to use Kconfig for DM_THERMAL

Use Kconfig instead of board config for DM and DM_THERMAL.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Move CONFIG_I2C_COMPAT to Kconfig
Simon Glass [Fri, 13 Feb 2015 19:20:48 +0000 (12:20 -0700)]
dm: Move CONFIG_I2C_COMPAT to Kconfig

Make this option available in Kconfig and clean up the board that uses it.
Note there is also an entry in exynos5-common.h but this affects multiple
boards and should be dropped as part of the Samsung I2C migration to
driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: cros_ec: Convert to Kconfig
Simon Glass [Fri, 13 Feb 2015 19:20:47 +0000 (12:20 -0700)]
dm: cros_ec: Convert to Kconfig

Since both I2C and SPI are converted to Kconfig, we can convert cros_ec
to Kconfig for these buses.

LPC will need to wait until driver mode PCI is available.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agocmd_i2c: Provide option for bulk 'i2c write' in one transaction
Lubomir Popov [Fri, 30 Jan 2015 17:56:04 +0000 (19:56 +0200)]
cmd_i2c: Provide option for bulk 'i2c write' in one transaction

I2C chips do exist that require a write of some multi-byte data to occur in
a single bus transaction (aka atomic transfer), otherwise either the write
does not come into effect at all, or normal operation of internal circuitry
cannot be guaranteed. The current implementation of the 'i2c write' command
(transfer of multiple bytes from a memory buffer) in fact performs a separate
transaction for each byte to be written and thus cannot support such types of
I2C slave devices.

This patch provides an alternative by allowing 'i2c write' to execute the
write transfer of the given number of bytes in a single bus transaction if
the '-s' option is specified as a final command argument. Else the current
re-addressing method is used.

Signed-off-by: Lubomir Popov <l-popov@ti.com>
hs: adapt to CONFIG_DM_I2C

9 years agocmd_i2c: quit I2C commands immediately on error
Masahiro Yamada [Thu, 5 Feb 2015 04:50:26 +0000 (13:50 +0900)]
cmd_i2c: quit I2C commands immediately on error

If the i2c driver returns an error status, error out immediately.
Continuing the loop just results in printing error messages
again and again.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-fdt
Tom Rini [Wed, 18 Feb 2015 13:46:50 +0000 (08:46 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-fdt

9 years agocmd_fdt: Print the control fdt in terms of virtual memory
Joe Hershberger [Thu, 5 Feb 2015 03:56:54 +0000 (21:56 -0600)]
cmd_fdt: Print the control fdt in terms of virtual memory

If you want to inspect the control device tree using the fdt command,
the "fdt address -c" command previously unhelpfully printed the phys
memory address of the device tree. That address could not then be used
to set the fdt address for inspection. Changed the resulting print to
one that can be copied directly to the 'fdt address <addr>' command.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agocmd_fdt: Actually fix fdt command in sandbox
Joe Hershberger [Thu, 5 Feb 2015 03:56:53 +0000 (21:56 -0600)]
cmd_fdt: Actually fix fdt command in sandbox

Commit 90bac29a76bc8d649b41a55f2786c0abef9bb2c1 claims to fix this bug
that was introduced in commit a92fd6577ea17751ead9b50243e3c562125cf581
but doesn't actually make the change that the commit message describes.

Actually fix the bug this time.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-avr32
Tom Rini [Wed, 18 Feb 2015 03:11:36 +0000 (22:11 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-avr32

9 years agoatstk1002: enable generic board
Andreas Bießmann [Fri, 6 Feb 2015 22:06:50 +0000 (23:06 +0100)]
atstk1002: enable generic board

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agograsshopper: enable generic board
Andreas Bießmann [Fri, 6 Feb 2015 22:06:49 +0000 (23:06 +0100)]
grasshopper: enable generic board

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoavr32: add generic board support
Andreas Bießmann [Fri, 6 Feb 2015 22:06:48 +0000 (23:06 +0100)]
avr32: add generic board support

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agocommon/board_r: allocate bootparams
Andreas Bießmann [Fri, 6 Feb 2015 22:06:47 +0000 (23:06 +0100)]
common/board_r: allocate bootparams

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agocommon/board_f: factor out reserve_stacks
Andreas Bießmann [Fri, 6 Feb 2015 22:06:45 +0000 (23:06 +0100)]
common/board_f: factor out reserve_stacks

Introduce arch_reserve_stacks() to tailor gd->start_addr_sp and gd->irq_sp to
the architecture needs.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoavr32: use generic gd->start_addr_sp
Andreas Bießmann [Fri, 6 Feb 2015 22:06:44 +0000 (23:06 +0100)]
avr32: use generic gd->start_addr_sp

Before avr32 had an extra storage for stack end to have a nice stack printout
on exception. Remove this extra storage and use generic gd->start_addr_sp
instead.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoavr32: convert to dram_init()
Andreas Bießmann [Fri, 6 Feb 2015 22:06:43 +0000 (23:06 +0100)]
avr32: convert to dram_init()

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoavr32: rename mmu.h definitions
Andreas Bießmann [Fri, 6 Feb 2015 22:06:42 +0000 (23:06 +0100)]
avr32: rename mmu.h definitions

Prefix mmu.h PAGE_xxx definitions with MMU_ in order to prevent a naming
conflict with other definitions.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoavr32: factor out cpu_mmc_init()
Andreas Bießmann [Fri, 6 Feb 2015 22:06:41 +0000 (23:06 +0100)]
avr32: factor out cpu_mmc_init()

cpu_mmc_init() is required by the init sequence to have a working MMC interface
on avr32. This will not be included in the binary if we omit the avr32 board.c
when building the generic board.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoavr32: rename cpu_init() -> arch_cpu_init()
Andreas Bießmann [Fri, 6 Feb 2015 22:06:40 +0000 (23:06 +0100)]
avr32: rename cpu_init() -> arch_cpu_init()

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoavr32: use dlmalloc for DMA buffers
Andreas Bießmann [Fri, 6 Feb 2015 22:06:39 +0000 (23:06 +0100)]
avr32: use dlmalloc for DMA buffers

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoPrepare v2015.04-rc2 v2015.04-rc2
Tom Rini [Tue, 17 Feb 2015 16:07:19 +0000 (11:07 -0500)]
Prepare v2015.04-rc2

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoRevert "sunxi: configs/sunxi-common.h: Enable CONFIG_CMD_PART"
Tom Rini [Mon, 16 Feb 2015 20:48:49 +0000 (15:48 -0500)]
Revert "sunxi: configs/sunxi-common.h: Enable CONFIG_CMD_PART"

This reverts commit bd2a4888b123713adec271d6c8040ca9f609aa2f which was
an older version of af21f2f which is what we actually want in.

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoadd example for file on VFAT filesystem usage
Waldemar Brodkorb [Mon, 16 Feb 2015 04:59:09 +0000 (05:59 +0100)]
add example for file on VFAT filesystem usage

For example on a raspberry pi the u-boot environment can be
saved in a file on the first VFAT partition.
This example illustrates how to use it with fw_printenv/fw_setenv.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
9 years agoMerge branch 'master' of http://git.denx.de/u-boot-sunxi
Tom Rini [Mon, 16 Feb 2015 19:55:50 +0000 (14:55 -0500)]
Merge branch 'master' of http://git.denx.de/u-boot-sunxi

9 years agoARM: lpc3250: config: add generic board support
Vladimir Zapolskiy [Wed, 11 Feb 2015 22:24:20 +0000 (00:24 +0200)]
ARM: lpc3250: config: add generic board support

The only LPC3250 board works fine with enabled generic board support,
add CONFIG_SYS_GENERIC_BOARD right into the arch config header.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
9 years agoKM/IVM: remove ivm_read_eeprom(void)
Valentin Longchamp [Tue, 10 Feb 2015 16:10:18 +0000 (17:10 +0100)]
KM/IVM: remove ivm_read_eeprom(void)

This is not used anymore since the procedure was split into a simple
read function and a later alaysis.

The ivm_read_eeprom name is now used for the previous
ivm_simple_read_eeprom function.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years ago82xx/km82xx: read the IVM eeprom earlier
Valentin Longchamp [Tue, 10 Feb 2015 16:10:17 +0000 (17:10 +0100)]
82xx/km82xx: read the IVM eeprom earlier

This allows to define the ethaddr env variable according to the the IVM
content by reading the IVM in misc_init_r.

Later, when HUSH is available the content read earlier is analyzed to
populate some non env variables.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years ago83xx/km83xx: read the IVM eeprom earlier
Valentin Longchamp [Tue, 10 Feb 2015 16:10:16 +0000 (17:10 +0100)]
83xx/km83xx: read the IVM eeprom earlier

This allows to define the ethaddr env variable according to the the IVM
content by reading the IVM in misc_init_r.

Later, when HUSH is available the content read earlier is analyzed to
populate some non env variables.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years ago85xx/kmp204x: read the IVM eeprom earlier
Valentin Longchamp [Tue, 10 Feb 2015 16:10:15 +0000 (17:10 +0100)]
85xx/kmp204x: read the IVM eeprom earlier

This allows to define the ethaddr env variable according to the the IVM
content by reading the IVM in misc_init_r.

Later, when HUSH is available the content read earlier is analyzed to
populate some non env variables.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agokirkwood/km_arm: read the IVM eeprom earlier
Valentin Longchamp [Tue, 10 Feb 2015 16:10:14 +0000 (17:10 +0100)]
kirkwood/km_arm: read the IVM eeprom earlier

This allows to define the ethaddr env variable according to the the IVM
content by reading the IVM in misc_init_r.

Later, when HUSH is available the content read earlier is analyzed to
populate some non env variables.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agoKM/IVM: split the IVM reading and parsing in 2 parts
Valentin Longchamp [Tue, 10 Feb 2015 16:10:13 +0000 (17:10 +0100)]
KM/IVM: split the IVM reading and parsing in 2 parts

This allows to first read the IVM content (earlier in the boot sequence)
and define the ethaddr env variable thanks to the ivm_read_eepromi().
Later, the IVM content can be parsed and used to define some hush
variables, when the hush subsystem is available thanks to
ivm_analyze_eeprom().

To avoid the HW read to happen twice, the buffer passed to
ivm_read_eeprom() has to be reused by ivm_analyze_eeprom (and thus
allocated before calling ivm_read_eeprom()).

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agospl, spl_nor: fix compiler warning
Heiko Schocher [Fri, 6 Feb 2015 08:31:36 +0000 (09:31 +0100)]
spl, spl_nor: fix compiler warning

executing "tools/buildman/buildman mpc5xx" drops this warning:

common/spl/spl_nor.c: In function 'spl_nor_load_image':
common/spl/spl_nor.c:26:10: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

fix this.

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years ago.travis.yml: remove 824x builds
Heiko Schocher [Tue, 3 Feb 2015 09:34:10 +0000 (10:34 +0100)]
.travis.yml: remove 824x builds

remove powerpc 824x build, as this architecture not longer
exists.

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agoPCI: add 64-bit prefetchable memory support
David Feng [Mon, 2 Feb 2015 08:53:13 +0000 (16:53 +0800)]
PCI: add 64-bit prefetchable memory support

PCI specification allow prefetchable memory to be 32-bit or 64-bit.
PCI express specification states that all memmory bars for prefetchable
memory must be implemented as 64-bit. They all require that 64 bit
prefetchble memory are suported especially when u-boot is ported to
more and more 64bit processors.

Signed-off-by: David Feng <fenghua@phytium.com.cn>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agosunxi: Support the FEL boot mode in the regular u-boot build
Siarhei Siamashka [Mon, 16 Feb 2015 08:23:59 +0000 (10:23 +0200)]
sunxi: Support the FEL boot mode in the regular u-boot build

So that the CONFIG_SPL_FEL option is not needed anymore. And the regular
SPL binary, generated by the default u-boot build, is now also bootable
over USB in the FEL mode. The SPL still can boot from the SD card too.

A bunch of system registers need to be saved/restored in order to ensure
that the IRQ handler still works in the BROM FEL code after getting
control back from the SPL. This is done in the sunxi code instead of
abusing ifdefs in 'start.S'.

The decision whether to load the main u-boot binary from the SD card or
return to the FEL code in the BROM is done at runtime.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
[hdegoede@redhat.com: Since we now restore various regs before returning to
 the FEL BROM code we can drop the sunxi specific #ifdefs in start.S]
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: Normalise FEL support
Simon Glass [Sat, 7 Feb 2015 17:47:30 +0000 (10:47 -0700)]
sunxi: Normalise FEL support

Make sunxi's FEL code fit with the normal U-Boot boot sequence instead of
creating its own. There are some #ifdefs required in start.S. Future work
will hopefully remove these.

This series is available at u-boot-dm, branch sunxi-working.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoarm: spl: Provide for a board-specific loader
Simon Glass [Sat, 7 Feb 2015 17:47:29 +0000 (10:47 -0700)]
arm: spl: Provide for a board-specific loader

Some boards have a special way of loading U-Boot that does not fit with
the existing SPL code. For example sunxi uses an 'FEL' mode where U-Boot
is loaded over USB. Add a CONFIG option and boot mode for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoarm: Allow lr to be saved by board code
Simon Glass [Sat, 7 Feb 2015 17:47:28 +0000 (10:47 -0700)]
arm: Allow lr to be saved by board code

The link register value can be required on some boards (e.g. FEL mode on
sunxi) so use a branch instruction to jump to save_boot_params() instead
of a branch link.

This requires a branch back to save_boot_params_ret so adjust the users
to deal with this. For exynos just drop the function since it doesn't
do anything.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agotools: mksunxiboot: Fix problems on big endian systems
Siarhei Siamashka [Sun, 8 Feb 2015 05:05:27 +0000 (07:05 +0200)]
tools: mksunxiboot: Fix problems on big endian systems

Now my PS3 can be also used to build u-boot for sunxi devices.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: otg: Fix peripheral mode
Hans de Goede [Wed, 11 Feb 2015 08:05:18 +0000 (09:05 +0100)]
sunxi: otg: Fix peripheral mode

Peripheral mode needs us to signal vusb high to the phy for it to work,
just like the host mode does.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: dram: Un-inline dram helper functions
Hans de Goede [Wed, 4 Feb 2015 11:14:56 +0000 (12:14 +0100)]
sunxi: dram: Un-inline dram helper functions

Move the dram helper functions to a separate C file, rather then having them
as inline helpers in dram.h. This saves 144 bytes in the .text segment for
sun6i builds.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agosunxi: video: Dynamically reserve framebuffer memory
Hans de Goede [Mon, 2 Feb 2015 17:00:53 +0000 (18:00 +0100)]
sunxi: video: Dynamically reserve framebuffer memory

Only use CONFIG_SUNXI_MAX_FB_SIZE to reserve memory at the top when relocating
u-boot, and calculate the actual amount of memory necessary when setting up
the video-mode and use only that, freeing up some additional memory for use
by the kernel.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: video: Do not use CONFIG_SYS_MEM_TOP_HIDE for the framebuffer
Hans de Goede [Mon, 2 Feb 2015 16:13:29 +0000 (17:13 +0100)]
sunxi: video: Do not use CONFIG_SYS_MEM_TOP_HIDE for the framebuffer

Do not use CONFIG_SYS_MEM_TOP_HIDE for the framebuffer, instead override
board_get_usable_ram_top to make sure that u-boot is not relocated into the
area where we want to use the framebuffer, and patch the devicetree from
sunxi_simplefb_setup() to tell the kernel to not touch the framebuffer.

This makes u-boot properly see the framebuffer as dram, and initalize the
level 2 cache for it, fixing the very slow cfb scrolling problem.

As an added bonus this stops us from reserving the framebuffer when simplefb
is not used because an older kernel is booted, or hdp is used and no hdmi
cable was plugged in, freeing up the memory for kernel use in these cases.

Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: MAINTAINERS: drop no longer existing felconfig-s from MAINTAINERS
Hans de Goede [Tue, 3 Feb 2015 07:45:33 +0000 (08:45 +0100)]
sunxi: MAINTAINERS: drop no longer existing felconfig-s from MAINTAINERS

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: Ampe A76 support
Paul Kocialkowski [Mon, 2 Feb 2015 22:04:08 +0000 (23:04 +0100)]
sunxi: Ampe A76 support

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoconfig_distro_bootcmd.h: Enable CONFIG_CMD_PART
Hans de Goede [Sat, 7 Feb 2015 12:38:19 +0000 (13:38 +0100)]
config_distro_bootcmd.h: Enable CONFIG_CMD_PART

The recent changes to config_distro_bootcmd.h require CONFIG_CMD_PART to be
defined, as the default bootcmd now uses the "part" command.

This fixes sunxi boards not booting with v2015.04-rc1.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
9 years agoimage: Convert to use fdt_for_each_subnode macro
Axel Lin [Sat, 7 Feb 2015 01:12:39 +0000 (09:12 +0800)]
image: Convert to use fdt_for_each_subnode macro

Use fdt_for_each_subnode macro to simplify the code a bit.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agotools/imagetool: remove linker script
Andreas Bießmann [Sun, 8 Feb 2015 23:06:10 +0000 (00:06 +0100)]
tools/imagetool: remove linker script

Commit a93648d197df48fa46dd55f925ff70468bd81c71 introduced linker generated
lists for imagetool which is the base for some host tools (mkimage, dumpimage,
et al.).  Unfortunately some host tool chains do not support the used type of
linker scripts. Therefore this commit broke these host-tools for them, namely
FreeBSD and Darwin (OS/X).

This commit tries to fix this. In order to have a clean distinction between host
and embedded code space we need to introduce our own linker generated list
instead of re-using the available linker_lists.h provided functionality.  So we
copy the implementation used in linux kernel script/mod/file2alias.c which has
the very same problem (cause it is a host tool). This code also comes with an
abstraction for Mach-O binary format used in Darwin systems.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
9 years agonet: keystone_net: move serdes setup to initialization function
Vitaly Andrianov [Wed, 11 Feb 2015 19:05:41 +0000 (14:05 -0500)]
net: keystone_net: move serdes setup to initialization function

On Keystone2 devices serdes must be initialized before accessing MDIO bus.
This commit moves the keystone2_net_serdes_setup() from keystone2_eth_open
to keystone2_emac_initialize to meet that requirement.

This also eliminates unnecessary serdes initializatin every time when the
keystone2_eth_open is being called.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Tested-by: Nishanth Menon <nm@ti.com>
9 years agokeystone2: ddr3: eliminate using global ddr3_size variable
Vitaly Andrianov [Wed, 11 Feb 2015 19:07:58 +0000 (14:07 -0500)]
keystone2: ddr3: eliminate using global ddr3_size variable

KS2 ddr3 initialization uses ddr3_size global variable before u-boot
relocation. Even if the variable is not being used after relocation,
writing to it corrupts relocation table.

This patch removes the global ddr3_size variable and uses local one
instead.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
9 years agoclock_am43xx:Set the MAC clock to /5 for OPP100
Steve Kipisz [Wed, 11 Feb 2015 23:54:28 +0000 (18:54 -0500)]
clock_am43xx:Set the MAC clock to /5 for OPP100

When EMAC is in the boot order, the boot ROM sets OPP50 and the
MAC clock is set to /2. SPL needs to change it to /5 for Ethernet
to generate the correct txclk. This patch sets it correctly.

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
9 years agoARM: DRA7-evm: DDR3: Update leveling values
Lokesh Vutla [Mon, 16 Feb 2015 04:45:57 +0000 (10:15 +0530)]
ARM: DRA7-evm: DDR3: Update leveling values

Update the software leveling parameters.
This fixes the random crash seen on DRA7-evm.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoARM: DRA7: EMIF: Update SDRAM_REF_CTRL register value
Lokesh Vutla [Mon, 16 Feb 2015 04:45:56 +0000 (10:15 +0530)]
ARM: DRA7: EMIF: Update SDRAM_REF_CTRL register value

The value in SDRAM_REF_CTRL controls the delay time between
the initial rising edge of DDR_RESETn to rising edge of DDR_CKE
(JEDEC specs this as 500us). In order to achieve this, SDRAM_REF_CTRL
should be written with a value corresponding to 500us delay before
starting DDR initialization sequence, and configure proper
value at the end of sequence.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoARM: DRA72x: DDR3: Fix EMIF timings for 666MHz clock
Angela Stegmaier [Mon, 16 Feb 2015 04:45:55 +0000 (10:15 +0530)]
ARM: DRA72x: DDR3: Fix EMIF timings for 666MHz clock

DDR3 timing and latency paramenters were not configured
correctly for 666MHz. Fixing the timing and latency values
according to Data sheet.
This fixes the random crashes seen on DRA72-evm.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agomtd, omap: fix case NAND_OMAP_GPMC_PREFETCH not defined
Egli, Samuel [Fri, 13 Feb 2015 14:47:10 +0000 (15:47 +0100)]
mtd, omap: fix case NAND_OMAP_GPMC_PREFETCH not defined

The patch c316f577b4b72d1a1aeb559e9b3fad20808f1ffd breaks
siemens boards because prefetch mode is not enabled.
I assume it breaks other boards as well that don't use
prefetch.

This patch sets read_buf to nand_read_buf if
NAND_OMAP_GPMC_PREFETCH is not defined.

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
CC: Daniel Mack <zonque@gmail.com>
CC: Guido Martínez <guido@vanguardiasur.com.ar>
CC: Tom Rini <trini@ti.com>
CC: Heiko Schocher <hs@denx.de>
9 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Mon, 16 Feb 2015 13:44:03 +0000 (08:44 -0500)]
Merge git://git.denx.de/u-boot-marvell

9 years agoMerge branch 'sandbox' of git://git.denx.de/u-boot-x86
Tom Rini [Mon, 16 Feb 2015 13:37:22 +0000 (08:37 -0500)]
Merge branch 'sandbox' of git://git.denx.de/u-boot-x86

9 years agolsxl: add a README file
Michael Walle [Fri, 13 Feb 2015 17:45:57 +0000 (18:45 +0100)]
lsxl: add a README file

The README describes the recovery method which can be used if the NAS box
is not reachable anymore. Addionally, it describes the different boot
scripts.

Signed-off-by: Michael Walle <michael@walle.cc>
9 years agosandbox: Adjust the order of the NO_SDL check
Simon Glass [Wed, 11 Feb 2015 01:52:35 +0000 (18:52 -0700)]
sandbox: Adjust the order of the NO_SDL check

An option is provided to avoid using SDL in U-Boot sandbox (and drop
support for the LCD). However the check in the Makefile is too late
and warnings are printed even if NO_SDL=y is given.

Adjust the order to avoid this warning.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agosandbox: Return '-c command' exit value as sandbox exit code
Joe Hershberger [Fri, 6 Feb 2015 21:37:31 +0000 (15:37 -0600)]
sandbox: Return '-c command' exit value as sandbox exit code

When a command is passed into sandbox using the '-c' argument the
command is run directly. This is most helpful when running tests (such
as test-dm.sh). Previously the exit code was an unused enum. Change it
to be the actual return code from the command so that the script calling
sandbox can know if the command succeeded (tests passed).  Also remove
the now completely unused "exit_state" in sandbox.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: allow multiple toolchains in a single path
Albert ARIBAUD [Sat, 31 Jan 2015 23:12:44 +0000 (00:12 +0100)]
buildman: allow multiple toolchains in a single path

When buildman scans a toolchain path, it stops at the
first toolchain found. However, a single path can contains
several toolchains, each with its own prefix.

This patch lets buildman scan all toolchains in the path.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agopatman: Read in the git-mailrc alias file
Simon Glass [Thu, 29 Jan 2015 18:35:17 +0000 (11:35 -0700)]
patman: Read in the git-mailrc alias file

We should read this file to obtain a set of aliases. This reduces the need
to create them in the ~/.patman file.

This feature did exist in some version of patman, and is mentioned in the
help but it did not find its way upstream.

Reported-by: Graeme Russ <gruss@tss-engineering.com>
Signed-off-by: Simon Glass <sjg@chromium.org>