project/bcm63xx/u-boot.git
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Tue, 29 Mar 2016 16:58:45 +0000 (12:58 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq

8 years agoarmv8/ls2080ardb: Enable VID support
Rai Harninder [Wed, 23 Mar 2016 11:34:38 +0000 (17:04 +0530)]
armv8/ls2080ardb: Enable VID support

This patch enable VID support for ls2080ardb platform.
It uses the common VID driver.

Signed-off-by: Rai Harninder <harninder.rai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8/ls1043aqds: dts: Set SPI mode for DSPI
Qianyu Gong [Wed, 23 Mar 2016 11:11:36 +0000 (19:11 +0800)]
armv8/ls1043aqds: dts: Set SPI mode for DSPI

Clock phase and polarity for DSPI flash need to be set.

Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: fsl-layerscape: Add LS1023A SVR
Mingkai Hu [Wed, 23 Mar 2016 11:10:43 +0000 (19:10 +0800)]
armv8: fsl-layerscape: Add LS1023A SVR

Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: fsl-layerscape: Fix LS1043A SVR register
Mingkai Hu [Wed, 23 Mar 2016 11:10:42 +0000 (19:10 +0800)]
armv8: fsl-layerscape: Fix LS1043A SVR register

Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoSECURE BOOT: Change fsl_secboot_validate func to pass image addr
Saksham Jain [Wed, 23 Mar 2016 10:54:45 +0000 (16:24 +0530)]
SECURE BOOT: Change fsl_secboot_validate func to pass image addr

Use a pointer to pass image address to fsl_secboot_validate(),
instead of using environmental variable "img_addr".

Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoSECURE BOOT: Halt execution when secure boot fail
Saksham Jain [Wed, 23 Mar 2016 10:54:44 +0000 (16:24 +0530)]
SECURE BOOT: Halt execution when secure boot fail

In case of fatal failure during secure boot execution (e.g. header
not found), reset is asserted to stop execution. If the RESET_REQ
is not tied to HRESET, this allows the execution to continue.

Add esbh_halt() after the reset to make sure execution stops.

Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoSECURE_BOOT: Use default bootargs
Saksham Jain [Wed, 23 Mar 2016 10:54:43 +0000 (16:24 +0530)]
SECURE_BOOT: Use default bootargs

For secure boot, currently we were using fixed bootargs for all SoCs.
This is not needed and we can use the bootargs which are used in
non-secure boot.

Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agocrypto/fsl: Make CAAM transactions cacheable
Saksham Jain [Wed, 23 Mar 2016 10:54:42 +0000 (16:24 +0530)]
crypto/fsl: Make CAAM transactions cacheable

This commit solves CAAM coherency issue on ls2080. When caches are
enabled and CAAM's DMA's AXI transcations are not made cacheable,
Core reads/writes data from/to caches and CAAM does from main memory.
This forces data flushes to synchronize various data structures. But
even if any data in proximity of these structures is read by core,
these structures again are fetched in caches.

To avoid this problem, either all the data that CAAM accesses can be
made cache line aligned or CAAM transcations can be made cacheable.

So, this commit makes CAAM transcations as write back with write and
read allocate.

Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agocrypto/fsl: Correct 64-bit write when MMU disabled
Saksham Jain [Wed, 23 Mar 2016 10:54:41 +0000 (16:24 +0530)]
crypto/fsl: Correct 64-bit write when MMU disabled

When MMU is disabled, 64-bit write must be aligned at 64-bit
boundary. Becaue the memory location is not guaranteed to be 64-bit
aligned, the 64-bit write needs to be split into two 32-bit writes
to avoid the alignment exception.

Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: fsl-lsch3: Disable SMMU during secure boot
Saksham Jain [Wed, 23 Mar 2016 10:54:40 +0000 (16:24 +0530)]
armv8: fsl-lsch3: Disable SMMU during secure boot

During secure boot, SMMU is enabled on POR by SP bootrom. SMMU needs
to be put in bypass mode in uboot to enable CAAM transcations to pass
through.

For non-secure boot, SP BootROM doesn't enable SMMU, which is in
bypass mode out of reset.

Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: ls2080: Add config for endianess of CCSR GUR
Saksham Jain [Wed, 23 Mar 2016 10:54:39 +0000 (16:24 +0530)]
armv8: ls2080: Add config for endianess of CCSR GUR

The GUR (DCFG) registers in CCSR space are in little endian format.
Define a config CONFIG_SYS_FSL_CCSR_GUR_LE in
arch/arm/include/asm/arch-fsl-layerscape/config.h

Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: ls2080: Change env variable "fdt_high"
Saksham Jain [Wed, 23 Mar 2016 10:54:38 +0000 (16:24 +0530)]
armv8: ls2080: Change env variable "fdt_high"

"fdt_high" env variable was set to 0xcfffffff for secure boot.
Change it to 0xa0000000 for LS2080 to be consistent with non-secure
boot targets.

Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: fsl-lsch3: Copy Bootscript and header from NOR to DDR
Saksham Jain [Wed, 23 Mar 2016 10:54:37 +0000 (16:24 +0530)]
armv8: fsl-lsch3: Copy Bootscript and header from NOR to DDR

To unify steps for secure boot for xip (eg. NOR) and non-xip memories
(eg. NAND, SD), bootscipts and its header are copied to main memory.
Validation and execution are performed from there.

For other ARM Platforms (ls1043 and ls1020), to avoid disruption of
existing users, this copy step is not used for NOR boot.

Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: ls2080: Add bootscript header addr for secure boot
Saksham Jain [Wed, 23 Mar 2016 10:54:36 +0000 (16:24 +0530)]
armv8: ls2080: Add bootscript header addr for secure boot

During secure boot, Linux image along with other images are validated
using bootscript. This bootscript also needs to be validated before
it executes. This requires a header for bootscript.

When secure boot is enabled, default bootcmd is changed to first
validate bootscript using the header and then execute the script.

For ls2080, NOR memory map is different from other ARM SoCs. So a new
address on NOR is used for this bootscript header (0x583920000). The
Bootscript address is mentioned in this header along with addresses of
other images.

Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: ls2080rdb: ls2080qds: Add secure boot support
Saksham Jain [Wed, 23 Mar 2016 10:54:35 +0000 (16:24 +0530)]
armv8: ls2080rdb: ls2080qds: Add secure boot support

Sec_init has been called at the beginning to initialize SEC Block
(CAAM) which is used by secure boot validation later for both ls2080a
qds and rdb. 64-bit address in ESBC Header has been enabled. Secure
boot defconfigs are created for boards (NOR boot).

Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: fsl-lsch3: Add new header for secure boot
Saksham Jain [Wed, 23 Mar 2016 10:54:34 +0000 (16:24 +0530)]
armv8: fsl-lsch3: Add new header for secure boot

For secure boot, a header is used to identify key table, signature
and image address. A new header structure is added for lsch3.

Currently key extension (IE) feature is not supported. Single key
feature is not supported. Keys must be in table format. Hence, SRK
(key table) must be present. Max key number has increase from 4 to
8. The 8th key is irrevocable. A new barker Code is used.

Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: ls2080: Add configs for SEC, SecMon, SRK and DCFG
Saksham Jain [Wed, 23 Mar 2016 10:54:33 +0000 (16:24 +0530)]
armv8: ls2080: Add configs for SEC, SecMon, SRK and DCFG

Add configs for various IPs used during secure boot. Add address
and endianness for SEC and Security Monitor. SRK are fuses in SFP
(fuses for public key's hash). These are stored in little endian
format.

Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: ls2080: Add SFP Configs for LS2080
Saksham Jain [Wed, 23 Mar 2016 10:54:32 +0000 (16:24 +0530)]
armv8: ls2080: Add SFP Configs for LS2080

In LS2080, SFP has version 3.4. It is in little endian. The base
address is 0x01e80200. SFP is used in Secure Boot to read fuses.

Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Signed-off-by: Saksham Jain <saksham.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agodriver: net: fsl-mc: Check NULL before pointer dereference
Prabhakar Kushwaha [Fri, 18 Mar 2016 10:46:03 +0000 (16:16 +0530)]
driver: net: fsl-mc: Check NULL before pointer dereference

NULL pointer should be checked before any dereference.  This patch
move memest after the NULL pointer check.

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reported-by: Jose Rivera <german.rivera@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agodriver: net: fsl-mc: Free dflt_dpio pointer after its usage
Prabhakar Kushwaha [Fri, 18 Mar 2016 10:45:29 +0000 (16:15 +0530)]
driver: net: fsl-mc: Free dflt_dpio pointer after its usage

Free dflt_dpio pointer after its usage during error handling

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reported-by: Jose Rivera <german.rivera@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: fsl-layerscape: Skip reconfigure QSPI clock when booting from QSPI
Qianyu Gong [Wed, 16 Mar 2016 10:01:52 +0000 (18:01 +0800)]
armv8: fsl-layerscape: Skip reconfigure QSPI clock when booting from QSPI

The qspi_cfg register is set by PBI when booting from QSPI. No need
to changing it again.

Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoomap24xx_i2c: Implement CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW
Guy Thouret [Fri, 11 Mar 2016 16:23:41 +0000 (16:23 +0000)]
omap24xx_i2c: Implement CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW

Signed-off-by: Guy Thouret <guy.thouret@wems.co.uk>
Cc: Heiko Schocher <hs@denx.de>
8 years agodm: i2c: mxc_i2c: implement i2c_idle_bus
Peng Fan [Fri, 11 Mar 2016 08:47:50 +0000 (16:47 +0800)]
dm: i2c: mxc_i2c: implement i2c_idle_bus

Implement i2c_idle_bus in driver, then setup_i2c can
be dropped for boards which enable DM_I2C/DM_GPIO/PINCTRL.
The i2c_idle_bus force bus idle flow follows setup_i2c in
arch/arm/imx-common/i2c-mxv7.c

This patch is an implementation following linux kernel patch:
"
commit 1c4b6c3bcf30d0804db0d0647d8ebeb862c6f7e5
Author: Gao Pan <b54642@freescale.com>
Date:   Fri Oct 23 20:28:54 2015 +0800

    i2c: imx: implement bus recovery

    Implement bus recovery methods for i2c-imx so we can recover from
    situations where SCL/SDA are stuck low.

    Once i2c bus SCL/SDA are stuck low during transfer, config the i2c
    pinctrl to gpio mode by calling pinctrl sleep set function, and then
    use GPIO to emulate the i2c protocol to send nine dummy clock to recover
    i2c device. After recovery, set i2c pinctrl to default group setting.
"

See Documentation/devicetree/bindings/i2c/i2c-imx.txt for detailed
description.
1. Introuduce scl_gpio/sda_gpio/bus in mxc_i2c_bus.
2. Discard the __weak attribute for i2c_idle_bus and implement it,
   since we have pinctrl driver/driver model gpio driver. We can
   use device tree, but not let board code to do this.
3. gpio state for mxc_i2c is not a must, but it is recommended. If
   there is no gpio state, driver will give tips, but not fail.
4. The i2c controller was first probed, default pinctrl state will
   be used, so when need to use gpio function, need to do
   "pinctrl_select_state(dev, "gpio")" and after force bus idle,
   need to switch back "pinctrl_select_state(dev, "default")".

This is example about how to use the gpio force bus
idle function:
"
 &i2c1 {
  clock-frequency = <100000>;
pinctrl-names = "default", "gpio";
  pinctrl-0 = <&pinctrl_i2c1>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
scl-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
sda-gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
status = "okay";
[....]
 };

[.....]

pinctrl_i2c1_gpio: i2c1grp_gpio {
fsl,pins = <
MX6UL_PAD_UART4_TX_DATA__GPIO1_IO28 0x1b8b0
MX6UL_PAD_UART4_RX_DATA__GPIO1_IO29 0x1b8b0
>;
};
"

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: York Sun <york.sun@nxp.com>
8 years agoRevert "pxa_lcd: make driver cache-aware"
Tom Rini [Mon, 28 Mar 2016 00:58:08 +0000 (20:58 -0400)]
Revert "pxa_lcd: make driver cache-aware"

This reverts commit 59deb7fe8d23c8ec2b659d99323ec4a2ec19148a.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoRevert "pxa_lcd: invert colors for Zipit Z2 to get white on black palette"
Tom Rini [Mon, 28 Mar 2016 00:57:54 +0000 (20:57 -0400)]
Revert "pxa_lcd: invert colors for Zipit Z2 to get white on black palette"

This reverts commit 3bc8ffd9cb774feceefc7bdebe9353fcea071343.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agotools: env: bug: config structs must be defined in tools library
Andreas Fenkart [Fri, 25 Mar 2016 13:52:19 +0000 (14:52 +0100)]
tools: env: bug: config structs must be defined in tools library

fw_senten/fw_printenv can be compiled as a tools library,
excluding the fw_env_main object.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
8 years agoARM: asm: types: Introduce DMA_ADDR_T_64BIT
Lokesh Vutla [Thu, 24 Mar 2016 10:32:00 +0000 (16:02 +0530)]
ARM: asm: types: Introduce DMA_ADDR_T_64BIT

dma_addr_t holds any valid DMA address. If the DMA API only uses 32-bit
addresses, dma_addr_t need only be 32 bits wide.  Bus addresses, e.g., PCI BARs,
may be wider than 32 bits, but drivers do memory-mapped I/O to ioremapped
kernel virtual addresses, so they don't care about the size of the actual
bus addresses.
Also 32 bit ARM systems with LPAE enabled can use 64bit address space, but
DMA still use 32bit address like in case of DRA7 and Keystone platforms.

This is inspired from the Linux kernel types implementation[1]

[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/linux/types.h#n142

Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoefi_loader: Fix some entry/exit points
Alexander Graf [Thu, 24 Mar 2016 00:37:37 +0000 (01:37 +0100)]
efi_loader: Fix some entry/exit points

When switching between EFI context and U-Boot context we need to swap
the register that "gd" resides in.

Some functions slipped through here, with efi_allocate_pool / efi_free_pool
not doing the switch correctly and efi_return_handle switching too often.

Fix them all up to make sure we always have consistent register state.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agocfi_flash: return device into read array mode after reading status
Vasily Khoruzhick [Mon, 21 Mar 2016 01:37:10 +0000 (18:37 -0700)]
cfi_flash: return device into read array mode after reading status

Otherwise flash remains in read status mode and it's not possible
to access data on flash.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
8 years agozipitz2: enable caches
Vasily Khoruzhick [Mon, 21 Mar 2016 01:37:09 +0000 (18:37 -0700)]
zipitz2: enable caches

It speeds up loading kernel from SD or USB a lot.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agopxa_lcd: make driver cache-aware
Vasily Khoruzhick [Mon, 21 Mar 2016 01:37:08 +0000 (18:37 -0700)]
pxa_lcd: make driver cache-aware

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
8 years agopxa: add support for D- and I- caches
Vasily Khoruzhick [Mon, 21 Mar 2016 01:37:07 +0000 (18:37 -0700)]
pxa: add support for D- and I- caches

Tested with OHCI and pxafb drivers - no issues found

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
8 years agopxa: start.S: enable SRAM clock
Vasily Khoruzhick [Mon, 21 Mar 2016 01:37:06 +0000 (18:37 -0700)]
pxa: start.S: enable SRAM clock

SRAM is used for early stack, but kernel disables its clock on suspend.
Re-enable SRAM clock on startup, otherwise u-boot crashes on resume from suspend.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
8 years agozipitz2: enable USB host support
Vasily Khoruzhick [Mon, 21 Mar 2016 01:37:05 +0000 (18:37 -0700)]
zipitz2: enable USB host support

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
8 years agopxa-common: pxa27x has 3 OHCI ports
Vasily Khoruzhick [Mon, 21 Mar 2016 01:37:04 +0000 (18:37 -0700)]
pxa-common: pxa27x has 3 OHCI ports

3rd port can be used as a device or host.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agozipitz2: enable libfdt
Vasily Khoruzhick [Mon, 21 Mar 2016 01:37:03 +0000 (18:37 -0700)]
zipitz2: enable libfdt

zipitz2 supports DT boot since linux-4.4 (not mainlined yet)

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
8 years agopxa_lcd: invert colors for Zipit Z2 to get white on black palette
Vasily Khoruzhick [Mon, 21 Mar 2016 01:37:02 +0000 (18:37 -0700)]
pxa_lcd: invert colors for Zipit Z2 to get white on black palette

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
8 years agozipitz2: enable LCD rotation
Vasily Khoruzhick [Mon, 21 Mar 2016 01:37:01 +0000 (18:37 -0700)]
zipitz2: enable LCD rotation

z2's screen is rotated by 270 degrees

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agozipitz2: restore board support
Vasily Khoruzhick [Mon, 21 Mar 2016 01:37:00 +0000 (18:37 -0700)]
zipitz2: restore board support

zipitz2 was dropped in 49d8899ba9c26335e4a12e01c18028fc5e40c796

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
8 years agocmd: spi: check return value of strdup
Peng Fan [Sun, 20 Mar 2016 13:21:36 +0000 (21:21 +0800)]
cmd: spi: check return value of strdup

Check return value of strdup.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@konsulko.com>
8 years agoserial: add BCM283x mini UART driver
Stephen Warren [Sat, 19 Mar 2016 03:41:38 +0000 (21:41 -0600)]
serial: add BCM283x mini UART driver

The RPi3 typically uses the regular UART for high-speed communication with
the Bluetooth device, leaving us the mini UART to use for the serial
console. Add support for this UART so we can use it.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agoboard: ti: am57xx: Set ethernet MAC addresses from EEPROM to env
Roger Quadros [Fri, 18 Mar 2016 11:18:12 +0000 (13:18 +0200)]
board: ti: am57xx: Set ethernet MAC addresses from EEPROM to env

The MAC addresses for the PRU Ethernet ports will be available in the
board EEPROM as an address range. Populate those MAC addresses (if valid)
into the u-boot environment so that they can be passed on to the
device tree during fdt_fixup_ethernet().

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agonet: export eth_setenv_enetaddr_by_index() to net.h
Roger Quadros [Fri, 18 Mar 2016 11:18:11 +0000 (13:18 +0200)]
net: export eth_setenv_enetaddr_by_index() to net.h

Some TI boards (e.g. IDK) have 4 to 6 ethernet ports and
this function is handy at board.c to configure the
MAC address of the ports.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodebug_uart: Remove duplicated carriage return handling
Bin Meng [Fri, 18 Mar 2016 06:59:04 +0000 (23:59 -0700)]
debug_uart: Remove duplicated carriage return handling

Since commit b391d74 "debug_uart: output CR along with LF", the
handling in puts() is duplicated, not to mention that it should
output carriage return before line feed.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoefi_stub: Move carriage return before line feed in putc()
Bin Meng [Fri, 18 Mar 2016 06:59:03 +0000 (23:59 -0700)]
efi_stub: Move carriage return before line feed in putc()

A carriage return needs to execute before a line feed.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agonet: rtl8169: Fix build error when DEBUG is on
Bin Meng [Fri, 18 Mar 2016 06:27:44 +0000 (23:27 -0700)]
net: rtl8169: Fix build error when DEBUG is on

When DEBUG_RTL8169 is on, a build error occurs in function
'rtl_init': error: 'dev' undeclared. Fix this.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agommc: Print send_cmd response only when return value is zero
Bin Meng [Fri, 18 Mar 2016 04:53:14 +0000 (21:53 -0700)]
mmc: Print send_cmd response only when return value is zero

send_cmd response is valid only when no error happened. If an error
occured, let mmc_send_cmd() print the return value to aid debugging.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agommc: Fix switch..case indention
Bin Meng [Fri, 18 Mar 2016 04:53:13 +0000 (21:53 -0700)]
mmc: Fix switch..case indention

Correct the indention level of switch..case statements.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoFix typo choosen in comments and printf logs
Alexander Merkle [Thu, 17 Mar 2016 14:44:47 +0000 (15:44 +0100)]
Fix typo choosen in comments and printf logs

Minor change: chosen is written with one "o".
No code change here, only comment & printf.

Signed-off-by: Alexander Merkle <alexander.merkle@lauterbach.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoFix typo in chosen parameter of pcm052.dts
Alexander Merkle [Thu, 17 Mar 2016 14:44:46 +0000 (15:44 +0100)]
Fix typo in chosen parameter of pcm052.dts

Fix typo "choosen" instead of "chosen" in pcm052.dts.
Not tested but should fix boot process and terminal output.

Signed-off-by: Alexander Merkle <alexander.merkle@lauterbach.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoFix typo in chosen parameter in vf610-twr.dts
Alexander Merkle [Thu, 17 Mar 2016 14:44:45 +0000 (15:44 +0100)]
Fix typo in chosen parameter in vf610-twr.dts

Fix typo "choosen" instead of "chosen" in vf610-twr.dts.
Fixes boot process and terminal output for Vybrid series.

Signed-off-by: Alexander Merkle <alexander.merkle@lauterbach.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agobootp: Prevent u-boot from using others responses.
Anton Persson [Thu, 17 Mar 2016 08:38:21 +0000 (09:38 +0100)]
bootp: Prevent u-boot from using others responses.

In rare circumstances two dhcp clients may generate the same
bootp ID. If this happens it is vital that the client also checks
the hw address in the received response to prevent IP address conflicts.

Signed-off-by: Anton Persson <don.juanton@gmail.com>
8 years agommc: bcm2835: fix 64-bit build warning
Stephen Warren [Thu, 17 Mar 2016 03:42:24 +0000 (21:42 -0600)]
mmc: bcm2835: fix 64-bit build warning

Fixes:
drivers/mmc/bcm2835_sdhci.c: In function ‘bcm2835_sdhci_init’:
drivers/mmc/bcm2835_sdhci.c:181:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agoARM: bcm2835: fix 64-bit build warning in mbox
Stephen Warren [Thu, 17 Mar 2016 03:40:57 +0000 (21:40 -0600)]
ARM: bcm2835: fix 64-bit build warning in mbox

Fixes:
arch/arm/mach-bcm283x/mbox.c: In function ‘bcm2835_mbox_call_prop’:
arch/arm/mach-bcm283x/mbox.c:118:48: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
arch/arm/mach-bcm283x/mbox.c:126:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: bcm283x: don't always define CONFIG_BCM2835
Stephen Warren [Thu, 17 Mar 2016 03:40:56 +0000 (21:40 -0600)]
ARM: bcm283x: don't always define CONFIG_BCM2835

Currently, CONFIG_BCM2835 is defined for all BCM283x builds and _BCM2836
is defined when building for that SoC. That means there isn't a single
define that means "exactly BCM2835". This will complicate future patches
where BCM2835-vs-anything-else needs to be determined simply.

Modify the code to define one or the other of CONFIG_BCM2835/BCM2836 so
future patches are simpler.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodoc/README.clang: Document sandbox instructions
Tom Rini [Thu, 17 Mar 2016 00:40:20 +0000 (20:40 -0400)]
doc/README.clang: Document sandbox instructions

It is possible to compile and run the sandbox target with clang
currently, so document that as well.

Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agobcm2835 video: Map fb as cached
Alexander Graf [Thu, 24 Mar 2016 09:31:11 +0000 (10:31 +0100)]
bcm2835 video: Map fb as cached

The bcm2835 frame buffer is in RAM, so we can easily map it as cached and gain
all the glorious performance boost that brings with it.

Signed-off-by: Alexander Graf <agraf@suse.de>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agoRPi: Enable caches for rpi2
Alexander Graf [Wed, 16 Mar 2016 14:41:23 +0000 (15:41 +0100)]
RPi: Enable caches for rpi2

Now that we have support for running with caches enabled in HYP mode,
opt in to that on the Raspberry Pi 2. This brings a significant performance
boost.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agolcd: Fix compile warning in 64bit mode
Alexander Graf [Wed, 16 Mar 2016 14:41:22 +0000 (15:41 +0100)]
lcd: Fix compile warning in 64bit mode

When compiling the code for 64bit, the lcd code emits warnings because it
tries to cast pointers to 32bit values. Fix it by casting them to longs
instead, actually properly aligning with the function prototype.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoarm: Add support for HYP mode and LPAE page tables
Alexander Graf [Wed, 16 Mar 2016 14:41:21 +0000 (15:41 +0100)]
arm: Add support for HYP mode and LPAE page tables

We currently always modify the SVC versions of registers and only support
the short descriptor PTE format.

Some boards however (like the RPi2) run in HYP mode. There, we need to modify
the HYP version of system registers and HYP mode only supports the long
descriptor PTE format.

So this patch introduces support for both long descriptor PTEs and HYP mode
registers.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoarm64: Add 32bit arm compatible dcache definitions
Alexander Graf [Wed, 16 Mar 2016 14:41:20 +0000 (15:41 +0100)]
arm64: Add 32bit arm compatible dcache definitions

We want to be able to reuse device drivers from 32bit code, so let's add
definitions for all the dcache options that 32bit code has.

While at it, fix up the DCACHE_OFF configuration. That was setting the bits
to declare a PTE a PTE and left the MAIR index bit at 0. Drop the useless
bits and make the index explicit.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoboard: ti: DRA7: Add DRA72-rev C evm pinmux
Nishanth Menon [Tue, 15 Mar 2016 23:09:17 +0000 (18:09 -0500)]
board: ti: DRA7: Add DRA72-rev C evm pinmux

Add the pinmux data for rev C evm. This is different from previous
revisions of the platform thanks to the deltas introduced both from
silicon side and from SoC side.

Based on J6EcoES2_EVM_Base_Config-20160309b and PCT-DRA72x-v1.3.0.7 for
SR2.0 silicon.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: OMAP5/DRA7: Expose do_set_iodelay
Nishanth Menon [Tue, 15 Mar 2016 23:09:16 +0000 (18:09 -0500)]
ARM: OMAP5/DRA7: Expose do_set_iodelay

do_set_iodelay can now be used from board files based on needs of the
platforms variation they have.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: OMAP5/DRA7: Split iodelay functionality into sub steps
Nishanth Menon [Tue, 15 Mar 2016 23:09:15 +0000 (18:09 -0500)]
ARM: OMAP5/DRA7: Split iodelay functionality into sub steps

Since many platforms may need different pad configuration required
depending on variation of the platform with minor deltas, it is
easier to maintain a sub step based approach to allow for pin mux
and iodelay configuration which may depend on the platform variations
and need to be done in IO isolation.

While we retain the older __recalibrate_iodelay function which provides
a ready sequencing, __recalibrate_iodelay_start and
__recalibrate_iodelay_end may be alternatively used now and the callers
will be responsible for the correct sequencing of operations.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoboard: ti: DRA72: revC evm: Update sdram timing configuration for SR2.0
Ravi Babu [Tue, 15 Mar 2016 23:09:14 +0000 (18:09 -0500)]
board: ti: DRA72: revC evm: Update sdram timing configuration for SR2.0

DDR configuration has changes from SR1.1 based Rev-A/B version of evm
to the SR2.0 based Rev C of the EVM. Rev C evm now uses the higher
density MT41K512M8RH-125-AAT:E (IT) which is of size 2GB.

Update the DDR configuration based on data from EMIF configuration
tool 1.1.1. NOTE: we use eeprom information (ram_size) to update the
configuration.

Tested-by: Vishal Mahaveer <vishalm@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: DRA72: sdram: Update sdram ext phy configuration for SR2.0
Nishanth Menon [Tue, 15 Mar 2016 23:09:13 +0000 (18:09 -0500)]
ARM: DRA72: sdram: Update sdram ext phy configuration for SR2.0

Based on data from EMIF configuration tool 1.1.1.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: DRA7: hwdata: Update ioreg data for DRA72 SR2.0
Nishanth Menon [Tue, 15 Mar 2016 23:09:12 +0000 (18:09 -0500)]
ARM: DRA7: hwdata: Update ioreg data for DRA72 SR2.0

Based on data from EMIF configuration tool 1.1.1. Expected update for
CTRL_WKUP_EMIF1_SDRAM_CONFIG_EXT in the next revision of the tool has
been incorporated as well.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: DRA72x: Add support for detection of SR2.0
Ravi Babu [Tue, 15 Mar 2016 23:09:11 +0000 (18:09 -0500)]
ARM: DRA72x: Add support for detection of SR2.0

Add support for detection of SR2.0 version of DRA72x family of
processors.

Signed-off-by: Ravi Babu <ravibabu@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoefi_loader: Add GOP support
Alexander Graf [Tue, 15 Mar 2016 17:38:21 +0000 (18:38 +0100)]
efi_loader: Add GOP support

The EFI standard defines a simple boot protocol that an EFI payload can use
to access video output.

This patch adds support to expose exactly that one (and the mode already in
use) as possible graphical configuration to an EFI payload.

With this, I can successfully run grub2 with graphical output.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoARM: keystone2: Convert BOOT_SET_BITFIELD into static inline function
Nishanth Menon [Tue, 15 Mar 2016 15:25:53 +0000 (10:25 -0500)]
ARM: keystone2: Convert BOOT_SET_BITFIELD into static inline function

Fix up BOOT_SET_BITFIELD to be a static inline function to be readable
with the same functionality.

Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: Convert BOOT_READ_BITFIELD into static inline function
Nishanth Menon [Tue, 15 Mar 2016 15:25:52 +0000 (10:25 -0500)]
ARM: keystone2: Convert BOOT_READ_BITFIELD into static inline function

BOOT_READ_BITFIELD can easily be a static inline function and be a
little more readable with the same functionality.

Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: Convert BOOTBITMASK to static inline function
Nishanth Menon [Tue, 15 Mar 2016 15:25:51 +0000 (10:25 -0500)]
ARM: keystone2: Convert BOOTBITMASK to static inline function

BOOTBITMASK is almost impossible to decode, so convert it into a simpler
static line functions of equivalent solution.

Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agotools: env: fw_parse_script: simplify removal of newline/carriage return
Andreas Fenkart [Fri, 11 Mar 2016 08:39:38 +0000 (09:39 +0100)]
tools: env: fw_parse_script: simplify removal of newline/carriage return

fgets returns when the first '\n' is found

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
8 years agotools: env: split fw_string_blank into skip_chars / skip_blanks
Andreas Fenkart [Fri, 11 Mar 2016 08:39:37 +0000 (09:39 +0100)]
tools: env: split fw_string_blank into skip_chars / skip_blanks

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
8 years agotools: env: fw_string_blank: return from loop when item found
Andreas Fenkart [Fri, 11 Mar 2016 08:39:36 +0000 (09:39 +0100)]
tools: env: fw_string_blank: return from loop when item found

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
8 years agotools: env: replace WHITESPACE macro by isblank
Andreas Fenkart [Fri, 11 Mar 2016 08:39:35 +0000 (09:39 +0100)]
tools: env: replace WHITESPACE macro by isblank

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
8 years agostm32f746-disco: enable flash support
Vikas Manocha [Wed, 9 Mar 2016 23:18:14 +0000 (15:18 -0800)]
stm32f746-disco: enable flash support

This patch enables embedded flash for stm32f746 discovery board.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
8 years agostm32: stm32f4: move flash driver to mtd driver location
Vikas Manocha [Wed, 9 Mar 2016 23:18:13 +0000 (15:18 -0800)]
stm32: stm32f4: move flash driver to mtd driver location

Same flash driver can be used by other stm32 families like stm32f7.
Better place for this driver would be mtd driver location.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
8 years agousb: gadget: Move CONFIG_USB_GADGET to Kconfig
Sam Protsenko [Fri, 25 Mar 2016 14:39:47 +0000 (16:39 +0200)]
usb: gadget: Move CONFIG_USB_GADGET to Kconfig

The description was borrowed from kernel. "tristate" type was changed
to "bool" (I believe we don't support modules for u-boot yet, right?).
CONFIG_USB_GADGET requires CONFIG_USB to be defined too, so add it along
as well.

Definitions were added to defconfig files in a way that
"make savedefconfig" generates exactly the same file as used defconfig.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
[trini: Add zynq_zc702 conversion]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge git://www.denx.de/git/u-boot-marvell
Tom Rini [Fri, 25 Mar 2016 16:57:18 +0000 (12:57 -0400)]
Merge git://www.denx.de/git/u-boot-marvell

8 years agoarmv8/ls1043a: Update env settings for booting kernel
Qianyu Gong [Tue, 15 Mar 2016 08:35:57 +0000 (16:35 +0800)]
armv8/ls1043a: Update env settings for booting kernel

Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarmv8: ls2080a: Update fdt path for fsl-mc node
Stuart Yoder [Wed, 2 Mar 2016 22:37:13 +0000 (16:37 -0600)]
armv8: ls2080a: Update fdt path for fsl-mc node

The fsl-mc node has been moved under /soc, so update
the path references accordingly.  Backwards compatibility
is retained for /fsl-mc.

Delete backwards compatibility for the completely obsolete
/fsl,dprc@0.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agotools: kwboot: Add xmodem timeout option
Kevin Smith [Tue, 16 Feb 2016 21:28:19 +0000 (21:28 +0000)]
tools: kwboot: Add xmodem timeout option

Add command-line specification of xmodem timeout.  If the binary
header needs to take a while to do something (e.g. DDR ECC
scrubbing), the xmodem transfer can time out.  Add a configurable
xmodem block timeout to allow transfers with slow binary headers
to succeed.

Signed-off-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agotools: kwboot: Clean up usage text
Kevin Smith [Tue, 16 Feb 2016 21:28:17 +0000 (21:28 +0000)]
tools: kwboot: Clean up usage text

Usage text was getting unwieldy and somewhat incorrect.  The
usage summary implied that some options were mutually exclusive
(e.g. -q or -s).  Clean up the summary to just include the
important ones, and include a generic "[OPTIONS]" instead.

Signed-off-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agoarm: mvebu: db-88f6820: Drop obsolete binary.0 placeholder
Andreas Färber [Mon, 15 Feb 2016 18:13:30 +0000 (19:13 +0100)]
arm: mvebu: db-88f6820: Drop obsolete binary.0 placeholder

It has been superseded in kwbimage.cfg in favor of an SPL in commit
9e30b31d20f0b793465d07f056b3d9885f578c0d (arm: mvebu: db-88f6820: Add
SPL support with DDR init code). Found via code review.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agoarm: mvebu: theadorable: Add StratixV FPGA programming support
Stefan Roese [Fri, 12 Feb 2016 13:24:07 +0000 (14:24 +0100)]
arm: mvebu: theadorable: Add StratixV FPGA programming support

This patch adds support for Altera StratixV bitstream programming. 2 FPGAs
are connected to the SPI busses. This patch uses board specific write
code to program the bitstream via SPI direct write mode.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agoarm: mvebu: spi.h: Add registers for direct write access
Stefan Roese [Fri, 12 Feb 2016 12:52:17 +0000 (13:52 +0100)]
arm: mvebu: spi.h: Add registers for direct write access

The direct write config register is needed for SPI direct write mode
configuration.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agoarm: mvebu: Add some SPI CS attributes
Stefan Roese [Fri, 12 Feb 2016 12:52:16 +0000 (13:52 +0100)]
arm: mvebu: Add some SPI CS attributes

These attribute defines may be used to map an area of memory for direct
access to the specific SPI devices. See SPI Direct Access Mode for
further information.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agofpga: altera: Add StratixV support
Stefan Roese [Fri, 12 Feb 2016 12:48:02 +0000 (13:48 +0100)]
fpga: altera: Add StratixV support

This patch adds support for programming of the StratixV FPGAs. Programming
is done in this case (board theadorable) via SPI. The board may provide
board specific code for bitstream programming.

This StratixV support will be used by the theadorable board.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agogpio: Add DM GPIO driver for Marvell MVEBU
Stefan Roese [Fri, 12 Feb 2016 12:46:50 +0000 (13:46 +0100)]
gpio: Add DM GPIO driver for Marvell MVEBU

This patch adds a DM GPIO driver for the Marvell MVEBU SoCs. There are
other non-DM drivers that might be used on these platforms. But this
patch creates a new DM driver. Which will be used by all Armada XP/38x
boards. Other MVEBU SoC (Kirkwood / Orion) may follow once they
support DM as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
Cc: Phil Sutter <phil@nwl.cc>
Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agoarm: mvebu: Fix ddr3_init() cpu config
Dirk Eibach [Wed, 28 Oct 2015 15:44:15 +0000 (16:44 +0100)]
arm: mvebu: Fix ddr3_init() cpu config

Armada 38x has a maximum of two cores. Probably copy/paste
bug from Armada XP.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agoARM: sheevaplug: correct nand partition layout
Peter Korsgaard [Sun, 17 Jan 2016 17:23:45 +0000 (18:23 +0100)]
ARM: sheevaplug: correct nand partition layout

Commit 1e3d640316 (ARM: sheevaplug: redefine MTDPARTS) changed the partition
layout (without any description why), but didn't change the offset/size to
load the kernel from or the root=/dev/mtdblockX in the bootargs.

The 3MB forseen for a kernel is furthermore too little. A 4.4 build of
mvebu_v5_defconfig is 3.6MB:

-rw-r--r-- 1 peko peko 3.6M Jan 16 20:24 uImage.kirkwood-sheevaplug

When device tree support for sheevaplug was added to the kernel in commit
ee514b381e (ARM: Kirkwood: Add dts files for Sheevaplug and eSATA
Sheevaplug) a default flash partition layout (used if mtdparts= isn't passed
on the command line / CONFIG_MTD_CMDLINE_PARTS isn't enabled) with 1MB for
u-boot / environment, 4MB for the kernel and the rest for the rootfs, so use
that layout here and adjust the kernel loading to match.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agoMerge branch 'master' of http://git.denx.de/u-boot-sunxi
Tom Rini [Wed, 23 Mar 2016 22:35:11 +0000 (18:35 -0400)]
Merge branch 'master' of git.denx.de/u-boot-sunxi

8 years agosunxi: A83T: fix 32bit overflow warning
vishnupatekar [Wed, 23 Mar 2016 17:54:33 +0000 (01:54 +0800)]
sunxi: A83T: fix 32bit overflow warning

In mctl_channel_init, (0x50<<26) which overflows 32bit.
It was supposed to be 0x50<<16,corrected now.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Vishnu Patekar <vishnupatekar0510@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Select CONFIG_OF_BOARD_SETUP from arch/arm/Kconfig
Hans de Goede [Tue, 22 Mar 2016 21:51:52 +0000 (22:51 +0100)]
sunxi: Select CONFIG_OF_BOARD_SETUP from arch/arm/Kconfig

Always select OF_BOARD_SETUP on sunxi, rather then having it in almost
all our defconfigs. This also fixes it missing from some recently
added defconfigs.

This commit also modifies our ft_board_setup() to not cause warnings
when CONFIG_VIDEO_DT_SIMPLEFB is not set, since we will now always
build it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: sinovoip-bpi-m3: drop LDO settings from defconfig
vishnupatekar [Mon, 21 Mar 2016 14:28:56 +0000 (22:28 +0800)]
sunxi: sinovoip-bpi-m3: drop LDO settings from defconfig

Kconfig default settings are same as mentioned Sinovoip
Bpi-m3 schematic.

As axp818 ALDO support is enabled, it causes bpi-m3 fail to boot
if ALDOs are set to 0.

Signed-off-by: Vishnu Patekar <vishnupatekar0510@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Specify SATAPWR pin for Orangepi Plus
Hans de Goede [Tue, 22 Mar 2016 16:00:13 +0000 (17:00 +0100)]
sunxi: Specify SATAPWR pin for Orangepi Plus

This enables the use of the sata connector in u-boot.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: Turn satapwr on from board_init
Hans de Goede [Tue, 22 Mar 2016 19:10:30 +0000 (20:10 +0100)]
sunxi: Turn satapwr on from board_init

There are 2 reasons for doing this:

1) The main reason for doing this is to move it outside of
   board/sunxi/ahci.c, so that it can be used on boards which use
   a usb<->sata chip too;
2) While doing this I realized that doing it from board_init also meant
   doing it much earlier. Some printf get_timer(0) calls show that the
   time between board_init() and scsi_init() is more then 600 ms,
   so we can drop the mdelay(500)

While at it also drop the printf("SUNXI SCSI INIT\n") AHCI init is
noisy enough by itself.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: Fix gmac not working due to cpu_eth_init no longer being called
Hans de Goede [Thu, 17 Mar 2016 12:53:03 +0000 (13:53 +0100)]
sunxi: Fix gmac not working due to cpu_eth_init no longer being called

cpu_eth_init is no longer called for dm enabled eth drivers, this
was causing the sunxi gmac eth controller to no longer work in u-boot.

This commit fixes this by calling the clock, reset and pinmux setup
function from s_init() and enabling the phy power pin (if any) from
board_init().

The enabling of phy power cannot be done from s_init because it uses dm
and dm is not ready yet at this point.

Note that the mdelay is dropped as the phy gets enabled much earlier
now, so it is no longer needed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Tested-by: Karsten Merker <merker@debian.org>
Tested-by: Michael Haas <haas@computerlinguist.org>