]> git.sur5r.net Git - u-boot/log
u-boot
8 years agoarm64: define _image_binary_end to fix SPL_OF_CONTROL
Masahiro Yamada [Tue, 8 Mar 2016 11:34:44 +0000 (20:34 +0900)]
arm64: define _image_binary_end to fix SPL_OF_CONTROL

To make SPL_OF_CONTROL work on ARM64 SoCs, _image_binary_end must be
defined in the linker script.

 LD      spl/u-boot-spl
lib/built-in.o: In function `fdtdec_setup':
lib/fdtdec.c:1186: undefined reference to `_image_binary_end'
lib/fdtdec.c:1186: undefined reference to `_image_binary_end'
make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2

Note:
CONFIG_SPL_SEPARATE_BSS must be defined as well on ARM64 SoCs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: DRA72-evm: Update mux and VIRTUAL/MANUAL mode timings
Lokesh Vutla [Tue, 8 Mar 2016 04:40:20 +0000 (10:10 +0530)]
ARM: DRA72-evm: Update mux and VIRTUAL/MANUAL mode timings

All the mux configurations needs to be done as part of the IODelay
sequence to avoid glitch. Adding all the mux configuration, MANUAL/VIRTUAL
mode configuration as needed for DRA72-evm.

Also update the mux for SD card detect on DRA74-evm.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: DRA7-evm: Update memory info in banks
Lokesh Vutla [Tue, 8 Mar 2016 03:48:09 +0000 (09:18 +0530)]
ARM: DRA7-evm: Update memory info in banks

Updating the memory banks properly so that DT is populated accordingly.
And updating this only after DDR is properly detected by eeprom, so that
git bisect is still maintained.

Acked-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: DRA7: EMIF: Add 4GB DDR settings
Lokesh Vutla [Tue, 8 Mar 2016 03:48:08 +0000 (09:18 +0530)]
ARM: DRA7: EMIF: Add 4GB DDR settings

The REVH and later versions of DRA7-evm uses MICRON MT41K512M16HA-125 memory
chips which is of size 4GB(2GB on EMIF1 and 2GB on EMIF2). Add support for the
same.

Acked-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: DRA7: configs: Prepare for detecting memory > 2GB
Lokesh Vutla [Tue, 8 Mar 2016 03:48:07 +0000 (09:18 +0530)]
ARM: DRA7: configs: Prepare for detecting memory > 2GB

Enable configs that are required for detecting memory > 2GB.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: DRA7: Move emif settings to board specific files
Lokesh Vutla [Tue, 8 Mar 2016 03:48:06 +0000 (09:18 +0530)]
ARM: DRA7: Move emif settings to board specific files

The newer versions of DRA7 boards has EEPROM populated with DDR
size specified in it. Moving DRA7 specific emif related settings
to board files so that emif settings can be identified based on EEPROM.

Acked-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: DRA7: Enable EEPROM support
Lokesh Vutla [Tue, 8 Mar 2016 03:48:05 +0000 (09:18 +0530)]
ARM: DRA7: Enable EEPROM support

Enable EEPROM support for DRA74-evm.

Acked-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoti: common: dra7: Add standard access for board description EEPROM
Lokesh Vutla [Tue, 8 Mar 2016 03:48:04 +0000 (09:18 +0530)]
ti: common: dra7: Add standard access for board description EEPROM

DRA7 EVM revH and later EVMs have EEPROM populated that can contain board
description information such as name, revision, DDR definition, etc. Adding
support for this EEPROM format.

Acked-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: AM57xx: Update EMIF registers
Lokesh Vutla [Tue, 8 Mar 2016 03:41:35 +0000 (09:11 +0530)]
ARM: AM57xx: Update EMIF registers

There are certain EMIF timing failures seen on the some x15 boards. Updating
the EMIF settings to get rid of these timing failures.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: Various: Future-proof serial platdata
Adam Ford [Tue, 8 Mar 2016 03:08:49 +0000 (21:08 -0600)]
ARM: Various: Future-proof serial platdata

A few boards still use ns16550_platdata structures, but assume the structure
is going to be in a specific order. By explicitly naming each entry,
this should also help 'future-proof' in the event the structure changes.

Tested on the Logic PD Torpedo + Wireless.

I only changed a handful of devices that used the same syntax as the Logic
board.  Appologies if I missed one or stepped on toes.  Thanks to Derald Woods
and Alexander Graf.

Signed-off-by: Adam Ford <aford173@gmail.com>
V6: Add fix to arch/arm/cpu/armv7/am33xx/board.c

V5: Add fix to arch/arm/cpu/arm926ejs/lpc32xx/devices.c

V4: Fix subject heading

V3: Remove  reg_offset out in all the structs. It was reverted out, and and if
it did exist, it would get initialized to 0 by default.

V2: I hastily copy-pasted the boards without looking at the UART number.
This addresses 3 boards that use UART3 and not UART1.
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoARM: OMAP4+: Allow arch specfic code to use early DM
Lokesh Vutla [Mon, 7 Mar 2016 09:19:54 +0000 (14:49 +0530)]
ARM: OMAP4+: Allow arch specfic code to use early DM

Early system initialization is being done before initf_dm is being called
in U-Boot. Then system will fail to boot if any of the DM enabled driver
is being called in this system initialization code. So, rearrange the
code a bit so that DM enabled drivers can be called during early system
initialization.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: DRA7: emif: Enable interleaving for higher address space
Lokesh Vutla [Sat, 5 Mar 2016 12:02:31 +0000 (17:32 +0530)]
ARM: DRA7: emif: Enable interleaving for higher address space

Given that DRA7/OMAP5 SoCs can support more than 2GB of memory,
enable interleaving for this higher memory to increase performance.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: DRA7: emif: Check for enable bits before updating leveling output
Lokesh Vutla [Sat, 5 Mar 2016 12:02:30 +0000 (17:32 +0530)]
ARM: DRA7: emif: Check for enable bits before updating leveling output

Read and write leveling can be enabled independently. Check for these
enable bits before updating the read and write leveling output values.
This will allow to use the combination of software and hardware leveling.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: DRA7: emif: Fix DDR init sequence during warm reset
Lokesh Vutla [Sat, 5 Mar 2016 12:02:29 +0000 (17:32 +0530)]
ARM: DRA7: emif: Fix DDR init sequence during warm reset

Commit (20fae0a - ARM: DRA7: DDR: Enable SR in Power Management Control)
enables Self refresh mode by default and during warm reset the EMIF
contents are preserved. After warm reset EMIF sees that it is idle and
puts DDR in self-refresh. When in SR, leveling operations cannot be done
as DDR can only accept SR exit command, so its hanging during warm reset.
In order to fix this reset the power management control register before
EMIF initialization if it is a warm reset.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: DRA7: emif: Fix updating of refresh ctrl shadow
Lokesh Vutla [Sat, 5 Mar 2016 12:02:28 +0000 (17:32 +0530)]
ARM: DRA7: emif: Fix updating of refresh ctrl shadow

On DRA7, refresh ctrl shadow should be updated with
the final value.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodm: omap_timer: Fix conversion of address to a pointer
Lokesh Vutla [Sat, 5 Mar 2016 11:10:32 +0000 (16:40 +0530)]
dm: omap_timer: Fix conversion of address to a pointer

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

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

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: use detected ddr3a size
Vitaly Andrianov [Fri, 4 Mar 2016 16:36:43 +0000 (10:36 -0600)]
ARM: keystone2: use detected ddr3a size

Because KS2 u-boot works in 32 bit address space the existing ram_size
global data field cannot be used. The maximum, which the get_ram_size()
can detect is 2GB only. The ft_board_setup() needs the actual ddr3 size
to fix up dtb.

This commit introduces the ddr3_get_size() which uses SPD data to
calculate the ddr3 size. This function replaces the "ddr3_size"
environment variable, which was used to get the SODIMM size.

For platforms, which don't have SODIMM with SPD and ddr3 is populated to
a board a simple ddr3_get_size function that returns ddr3 size has to be
implemented. See hardware-k2l.h

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: use SPD info to configure K2HK and K2E DDR3
Vitaly Andrianov [Fri, 4 Mar 2016 16:36:42 +0000 (10:36 -0600)]
ARM: keystone2: use SPD info to configure K2HK and K2E DDR3

This commit replaces hard-coded EMIF and PHY DDR3 configurations for
predefined SODIMMs to a calculated configuration. The SODIMM parameters
are read from SODIMM's SPD and used to calculated the configuration.

The current commit supports calculation for DDR3 with 1600MHz and 1333MHz
only.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: K2G: Add support for different arm/device speeds
Lokesh Vutla [Fri, 4 Mar 2016 16:36:41 +0000 (10:36 -0600)]
ARM: keystone2: K2G: Add support for different arm/device speeds

The maximum device and arm speeds can be determined by reading
EFUSE_BOOTROM register. As there is already a framework for reading this
register, adding support for all possible speeds on k2g devices.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: Allow for board specific speed definitions
Lokesh Vutla [Fri, 4 Mar 2016 16:36:40 +0000 (10:36 -0600)]
ARM: keystone2: Allow for board specific speed definitions

Its not compulsory that speed definition should be same on EFUSE_BOOTROM
register for all keystone 2 devices. So, allow for board specific
speed definitions.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: K2G: power-off DSP during boot
Suman Anna [Fri, 4 Mar 2016 16:36:39 +0000 (10:36 -0600)]
ARM: keystone2: K2G: power-off DSP during boot

The DSPs are powered on by default upon a Power ON reset, and
they are powered off on current Keystone 2 SoCs - K2HK, K2L, K2E
during the boot in u-boot. This is not functional on K2G though.
Extend the existing DSP power-off support to the only DSP present
on K2G. Do note that the PSC clock domain module id for DSP on K2G
differs from that of previous Keystone2 SoCs.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: Use macro for DSP GEM power domain
Suman Anna [Fri, 4 Mar 2016 16:36:38 +0000 (10:36 -0600)]
ARM: keystone2: Use macro for DSP GEM power domain

Define a macro for the DSP GEM power domain id number and
use it instead of a hard-coded number in the code that
disables all the DSPs on various Keystone2 SoCs.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoinclude/crc.h: Remove unreferenced cyg_xxx() prototypes
Stefan Roese [Thu, 3 Mar 2016 08:34:13 +0000 (09:34 +0100)]
include/crc.h: Remove unreferenced cyg_xxx() prototypes

These cyg_ prototypes are not referenced anywhere in current mainline
U-Boot. So lets remove them.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agolib/crc16.c: Rename cyg_crc16() to crc16_ccitt() and add crc start value
Stefan Roese [Thu, 3 Mar 2016 08:34:12 +0000 (09:34 +0100)]
lib/crc16.c: Rename cyg_crc16() to crc16_ccitt() and add crc start value

The original name of this function is unclear. This patch renames this
CRC16 function to crc16_ccitt() matching its name with its
implementation.

To make the usage of this function more flexible, lets add the CRC start
value as parameter to this function. This way it can be used by other
functions requiring different start values than 0 as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agolib/crc16.c: Coding-style cleanup
Stefan Roese [Thu, 3 Mar 2016 08:34:11 +0000 (09:34 +0100)]
lib/crc16.c: Coding-style cleanup

lib/crc16.c is changed to match the common U-Boot coding-style.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agocommon: image-fit: Fix load and entry addresses in FIT image
York Sun [Mon, 29 Feb 2016 23:48:41 +0000 (15:48 -0800)]
common: image-fit: Fix load and entry addresses in FIT image

FIT image supports more than 32 bits in addresses by using #address-cell
field. Fixing 64-bit support by using this field.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agocommon: image-fit: Use a common function to get address
York Sun [Mon, 29 Feb 2016 23:48:40 +0000 (15:48 -0800)]
common: image-fit: Use a common function to get address

FIT image supports load address and entry address. Getting these
addresses can use a common function.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarm: Add support for LEGO MINDSTORMS EV3
David Lechner [Fri, 26 Feb 2016 06:46:07 +0000 (00:46 -0600)]
arm: Add support for LEGO MINDSTORMS EV3

This is based on the davinci da850evm. It can boot from either the
on-board 16MB flash or from a microSD card. It also reads board
information from an I2C EEPROM.

The EV3 itself initally boots from write-protected EEPROM, so no
u-boot SPL is needed.

Signed-off-by: David Lechner <david@lechnology.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: k2g_evm: Add TI power processor support
Nishanth Menon [Thu, 25 Feb 2016 18:53:47 +0000 (12:53 -0600)]
configs: k2g_evm: Add TI power processor support

Enable support for PMMC the TI power processor on K2G. This processor
manages all power management related activities on the SoC and and
allows the Operating Systems on compute processors such as ARM, DSP to
offload the power logic away into the power processor.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: dts: k2g: Add support for PMMC
Nishanth Menon [Thu, 25 Feb 2016 18:53:46 +0000 (12:53 -0600)]
ARM: dts: k2g: Add support for PMMC

Enable support for PMMC the TI power processor on K2G. This processor
manages all power management related activities on the SoC and and
allows the Operating Systems on compute processors such as ARM, DSP to
offload the power logic away into the power processor. U-boot just has a
load responsibility, hence the view of the hardware from a bootloader
perspective is different from the view of hardware from a Operating
System perspective. While bootloader just loads up the firmware,
Operating Systems look at the resultant system as "hardware".

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoremoteproc: Add support for TI power processor
Nishanth Menon [Thu, 25 Feb 2016 18:53:45 +0000 (12:53 -0600)]
remoteproc: Add support for TI power processor

Many TI System on Chip (SoC) solutions do have a dedicated
microcontroller for doing power management functionality. These include
the AM335x, AM437x, Keystone K2G SoCs. The functionality provided by
these microcontrollers and the communication mechanisms vary very
widely. However, we are able to consolidate some basic functionality to
be generic enough starting with K2G SoC family. Introduce a basic remote
proc driver to support these microcontrollers. In fact, on SoCs starting
with K2G, basic power management functions are primarily accessible for
the High Level Operating Systems(HLOS) via these microcontroller solutions.

Hence, having these started at a bootloader level is pretty much
mandatory.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: psc: introduce function to hold and release module in reset.
Nishanth Menon [Thu, 25 Feb 2016 18:53:44 +0000 (12:53 -0600)]
ARM: keystone2: psc: introduce function to hold and release module in reset.

These are useful for modules that need to be held in reset and are
enabled for data to be loaded on to them. Typically these are
microcontrollers or other processing entities in the system.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: psc-defs: use adequate () for macros
Nishanth Menon [Thu, 25 Feb 2016 18:53:43 +0000 (12:53 -0600)]
ARM: keystone2: psc-defs: use adequate () for macros

'#define X a | b' is better defined as '#define X (a | b)' for obvious
reasons.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: psc: redo doc in kernel-doc format
Nishanth Menon [Thu, 25 Feb 2016 18:53:42 +0000 (12:53 -0600)]
ARM: keystone2: psc: redo doc in kernel-doc format

u-boot coding style guidance in
http://www.denx.de/wiki/U-Boot/CodingStyle clearly mentions that the
kernel doc style shall be followed for documentation in u-boot.

Current PSC documentation standard does not, so fix that.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: Get rid of unused clock files
Nishanth Menon [Wed, 24 Feb 2016 23:48:43 +0000 (17:48 -0600)]
ARM: keystone2: Get rid of unused clock files

With commit fe772ebd285b ("ARM: keystone2: Use common definition for
clk_get_rate"), we have centralized the clock code into a common clock
logic and the redundant files, unfortunately remained... Clean that
up.

Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoboard: ti: AM57xx: Add detection logic for AM57xx-evm
Kipisz, Steven [Wed, 24 Feb 2016 18:30:58 +0000 (12:30 -0600)]
board: ti: AM57xx: Add detection logic for AM57xx-evm

Current AM57xx evm supports both BeagleBoard-X15
(http://beagleboard.org/x15) and AM57xx EVM
(http://www.ti.com/tool/tmdxevm5728).

The AM572x EValuation Module(EVM) provides an affordable platform to
quickly start evaluation of Sitara. ARM Cortex-A15 AM57x Processors
(AM5728, AM5726, AM5718, AM5716) and accelerate development for HMI,
machine vision, networking, medical imaging and many other industrial
applications. This EVM is based on the same BeagleBoard-X15 Chassis
and adds mPCIe, mSATA, LCD, touchscreen, Camera, push button and TI's
wlink8 offering.

Since the EEPROM contents are compatible between the BeagleBoard-X15 and
the AM57xx-evm, we add support for the detection logic to enable
support for various user programmable scripting capability.

NOTE: U-boot configuration is currently a superset of AM57xx evm and
BeagleBoard-X15 and no additional configuration tweaking is needed.

This change also sets up the stage for future support of TI AM57xx EVMs
to the same base bootloader build.

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: OMAP4/5: Add generic board detection hook
Kipisz, Steven [Wed, 24 Feb 2016 18:30:57 +0000 (12:30 -0600)]
ARM: OMAP4/5: Add generic board detection hook

Many TI EVMs have capability to store relevant board information
such as DDR description in EEPROM. Further many pad configuration
variations can occur as part of revision changes in the platform.
In-order to support these at runtime, we for a board detection hook
which is available for override from board files that may desire to do
so.

NOTE: All TI EVMs are capable of detecting board information based on
early clocks that are configured. However, in case of additional needs
this can be achieved within the override logic from within the board
file.

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoti: AM437x: Use generic EEPROM detection logic
Nishanth Menon [Wed, 24 Feb 2016 18:30:56 +0000 (12:30 -0600)]
ti: AM437x: Use generic EEPROM detection logic

Now that we have a generic TI eeprom logic which can be reused across
platforms, reuse the same.

This revision also includes fixes identified by Dave Gerlach
<d-gerlach@ti.com>

Cc: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Steven Kipisz <s-kipisz2@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoti: AM335x: Use generic EEPROM detection logic
Nishanth Menon [Wed, 24 Feb 2016 18:30:55 +0000 (12:30 -0600)]
ti: AM335x: Use generic EEPROM detection logic

Use the generic EEPROM detection logic instead of duplicating the AM
eeprom logic.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Steven Kipisz <s-kipisz2@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: omap-common: Add standard access for board description EEPROM
Lokesh Vutla [Wed, 24 Feb 2016 18:30:54 +0000 (12:30 -0600)]
ARM: omap-common: Add standard access for board description EEPROM

Several TI EVMs have EEPROM that can contain board description information
such as revision, DDR definition, serial number, etc. In just about all
cases, these EEPROM are on the I2C bus and provides us the opportunity
to centralize the generic operations involved.

The on-board EEPROM on the BeagleBone Black, BeagleBone, AM335x EVM,
AM43x GP EVM, AM57xx-evm, BeagleBoard-X15 share the same format.
However, DRA-7* EVMs, OMAP4SDP use a modified format.

We hence introduce logic which is generic between these platforms
without enforcing any specific format. This allows the boards to use the
relevant format for operations that they might choose.

This module will compile for all TI SoC based boards when
CONFIG_TI_I2C_BOARD_DETECT is enabled to have optimal build times for
platforms that require this support.

It is important to note that this logic is fundamental to the board
configuration process such as DDR configuration which is needed in
SPL, hence cannot be part of the standard u-boot driver model (which
is available later in the process). Hence, to aid efficiency, the
eeprom contents are copied over to SRAM scratchpad memory area at the
first invocation to retrieve data.

To prevent churn with cases such as DRA7, where eeprom format maybe
incompatible, we introduce a generic common format in eeprom which
is made available over accessor functions for usage.

Special handling for BBG1 EEPROM had to be introduced thanks to the
weird eeprom rev contents used.

The follow on patches introduce the use of this library for AM335x,
AM437x, and AM57xx.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: OMAP4/5: Centralize gpi2c_init
Kipisz, Steven [Wed, 24 Feb 2016 18:30:53 +0000 (12:30 -0600)]
ARM: OMAP4/5: Centralize gpi2c_init

Centralize gpi2c_init into omap_common from the sys_proto header so
that the information can be reused across SoCs.

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: OMAP4/5: Centralize early clock initialization
Kipisz, Steven [Wed, 24 Feb 2016 18:30:52 +0000 (12:30 -0600)]
ARM: OMAP4/5: Centralize early clock initialization

Early clock initialization is currently done in two stages for OMAP4/5
SoCs. The first stage is the initialization of console clocks and
then we initialize basic clocks for functionality necessary for SoC
initialization and basic board functionality.

By splitting up prcm_init and centralizing this clock initialization,
we setup the code for follow on patches that can do board specific
initialization such as board detection which will depend on these
basic clocks.

As part of this change, since the early clock initialization
is centralized, we no longer need to expose the console clock
initialization.

NOTE: we change the sequence slightly by initializing console clocks
timer after the io settings are complete, but this is not expected
to have any functioanlity impact since we setup the basic IO drive
strength initialization as part of do_io_settings.

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agospl: Support loading a FIT from MMC
Simon Glass [Tue, 23 Feb 2016 05:55:58 +0000 (22:55 -0700)]
spl: Support loading a FIT from MMC

Detect a FIT when loading from MMC and handle it using the new FIT SPL
support.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agospl: Add a way to specify a list of device trees to include
Simon Glass [Tue, 23 Feb 2016 05:55:57 +0000 (22:55 -0700)]
spl: Add a way to specify a list of device trees to include

When building a FIT, more than one device tree can be included. The board
can select (at run-time) the one that it wants.

Add a Kconfig option to allow the list of devices trees (supported by the
board) to be specified.

When using SPL_LOAD_FIT, build u-boot.img in FIT format instead of the
legacy image format. Include all the listed device tree files in this FIT.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agospl: Add an option to load a FIT containing U-Boot
Simon Glass [Tue, 23 Feb 2016 05:55:56 +0000 (22:55 -0700)]
spl: Add an option to load a FIT containing U-Boot

This provides a way to load a FIT containing U-Boot and a selection of device
tree files. The board can select the correct device tree by probing the
hardware. Then U-Boot is started with the selected device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agospl: Add a way for boards to select which device tree to load
Simon Glass [Tue, 23 Feb 2016 05:55:55 +0000 (22:55 -0700)]
spl: Add a way for boards to select which device tree to load

SPL calls this function with each device tree it can find in the FIT. The
board should implement this function, using whatever hardware detection it
can muster to determine the correct device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agomkimage: Bring data into the FIT before processing
Simon Glass [Tue, 23 Feb 2016 05:55:54 +0000 (22:55 -0700)]
mkimage: Bring data into the FIT before processing

Since we now support data outside the FIT image, bring it into the FIT image
first before we do any processing. This avoids adding new functionality to
the core FIT code for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agomkimage: Support placing data outside the FIT
Simon Glass [Tue, 23 Feb 2016 05:55:53 +0000 (22:55 -0700)]
mkimage: Support placing data outside the FIT

One limitation of FIT is that all the data is 'inline' within it, using a
'data' property in each image node. This means that to find out what is in
the FIT it is necessary to scan the entire file. Once loaded it can be
scanned and then the images can be copied to the correct place in memory.

In SPL it can take a significant amount of time to copy images around in
memory. Also loading data that does not end up being used is wasteful. It
would be useful if the FIT were small, acting as a directory, with the
actual data stored elsewhere.

This allows SPL to load the entire FIT, without the images, then load the
images it wants later.

Add a -E option to mkimage to request that it output an 'external' FIT.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agomkimage: Support adding device tree files to a FIT
Simon Glass [Tue, 23 Feb 2016 05:55:52 +0000 (22:55 -0700)]
mkimage: Support adding device tree files to a FIT

To make the auto-FIT feature useful we need to be able to provide a list of
device tree files on the command line for mkimage to add into the FIT. Add
support for this feature.

So far there is no support for hashing or verified boot using this method.
For those cases, a .its file must still be provided.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agomkimage: Support automatic creating of a FIT without a .its
Simon Glass [Tue, 23 Feb 2016 05:55:51 +0000 (22:55 -0700)]
mkimage: Support automatic creating of a FIT without a .its

At present, when generating a FIT, mkimage requires a .its file containing
the structure of the FIT and referring to the images to be included.

Creating the .its file is a separate step that makes it harder to use FIT.
This is not required for creating legacy images.

Often the FIT is pretty standard, consisting of an OS image, some device
tree files and a single configuration. We can handle this case automatically
and avoid needing a .its file at all.

To start with, support automatically generate the FIT using a new '-f auto'
option. Initially this only supports adding a single image (e.g. a linux
kernel) and a single configuration.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoimage: Add functions to obtain short names
Simon Glass [Tue, 23 Feb 2016 05:55:50 +0000 (22:55 -0700)]
image: Add functions to obtain short names

Sometimes it is useful to obtain the short name for an Operating System,
architecture or compression mechanism. Provide functions for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agotools: Add a function to obtain the size of a file
Simon Glass [Tue, 23 Feb 2016 05:55:49 +0000 (22:55 -0700)]
tools: Add a function to obtain the size of a file

This will be used in mkimage when working out the required size of the FIT
based on the files to be placed into it.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agomkimage: Allow a FIT to include an image of any type
Simon Glass [Tue, 23 Feb 2016 05:55:48 +0000 (22:55 -0700)]
mkimage: Allow a FIT to include an image of any type

At present FIT images are set up by providing a device tree source file
which is a file with a .its extension. We want to support automatically
creating this file based on the image supplied to mkimage. This means that
even though the final file type is always IH_TYPE_FLATDT, the image inside
may be something else.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agotools: Include fdt_sw.o in libfdt for mkimage
Simon Glass [Tue, 23 Feb 2016 05:55:47 +0000 (22:55 -0700)]
tools: Include fdt_sw.o in libfdt for mkimage

At present this file is omitted. It is used to build up a binary device
tree. We plan to do this in mkimage, so include this file in the build.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agosunxi: Display the board model on start-up
Simon Glass [Tue, 23 Feb 2016 05:55:46 +0000 (22:55 -0700)]
sunxi: Display the board model on start-up

It is useful to know which sunxi board you are booting. Display this on
start-up to avoid confusion.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agofdt: Allow libfdt to be used in SPL
Simon Glass [Tue, 23 Feb 2016 05:55:45 +0000 (22:55 -0700)]
fdt: Allow libfdt to be used in SPL

Add an option to enable libfdt in SPL. This can be useful when decoding
FIT files in SPL.

We need to make sure this option is not enabled in SPL by this change.
Also this option needs to be enabled in host builds. Si add a new
IMAGE_USE_LIBFDT #define which can be used in files that are built on the
host but must also build for U-Boot and SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agofdt: Adjust DEFAULT_DEVICE_TREE to device on OF_CONTROL
Simon Glass [Tue, 23 Feb 2016 05:55:44 +0000 (22:55 -0700)]
fdt: Adjust DEFAULT_DEVICE_TREE to device on OF_CONTROL

This option has no meaning without OF_CONTROL, so add a dependency.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoKconfig: Move CONFIG_FIT and related options to Kconfig
Simon Glass [Tue, 23 Feb 2016 05:55:43 +0000 (22:55 -0700)]
Kconfig: Move CONFIG_FIT and related options to Kconfig

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

Move these options to Kconfig and tidy up board configuration:

   CONFIG_FIT
   CONFIG_OF_BOARD_SETUP
   CONFIG_OF_SYSTEM_SETUP
   CONFIG_FIT_SIGNATURE
   CONFIG_FIT_BEST_MATCH
   CONFIG_FIT_VERBOSE
   CONFIG_OF_STDOUT_VIA_ALIAS
   CONFIG_RSA

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

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

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

Move this option to Kconfig and tidy up existing boards.

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

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

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

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

diff in the next patch, reorder the configuration correctly.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

One example for a failing build is Travis CI.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[ ported from Linux commit bac7f4c1bf5e7c6ccd5bb71edc015b26c77f7460 ]

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

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

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

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

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

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

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

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

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

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

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

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

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

Use the new NXP emails.

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>