]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
8 years agoarm: Add a prototype for save_boot_params_ret()
Simon Glass [Mon, 4 May 2015 17:31:03 +0000 (11:31 -0600)]
arm: Add a prototype for save_boot_params_ret()

It is convenient for some boards to implement save_boot_params() in C rather
than assembler. Provide a way to return in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agoarm: Include the .got section in the binary
Simon Glass [Mon, 4 May 2015 17:31:02 +0000 (11:31 -0600)]
arm: Include the .got section in the binary

Commit 47ed5dd0 dropped the .got section from U-Boot binaries. This is needed
for some relocations, and causes failures if missing. Add it back.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodm: gpio: Fix comment typo in GPIOD_IS_IN
Simon Glass [Mon, 4 May 2015 17:31:01 +0000 (11:31 -0600)]
dm: gpio: Fix comment typo in GPIOD_IS_IN

This should say 'in', not 'out'.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agotpm: Rename Infineon TPM to slb9645tt
Simon Glass [Mon, 4 May 2015 17:31:00 +0000 (11:31 -0600)]
tpm: Rename Infineon TPM to slb9645tt

This name is used in Linux, so use it in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agotpm: Support using driver model with I2C
Simon Glass [Mon, 4 May 2015 17:30:59 +0000 (11:30 -0600)]
tpm: Support using driver model with I2C

As a first step towards converting the TPM system to driver model, allow it
to work with CONFIG_DM_I2C.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodm: i2c: Add a function to find out the chip offset length
Simon Glass [Mon, 4 May 2015 17:30:58 +0000 (11:30 -0600)]
dm: i2c: Add a function to find out the chip offset length

We can currently set this but there is no API function to get it. Add one.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Heiko Schocher<hs@denx.de>
8 years agodm: i2c: Implement 'i2c bus' command for driver model
Simon Glass [Mon, 4 May 2015 17:30:57 +0000 (11:30 -0600)]
dm: i2c: Implement 'i2c bus' command for driver model

This command was missed in the conversion. Add it back for driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Heiko Schocher <hs@denx.de>
8 years agobootstage: Add IDs for SPI flash reading and decompression
Simon Glass [Mon, 4 May 2015 17:30:56 +0000 (11:30 -0600)]
bootstage: Add IDs for SPI flash reading and decompression

We maintain an accumulator for time spent reading from SPI flash, since
this can be significant on some platforms. Also add one for decompression
time.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agousb: add device connection/disconnection detection
Vincent Palatin [Mon, 4 May 2015 17:30:54 +0000 (11:30 -0600)]
usb: add device connection/disconnection detection

Provide a function to detect USB device insertion/removal in order to
avoid having to do USB enumeration in a tight loop when trying to detect
peripheral hotplugging.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agosunxi: ohci: Add ohci usb host controller support
Hans de Goede [Sun, 10 May 2015 12:10:27 +0000 (14:10 +0200)]
sunxi: ohci: Add ohci usb host controller support

This commit adds support for the OHCI companion controller, which makes
usb-1 devices directly plugged into to usb root port work.

Note for now this switches usb-keyboard support for sunxi back from int-queue
support to the old interrupt polling method. Adding int-queue support to the
ohci code and switching back to int-queue support is in the works.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: ehci: Convert to the driver-model
Hans de Goede [Sun, 10 May 2015 12:10:26 +0000 (14:10 +0200)]
sunxi: ehci: Convert to the driver-model

Convert sunxi-boards which use the sunxi-ehci code to the driver-model.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agousb: ohci: Add dm support
Hans de Goede [Sun, 10 May 2015 12:10:25 +0000 (14:10 +0200)]
usb: ohci: Add dm support

Add driver-model support to the ohci code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Marek Vasut <marex@denx.de>
8 years agousb: ohci: Skip unnecessary mdelay(1) calls in various places
Hans de Goede [Sun, 10 May 2015 12:10:24 +0000 (14:10 +0200)]
usb: ohci: Skip unnecessary mdelay(1) calls in various places

For some reason the ohci code is full with:

 #ifdef DEBUG
pkt_print(...)
 #else
mdelay(1);
 #endif

AFAICT there is no reason for the mdelay(1) calls. This commit disables them
when building the ohci code for new driver-model using boards. It leaves
the mdelay(1) calls in place when building for older boards, so as to avoid
causing any regressions there.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agousb: ohci: Remove unnecessary delays from hc_start and power power-on paths
Hans de Goede [Sun, 10 May 2015 12:10:23 +0000 (14:10 +0200)]
usb: ohci: Remove unnecessary delays from hc_start and power power-on paths

The usb spec says that we must wait a minimum amount of time after port
power on (exact time is in the hub descriptor), this is something which
we must not only do for root ports but also for external hub ports, which
is why the common usb_hub code already waits a full second after powering
up ports. Having a separate wait for just the root hub in the ohci-hcd
code only leads to doing the waiting twice for the root ports, so drop the
wait from the ohci-hcd code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agousb: ohci: Do not resubmit and leak urbs for interrupt packets
Hans de Goede [Sun, 10 May 2015 12:10:22 +0000 (14:10 +0200)]
usb: ohci: Do not resubmit and leak urbs for interrupt packets

The u-boot usb code uses polling for all endpoints, including interrupt
endpoints, so urbs should never be automatically resubmitted.

