]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-atmel
Tom Rini [Mon, 30 Nov 2015 23:13:10 +0000 (18:13 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-atmel

9 years agoarm: at91/spl: atmel_sfr: move saic redirect to separate file
Wenyou Yang [Thu, 5 Nov 2015 08:37:53 +0000 (16:37 +0800)]
arm: at91/spl: atmel_sfr: move saic redirect to separate file

To make saic redirect code sharing with other SoCs, move the
saic redirect code from SAMA5D4 particular file,
mach-at91/armv7/sama5d4_devices.c to a separate file,
mach-at91/atmel_sfr.c

Move ATMEL_SFR_AICREDIR_KEY definition to sama5d4.h, because each
SoC has its own value.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm: at91/spl: matrix: use matrix slave id macros
Wenyou Yang [Thu, 5 Nov 2015 08:37:52 +0000 (16:37 +0800)]
arm: at91/spl: matrix: use matrix slave id macros

To make matrix initialization code sharing with others,
use the matrix slave id macros, instead of hard-coding.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm: at91/spl: matrix: remove security peripheral select code
Wenyou Yang [Thu, 5 Nov 2015 08:37:51 +0000 (16:37 +0800)]
arm: at91/spl: matrix: remove security peripheral select code

Remove the security peripheral select code, keep the default value
in these registers, that is, the peripheral address space is
configured as "Secured" access, it is suitable for SPL.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm: at91/spl: matrix: remove matrix write protection code
Wenyou Yang [Thu, 5 Nov 2015 08:37:50 +0000 (16:37 +0800)]
arm: at91/spl: matrix: remove matrix write protection code

On processor reset, the matrix write protection is disabled,
so no need to disable/enable write protection when writing
the matrix registers.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm: at91/spl: matrix: move matrix init to separate file
Wenyou Yang [Thu, 5 Nov 2015 08:37:49 +0000 (16:37 +0800)]
arm: at91/spl: matrix: move matrix init to separate file

To make the matrix initialization code sharing with other SoCs,
move it from SAMA5D4 particular file,
mach-at91/armv7/sama5d4_devices.c to a separate file,
mach-at91/matrix.c

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm: atmel: Add SAMA5D2 Xplained board
Wenyou Yang [Fri, 30 Oct 2015 01:55:52 +0000 (09:55 +0800)]
arm: atmel: Add SAMA5D2 Xplained board

The board supports following features:
 - Boot media support: SD card/e.MMC/SPI flash,
 - Support LCD display (optional, disabled by default),
 - Support ethernet,
 - Support USB mass storage.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
[fix checkpatch warnings]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agogpio: atmel: Add the PIO4 driver support
Wenyou Yang [Wed, 4 Nov 2015 06:25:13 +0000 (14:25 +0800)]
gpio: atmel: Add the PIO4 driver support

The PIO4 is introduced from SAMA5D2, as a new version
for Atmel PIO controller.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Mon, 30 Nov 2015 20:18:30 +0000 (15:18 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq

9 years agoarmv8: fsl-layerscape: Fix early MMU table for nand boot
York Sun [Wed, 25 Nov 2015 22:56:40 +0000 (14:56 -0800)]
armv8: fsl-layerscape: Fix early MMU table for nand boot

The early MMU table doesn't enable all addresses. Unused addresses
are marked as invalid, as introduced by commit 9979922. An entry
was missing for NAND flash space, causing nand boot failure.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Alison Wang <alison.wang@freescale.com>
CC: Prabhakar Kushwaha <prabhakar@freescale.com>
9 years agoarmv8: ls2080a: Define CONFIG_ENV_OVERWRITE to overwrite serial and ethaddr
Alison Wang [Fri, 13 Nov 2015 08:49:06 +0000 (16:49 +0800)]
armv8: ls2080a: Define CONFIG_ENV_OVERWRITE to overwrite serial and ethaddr

As the environment variables "serial#" and "ethaddr" need to be
overwriten by the users, CONFIG_ENV_OVERWRITE is defined to disable
the write protection. Anybody can change or delete these parameters.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agonet: phy: added aquantia PHY AQR405 support
Shaohui Xie [Tue, 10 Nov 2015 11:16:33 +0000 (19:16 +0800)]
net: phy: added aquantia PHY AQR405 support

The phy can share driver with other aquantia PHYs, so we only
add PHY ID.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarmv8: ls2085a: Add workaround of errata A009635
Prabhakar Kushwaha [Thu, 5 Nov 2015 06:30:14 +0000 (12:00 +0530)]
armv8: ls2085a: Add workaround of errata A009635

If the core runs at higher than x3 speed of the platform, there is
possiblity about sev instruction to getting missed by other cores.
This is because of SoC Run Control block may not able to sample
the EVENTI(Sev) signals.

Configure Run Control and EPU to periodically send out EVENTI signals to
wake up A57 cores.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoboard/ls2080qds: Fix typo in README for QSGMII riser card
Prabhakar Kushwaha [Thu, 5 Nov 2015 04:12:31 +0000 (09:42 +0530)]
board/ls2080qds: Fix typo in README for QSGMII riser card

DPMACx to PHY mapping for SGMII is mentioned as QSGMII.

So fix typo in README for QSGMII rise card.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
[York Sun: Change from ls2085aqds to ls2080aqds]
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarm: ls102xa: Update fdt_high and initrd_high for LS1021AQDS board
Alison Wang [Thu, 5 Nov 2015 03:16:26 +0000 (11:16 +0800)]
arm: ls102xa: Update fdt_high and initrd_high for LS1021AQDS board

As 3G/1G user/kernel memory split is used on LS1021A, the Linux kernel
fails to access the device tree blob on boot. The reason is that u-boot
relocates the device tree blob into high memory when booting the kernel
and the kernel is unable to access the blob.

To avoid this issue, fdt_high is set to the value of 0xffffffff. The
device tree blob will not get relocated and is still in low memory to
make it accessible to the kernel.

For the same reason, initrd_high is set to the value of 0xffffffff too.

This patch is to update fdt_high and initrd_high for LS1021AQDS board.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarmv8: fsl-layerscape: Fix "cpu release" command
York Sun [Thu, 12 Nov 2015 20:38:21 +0000 (12:38 -0800)]
armv8: fsl-layerscape: Fix "cpu release" command

When one core is released, other cores may not have valid entry
address. Those cores are trapped by "wfe" and wait for further
instruction. When their address is set, they need to be kicked
off by "sev".

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agodrivers/ddr/fsl: Fix typo in BIST test for DDR4
York Sun [Fri, 6 Nov 2015 17:58:46 +0000 (09:58 -0800)]
drivers/ddr/fsl: Fix typo in BIST test for DDR4

BIST test code has a typo, resulting the binding registers not
maintained as expected. This typo results BIST runs twice on
the covered memory.

Signed-off-by: York Sun <yorksun@freescale.com>
Reported-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
9 years agoarmv8/layerscape: Update MMU table with execute-never bits
Alison Wang [Thu, 5 Nov 2015 03:15:49 +0000 (11:15 +0800)]
armv8/layerscape: Update MMU table with execute-never bits

For most device addresses excution shouldn't be allowed. Revise
the MMU table to enforce execute-never bits. OCRAM, DDR and IFC
are allowed for excution.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reported-by: Zhichun Hua <zhichun.hua@freescale.com>
9 years agodrivers/ddr/fsl: Enable detection of one DDR controller operation for LSCH3
York Sun [Wed, 4 Nov 2015 17:53:10 +0000 (09:53 -0800)]
drivers/ddr/fsl: Enable detection of one DDR controller operation for LSCH3

Freescale LSCH3 platforms use two DDR controlers interleaving mode out of
reset. It can be configured to disable one controller. To support this
operation, the driver needs to detect and skip the disabled controller.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agoarmv8/ls1043ardb: add USB support
Gong Qianyu [Wed, 11 Nov 2015 09:58:40 +0000 (17:58 +0800)]
armv8/ls1043ardb: add USB support

Add support for the third USB controller for LS1043A.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarmv8/ls1043ardb: add DSPI support
Gong Qianyu [Wed, 11 Nov 2015 09:58:39 +0000 (17:58 +0800)]
armv8/ls1043ardb: add DSPI support

Use the U-Boot Driver Model. Just enable Freescale DSPI driver
and set DSPI related parameters in dts file.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarmv8/ls1043aqds: dts: add dtb support
Gong Qianyu [Wed, 11 Nov 2015 09:58:38 +0000 (17:58 +0800)]
armv8/ls1043aqds: dts: add dtb support

Reuse the dts files from ls1043a linux kernel.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarmv8/ls1043aqds: add LS1043AQDS board support
Shaohui Xie [Wed, 11 Nov 2015 09:58:37 +0000 (17:58 +0800)]
armv8/ls1043aqds: add LS1043AQDS board support

LS1043AQDS Specification:
-------------------------
Memory subsystem:
 * 2GByte DDR4 DIMM
 * 128 Mbyte NOR flash single-chip memory
 * 512 Mbyte NAND flash
 * 16 Mbyte high-speed SPI flash
 * SD connector to interface with the SD memory card

Ethernet:
 * Two RGMII ports
 * XFI 10G port
 * SGMII
 * QSGMII with 4x 1G ports

PCIe: supports Gen 1 and Gen 2

SATA 3.0: one SATA 3.0 port

USB 3.0: two micro AB connector and one type A connector

UART: supports two UARTs up to 115200 bps for console

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
[York Sun: Add CONFIG_SYS_NS16550=y in defconfig]
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarmv8/ls1043ardb: dts: add dtb support
Gong Qianyu [Wed, 11 Nov 2015 09:58:36 +0000 (17:58 +0800)]
armv8/ls1043ardb: dts: add dtb support

Reuse dts files from ls1043a linux kernel. Some parts in dts files
may not be needed by U-Boot.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarmv8/fsl-layerscape: Remove reference to gdata
Gong Qianyu [Wed, 11 Nov 2015 09:58:35 +0000 (17:58 +0800)]
armv8/fsl-layerscape: Remove reference to gdata

The global_data pointer (gd) has been set earlier in crt0_64.S.
So there's no need to assign it again. Remove gdata since it is going
away in U-Boot.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopci/layerscape: add support for LS1043A PCIe LUT register access
Mingkai Hu [Wed, 11 Nov 2015 09:58:34 +0000 (17:58 +0800)]
pci/layerscape: add support for LS1043A PCIe LUT register access

The endian and base address of PEX LUT register region is different
between Chassis 2 and Chassis 3, so move the base address definition
to chassis specific header file and add pex_lut_* functions to access
LUT register.

Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarmv8: ls2085a: Add support of LS2085A SoC
Prabhakar Kushwaha [Mon, 9 Nov 2015 11:12:20 +0000 (16:42 +0530)]
armv8: ls2085a: Add support of LS2085A SoC

Freescale's LS2085A is a another personality of LS2080A SoC with
support of AIOP and DP-DDR.
This Patch adds support of LS2085A Personality.

Signed-off-by: Pratiyush Mohan Srivastava <pratiyush.srivastava@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
[York Sun: Updated MAINTAINERS files
           Dropped #ifdef in cpu.h
           Add CONFIG_SYS_NS16550=y in defconfig]
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarmv8: LS2080A: Rename LS2085A to reflect LS2080A
Prabhakar Kushwaha [Mon, 9 Nov 2015 11:12:07 +0000 (16:42 +0530)]
armv8: LS2080A: Rename LS2085A to reflect LS2080A

LS2080A is a prime personality of Freescale’s LS2085A. It is a non-AIOP
personality without support of DP-DDR, L2 switch, 1588, PCIe endpoint etc.
So renaming existing LS2085A code base to reflect LS2080A (Prime personality)

Signed-off-by: Pratiyush Mohan Srivastava <pratiyush.srivastava@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
[York Sun: Dropped #ifdef in cpu.c for cpu_type_list]
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver: net: ldpaa: Fix Rx buffer alignment
Prabhakar Kushwaha [Wed, 4 Nov 2015 06:56:02 +0000 (12:26 +0530)]
driver: net: ldpaa: Fix Rx buffer alignment

MC 0.7.1.2 enforces limitation i.e.: "Packets may be corrupted
in several combinations of buffer size and frame offsets.
Workaround: Use buffers that are of size that is a multiple of 256, and
frame offset that is a multiple of 256"

Updating the DPNI Eth driver to comply with the restriction.

Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver: net: ldpaa: Add debug information
Prabhakar Kushwaha [Wed, 4 Nov 2015 06:56:01 +0000 (12:26 +0530)]
driver: net: ldpaa: Add debug information

Add following debug information in the driver
 - Get various DPNI counter values
 - Get link status of DPNI objects
 - Get information of both ends of connection (DPMAC - DPNI)

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver: net: ldpaa: Use DPMAC as net device
Prabhakar Kushwaha [Wed, 4 Nov 2015 06:56:00 +0000 (12:26 +0530)]
driver: net: ldpaa: Use DPMAC as net device

As per current implementation of DPAA2 ethernet driver DPNI is used as
net device. DPNI is tangible objects can be multiple connected to same physical lane.

Use DPMAC as net device where it represents physical lane.
Below modification done in driver
 - Use global DPNI object
 - Connect DPMAC to DPNI
 - Create and destroy DPMAC

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver: net: fsl-mc: Create DPAA2 object at run-time
Prabhakar Kushwaha [Wed, 4 Nov 2015 06:55:59 +0000 (12:25 +0530)]
driver: net: fsl-mc: Create DPAA2 object at run-time

Freescale's DPAA2 ethernet driver depends upon the static DPL for the
DPRC, DPNI, DPBP, DPIO objects.

Instead of static objects, Create DPNI, DPBP, DPIO objects at run-time.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver: net: fsl-mc: Add DPAA2 commands to manage MC
Prabhakar Kushwaha [Wed, 4 Nov 2015 06:55:58 +0000 (12:25 +0530)]
driver: net: fsl-mc: Add DPAA2 commands to manage MC

Management complex Firmware, DPL and DPC are depolyed during u-boot boot
sequence.

Add new DPAA2 commands to manage Management Complex (MC) i.e. start mc, aiop
and apply DPL from u-boot command prompt.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver: net: fsl-mc: Increase MC command timeout
Prabhakar Kushwaha [Wed, 4 Nov 2015 06:55:57 +0000 (12:25 +0530)]
driver: net: fsl-mc: Increase MC command timeout

dpni_create API take takes more time as comapred to existing supported
APIs of MC Flib.
So increase MC command timeout.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver: ldpaa: Add api to return linked PHY ID of DPMAC
Prabhakar Kushwaha [Wed, 4 Nov 2015 06:55:56 +0000 (12:25 +0530)]
driver: ldpaa: Add api to return linked PHY ID of DPMAC

DPMAC represents physical line on the board. This physical
line eventually asscociate with on-board PHY.

So Add an api to return linked PHY ID of DPMAC object.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarmv8: ls2085aqds: Print function name during SerDes error
Prabhakar Kushwaha [Wed, 4 Nov 2015 06:55:55 +0000 (12:25 +0530)]
armv8: ls2085aqds: Print function name during SerDes error

Print function name along with SerDes Protocol during SerDes Protocol
not supported error.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver: net: fsl-mc: Add APIs for DPMAC objects in FLIB
Prabhakar Kushwaha [Wed, 4 Nov 2015 06:55:54 +0000 (12:25 +0530)]
driver: net: fsl-mc: Add APIs for DPMAC objects in FLIB

DPMAC object of Management complex controls Physical MAC and MDIO controller.
It provides APIs for MDIO and link state updates. It also provides APIs for
PHY/link configuration.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver: net: fsl-mc: Add create, destroy APIs in flibs
Prabhakar Kushwaha [Wed, 4 Nov 2015 06:55:53 +0000 (12:25 +0530)]
driver: net: fsl-mc: Add create, destroy APIs in flibs

Current Management Complex Flibs does not support APIs for adding and
destroying the objects.

Add APIs to create and destroy objects for DPBP, DPIO, DPNI and DPRC.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarmv8: lsch3: Fix lane protocol parsing logic
Prabhakar Kushwaha [Wed, 4 Nov 2015 06:55:52 +0000 (12:25 +0530)]
armv8: lsch3: Fix lane protocol parsing logic

Current implementation only consider SGMIIs for dpmac initialization.
XFI serdes protocols also uses dpmac.

Also, fix lane protocol parsing logic to consider both XFIs and SGMIIs.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarm: ls1021a: Ensure Generic Timer disabled before jumping into the OS
Alison Wang [Tue, 4 Aug 2015 01:55:37 +0000 (09:55 +0800)]
arm: ls1021a: Ensure Generic Timer disabled before jumping into the OS

This patch addresses a problem mentioned recently on this mailing list:
[1].

In that posting a LS1021 based system was locking up at about 5 minutes
after boot,but the problem was mysteriously related to the toolchain
used for building u-boot.Debugging the problem reveals a stuck
interrupt 29 on the GIC.

It appears Freescale's LS1021 support in u-boot erroneously sets the
64-bit ARM generic PL1 physical time CompareValue register to all-ones
with a 32-bit value.This causes the timer compare to fire 344 seconds
after u-boot configures it.Depending on how fast u-boot gets the
kernel booted,this amounts to about 5-minutes of Linux uptime before
locking up.

Apparently the bug is masked by some toolchains. Perhaps this is
explained by default compiler options, word sizes, or binutils versions.

To fix the above issue, the generic physical timer is disabled
before jumping to the OS.

[1]
https://lists.yoctoproject.org/pipermail/meta-freescale/2015-June/014400.html

Signed-off-by: Chris Kilgour <techie@whiterocker.com>
Signed-off-by: Alison Wang <alison.wang@freescale.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarm: ls1021a: Ensure LS1021 ARM Generic Timer CompareValue Set 64-bit
Alison Wang [Wed, 15 Jul 2015 07:13:05 +0000 (15:13 +0800)]
arm: ls1021a: Ensure LS1021 ARM Generic Timer CompareValue Set 64-bit

This patch addresses a problem mentioned recently on this mailing list:
[1].

In that posting a LS1021 based system was locking up at about 5 minutes
after boot, but the problem was mysteriously related to the toolchain
used for building u-boot.  Debugging the problem reveals a stuck
interrupt 29 on the GIC.

It appears Freescale's LS1021 support in u-boot erroneously sets the
64-bit ARM generic PL1 physical time CompareValue register to all-ones
with a 32-bit value.  This causes the timer compare to fire 344 seconds
after u-boot configures it.  Depending on how fast u-boot gets the
kernel booted, this amounts to about 5-minutes of Linux uptime before
locking up.

Apparently the bug is masked by some toolchains.  Perhaps this is
explained by default compiler options, word sizes, or binutils versions.
At any rate this patch makes the manipulation explicitly 64-bit which
alleviates the issue.

[1]
https://lists.yoctoproject.org/pipermail/meta-freescale/2015-June/014400.html

Signed-off-by: Chris Kilgour <techie@whiterocker.com>
Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoMerge git://git.denx.de/u-boot-socfpga
Tom Rini [Mon, 30 Nov 2015 13:30:14 +0000 (08:30 -0500)]
Merge git://git.denx.de/u-boot-socfpga

9 years agoarm: socfpga: Remove fsloadcmd from environment
Chin Liang See [Fri, 27 Nov 2015 13:32:40 +0000 (21:32 +0800)]
arm: socfpga: Remove fsloadcmd from environment

Remove fsloadcmd / ext2load as we are using load command
which use the corresponding latest file system command.

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
9 years agoarm: socfpga: dts: Adding drvsel and smplsel to dts
Chin Liang See [Thu, 26 Nov 2015 01:44:11 +0000 (09:44 +0800)]
arm: socfpga: dts: Adding drvsel and smplsel to dts

Adding new node drvsel and smplsel for SDMMC

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
9 years agommc: socfpga_dw_mmc: Move drvsel and smplsel to dts
Chin Liang See [Thu, 26 Nov 2015 01:43:43 +0000 (09:43 +0800)]
mmc: socfpga_dw_mmc: Move drvsel and smplsel to dts

socfpga_dw_mmc driver will obtain the drvsel and
smplsel value from device tree instead of definition
in config header file.

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agoarm: socfpga: Repair SoCrates board
Marek Vasut [Mon, 23 Nov 2015 16:06:27 +0000 (17:06 +0100)]
arm: socfpga: Repair SoCrates board

This board was constantly parasiting on the CV SoCDK, so split it
into it's own separate directory. Moreover, the board config was
missing important bits, like simple-bus support in SPL, the DRAM
configuration was incorrect and the DTS was also missing the pre
reloc bits.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: Jan Viktorin <viktorin@rehivetech.com>
9 years agoARM: socfpga: rename the cyclone5 and arria5 base address file
Dinh Nguyen [Mon, 23 Nov 2015 23:27:17 +0000 (17:27 -0600)]
ARM: socfpga: rename the cyclone5 and arria5 base address file

When adding support for the Arria10 platform, we're going to name the file
base_addr_a10.h, so to be systematic about it, rename the socfpga_base_addr.h
to be base_addr_ac5.h for the Arria5 and Cyclone5 platform.

Suggested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
9 years agoARM: socfpga: arria10: add base address map for Arria10
Dinh Nguyen [Mon, 23 Nov 2015 23:27:16 +0000 (17:27 -0600)]
ARM: socfpga: arria10: add base address map for Arria10

Add the base address map for Arria10.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agoarm: socfpga: reset: FIX address of tstscratch register
Philipp Rosenberger [Thu, 12 Nov 2015 17:23:10 +0000 (18:23 +0100)]
arm: socfpga: reset: FIX address of tstscratch register

The Cyclone V Hard Processor System Technical Reference Manual in the
chapter about the Reset Manager Module Address Map stats that the offset
of the tstscratch register ist 0x54 not 0x24.

Cyclone V Hard Processor System Technical Reference Manual cv_5v4 2015.11.02
page 3-17 Reset Manager Module Address Map

Signed-off-by: Philipp Rosenberger <ilu@linutronix.de>
9 years agoMerge git://www.denx.de/git/u-boot-cfi-flash
Tom Rini [Mon, 30 Nov 2015 12:11:53 +0000 (07:11 -0500)]
Merge git://www.denx.de/git/u-boot-cfi-flash

9 years agoMerge git://www.denx.de/git/u-boot-ppc4xx
Tom Rini [Mon, 30 Nov 2015 12:10:49 +0000 (07:10 -0500)]
Merge git://www.denx.de/git/u-boot-ppc4xx

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-samsung
Tom Rini [Mon, 30 Nov 2015 12:10:27 +0000 (07:10 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-samsung

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Mon, 30 Nov 2015 12:10:18 +0000 (07:10 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-video

9 years agocfi_flash: give default CONFIG_SYS_MAX_FLASH_SECT in flash.h
Thomas Chou [Sat, 31 Oct 2015 03:09:36 +0000 (11:09 +0800)]
cfi_flash: give default CONFIG_SYS_MAX_FLASH_SECT in flash.h

Give default CONFIG_SYS_MAX_FLASH_SECT in flash.h, so that
the header can be included regardless of the present of flash.
The value 512 is the most used.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoPPC4xx: Create "liebherr" vendor directory
Wolfgang Denk [Tue, 24 Nov 2015 19:46:45 +0000 (20:46 +0100)]
PPC4xx: Create "liebherr" vendor directory

In preparation of some new Liebherr boards to be added soon, a new
"liebherr" vendor directory gets created, and the "lwmon5" board
directory is moved into this new vendor directory.

cc: Stefan Roese <sr@denx.de>
Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoppc4xx: Remove remnants from ocotea, taishan, ebony and taihu
Stefan Roese [Tue, 27 Oct 2015 11:48:15 +0000 (12:48 +0100)]
ppc4xx: Remove remnants from ocotea, taishan, ebony and taihu

The removal of some PPC4xx boards did not catch all references to
these boards. This patch now removes all remnants still left.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Stefan Roese <sr@denx.de>
9 years agovideo: ipu: fix out of bounds access
Peng Fan [Fri, 27 Nov 2015 02:00:10 +0000 (10:00 +0800)]
video: ipu: fix out of bounds access

We need to access reg stp_rep9, but not stp_rep[(9 - 1) / 2].
If using "__raw_writel(0, DI_STP_REP(disp, 9))", this will exceeds
the size of stp_rep array.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Acked-by: Liu Ying <Ying.Liu@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agoarm: s5pc1xx: move SoC to mach-s5pc1xx
Minkyu Kang [Fri, 20 Nov 2015 06:24:57 +0000 (15:24 +0900)]
arm: s5pc1xx: move SoC to mach-s5pc1xx

move arm/arm/cpu/armv7/s5pc1xx to arch/arm/mach-s5pc1xx

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoarm: kirkwood: add ZyXEL NSA310S device
Gerald Kerma [Fri, 23 Oct 2015 07:50:58 +0000 (09:50 +0200)]
arm: kirkwood: add ZyXEL NSA310S device

This patch add ZyXEL NSA310S 1-Bay Media Server

The ZyXEL NSA310S device is a Kirkwood based NAS:

- SoC: Marvell 88F6702 1000Mhz
- SDRAM memory: 256MB DDR2 400Mhz
- Gigabit ethernet: PHY Marvell 88E1318
- Flash memory: 128MB
- 1 Power button
- 1 Power LED (blue)
- 4 Status LED (green)
- 1 Copy/Sync button
- 1 Reset button
- 1 SATA II port
- 2 USB 2.0 ports (front and back)
- Smart fan

Signed-off-by: Gerald Kerma <dreagle@doukki.net>
Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
9 years agotools/kwbimage: fix size computations for v1 images
Reinhard Pfau [Sun, 29 Nov 2015 14:52:14 +0000 (15:52 +0100)]
tools/kwbimage: fix size computations for v1 images

Fix computation of haeder size and binary header size.
Size of opt header and some 32bit values were not taken into account. This could
result in invalid boot images (due to the wrong binary header size, the image could
claim to have another extension header after the binary extension although there
is none).

Use "uint32_t" instead of "unsigned int" for header size computation.

Signed-off-by: Reinhard Pfau <reinhard.pfau@gdsys.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agotools/kwbimage: fix endianess issue
Reinhard Pfau [Sun, 29 Nov 2015 14:48:25 +0000 (15:48 +0100)]
tools/kwbimage: fix endianess issue

KWB image header values are in little endian (LE).
So adding appropriate cpu_to_leXX() calls to allow building those images
on BE hosts, too.

Signed-off-by: Reinhard Pfau <reinhard.pfau@gdsys.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
9 years agotools/kwbimage.c: Make sure that the resulting image is 4-byte aligned
Stefan Roese [Tue, 24 Nov 2015 08:14:59 +0000 (09:14 +0100)]
tools/kwbimage.c: Make sure that the resulting image is 4-byte aligned

With the dtb added to the main U-Boot image, it can happen, that
the resulting image is not 4-byte aligned. As the dtb tends to
be unaligned. But the image needs to be 4-byte aligned. At least the
Marvell hdrparser tool complains if its unaligned. By returning 1 here
in kwbimage_generate(), called via tparams->vrec_header() in mkimage.c,
mkimage will automatically pad the resulting image to a 4-byte size
if necessary.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
9 years agoarm: mvebu: Configure ARP timeout and retry count
Stefan Roese [Tue, 24 Nov 2015 08:15:22 +0000 (09:15 +0100)]
arm: mvebu: Configure ARP timeout and retry count

As some MVEBU platforms using the MVNETA driver seem to miss the
first ARP packet, lets reduce the timeout and increase the retry
count. This increases the speed for communication establishment.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Fri, 27 Nov 2015 13:41:03 +0000 (08:41 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

9 years agoi2c: Fix the comment to match the function described
Stefan Roese [Wed, 25 Nov 2015 06:41:58 +0000 (07:41 +0100)]
i2c: Fix the comment to match the function described

Use the correct function name in the function description.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
9 years agoarm: spear: x600: Enable tiny-printf
Stefan Roese [Tue, 24 Nov 2015 08:25:08 +0000 (09:25 +0100)]
arm: spear: x600: Enable tiny-printf

Enabling the new tiny-printf function makes the SPL image fit again in
the 8KiB restricted area.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@konsulko.com>
9 years agosf: Move SPI flash drivers to defconfig
Bin Meng [Wed, 25 Nov 2015 13:34:54 +0000 (05:34 -0800)]
sf: Move SPI flash drivers to defconfig

There are already Kconfig options for SPI flash drivers, but we
have not moved them from config.h to defconfig files. This commit
does this in a batch.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
9 years agospi: Move SPI drivers to defconfig
Bin Meng [Wed, 25 Nov 2015 13:34:53 +0000 (05:34 -0800)]
spi: Move SPI drivers to defconfig

There are already Kconfig options for SPI drivers, but we
have not moved them from config.h to defconfig files. This
commit does this in a batch.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
9 years agoam33xx: Remove serial_init in s_init for QSPI/NOR XIP boot
Vignesh R [Fri, 20 Nov 2015 10:37:41 +0000 (16:07 +0530)]
am33xx: Remove serial_init in s_init for QSPI/NOR XIP boot

serial_init() reads global_data, since global_data is not yet
initialized, this can cause unwanted behaviour leading to QSPI XIP boot
hang. Also, since serial_init() is anyways called later from
boar_init_f(), it does not make sense to do the same in s_init().

Tested on AM437x IDK EVM with QSPI XIP boot.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agofs: ext4: Prevent infinite loop in ext4fs_iterate_dir
Thomas Fitzsimmons [Wed, 18 Nov 2015 17:42:53 +0000 (12:42 -0500)]
fs: ext4: Prevent infinite loop in ext4fs_iterate_dir

If the ext3 journal gets out of sync with what is written on disk, for
example because of an unexpected power cut, ext4fs_read_file can
return an all-zero directory entry.  In that case, ext4fs_iterate_dir
would infinite loop.

This patch detects when a directory entry's direntlen member is 0 and
returns a failure status, which breaks out of the infinite loop.  As a
result, U-Boot will not find files that may subsequently be recovered
when the journal is replayed.

This is better behaviour than hanging in an infinite loop, but as a
further improvement maybe U-Boot could interpret the ext3 journal and
actually find the unsynced entries.

Signed-off-by: Thomas Fitzsimmons <fitzsim@cisco.com>
Reviewed-by: Stefan Roese <sr@denx.de>
9 years agopci: fix address range check in __pci_hose_phys_to_bus()
Marcel Ziswiler [Wed, 18 Nov 2015 14:05:06 +0000 (15:05 +0100)]
pci: fix address range check in __pci_hose_phys_to_bus()

The address range check may overflow if the memory region is located at
the top of the 32-bit address space. This can e.g. be seen on TK1 if
using the E1000 gigabit Ethernet driver where start and size are both
0x80000000 leading to the following messages:

Apalis TK1 # tftpboot $loadaddr test_file
Using e1000#0 device
TFTP from server 192.168.10.1; our IP address is 192.168.10.2
Filename 'test_file'.
Load address: 0x80408000
Loading: pci_hose_phys_to_bus: invalid physical address

This patch fixes this by changing the order of the addition vs.
subtraction in the range check just like already done in
__pci_hose_bus_to_phys().

Reported-by: Ivan Mercier <ivan.mercier@nexvision.fr>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agopart:efi: add bootable parameter in gpt command
Patrick Delaunay [Tue, 17 Nov 2015 10:36:52 +0000 (11:36 +0100)]
part:efi: add bootable parameter in gpt command

The optional parameter bootable is added in gpt command to set the
partition attribute flag "Legacy BIOS bootable"

This flag is used in extlinux and so in with distro to select
the boot partition where is located the configuration file
(please check out doc/README.distro for details).

With this parameter, U-Boot can be used to create the boot partition
needed for device using distro.

example of use:

setenv partitions "name=u-boot,size=60MiB;name=boot,size=60Mib,bootable;\
                   name=rootfs,size=0"

> gpt write mmc 0 $partitions

> part list mmc 0

Partition Map for MMC device 0  --   Partition Type: EFI

Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
  1 0x00000022 0x0001e021 "u-boot"
attrs: 0x0000000000000000
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
guid: cceb0b18-39cb-d547-9db7-03b405fa77d4
  2 0x0001e022 0x0003c021 "boot"
attrs: 0x0000000000000004
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
guid: d4981a2b-0478-544e-9607-7fd3c651068d
  3 0x0003c022 0x003a9fde "rootfs"
attrs: 0x0000000000000000
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
guid: 6d6c9a36-e919-264d-a9ee-bd00379686c7

> part list mmc 0 -bootable devplist

> printenv devplist

devplist=2

Then the distro scripts will search extlinux in partition 2
and not in the first partition.

Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
9 years agogpt: command: Extend gpt command to support GPT table verification
Lukasz Majewski [Fri, 20 Nov 2015 07:06:17 +0000 (08:06 +0100)]
gpt: command: Extend gpt command to support GPT table verification

This commit adds support for "gpt verify" command, which verifies
correctness of on-board stored GPT partition table.
As the optional parameter one can provide '$partitons' environment variable
to check if partition data (size, offset, name) is correct.

This command should be regarded as complementary one to "gpt restore".

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agogpt: part: Definition and declaration of GPT verification functions
Lukasz Majewski [Fri, 20 Nov 2015 07:06:16 +0000 (08:06 +0100)]
gpt: part: Definition and declaration of GPT verification functions

This commit provides definition and declaration of GPT verification
functions - namely gpt_verify_headers() and gpt_verify_partitions().
The former is used to only check CRC32 of GPT's header and PTEs.
The latter examines each partition entry and compare attributes such as:
name, start offset and size with ones provided at '$partitions' env
variable.

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 years agogpt: doc: Update gpt command's help description
Lukasz Majewski [Fri, 13 Nov 2015 06:42:10 +0000 (07:42 +0100)]
gpt: doc: Update gpt command's help description

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agogpt: doc: README: Update README entry for gpt verify extension
Lukasz Majewski [Fri, 20 Nov 2015 07:06:14 +0000 (08:06 +0100)]
gpt: doc: README: Update README entry for gpt verify extension

./doc/README.gpt entry has been updated to explain usage of "gpt verify"
command.

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agogpt: command: Remove duplicated check for empty partition description
Lukasz Majewski [Fri, 20 Nov 2015 07:06:13 +0000 (08:06 +0100)]
gpt: command: Remove duplicated check for empty partition description

Exactly the same check is performed in set_gpt_info() function executed
just after this check.

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agolib/tiny-printf.c: Support numbers bigger than 0xffff and misc updates
Stefan Roese [Mon, 16 Nov 2015 14:26:34 +0000 (15:26 +0100)]
lib/tiny-printf.c: Support numbers bigger than 0xffff and misc updates

With this patch now, the tiny printf() function also supports numbers
bigger than 0xffff. Additionally the code is simplified a bit and
some static variables are moved to function parameters. Also the
upper case hex variable output support is removed, as its not really
needed in this simple printf version. And removing it reduces the
complexity and the code size again a bit.

Here the new numbers, again on the db-mv784mp-gp (Armada XP):

Without this patch:
  56542   18536    1956   77034   12cea ./spl/u-boot-spl

With this patch:
  56446   18536    1936   76918   12c76 ./spl/u-boot-spl

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
9 years agolib/tiny-printf.c: Add tiny printf function for space limited environments
Stefan Roese [Mon, 23 Nov 2015 06:00:22 +0000 (07:00 +0100)]
lib/tiny-printf.c: Add tiny printf function for space limited environments

This patch adds a small printf() version that supports all basic formats.
Its intented to be used in U-Boot SPL versions on platforms with very
limited internal RAM sizes.

To enable it, just define CONFIG_USE_TINY_PRINTF in your defconfig. This
will result in the SPL using this tiny function and the main U-Boot
still using the full-blown printf() function.

This code was copied from:
http://www.sparetimelabs.com/printfrevisited
With mostly only coding style related changes so that its checkpatch
clean.

The size reduction is about 2.5KiB. Here a comparison for the db-mv784mp-gp
(Marvell AXP) SPL:

Without this patch:
  58963   18536    1928   79427   13643 ./spl/u-boot-spl

With this patch:
  56542   18536    1956   77034   12cea ./spl/u-boot-spl

Note:
To make it possible to compile tiny-printf.c instead of vsprintf.c when
CONFIG_USE_TINY_PRINTF is defined, the functions printf() and vprintf() are
moved from common/console.c into vsprintf.c in this patch.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
9 years agocommon/console.c: Small coding style cleanup
Stefan Roese [Mon, 16 Nov 2015 14:26:32 +0000 (15:26 +0100)]
common/console.c: Small coding style cleanup

Change some comments to match the U-Boot coding style rules.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agocommon/console.c: Drop sandbox special-case console code
Stefan Roese [Mon, 16 Nov 2015 14:26:31 +0000 (15:26 +0100)]
common/console.c: Drop sandbox special-case console code

As done in commit da229e4e [sandbox: Drop special-case sandbox console code],
this patch drops the sandbox special-case code in vprintf() that was
missed by Simon at that time.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoi2c, avr32: fix compiler warning "input is not relaxable"
Heiko Schocher [Tue, 17 Nov 2015 11:22:53 +0000 (12:22 +0100)]
i2c, avr32: fix compiler warning "input is not relaxable"

compiling U-Boot for avr32 boards shows since
commit 3d1957f0ea01 "dm: i2c: Add support for multiplexed I2C buses"
this warning:

Building current source for 4 boards (4 threads, 8 jobs per thread)
     avr32:  +   atstk1002
+(atstk1002) drivers/i2c/built-in.o: warning: input is not relaxable
     avr32:  +   grasshopper
+(grasshopper) drivers/i2c/built-in.o: warning: input is not relaxable
     avr32:  +   atngw100
+(atngw100) drivers/i2c/built-in.o: warning: input is not relaxable
     avr32:  +   atngw100mkii
+(atngw100mkii) drivers/i2c/built-in.o: warning: input is not relaxable
    0    4    0 /4      0:00:16  : atngw100mkii

Fix it.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Roger Meier <r.meier@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agosunxi: Update new defconfigs
Tom Rini [Sun, 22 Nov 2015 15:46:25 +0000 (10:46 -0500)]
sunxi: Update new defconfigs

After introduction of CONFIG_SYS_NS16550 these defconfig files were
added and need to be updated.

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoMerge branch 'master' of http://git.denx.de/u-boot-sunxi
Tom Rini [Sun, 22 Nov 2015 13:20:03 +0000 (08:20 -0500)]
Merge branch 'master' of http://git.denx.de/u-boot-sunxi

9 years agosunxi: Add support for the Lamobo R1 board
Jelle de Jong [Sun, 18 Oct 2015 14:34:13 +0000 (16:34 +0200)]
sunxi: Add support for the Lamobo R1 board

The lamobo-r1 board, sometimes called the BPI-R1 but not labelled as such
on the PCB, is meant as a A20 based router board. As such the board comes
with a built-in switch chip giving it 5 gigabit ethernet ports, and it
has a large empty area on the pcb with mounting holes which will fit a
2.5 inch harddisk. To complete its networking features it has a
Realtek RTL8192CU for WiFi 802.11 b/g/n.

The dts file is identical to the one submitted upstream.

Signed-off-by: Jelle de Jong <jelledejong@powercraft.nl>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: Add support for Orangepi Plus and Orangepi PC boards
Hans de Goede [Fri, 20 Nov 2015 15:19:51 +0000 (16:19 +0100)]
sunxi: Add support for Orangepi Plus and Orangepi PC boards

Add defconfig files for the Orangepi Plus and Orangepi PC.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: Add H3 dts[i] files
Hans de Goede [Fri, 20 Nov 2015 15:03:56 +0000 (16:03 +0100)]
sunxi: Add H3 dts[i] files

These files are based on the current latest upstream kernel work. The
bus_gates bindings may still change, but for u-boot that does not matter
as we do not (yet) use any clock info from devicetree for sunxi u-boot.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: clock: Set AHB1 clock frequency to 200MHz on Allwinner H3
Siarhei Siamashka [Fri, 20 Nov 2015 05:07:48 +0000 (07:07 +0200)]
sunxi: clock: Set AHB1 clock frequency to 200MHz on Allwinner H3

The 3.4 kernel from the Allwinner SDK is clocking AHB1 at 200MHz
on Allwinner H3 and using PLL6 as the clock source (PLL6/3).
This can be verified by reading the value of the AHB1_APB1_CFG_REG
register via /dev/mem. It always reads as 0x3180 regardless of
the current cpufreq operating point. So this configuration should
be safe for use in U-Boot too.

PLL6 also needs to be configured before it is used as the clock
source, according to the "CCU / Programming Guidelines" section
of the Allwinner manual.

The current low AHB1 clock speed is limiting the USB transfer
speed when booting via FEL. This patch can increase the FEL USB
transfer speed from ~510 KB/s to ~950 KB/s.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: Add H3 DRAM initialization support
Jens Kuske [Tue, 17 Nov 2015 14:12:59 +0000 (15:12 +0100)]
sunxi: Add H3 DRAM initialization support

Based on existing A23/A33 code and the original H3 boot0.

Signed-off-by: Jens Kuske <jenskuske@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: Add basic H3 support
Jens Kuske [Tue, 17 Nov 2015 14:12:58 +0000 (15:12 +0100)]
sunxi: Add basic H3 support

Add initial sun8i H3 support, only uart + mmc are supported for now.

Signed-off-by: Jens Kuske <jenskuske@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: musb: Implement dfu_usb_get_reset()
Siarhei Siamashka [Sun, 25 Oct 2015 04:44:47 +0000 (06:44 +0200)]
sunxi: musb: Implement dfu_usb_get_reset()

This is necessary to distinguish between the "dfu-util --detach" and
the "dfu-util --reset" requests.

The default weak implementation of dfu_usb_get_reset() unconditionally
reboots the device, but we want to be able to continue the boot.scr
execution after writing the kernel, fdt and ramdisk to RAM via DFU.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: Enable DFU for RAM
Siarhei Siamashka [Sun, 25 Oct 2015 04:44:46 +0000 (06:44 +0200)]
sunxi: Enable DFU for RAM

The DFU protocol implementation in U-Boot is much faster than the
FEL protocol implementation in the boot ROM on Allwinner devices.
Using DFU instead of FEL improves the USB transfer speed from
500-900 KB/s to 3.2-3.7 MB/s. This is particularly useful for
reducing the time needed for booting systems with large initrd
images.

FEL is still useful for loading the U-Boot bootloader and a boot
script, which may then activate DFU in the following way:

   setenv dfu_alt_info ${dfu_alt_info_ram}
   dfu 0 ram 0
   bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}

The rest of the files can be transferred to the device using the
"dfu-util" tool.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agovexpress64: store env in flash
Ryan Harkin [Wed, 18 Nov 2015 10:39:09 +0000 (10:39 +0000)]
vexpress64: store env in flash

Add support for storing the environment in CFI NOR flash on Juno and FVP
models.

I also removed some config values that are not used by CFI flash parts.

Juno has 1 flash part with 259 sectors.  The first 255 sectors are
0x40000 (256kb) and are followed by 4 sectors of 0x10000 (64KB).

FVP models simulate a 64MB NOR flash part at base address 0x0FFC0000.
This part has 256 x 256kb sectors.  We use the last sector to store the
environment.

To save the NOR flash to a file, the following parameters should be
passed to the model:

    -C bp.flashloader1.fname=${FILENAME}
    -C bp.flashloader1.fnameWrite=${FILENAME}

Foundation models don't simulate the NOR flash, but having NOR support
in the u-boot binary does not harm:  attempting to write to the NOR will
fail gracefully.

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
9 years agovexpress64: remove #error
Ryan Harkin [Wed, 18 Nov 2015 10:39:08 +0000 (10:39 +0000)]
vexpress64: remove #error

This patch allows vexpress64 targets to be compiled when
CONFIG_SYS_FLASH_CFI is enabled.

I considered using #warning instead of #error, but this just clutters up
the build output and hides real warnings.

Without this patch, you see errors during compilation like this:

include/configs/vexpress_aemv8a.h:42:2: error: #error "Unknown board
variant"
 #error "Unknown board variant"
include/configs/vexpress_aemv8a.h:115:2: error: #error "Unknown board
variant"
 #error "Unknown board variant"
include/configs/vexpress_aemv8a.h:280:2: error: #error "Unknown board
variant"
 #error "Unknown board variant"
make[1]: *** [tools/envcrc.o] Error 1
make: *** [tools] Error 2
In file included from include/config.h:5:0,
                 from tools/envcrc.c:19:

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
9 years agovexpress64: use 2nd DRAM bank only on juno
Ryan Harkin [Wed, 18 Nov 2015 10:39:07 +0000 (10:39 +0000)]
vexpress64: use 2nd DRAM bank only on juno

This patch makes the 2nd DRAM bank available on Juno only and not on
other vexpress64 targets, eg. the FVP models.

The commit below added a 2nd bank of NOR flash for Juno, but also for
all vexpress64 targets:

    commit 2d0cee1ca2b9d977fa3214896bb2e30cfec77059
    Author: Liviu Dudau <Liviu.Dudau@foss.arm.com>
    Date:   Mon Oct 19 11:08:31 2015 +0100

    vexpress64: Juno: Declare all 8GB of RAM and make them visible to the kernel.

    Juno comes with 8GB RAM, but U-Boot only passes 2GB to the kernel.
    Declare a secondary memory bank and set the sizes correctly.

Signed-off-by: Liviu Dudau <Liviu.Dudau@foss.arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Unfortunately, I only fully tested on Juno R0, R1 and the FVP Foundation
model.  Whilst FVP Base AEMV8 models run U-Boot OK, they fail to boot
the kernel.

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Acked-by: Liviu Dudau <liviu.dudau@foss.arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
9 years agovexpress64: compile Juno PCIe conditionally
Ryan Harkin [Wed, 18 Nov 2015 10:39:06 +0000 (10:39 +0000)]
vexpress64: compile Juno PCIe conditionally

Only compile in PCIe support if the board really uses it. Provide
a __weak stub for the init function if e.g. FVP is being built.

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
9 years agoJuno: don't print PCI debug information by default
Andre Przywara [Fri, 13 Nov 2015 11:25:46 +0000 (11:25 +0000)]
Juno: don't print PCI debug information by default

On a Juno r1 the PCI controller init routine outputs the rather boring
ATR entry information.
Do this only with DEBUG defined to avoid cluttering the user's
terminal.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Ryan Harkin <ryan.harkin@linaro.org>
9 years agoeeprom: Clean up checkpatch issues
Marek Vasut [Tue, 10 Nov 2015 19:53:33 +0000 (20:53 +0100)]
eeprom: Clean up checkpatch issues

Cosmetic fixes to the file, make it checkpatch clean.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
9 years agoeeprom: Add support for selecting i2c bus
Marek Vasut [Tue, 10 Nov 2015 19:53:32 +0000 (20:53 +0100)]
eeprom: Add support for selecting i2c bus

Add additional parameter into the eeprom command to select
the I2C bus on which the eeprom resides.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
9 years agoeeprom: Add bus argument to eeprom_init()
Marek Vasut [Tue, 10 Nov 2015 19:53:31 +0000 (20:53 +0100)]
eeprom: Add bus argument to eeprom_init()

Add bus argument to eeprom_init(), so that it can select
the I2C bus number on which the eeprom resides. Any negative
value of the $bus argument will preserve the old behavior.
This is in place so that old code does not randomly break.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
[trini: Wrap i2c_set_bus_num() call with CONFIG_SYS_I2C test]
Signed-off-by: Tom Rini <trini@konsulko.com>