This also fixes a leak of the urb, as submit_int_msg() did not check if
an already re-submitted urb exists before creating a new one.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agodm: usb: Do not scan companion buses if no devices where handed over
Hans de Goede [Sun, 10 May 2015 12:10:21 +0000 (14:10 +0200)]
dm: usb: Do not scan companion buses if no devices where handed over

USB scanning is slow, and there is no need to scan the companion buses
if no usb devices where handed over to the companinon controllers by any
of the main controllers.

This saves e.g. 2 seconds when booting a A10 OLinuxIno Lime with no USB-1
devices plugged into the root usb ports.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: usb: Add support for companion controllers
Hans de Goede [Sun, 10 May 2015 12:10:20 +0000 (14:10 +0200)]
dm: usb: Add support for companion controllers

USB companion controllers must be scanned after the main controller has
been scanned, so that any devices which the main controller which to hand
over to the companion have actually been handed over before we scan the
companion.

As there are no guarantees that this will magically happen in the right
order, split the scanning of the buses in 2 phases, first main controllers,
and then companion controllers.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: usb: Move printing of usb scan status to usb_scan_bus()
Hans de Goede [Sun, 10 May 2015 12:10:19 +0000 (14:10 +0200)]
dm: usb: Move printing of usb scan status to usb_scan_bus()

Move printing of usb scan status to usb_scan_bus().

This is a preparation patch for adding companion controller support to the
usb uclass.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: usb: Add support for interrupt queues to the dm usb code
Hans de Goede [Sun, 10 May 2015 12:10:18 +0000 (14:10 +0200)]
dm: usb: Add support for interrupt queues to the dm usb code

Interrupt endpoints typically are polled for a long time by the usb
controller before they return anything, so calls to submit_int_msg() can
take a long time to complete this.

To avoid this the u-boot code has the an interrupt queue mechanism / API,
add support for this to the driver-model usb code and implement it for the
dm ehci code.

See the added doc comments for more details.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: usb: Prefix ehci interrupt-queue functions with _ehci_
Hans de Goede [Mon, 11 May 2015 18:43:52 +0000 (20:43 +0200)]
dm: usb: Prefix ehci interrupt-queue functions with _ehci_

This is a preparation patch for adding interrupt-queue support to the
ehci dm code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agousb: Stop reset procedure when a dev is handed over to a companion hcd
Hans de Goede [Sun, 10 May 2015 12:10:16 +0000 (14:10 +0200)]
usb: Stop reset procedure when a dev is handed over to a companion hcd

Short circuit the retry loop in legacy_hub_port_reset() by returning an
error from usb_control_msg() when a device was handed over to a companion
by the ehci code. This avoids trying to reset low / fullspeed devices 5
times needlessly. Also do not print an error when a device has been handed
over.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agousb: legacy_hub_port_reset() check and propagate usb_set_port_feature() errors
Hans de Goede [Sun, 10 May 2015 12:10:15 +0000 (14:10 +0200)]
usb: legacy_hub_port_reset() check and propagate usb_set_port_feature() errors

Actually check for usb_set_port_feature() errors and propagate these if they
happen.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agousb: usb_control_msg() propagate controller error code
Hans de Goede [Sun, 10 May 2015 12:10:14 +0000 (14:10 +0200)]
usb: usb_control_msg() propagate controller error code

Propagate the error returned by submit_control_msg() rather then always
returning -EIO when the hcd code indicates an error.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agousb: Fix handover of full-speed devices from ehci to companion
Hans de Goede [Sun, 10 May 2015 12:10:13 +0000 (14:10 +0200)]
usb: Fix handover of full-speed devices from ehci to companion

When after a reset the port status connection bit is still set and the enable
bit is not then we're dealing with a full-speed device and should hand it over
to the companion controller.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agoarch/arm/lib/bootm-fdt.c: Guard the include of <asm/armv7.h>
Tom Rini [Thu, 14 May 2015 15:07:03 +0000 (11:07 -0400)]
arch/arm/lib/bootm-fdt.c: Guard the include of <asm/armv7.h>

With d6b72da0 we started including this file unconditionally.  This
isn't allowed in a file that we also use on armv8.  This will get
cleaned up a bit better once we really start using these same features
(and have similar fdt updates needed) on armv8.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoUse map_sysmem when accessing memory in setexpr
Joe Hershberger [Mon, 11 May 2015 18:53:13 +0000 (13:53 -0500)]
Use map_sysmem when accessing memory in setexpr

The setexpr command used to segfault when accessing memory in sandbox.
The pointer accesses should be mapped.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agospl: Correct address in spl_relocate_stack_gd()
Simon Glass [Thu, 14 May 2015 03:15:21 +0000 (21:15 -0600)]
spl: Correct address in spl_relocate_stack_gd()

During the Kconfig conversion one of the changes was missed.
CONFIG_SPL_STACK_R should be CONFIG_SPL_STACK_R_ADDR since we want the
address.

Reported-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoARM: tegra: move NVIDIA common files to arch/arm/mach-tegra
Masahiro Yamada [Mon, 13 Apr 2015 01:51:14 +0000 (10:51 +0900)]
ARM: tegra: move NVIDIA common files to arch/arm/mach-tegra

All the Tegra boards borrow the files from board/nvidia/common/
directory, i.e., board/nvidia/common/* are not vendor-common files,
but SoC-common files.

Move NVIDIA common files to arch/arm/mach-tegra/ to clean up
Makefiles.

As arch/arm/mach-tegra/board.c already exists, this commit renames
board/nvidia/common/board.c to arch/arm/mach-tegra/board2.c,
expecting they will be consolidated as a second step.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agojetson-tk1: Add PSCI configuration options and reserve secure code
Ian Campbell [Tue, 21 Apr 2015 05:18:40 +0000 (07:18 +0200)]
jetson-tk1: Add PSCI configuration options and reserve secure code

The secure world code is relocated to the MB just below the top of 4G, we
reserve it in the FDT (by setting CONFIG_ARMV7_SECURE_RESERVE_SIZE) but it is
not protected in h/w.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: Boot in non-secure mode by default
Jan Kiszka [Tue, 21 Apr 2015 05:18:39 +0000 (07:18 +0200)]
tegra: Boot in non-secure mode by default

Upstream Linux is broken with default configs when PSCI, thus non-secure
mode is enabled. So the user should explicitly enable this mode, e.g.
when she disabled CONFIG_CPU_IDLE in Linux (in which case it's safe to
use). We can revert this workaround once Linux got fixed.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: Enable SMMU when going non-secure
Thierry Reding [Tue, 21 Apr 2015 05:18:38 +0000 (07:18 +0200)]
ARM: tegra: Enable SMMU when going non-secure

Make sure to enable the SMMU when booting the kernel in non-secure mode.
This is necessary because some of the SMMU registers are restricted to
TrustZone-secured requestors, hence the kernel wouldn't be able to turn
the SMMU on. At the same time, enable translation for all memory clients
for the same reasons. The kernel will still be able to control SMMU IOVA
translation using the per-SWGROUP enable bits.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: Set CNTFRQ for secondary CPUs
Jan Kiszka [Tue, 21 Apr 2015 05:18:37 +0000 (07:18 +0200)]
tegra: Set CNTFRQ for secondary CPUs

We only set CNTFRQ in arch_timer_init for the boot CPU. But this has to
happen for all cores.

Fixing this resolves problems of KVM with emulating the generic
timer/counter.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra124: Reserve secure RAM using MC_SECURITY_CFG{0, 1}_0
Ian Campbell [Tue, 21 Apr 2015 05:18:36 +0000 (07:18 +0200)]
tegra124: Reserve secure RAM using MC_SECURITY_CFG{0, 1}_0

These registers can be used to prevent non-secure world from accessing a
megabyte aligned region of RAM, use them to protect the u-boot secure monitor
code.

At first I tried to do this from s_init(), however this inexplicably causes
u-boot's networking (e.g. DHCP) to fail, while networking under Linux was fine.

So instead I have added a new weak arch function protect_secure_section()
called from relocate_secure_section() and reserved the region there. This is
better overall since it defers the reservation until after the sec vs. non-sec
decision (which can be influenced by an envvar) has been made when booting the
os.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
[Jan: tiny style adjustment]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra124: Add PSCI support for Tegra124
Jan Kiszka [Tue, 21 Apr 2015 05:18:35 +0000 (07:18 +0200)]
tegra124: Add PSCI support for Tegra124

This is based on Thierry Reding's work and uses Ian Campell's
preparatory patches. It comes with full support for CPU_ON/OFF PSCI
services. The algorithm used in this version for turning CPUs on and
off was proposed by Peter De Schrijver and Thierry Reding in
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/210881. It
consists of first enabling CPU1..3 via the PMC, just to powergate them
again with the help of the Flow Controller. Once the Flow Controller is
in place, we can leave the PMC alone while processing CPU_ON and CPU_OFF
PSCI requests.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: Add board-specific initialization hook for PSCI
Jan Kiszka [Tue, 21 Apr 2015 05:18:34 +0000 (07:18 +0200)]
ARM: Add board-specific initialization hook for PSCI

Tegra boards will have to initialize power management for the PSCI
support this way.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: Make tegra_powergate_power_on public
Jan Kiszka [Tue, 21 Apr 2015 05:18:33 +0000 (07:18 +0200)]
tegra: Make tegra_powergate_power_on public

Will be used for unpowergating CPUs.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agovirt-dt: Allow reservation of secure region when in a RAM carveout
Jan Kiszka [Tue, 21 Apr 2015 05:18:32 +0000 (07:18 +0200)]
virt-dt: Allow reservation of secure region when in a RAM carveout

In this case the secure code lives in RAM, and hence the memory node in
the device tree needs to be adjusted. This avoids that the OS will map
and possibly access the reservation.

Add support for setting CONFIG_ARMV7_SECURE_RESERVE_SIZE to carve out
such a region. We only support cutting off memory from the beginning or
the end of a RAM bank as we do not want to increase their number (which
would happen if punching a hole) for simplicity reasons

This will be used in a subsequent patch for Jetson-TK1.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra124: Add more registers to struct mc_ctlr
Ian Campbell [Tue, 21 Apr 2015 05:18:31 +0000 (07:18 +0200)]
tegra124: Add more registers to struct mc_ctlr

I will need mc_security_cfg0/1 in a future patch and I added the rest while
debugging, so thought I might as well commit them.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: Put target PC for PSCI CPU_ON on per-CPU stack
Jan Kiszka [Tue, 21 Apr 2015 05:18:30 +0000 (07:18 +0200)]
ARM: Put target PC for PSCI CPU_ON on per-CPU stack

Use a per-CPU variable for saving the target PC during CPU_ON
operations. This allows us to run this service independently on targets
that have more than 2 cores and also core-local power control.

CC: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: Factor out reusable psci_get_cpu_stack_top
Jan Kiszka [Tue, 21 Apr 2015 05:18:29 +0000 (07:18 +0200)]
ARM: Factor out reusable psci_get_cpu_stack_top

This algorithm will be useful on Tegra as well, plus we will need it for
making _psci_target_pc per-CPU.

CC: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: Factor out reusable psci_cpu_entry
Jan Kiszka [Tue, 21 Apr 2015 05:18:28 +0000 (07:18 +0200)]
ARM: Factor out reusable psci_cpu_entry

_sunxi_cpu_entry can be converted completely into a reusable
psci_cpu_entry. Tegra124 will use it as well.

As with psci_disable_smp, also the enabling is designed to be overloaded
in cased SMP is not controlled via ACTLR.

CC: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: Factor out reusable psci_cpu_off_common
Jan Kiszka [Tue, 21 Apr 2015 05:18:27 +0000 (07:18 +0200)]
ARM: Factor out reusable psci_cpu_off_common

Move parts of sunxi's psci_cpu_off into psci_cpu_off_common, namely
cache disabling and flushing, clrex and the disabling of SMP for the
dying CPU. These steps are apparently generic for ARMv7 and will be
reused for Tegra124 support.

As the way of disabled SMP is not architectural, though commonly done
via ACLTR, the related function can be overloaded.

CC: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: Factor out common psci_get_cpu_id
Jan Kiszka [Tue, 21 Apr 2015 05:18:26 +0000 (07:18 +0200)]
ARM: Factor out common psci_get_cpu_id

Will be required for obtaining the ID of the current CPU in shared PSCI
functions. The default implementation requires a dense ID space and only
supports a single cluster. Therefore, the functions can be overloaded in
cases where these assumptions do not hold.

CC: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: Clean up CONFIG_ARMV7_NONSEC/VIRT/PSCI conditions
Jan Kiszka [Tue, 21 Apr 2015 05:18:24 +0000 (07:18 +0200)]
ARM: Clean up CONFIG_ARMV7_NONSEC/VIRT/PSCI conditions

CONFIG_ARMV7_VIRT depends on CONFIG_ARMV7_NONSEC, thus doesn't need to
be taken into account additionally. CONFIG_ARMV7_PSCI is only set on
boards that support CONFIG_ARMV7_NONSEC, and it only works on those.

CC: Tang Yuantian <Yuantian.Tang@freescale.com>
CC: York Sun <yorksun@freescale.com>
CC: Steve Rae <srae@broadcom.com>
CC: Andre Przywara <andre.przywara@linaro.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Tested-by: Alison Wang <alison.wang@freescale.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: enable STDIO deregistration
Stephen Warren [Tue, 14 Apr 2015 14:41:14 +0000 (08:41 -0600)]
ARM: tegra: enable STDIO deregistration

At the very least when USB keyboard support is enabled, we need to enable
CONFIG_SYS_STDIO_DEREGISTER, so the "usb reset" is able to re-scan USB
ports and find new devices. Enable it everywhere per request from Simon
Glass.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: CONFIG_{SYS_, }LOAD{_, }ADDR rationalization
Stephen Warren [Wed, 1 Apr 2015 21:40:53 +0000 (15:40 -0600)]
ARM: tegra: CONFIG_{SYS_, }LOAD{_, }ADDR rationalization

As best I can tell, CONFIG_SYS_LOAD_ADDR and CONFIG_LOADADDR/$loadaddr
serve essentially the same purpose. Roughly, if a command takes a load
address, then CONFIG_SYS_LOAD_ADDR or $loadaddr (or both) are the default
if the command-line does not specify the address. Different U-Boot
commands are inconsistent re: which of the two default values they use.
As such, set the two to the same value, and move the logic that does this
 into tegra-common-post.h so it's not duplicated. A number of other non-
Tegra boards do this too.

The values chosen for these macros are no longer consistent with anything
in MEM_LAYOUT_ENV_SETTINGS. Regain consistency by setting $kernel_addr_r
to CONFIG_LOADADDR. Older scripts tend to use $loadaddr for the default
kernel load address, whereas newer scripts and features tend to use
$kernel_addr_r, along with other variables for other purposes such as
DTBs and initrds. Hence, it's logical they should share the same value.

I had originally thought to make the $kernel_addr_r and CONFIG_LOADADDR
have different values. This would guarantee no interference if a script
used the two variables for different purposes. However, that scenario is
unlikely given the semantic meaning associated with the two variables.
The lowest available value is 0x90200000; see comments for
MEM_LAYOUT_ENV_SETTINGS in tegra30-common-post.h for details. However,
that value would be problematic for a script that loaded a raw zImage to
$loadaddr, since it's more than 128MB beyond the start of SDRAM, which
would interfere with the kernel's CONFIG_AUTO_ZRELADDR. So, let's not do
that.

The only potential fallout I could foresee from this patch is if someone
has a script that loads the kernel to $loadaddr, but some other file
(DTB, initrd) to a hard-coded address that the new value of $loadaddr
interferes with. This seems unlikely. A user should not do that; they
should either hard-code all load addresses, or use U-Boot-supplied
variables for all load addresses. Equally, any fallout due to this change
is trivial to fix; simply modify the load addresses in that script.

Cc: Paul Walmsley <pwalmsley@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Paul Walmsley <pwalmsley@nvidia.com>
Reviewed-by: Simon Glass
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra124: video: Add full link training for eDP
Simon Glass [Wed, 15 Apr 2015 03:03:44 +0000 (21:03 -0600)]
tegra124: video: Add full link training for eDP

Add full link training as a fallback in case the fast link training
fails.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: config: nyan-big: Enable LCD
Simon Glass [Wed, 15 Apr 2015 03:03:43 +0000 (21:03 -0600)]
tegra: config: nyan-big: Enable LCD

Add the PMIC, LCD settings, PWM and also show the board info at the top of
the LCD when starting up.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: video: support eDP displays on Tegra124 devices
Simon Glass [Wed, 15 Apr 2015 03:03:42 +0000 (21:03 -0600)]
tegra: video: support eDP displays on Tegra124 devices

Connect up the clocks and the eDP driver to make these displays work with
Tegra124-based devices.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: video: Add Embedded DisplayPort driver
Simon Glass [Wed, 15 Apr 2015 03:03:41 +0000 (21:03 -0600)]
tegra: video: Add Embedded DisplayPort driver

This interface is used on laptop devices based on Tegra. Add a driver which
provides access to the eDP interface. The driver uses the display port
uclass.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: video: Support serial output resource (SOR) on tegra124
Simon Glass [Wed, 15 Apr 2015 03:03:40 +0000 (21:03 -0600)]
tegra: video: Support serial output resource (SOR) on tegra124

The SOR is required for talking to eDP LCD panels. Add a driver for this
which will be used by the DisplayPort driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: dts: nyan-big: Add definitions for eDP display
Simon Glass [Wed, 15 Apr 2015 03:03:39 +0000 (21:03 -0600)]
tegra: dts: nyan-big: Add definitions for eDP display

Add the various host1x peripherals to allow an eDP display to be connected.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agodm: video: Add a uclass for display port
Simon Glass [Wed, 15 Apr 2015 03:03:38 +0000 (21:03 -0600)]
dm: video: Add a uclass for display port

eDP (Embedded DisplayPort) is a standard widely used in laptops to drive
LCD panels. Add a uclass for this which supports a few simple operations.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoedid: Add a function to read detailed monitor timings
Simon Glass [Wed, 15 Apr 2015 03:03:37 +0000 (21:03 -0600)]
edid: Add a function to read detailed monitor timings

For digital displays (such as EDP LCDs) we would like to read the EDID
information and use that to set display timings. Provide a function to do
this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agovideo: Add drm_dp_helper.h
Simon Glass [Wed, 15 Apr 2015 03:03:36 +0000 (21:03 -0600)]
video: Add drm_dp_helper.h

This file (from Linux 3.17) provides defines for display port. Use it so
that our naming is consistent with Linux.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: Move display controller header into common
Simon Glass [Wed, 15 Apr 2015 03:03:35 +0000 (21:03 -0600)]
tegra: Move display controller header into common

Allow this to be used by other Tegra SoCs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra124: clock: Add display clocks and functions
Simon Glass [Wed, 15 Apr 2015 03:03:34 +0000 (21:03 -0600)]
tegra124: clock: Add display clocks and functions

Add functions to provide access to the display clocks on Tegra124 including
setting the clock rate for an EDP display.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: clock: Split the clock source code into a separate function
Simon Glass [Wed, 15 Apr 2015 03:03:33 +0000 (21:03 -0600)]
tegra: clock: Split the clock source code into a separate function

Create a function which sets the source clock for a peripheral, given
the number of mux bits to adjust. This can then be used more generally.
For now, don't export it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: clock: Add checking for invalid clock IDs
Simon Glass [Wed, 15 Apr 2015 03:03:32 +0000 (21:03 -0600)]
tegra: clock: Add checking for invalid clock IDs

The get_pll() function can do the wrong thing if passed values that are
out of range. Add checks for this and add a function which can return
a 'simple' PLL. This can be defined by SoCs with their own clocks.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: config: Use CONFIG_LCD to detect LCD presence
Simon Glass [Wed, 15 Apr 2015 03:03:31 +0000 (21:03 -0600)]
tegra: config: Use CONFIG_LCD to detect LCD presence

Instead of CONFIG_VIDEO_TEGRA, use CONFIG_LCD to determine whether an LCD
is present. Tegra124 uses a different driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra124: dts: Add host1x node to provide display information
Simon Glass [Wed, 15 Apr 2015 03:03:30 +0000 (21:03 -0600)]
tegra124: dts: Add host1x node to provide display information

This peripheral is required to get the LCD display running. Add it to
tegra124 and also bring in the binding file from Linux 3.18

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: nyan-big: Add LCD PMIC init and board ID
Simon Glass [Wed, 15 Apr 2015 03:03:29 +0000 (21:03 -0600)]
tegra: nyan-big: Add LCD PMIC init and board ID

Add required setup for the LCD display, and a function to provide the
board ID. This requires GPIOs to be available prior to relocation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: Add support for setting up a as3722 PMIC
Simon Glass [Wed, 15 Apr 2015 03:03:28 +0000 (21:03 -0600)]
tegra: Add support for setting up a as3722 PMIC

Add support for this PMIC which is used on some Tegra124 boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: Provide a function to allow LCD PMIC setup
Simon Glass [Wed, 15 Apr 2015 03:03:27 +0000 (21:03 -0600)]
tegra: Provide a function to allow LCD PMIC setup

Some LCDs require a PMIC to be set up - add a function for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agopower: Export register access functions from as3722
Simon Glass [Wed, 15 Apr 2015 03:03:26 +0000 (21:03 -0600)]
power: Export register access functions from as3722

With the full PMIC framework we may be able to avoid this. But for now
we need access to the PMIC.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: Add a board ID function
Simon Glass [Wed, 15 Apr 2015 03:03:25 +0000 (21:03 -0600)]
tegra: Add a board ID function

Add a way of displaying a numeric board ID on start-up.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: Move checkboard() into the board code
Simon Glass [Wed, 15 Apr 2015 03:03:24 +0000 (21:03 -0600)]
tegra: Move checkboard() into the board code

This is only used by Nvidia boards, so move it into nvidia/common to
simplify things.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: pwm: Allow the clock rate to be left as is
Simon Glass [Wed, 15 Apr 2015 03:03:23 +0000 (21:03 -0600)]
tegra: pwm: Allow the clock rate to be left as is

When enabling a PWM, allow the existing clock rate and source to stand
unchanged.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: Move the pwm into tegra-common
Simon Glass [Wed, 15 Apr 2015 03:03:22 +0000 (21:03 -0600)]
tegra: Move the pwm into tegra-common

This is needed for tegra124 also, so make it common and add a header file
for tegra124.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agofdt: Add binding decode function for display-timings
Simon Glass [Wed, 15 Apr 2015 03:03:21 +0000 (21:03 -0600)]
fdt: Add binding decode function for display-timings

This is useful for display parameters. Add a simple decode function to read
from this device tree node.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agodm: gpio: Add error handling and a function to claim vector GPIOs
Simon Glass [Wed, 15 Apr 2015 03:03:20 +0000 (21:03 -0600)]
dm: gpio: Add error handling and a function to claim vector GPIOs

gpio_get_values_as_int() should return an error if something goes wrong.
Also provide gpio_claim_vector(), a function to request the GPIOs and set
them to input mode. Otherwise callers have to do this themselves.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agodm: core: Sort the uclasses
Simon Glass [Wed, 15 Apr 2015 03:03:19 +0000 (21:03 -0600)]
dm: core: Sort the uclasses

Sort uclasses into alphabetical order and tidy up the comments.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoarc: remove dummy target
Alexey Brodkin [Wed, 13 May 2015 10:48:07 +0000 (13:48 +0300)]
arc: remove dummy target

TARGET_DUMMY was introduced to resolve the same problem as commit
"arch: Make board selection choices optional"
http://git.denx.de/?p=u-boot.git;a=commit;h=a26cd04920dc069fd6e91abb785426cf6c29f45f

Latter implementation is much cleaner and appropriate.

And anyways TARGET_DUMMY is no longer required.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agoARM: at91: trival: fix typo for the nand partition name
Wu, Josh [Thu, 30 Apr 2015 10:22:02 +0000 (18:22 +0800)]
ARM: at91: trival: fix typo for the nand partition name

We should use 'env' to present environment instead of 'evn'

Signed-off-by: Josh Wu <josh.wu@atmel.com>
8 years agoARM: at91: remove non-generic boards
Masahiro Yamada [Wed, 8 Apr 2015 09:15:53 +0000 (18:15 +0900)]
ARM: at91: remove non-generic boards

Remove board support for afeb9260, tny_a9260, and sbc35_a9g20.

They have not been converted into Generic Board yet.
See doc/README.generic-board for details.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
8 years agoarc: use more universal prefix for default CROSS_COMPILE
Masahiro Yamada [Wed, 13 May 2015 09:49:31 +0000 (18:49 +0900)]
arc: use more universal prefix for default CROSS_COMPILE

As doc/README.ARC says, pre-build ARC toolchains are available at
the Synopsys GitHub page.

The bin files are prefixed with arc(eb)-buildroot-linux- for earlier
releases, but with arc(eb)-snps-linux- for the latest releases.

The symbolic links prefixed with arc(eb)-linux- are also available
for all the release, so those prefixes can be used as the default
CROSS_COMPILE regardless of the toolchains version/variants.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoClean all defconfigs with savedefconfig
Joe Hershberger [Tue, 12 May 2015 19:46:24 +0000 (14:46 -0500)]
Clean all defconfigs with savedefconfig

In order to reduce merge conflicts and to maintain the simplest possible
defconfig files, we should be using the savedefconfig feature of Kconfig
every time a new feature is added. This keeps the defconfig settings to
a minimum (only those things not default) and keeps them in the same
order as the Kconfig options.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tom Rini <trini@konsulko.com>
8 years agoarch: Make board selection choices optional
Joe Hershberger [Tue, 12 May 2015 19:46:23 +0000 (14:46 -0500)]
arch: Make board selection choices optional

By making the board selections optional, every defconfig will include
the board selection when running savedefconfig so if a new board is
added to the top of the list of choices the former top's defconfig will
still be correct.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tom Rini <trini@konsulko.com>
8 years agoRevert "stm32f4: fix serial output"
Tom Rini [Sun, 10 May 2015 20:01:48 +0000 (16:01 -0400)]
Revert "stm32f4: fix serial output"

As per the author, we don't need this patch really since the other patch
"stm32f4: fix serial output" superseded it.

This reverts commit 85e5f5b7a7f8d889271f94791606cde62d81d53f.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agokconfig: Move REGEX to Kconfig
Joe Hershberger [Tue, 21 Apr 2015 22:02:42 +0000 (17:02 -0500)]
kconfig: Move REGEX to Kconfig

Having this as a Kconfig allows it to be a dependent feature.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoppc4xx: Remove sc3 board
Stefan Roese [Thu, 7 May 2015 11:00:23 +0000 (13:00 +0200)]
ppc4xx: Remove sc3 board

As this board seems to be unmaintained for quite some time, and its
not moved to the generic board ingrastructure, lets remove it.

This will also enable us to remove the CONFIG_AUTOBOOT_DELAY_STR2
and CONFIG_AUTOBOOT_STOP_STR2 macros, as this sc3 board is the
only one using one of this macros. A removal patch will follow
soon.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Juergen Beisert <jbeisert@eurodsn.de>
Acked-by: Heiko Schocher <hs@denx.de>
8 years agoserial: fdt: add device tree support for pl01x
Vikas Manocha [Wed, 6 May 2015 18:46:29 +0000 (11:46 -0700)]
serial: fdt: add device tree support for pl01x

This patch adds device tree support for arm pl010/pl011 driver.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoFix broken verify functionality in crc32 command
Joe Hershberger [Tue, 5 May 2015 17:23:53 +0000 (12:23 -0500)]
Fix broken verify functionality in crc32 command

Introduced in change d20a40de9db07de1f1f06a79a4da1cdda5379b75
"Roll crc32 into hash infrastructure"

The crc32 command with no -v expects an optional 3rd argument to be an
address to store the result in. With the -v switch, the last argument
is a crc, not an address. In the case where -v is set, we should set the
HASH_FLAG_ENV flag since that will first look for the value to be a
digest value, which matches the expected API for the crc32 command.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoFix inconsistency of VERIFY defines in cmd_mem
Joe Hershberger [Tue, 5 May 2015 17:23:52 +0000 (12:23 -0500)]
Fix inconsistency of VERIFY defines in cmd_mem

Introduced in change d20a40de9db07de1f1f06a79a4da1cdda5379b75
"Roll crc32 into hash infrastructure"

Use a consistent define to enable the verify feature in crc32 command.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoMakefile: add a symbol link tags for ctags
Du Huanpeng [Mon, 4 May 2015 13:26:53 +0000 (06:26 -0700)]
Makefile: add a symbol link tags for ctags

Signed-off-by: Du Huanpeng <u74147@gmail.com>
8 years agostv0991: use fdt for serial port platform data
Vikas Manocha [Sun, 3 May 2015 21:10:35 +0000 (14:10 -0700)]
stv0991: use fdt for serial port platform data

This patch ignores the serial port static platform data at compilation time
in case of device tree control.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agostv0991: fdt: add stv0991 device tree
Vikas Manocha [Sun, 3 May 2015 21:10:34 +0000 (14:10 -0700)]
stv0991: fdt: add stv0991 device tree

This patch adds device tree for the ST Micro stv0991 board & enables
device tree control. Progressively device tree support for the drivers
being used will also be added.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoovero: Fix regression introduced in a6b541b
Arun Bharadwaj [Tue, 28 Apr 2015 23:55:30 +0000 (16:55 -0700)]
overo: Fix regression introduced in a6b541b

U-Boot has been broken on Overo boards since commit
a6b541b09022acb6f7c2754100ae26bd44eed1d9.

This is because the gd pointer is not set early enough anymore,
such that the i2c_set_bus_num in get_board_revision can safely
execute. This results in a console hang at SPL and the boot does
not proceed.

This piece of code is anyway necessary only for really old Overo
boards with revision numbers <= 2410 and not required for the newer
boards. For these older boards, u-boot v2014.10 still works fine.

Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
8 years agoovero: Split overo.c into spl.c, common.c and overo.c
Arun Bharadwaj [Tue, 28 Apr 2015 23:55:29 +0000 (16:55 -0700)]
overo: Split overo.c into spl.c, common.c and overo.c

This separates the SPL-specific code from the u-boot-specific code for
the Overo board following the discussion at
http://lists.denx.de/pipermail/u-boot/2015-April/211622.html

The code is split up into spl.c, overo.c and common.c (which
has the code common to both)

Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
8 years agoomap3: overo: Allow boot with kernel in UBI rootfs
Ash Charles [Tue, 28 Apr 2015 23:17:54 +0000 (16:17 -0700)]
omap3: overo: Allow boot with kernel in UBI rootfs

If regular NAND booting fails to find a valid uImage in the
kernel partition in NAND, try to boot using a zImage and dtb found
in a UBI volume in the rootfs partition.  This is the NAND analog
of mmc zImage booting for device-tree based kernels.

Signed-off-by: Ash Charles <ashcharles@gmail.com>
Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
8 years agoomap3: overo: Use software BCH8 ECC for NAND
Ash Charles [Tue, 28 Apr 2015 23:17:53 +0000 (16:17 -0700)]
omap3: overo: Use software BCH8 ECC for NAND

Overo COMs have NAND flash that requires 4-bit ECC or better except for
the first sector which can use 1-bit ECC.  The boot ROM expects to load
a payload from NAND written using 1-bit hardware-based ECC.  In short,
write SPL to NAND something like this (4 times for redundancy):
 #> nandecc hw
 #> nand write ${loadaddr} 0x0 ${filesize}
 #> nand write ${loadaddr} 0x20000 ${filesize}
 #> nand write ${loadaddr} 0x40000 ${filesize}
 #> nand write ${loadaddr} 0x60000 ${filesize}

Then, switch back to software-based BCH8 for everything else:
 #> nandecc sw bch8

After [1], enlarge the max size of the SPL so the BCH code can fit.

[1] https://www.mail-archive.com/u-boot@lists.denx.de/msg163912.html

Signed-off-by: Ash Charles <ashcharles@gmail.com>
8 years agoovero: Add support for Palo35 expansion board
Ash Charles [Tue, 28 Apr 2015 23:17:52 +0000 (16:17 -0700)]
overo: Add support for Palo35 expansion board

Signed-off-by: Ash Charles <ashcharles@gmail.com>
8 years agoomap3: overo: Add DTS support for TobiDuo expansion
Arun Bharadwaj [Tue, 28 Apr 2015 23:17:51 +0000 (16:17 -0700)]
omap3: overo: Add DTS support for TobiDuo expansion

Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
Signed-off-by: Ash Charles <ashcharles@gmail.com>
8 years agoomap3: overo: Set the Arbor43C 'expansionname'
Ash Charles [Tue, 28 Apr 2015 23:17:50 +0000 (16:17 -0700)]
omap3: overo: Set the Arbor43C 'expansionname'

The Gumstix Arbor43C expansion board [1] uses a customized device tree
file.  When this expansion board is detected, load this file.

[1] https://store.gumstix.com/index.php/products/635/

Signed-off-by: Ash Charles <ashcharles@gmail.com>
8 years agodavinci: restore CONFIG_SPL=y to configs/omapl138_lcdk_defconfig
Peter Howard [Tue, 28 Apr 2015 23:05:57 +0000 (09:05 +1000)]
davinci: restore CONFIG_SPL=y to configs/omapl138_lcdk_defconfig

Signed-off-by: Peter Howard <phoward@gme.net.au>
8 years agocmd_part: fix usage text
maxin.john@enea.com [Mon, 27 Apr 2015 23:44:58 +0000 (01:44 +0200)]
cmd_part: fix usage text

Fix the usage info from:
part part uuid <interface> <dev>:<part>
to
part uuid <interface> <dev>:<part>

Signed-off-by: Maxin B. John <maxin.john@enea.com>
Reviewed-By: Sjoerd Simons <sjoerd.simons@collabora.co.uk
8 years agostm32f4: add serial print port
kunhuahuang [Mon, 27 Apr 2015 19:01:19 +0000 (03:01 +0800)]
stm32f4: add serial print port

Add the stm32F4 board's serial ports support.
User can use it easily.
The user only need to edit the number of the usart.
The patch also fix the serial print out.

Last, this version of patch fix the first patch checkpatch.pl error.
Thanks to Kamil Lulko.

Signed-off-by: kunhuahuang <huangkunhua@gmail.com>
8 years agostm32f4: fix serial output
kunhuahuang [Mon, 27 Apr 2015 18:25:45 +0000 (02:25 +0800)]
stm32f4: fix serial output

This patch fix the serial output.
The source is from Kamil Lulko's "stm32f429-discovery board support"

Thanks, Varcain. I learned a lot.

Signed-off-by: kunhuahuang <huangkunhua@gmail.com>
8 years agospl: spl_mmc: Partition raw boot mode for eMMC
Paul Kocialkowski [Mon, 27 Apr 2015 08:20:23 +0000 (10:20 +0200)]
spl: spl_mmc: Partition raw boot mode for eMMC

This adds support for providing a partition number instead of a sector for eMMC.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agospl: spl_mmc: Clearer structure in spl_mmc_load_image and cosmetics
Paul Kocialkowski [Mon, 27 Apr 2015 08:20:22 +0000 (10:20 +0200)]
spl: spl_mmc: Clearer structure in spl_mmc_load_image and cosmetics

This refactors spl_mmc_load_image to use a switch/case structure and easier
to understand spl_start_uboot checks. This also introduces some more automatic
fallback on the next mmc boot mode as long as it keeps failing.

Lines that go beyond 80 chars are also reduced by reducing the number of tabs.
Debug and error strings are refctored to match a common style.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
[trini: Fix a thinko in the SPL_EXT_SUPPORT + SPL_OS conversion, make part be
 __maybe_unused]
Signed-off-by: Tom Rini <trini@konsulko.com>