oweals/u-boot.git
7 years agoboard: atmel: Use the new PIT timer driver
Wenyou.Yang@microchip.com [Tue, 15 Aug 2017 09:40:27 +0000 (17:40 +0800)]
board: atmel: Use the new PIT timer driver

Use the Atmel PIT timer driver which supports the driver model
and device tree.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
7 years agodriver: timer: Add the Atmel PIT timer driver
Wenyou.Yang@microchip.com [Tue, 15 Aug 2017 09:40:26 +0000 (17:40 +0800)]
driver: timer: Add the Atmel PIT timer driver

Add the new Atmel PIT timer driver, which supports the driver model
and device tree.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
7 years agopowerpc: Rework interrupt_init_cpu()
Tom Rini [Mon, 14 Aug 2017 02:44:37 +0000 (22:44 -0400)]
powerpc: Rework interrupt_init_cpu()

The function interrupt_init_cpu() is given an int return type but does
not return anything but 0.  Rework this to be a void function.

Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Mario Six <mario.six@gdsys.cc>
7 years agofs: fat: fix fatwrite overflow calculation
Reno Farnesi [Sun, 13 Aug 2017 19:16:17 +0000 (15:16 -0400)]
fs: fat: fix fatwrite overflow calculation

The overflow calculation was incorrect. Adding the start block of the
partition is not needed because the sectors are already relative to the
beginning of the partition. If you attempted to write a file smaller
than cur_part_info.start blocks on a full partition the old calculation
fails to catch the overflow. This would cause an infinite loop in the
determine_fatent function.

Old, incorrect calculation:

ending sector of new file = start sector + file size (in sectors)
last sector = partition start + total sectors on the partition

Adding the partition start block number is not needed because sectors
are already relative to the start of the partition.

New calculation:

ending sector of new file = start sector + file size (in sectors)
last sector = total sectors on the partition

Signed-off-by: Reno Farnesi <nfarnesi4@gmail.com>
7 years agoarm: dts: am33xx: sync DTS with Linux 4.13-rc4
Suniel Mahesh [Sat, 12 Aug 2017 07:56:38 +0000 (13:26 +0530)]
arm: dts: am33xx: sync DTS with Linux 4.13-rc4

This re-syncs AM33xx DTS file with current file from
Linux v4.13-rc4 to ensure a consistent configuration. Upstream
Linux removed the redundant Interrupt-parent property from mmc,
mac, lcdc and tscadc sub nodes.

Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoram: kconfig: s/SPL/TPL/ in TPL_RAM help text
Jagan Teki [Fri, 25 Aug 2017 14:46:00 +0000 (20:16 +0530)]
ram: kconfig: s/SPL/TPL/ in TPL_RAM help text

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agorpi: Enable USB keyboard support
Simon Glass [Fri, 25 Aug 2017 01:45:31 +0000 (19:45 -0600)]
rpi: Enable USB keyboard support

This is currently disabled, so USB keyboards are not detected in U-Boot.
Enable this option to fix that.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Paul Barker <pbarker@toganlabs.com>
7 years agoarch/sh: don't bring common/env_embedded.o into the link
Thomas Petazzoni [Fri, 28 Jul 2017 21:46:36 +0000 (23:46 +0200)]
arch/sh: don't bring common/env_embedded.o into the link

The linker script for SuperH brings the .ppcenv and .ppcenvr section
of common/env_embedded.o into the .text section. However, the .ppcenv
section is only ever filled in by env_embedded.o when
CONFIG_SYS_USE_PPCENV is defined, but no platforms in mainline U-Boot
use this.

In addition, common/env_embedded.o is not always built (when you use
CONFIG_ENV_IS_NOWHERE for example), which causes the following build
failure:

Fixes:

  LD      u-boot
/home/thomas/sh4aeb-linux-musl/bin/sh4aeb-linux-ld.bfd: cannot find common/env_embedded.o

We fix this by no longer adding the .ppcenv and .ppcenvr sections from
common/env_embedded.o into the .text section.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoarch/sh: allow building in big-endian mode
Thomas Petazzoni [Fri, 28 Jul 2017 21:14:28 +0000 (23:14 +0200)]
arch/sh: allow building in big-endian mode

The SuperH architecture allows to be run in either little or big
endian mode. Some SuperH SoCs get the little vs. big endian decision
through mode pins sampled at reset, so if big endian has been choosen
by HW designers, it cannot be easily changed.

Therefore, it makes sense to allow building U-Boot for SuperH in big
endian mode. To allow this, the only change needed is to adjust the
OUTPUT_FORMAT() in the linker script.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7 years agoARM: rmobile: Enable MMC and USB DM on ULCB
Marek Vasut [Sun, 20 Aug 2017 15:13:50 +0000 (17:13 +0200)]
ARM: rmobile: Enable MMC and USB DM on ULCB

Enable the MMC and USB DM on the board since it's the modern method
and now supported by the drivers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Enable MMC and USB DM on Salvator-X
Marek Vasut [Sun, 20 Aug 2017 15:13:49 +0000 (17:13 +0200)]
ARM: rmobile: Enable MMC and USB DM on Salvator-X

Enable the MMC and USB DM on the board since it's the modern method
and now supported by the drivers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Remove SH SDHI probing from ULCB board
Marek Vasut [Sun, 20 Aug 2017 15:13:48 +0000 (17:13 +0200)]
ARM: rmobile: Remove SH SDHI probing from ULCB board

Drop the SH SDHI bit from the board since SD now probes from DT instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Remove SH SDHI probing from Salvator-X board
Marek Vasut [Sun, 20 Aug 2017 15:13:47 +0000 (17:13 +0200)]
ARM: rmobile: Remove SH SDHI probing from Salvator-X board

Drop the SH SDHI bit from the board since SD now probes from DT instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Remove Serial SH probing from ULCB board
Marek Vasut [Sun, 20 Aug 2017 15:13:46 +0000 (17:13 +0200)]
ARM: rmobile: Remove Serial SH probing from ULCB board

Drop the Serial SH bit from the board since UART now probes from DT instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Remove Serial SH probing from Salvator-X board
Marek Vasut [Sun, 20 Aug 2017 15:13:45 +0000 (17:13 +0200)]
ARM: rmobile: Remove Serial SH probing from Salvator-X board

Drop the Serial SH bit from the board since UART now probes from DT instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Remove RAVB probing from ULCB board
Marek Vasut [Sun, 20 Aug 2017 15:13:44 +0000 (17:13 +0200)]
ARM: rmobile: Remove RAVB probing from ULCB board

Drop the RAVB bit from the board since RAVB now probes from DT instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Remove RAVB probing from Salvator-X board
Marek Vasut [Sun, 20 Aug 2017 15:13:43 +0000 (17:13 +0200)]
ARM: rmobile: Remove RAVB probing from Salvator-X board

Drop the RAVB bit from the board since RAVB now probes from DT instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Enable HUSH parser
Marek Vasut [Sun, 20 Aug 2017 15:13:42 +0000 (17:13 +0200)]
ARM: rmobile: Enable HUSH parser

The HUSH parser was disabled somewhere along the way, reenable it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Alexandru Gagniuc <alex.g@adaptrum.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Enable KSZ90X1 PHY on Salvator-X
Marek Vasut [Sun, 20 Aug 2017 15:13:41 +0000 (17:13 +0200)]
ARM: rmobile: Enable KSZ90X1 PHY on Salvator-X

Commit da3b9e7fd6a1 (Move PHY_MICREL and PHY_MICREL_KSZ90X1 to Kconfig)
broke ethernet support on R8A779x Salvator-X boards by disabling the
KSZ90x1 PHY in Kconfig. Reenable it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Alexandru Gagniuc <alex.g@adaptrum.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Add u-boot, dm-pre-reloc to clock nodes on Gen3
Marek Vasut [Sun, 20 Aug 2017 15:13:40 +0000 (17:13 +0200)]
ARM: rmobile: Add u-boot, dm-pre-reloc to clock nodes on Gen3

We need the clock available very early, add the u-boot,dm-pre-reloc
DT property on those nodes, so they come up very in the process.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoclk: rmobile: Split R8A7795 and R8A7796 core clock tables
Marek Vasut [Sun, 20 Aug 2017 15:13:39 +0000 (17:13 +0200)]
clk: rmobile: Split R8A7795 and R8A7796 core clock tables

The R8A7795 and R8A7796 tables use different constants to identify
clock in DT, so split the tables and use the correct constants on
R8A7795. This fixes UART clock misconfiguration on R8A7795.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoimx: use BOOT_DEVICE_BOARD instead of UART
Stefan Agner [Wed, 16 Aug 2017 00:49:43 +0000 (17:49 -0700)]
imx: use BOOT_DEVICE_BOARD instead of UART

i.MX 6 serial downloader is not necessarily booting via UART but can
also boot from USB. In fact only some i.MX chips have serial
downloader support via UART (e.g. 6UL/ULL and Vybrid) but all of
them have serial downloader support via USB. Use the more appropriate
BOOT_DEVICE_BOARD define which is used for ROM provided recovery
mechanisms in general.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
7 years agoimx: fix USB boot mode detection for i.MX 6UL and 6ULL
Stefan Agner [Wed, 16 Aug 2017 00:49:42 +0000 (17:49 -0700)]
imx: fix USB boot mode detection for i.MX 6UL and 6ULL

Add the reserved boot mode used in the bmode command for i.MX 6UL
and 6ULL as introduced in commit 3fd9579085fa ("imx: mx6ull: fix USB
bmode for i.MX 6UL and 6ULL").

Also replace BMODE_UART with BMODE_RESERVED, which is more appropriate.
Commit 96aac843b68d ("imx: Use IMX6_BMODE_* macros instead of numericals")
added macros for boot modes, in the process the reserved boot mode got
named BMODE_UART. We use the reserved boot mode in the bmode command to
let the boot ROM enter serial downloader recovery mode. But this is only
a side effect, the actual boot mode is reserved...

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
7 years agox86: tangier: kconfig: Guard tangier-specific options
Bin Meng [Sun, 20 Aug 2017 11:33:46 +0000 (04:33 -0700)]
x86: tangier: kconfig: Guard tangier-specific options

These options should not be exposed to other platforms.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7 years agox86: bayleybay: Adjust VGA rom address
Bin Meng [Sun, 20 Aug 2017 11:32:51 +0000 (04:32 -0700)]
x86: bayleybay: Adjust VGA rom address

Adjust VGA rom address to 0xfffb0000 so that u-boot.rom image can be
built again.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: baytrail: Fix turbo enable
Bin Meng [Thu, 17 Aug 2017 08:10:43 +0000 (01:10 -0700)]
x86: baytrail: Fix turbo enable

CPU_INTEL_TURBO_NOT_PACKAGE_SCOPED must be turned on for Baytrail.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: Convert CPU_INTEL_TURBO_NOT_PACKAGE_SCOPED to Kconfig
Bin Meng [Thu, 17 Aug 2017 08:10:42 +0000 (01:10 -0700)]
x86: Convert CPU_INTEL_TURBO_NOT_PACKAGE_SCOPED to Kconfig

This converts CPU_INTEL_TURBO_NOT_PACKAGE_SCOPED to a Kconfig option.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: dfi-bt700: Select SERIAL_RX_BUFFER via Kconfig
Stefan Roese [Wed, 16 Aug 2017 15:37:18 +0000 (17:37 +0200)]
x86: dfi-bt700: Select SERIAL_RX_BUFFER via Kconfig

To support more input characters (longer stings pasted into the U-Boot
prompt) without dropping, lets selects the recently added UART RX
buffer for these boards.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: conga-qeval20-qa3-e3845: Select SERIAL_RX_BUFFER via Kconfig
Stefan Roese [Wed, 16 Aug 2017 15:37:17 +0000 (17:37 +0200)]
x86: conga-qeval20-qa3-e3845: Select SERIAL_RX_BUFFER via Kconfig

To support more input characters (longer stings pasted into the U-Boot
prompt) without dropping, lets selects the recently added UART RX
buffer for these boards.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoserial: serial-uclass: Add generic serial RX buffer support
Stefan Roese [Wed, 16 Aug 2017 15:37:16 +0000 (17:37 +0200)]
serial: serial-uclass: Add generic serial RX buffer support

Pasting longer lines into the U-Boot console prompt sometimes leads to
characters missing. One problem here is the small 16-byte FIFO of the
legacy NS16550 UART, e.g. on x86 platforms.

This patch now introduces a Kconfig option to enable RX buffer support
for all DM based serial drivers. With this option enabled, I was
able paste really long lines into the U-Boot console, without any
characters missing.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoRevert "serial: ns16550: Add RX interrupt buffer support"
Stefan Roese [Wed, 16 Aug 2017 15:37:15 +0000 (17:37 +0200)]
Revert "serial: ns16550: Add RX interrupt buffer support"

This reverts commit 6822cf3ec7c8768b8727573b8f4b2cb3d870b881.

As Bin Meng has tested and pointed out, we don't need the RX interrupt
for the RX buffer support at all. Just reading all available characters
into a buffer is sufficient to solve the problem with the dropped
characters upon long lines pasted into the U-Boot prompt. Since this
RX buffer support can be implemented in a generic way, without any
device specifica (e.g. for the ns16550), I'll post a new patch with
a new serial RX buffer support for DM, which all DM based serial
drivers can use.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agovbe: Drop vbe_get_video_info()
Bin Meng [Wed, 16 Aug 2017 14:35:36 +0000 (07:35 -0700)]
vbe: Drop vbe_get_video_info()

With DM video, this is not used any more. Drop it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: kconfig: Imply CMD_PCI
Bin Meng [Wed, 16 Aug 2017 12:46:49 +0000 (05:46 -0700)]
x86: kconfig: Imply CMD_PCI

Let's imply the 'pci' command to access the de facto interconnect
bus in an x86 system.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agox86: fsp: Configure SPI opcode registers before SPI is locked down
Bin Meng [Wed, 16 Aug 2017 05:38:31 +0000 (22:38 -0700)]
x86: fsp: Configure SPI opcode registers before SPI is locked down

Some Intel FSP (like Braswell) does SPI lock-down during the call
to fsp_notify(INIT_PHASE_BOOT). But before SPI lock-down is done,
it's bootloader's responsibility to configure the SPI controller's
opcode registers properly otherwise SPI controller driver doesn't
know how to communicate with the SPI flash device.

This introduces a Kconfig option CONFIG_FSP_LOCKDOWN_SPI for such
FSPs. When it is on, U-Boot will configure the SPI opcode registers
before the lock-down.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agox86: ich-spi: Move opcode registers configuration to another routine
Bin Meng [Wed, 16 Aug 2017 05:38:30 +0000 (22:38 -0700)]
x86: ich-spi: Move opcode registers configuration to another routine

At present the ICH SPI opcode registers configuration is done in the
ich_spi_remove() routine, a little bit weird but that's how current.
Linux MTD driver works. This changes to move the opcode registers
configuration to a separate routine ich_spi_config_opcode() which
might be called by U-Boot itself as well.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agox86: ich-spi: Don't read cached lock status
Bin Meng [Wed, 16 Aug 2017 05:38:29 +0000 (22:38 -0700)]
x86: ich-spi: Don't read cached lock status

At present the ICH SPI controller driver reads the controller lock
status from its register in the probe routine and saves the lock
status to a member of priv. Later the driver uses the cached status
from priv to judge whether the controller setting is locked and do
different setup.

But such logic is only valid when there is only the SPI controller
driver that touches the SPI hardware. In fact the lock status change
can be trigged outside the driver, eg: during the fsp_notify() call
when Intel FSP is used.

This changes the driver to read the lock status every time when an
SPI transfer is initiated instead of reading the cached one.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agox86: ich-spi: Remove unnecessary assignment in ich_init_controller()
Bin Meng [Wed, 16 Aug 2017 05:38:28 +0000 (22:38 -0700)]
x86: ich-spi: Remove unnecessary assignment in ich_init_controller()

There is no need to do another assignment to ich7_spi.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agox86: ich-spi: Remove spi_write_protect_region()
Bin Meng [Wed, 16 Aug 2017 05:38:27 +0000 (22:38 -0700)]
x86: ich-spi: Remove spi_write_protect_region()

This routine is not called anywhere.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agopinctrl: imx7ulp: Add new info instance for iomuxc1
Peng Fan [Mon, 14 Aug 2017 10:09:17 +0000 (18:09 +0800)]
pinctrl: imx7ulp: Add new info instance for iomuxc1

To i.MX7ULP, we need to create two info instances for
iomux0 and iomux1 respectively, otherwise iomuxc0/1 will
share one info instance and use one base, because imx_pinctrl_probe
will use info to store base address and etc. But iomuxc0/1
actually have different base address.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
7 years agopinctrl: imx: Fix mask when SHARE_MUX_CONF_REG is set
Peng Fan [Mon, 14 Aug 2017 10:09:16 +0000 (18:09 +0800)]
pinctrl: imx: Fix mask when SHARE_MUX_CONF_REG is set

when using SHARE_MUX_CONF_REG, wrong mask is used for
writing config value, which causes mux value is cleared.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoimx: fix licensing in i.MX files
Stefano Babic [Thu, 17 Aug 2017 11:55:20 +0000 (13:55 +0200)]
imx: fix licensing in i.MX files

Some files for i.MX do not yet have the SPDX ID to reference the correct
license.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Wolfgang Denk <wd@denx.de>
7 years agoimx: mx7: psci: add copyright and license
Peng Fan [Thu, 17 Aug 2017 09:48:50 +0000 (17:48 +0800)]
imx: mx7: psci: add copyright and license

Add copyright and license header.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoapalis/colibri_imx6: enable SDP by default
Stefan Agner [Wed, 16 Aug 2017 18:00:57 +0000 (11:00 -0700)]
apalis/colibri_imx6: enable SDP by default

Enable Serial Download Protocol (SDP) in SPL and U-Boot. This is
useful to make use of imx_usb to download the complete U-Boot
(u-boot.img) after SPL has been downloaded. The U-Boot command
sdp allows to enumerate as SDP capable device again, e.g. to
download a Linux kernel and/or U-Boot script.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis/colibri_imx6: use independent USB PID for SPL
Stefan Agner [Wed, 16 Aug 2017 18:00:56 +0000 (11:00 -0700)]
apalis/colibri_imx6: use independent USB PID for SPL

Use a completely independent USB Product ID for SPL. This allows
to differentiate a SDP running in SPL and SDP running in a U-Boot
which could not read the config block successfully.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
7 years agodoc: add Serial Download Protocol documentation
Stefan Agner [Wed, 16 Aug 2017 18:00:55 +0000 (11:00 -0700)]
doc: add Serial Download Protocol documentation

Document the U-Boot Serial Download Protocol implementation and
some typical use cases.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
7 years agospl: add serial download protocol (SDP) support
Stefan Agner [Wed, 16 Aug 2017 18:00:54 +0000 (11:00 -0700)]
spl: add serial download protocol (SDP) support

Add USB serial download protocol support to SPL. If the SoC started
in recovery mode the SPL will immediately switch to SDP and wait for
further downloads/commands from the host side.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
7 years agocmd: add sdp command
Stefan Agner [Wed, 16 Aug 2017 18:00:53 +0000 (11:00 -0700)]
cmd: add sdp command

Add a new command to start USB Serial Download Protocol (SDP)
state machine.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
7 years agousb: gadget: sdp: extend images compatible for jumps
Stefan Agner [Wed, 16 Aug 2017 18:00:52 +0000 (11:00 -0700)]
usb: gadget: sdp: extend images compatible for jumps

Support U-Boot images in SPL so that u-boot.img files can be
directly downloaded and executed. Furthermore support U-Boot
scripts download and execution in full U-Boot so that custom
recovery actions can be downloaded from the host in a third
step.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
7 years agousb: gadget: add SDP driver
Stefan Agner [Wed, 16 Aug 2017 18:00:51 +0000 (11:00 -0700)]
usb: gadget: add SDP driver

Add SDP (Serial Downloader Protocol) implementation for U-Boot. The
protocol is used in NXP SoC's boot ROM and allows to download program
images. Beside that, it can also be used to read/write registers and
download complete Device Configuration Data (DCD) sets. This basic
implementation supports downloading images with the imx header format
reading and writing registers.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
7 years agoimx: move imximage header to common location
Stefan Agner [Wed, 16 Aug 2017 18:00:50 +0000 (11:00 -0700)]
imx: move imximage header to common location

Move the imximage.h header file to a common location so we can make
use of it from U-Boot too.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
7 years agoi2c: muxes: add i2c gpio multiplexer driver
Peng Fan [Mon, 14 Aug 2017 10:00:05 +0000 (18:00 +0800)]
i2c: muxes: add i2c gpio multiplexer driver

Add an i2c mux driver providing access to i2c bus segments using a
hardware MUX sitting on a master bus and controlled through gpio pins.

E.G. something like:

         ----------              ----------  Bus segment 1   - - - - -
        |          | SCL/SDA    |          |-------------- |           |
        |          |------------|          |
        |          |            |          | Bus segment 2 |           |
        |  Linux   | GPIO 1..N  |   MUX    |---------------   Devices
        |          |------------|          |               |           |
        |          |            |          | Bus segment M
        |          |            |          |---------------|           |
         ----------              ----------                  - - - - -

SCL/SDA of the master I2C bus is multiplexed to bus segment 1..M
according to the settings of the GPIO pins 1..N.

Note commit log from kernel
commit 92ed1a76("i2c: Add generic I2C multiplexer using GPIO API")

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Peng Fan <peng.fan@nxp.com> (i.MX6QP-Sabreauto)
Cc: Heiko Schocher <hs@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Simon Glass <sjg@chromium.org>
7 years agoi2c: add i2c driver for stm32
Patrice Chotard [Wed, 9 Aug 2017 12:45:27 +0000 (14:45 +0200)]
i2c: add i2c driver for stm32

Add i2c driver which can be used on both STM32F7 and STM32H7.
This I2C block supports the following features:
 _ Slave and master modes
 _ Multimaster capability
 _ Standard-mode (up to 100 kHz)
 _ Fast-mode (up to 400 kHz)
 _ Fast-mode Plus (up to 1 MHz)
 _ 7-bit and 10-bit addressing mode
 _ Multiple 7-bit slave addresses (2 addresses, 1 with configurable mask)
 _ All 7-bit addresses acknowledge mode
 _ General call
 _ Programmable setup and hold times
 _ Easy to use event management
 _ Optional clock stretching
 _ Software reset

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agofastboot: Ensure we treat CONFIG_FASTBOOT_BUF_ADDR as long
Tom Rini [Tue, 22 Aug 2017 12:20:02 +0000 (08:20 -0400)]
fastboot: Ensure we treat CONFIG_FASTBOOT_BUF_ADDR as long

Otherwise:
drivers/usb/gadget/f_fastboot.c:564:32: warning: format "%lx" expects
argument of type "long unsigned int", but argument 3 has type "unsigned
int" [-Wformat=]

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agomtd: cfi: staticize functions
Marek Vasut [Sun, 20 Aug 2017 15:20:00 +0000 (17:20 +0200)]
mtd: cfi: staticize functions

Staticize a few functions and variables which are no longer exposed.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agoMerge git://www.denx.de/git/u-boot-marvell
Tom Rini [Mon, 21 Aug 2017 11:17:15 +0000 (07:17 -0400)]
Merge git://www.denx.de/git/u-boot-marvell

7 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Mon, 21 Aug 2017 11:16:56 +0000 (07:16 -0400)]
Merge git://git.denx.de/u-boot-usb

7 years agoMerge git://git.denx.de/u-boot-uniphier
Tom Rini [Mon, 21 Aug 2017 11:16:16 +0000 (07:16 -0400)]
Merge git://git.denx.de/u-boot-uniphier

 - Fix unmet direct dependencies warning
 - Remove old sLD3 SoC support
 - Update reset data
 - Add dr_mode DT property to avoid warning

7 years agoARM: mvebu: set correct mem_size for db-88f6820-amc
Chris Packham [Thu, 17 Aug 2017 10:27:03 +0000 (22:27 +1200)]
ARM: mvebu: set correct mem_size for db-88f6820-amc

The db-88f6820-amc has four chips with 2Gb density giving a total of 1GB
DRAM. Update the board_topology_map to reflect the correct
configuration.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agodoc: license: Add license header to the README.dfutftp file
Lukasz Majewski [Thu, 17 Aug 2017 21:10:49 +0000 (23:10 +0200)]
doc: license: Add license header to the README.dfutftp file

Signed-off-by: Lukasz Majewski <lukma@denx.de>
7 years agofb_mmc.c: Correct blk_dread() return value checks
Tom Rini [Tue, 15 Aug 2017 01:00:44 +0000 (21:00 -0400)]
fb_mmc.c: Correct blk_dread() return value checks

The function blk_dread will return -ENOSYS on failure or on success the
number of blocks read, which must be the number asked to read (otherwise
it failed somewhere).  Correct this check.

Cc: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agocommon/fb_mmc.c: Fix warnings about casts
Tom Rini [Sat, 10 Jun 2017 13:15:37 +0000 (09:15 -0400)]
common/fb_mmc.c: Fix warnings about casts

When building the flash zImage code on aarch64 we see warnings about
pointer size casts.  Use uintptr_t instead to correct these.

Cc: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-By: Sam Protsenko <semen.protsenko@linaro.org>
7 years agofastboot: avoid printing invalid data
John Keeping [Mon, 19 Sep 2016 09:59:40 +0000 (10:59 +0100)]
fastboot: avoid printing invalid data

There is no guarantee that commands are null-terminated in the USB
request buffer, so limit the length of data that is printed.

Signed-off-by: John Keeping <john@metanate.com>
Tested-by: Steve Rae <steve.rae@raedomain.com>
7 years agoFix fastboot boot address
Peter Chubb [Thu, 8 Sep 2016 20:51:57 +0000 (20:51 +0000)]
Fix fastboot boot address

Fastboot loads an image at CONFIG_FASTBOOT_BUF_ADDR, but currently
tells do_bootm() to look for an image at $loadaddr.  This breaks if
CONFIG_FASTBOOT_BUF_ADDR is different from the current user-set
loadaddr.

Instead, tell do_bootm() to pick up the image where it was laoded.

Signed-off-by: Peter Chubb <peter.chubb@data61.csiro.au>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Steve Rae <steve.rae@raedomain.com>
7 years agousb: ehci: Convert CONFIG_USB_EHCI_PCI to Kconfig
Bin Meng [Wed, 9 Aug 2017 07:21:54 +0000 (00:21 -0700)]
usb: ehci: Convert CONFIG_USB_EHCI_PCI to Kconfig

This converts CONFIG_USB_EHCI_PCI to a Kconfig option, and updates
all boards that use it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoenv: Replace all open-coded gd->env_valid values with ENV_ flags
Simon Glass [Sun, 20 Aug 2017 10:45:15 +0000 (04:45 -0600)]
env: Replace all open-coded gd->env_valid values with ENV_ flags

Some of these were missed in the conversion.
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoenv: Allow env_load() to detect errors
Simon Glass [Sun, 20 Aug 2017 10:45:14 +0000 (04:45 -0600)]
env: Allow env_load() to detect errors

Now that we have errors available in the environment driver's load()
method, check the return valid.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoenv: Correct case of no sub-init function
Tom Rini [Sun, 20 Aug 2017 02:27:57 +0000 (22:27 -0400)]
env: Correct case of no sub-init function

With the change to the environment code to remove the common init stage
of pointing to the default environment and setting it as valid, combined
with the change to switch gd->env_valid from 0/1/2 to an enum we now
must set env_valid to one of the enum values rather than an int.  And in
this case, not only was setting it to an int wrong, it was now the wrong
value.  Finally, in the case of ENV_IS_NOWHERE we must still say that
our envionrment is invalid after init for things to continue to
function.

Fixes: 7938822a6b75 ("env: Drop common init() functions")
Tested-by: Marek Vasut <marek.vasut@gmail.com>
Reported-by: Marek Vasut <marek.vasut@gmail.com>
Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
Changes in v3:
- Actually include changes for env/nowhere.c

7 years agoARM: dts: uniphier: add dr_mode property to dwc3 node
Masahiro Yamada [Sun, 13 Aug 2017 00:01:17 +0000 (09:01 +0900)]
ARM: dts: uniphier: add dr_mode property to dwc3 node

Since commit 576e3cc700c5 ("usb: host: xhci-dwc3: Add dual role mode
support from DT"), warning is displayed if dr_mode is not specified.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoreset: uniphier: refactor reset data and add NAND/eMMC reset lines
Masahiro Yamada [Sun, 13 Aug 2017 00:01:16 +0000 (09:01 +0900)]
reset: uniphier: refactor reset data and add NAND/eMMC reset lines

  - Merge sys_reset data of LD4, Pro4, sLD8 and Pro5

  - Merge sys_reset data of LD11 and LD20

  - Use primitive UNIPHIER_RESETX() macro because bit assignments for
    system reset will be changed for every SoC in the future

  - Add NAND and eMMC resets

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoRevert "ARM: uniphier: fix ROM boot mode for PH1-sLD3"
Masahiro Yamada [Sun, 13 Aug 2017 00:01:15 +0000 (09:01 +0900)]
Revert "ARM: uniphier: fix ROM boot mode for PH1-sLD3"

This reverts commit 82d075e79fa509ffb8ecd8dd2dc216929d6e8289.

Commit 82d075e79fa5 ("ARM: uniphier: fix ROM boot mode for PH1-sLD3")
was a workaround for sLD3.  Now the sLD3 SoC support has been removed.

Revert it to allow to simplify the init code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoRevert "ARM: uniphier: move lowlevel debug init code after page table switch"
Masahiro Yamada [Sun, 13 Aug 2017 00:01:14 +0000 (09:01 +0900)]
Revert "ARM: uniphier: move lowlevel debug init code after page table switch"

This reverts commit bcc51c1512a3deb6a9fdd37362c6dde32ad3da23.

Commit bcc51c1512a3 ("ARM: uniphier: move lowlevel debug init code
after page table switch") was intended to support lowlevel debug for
sLD3.  Now the sLD3 SoC support has been removed.

Revert it to allow to enable lowlevel debug earlier.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: remove sLD3 SoC support
Masahiro Yamada [Sun, 13 Aug 2017 00:01:13 +0000 (09:01 +0900)]
ARM: uniphier: remove sLD3 SoC support

This SoC is too old.  It is difficult to maintain any longer.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoclk: uniphier: fix unmet direct dependencies warning
Masahiro Yamada [Sun, 20 Aug 2017 13:59:36 +0000 (22:59 +0900)]
clk: uniphier: fix unmet direct dependencies warning

Since commit f0776a551764 ("spl: dm: Kconfig: SPL_CLK depends on
SPL_DM"), the following warning is displayed:

  $ make uniphier_v8_defconfig
  warning: (ARCH_ZYNQ && ARCH_ZYNQMP && STM32F7 && CLK_UNIPHIER) selects
  SPL_CLK which has unmet direct dependencies (CLK && SPL_DM)

While I am here, I am removing the prompt to make it user-unconfigurable
option so that "select CLK_UNIPHIER" can be omitted.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoFix 'notes' typos
Anatolij Gustschin [Fri, 18 Aug 2017 15:58:51 +0000 (17:58 +0200)]
Fix 'notes' typos

s/notes/nodes

Signed-off-by: Anatolij Gustschin <agust@denx.de>
7 years agoenv: Sort selection of default choices
Andy Shevchenko [Fri, 18 Aug 2017 10:14:47 +0000 (13:14 +0300)]
env: Sort selection of default choices

It would be easier to catch out which platform is using which default.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7 years agoarm, at91: fix taurus board
Heiko Schocher [Wed, 16 Aug 2017 07:47:45 +0000 (09:47 +0200)]
arm, at91: fix taurus board

since commit: b529993e0222 "spl: add hierarchical defaults for SPL_LDSCRIPT"

taurus board stopped working. Use the ldscript from
arch/arm/cpu/u-boot-spl.lds (as before this patch) fixed it.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agocommon/board_f.c: remove CONFIG_SYS_GENERIC_GLOBAL_DATA
Thomas Petazzoni [Tue, 15 Aug 2017 21:11:02 +0000 (23:11 +0200)]
common/board_f.c: remove CONFIG_SYS_GENERIC_GLOBAL_DATA

CONFIG_SYS_GENERIC_GLOBAL_DATA is no longer used by any board or
platform, so support for it can be dropped.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoARM: hisilicon: hikey: Fix eMMC with latest ATF & U-Boot
Peter Griffin [Tue, 15 Aug 2017 16:18:16 +0000 (17:18 +0100)]
ARM: hisilicon: hikey: Fix eMMC with latest ATF & U-Boot

ATF can leave the MMC IP in a state where U-Boot mmc driver
can't enumerate the eMMC.

This patch provides a mmc0_reset_clk() function like we
already so do sd card controller which resets the IP
when entering U-Boot.

With this patch applied eMMC partitions are successfully
enumerated again.

=> mmc dev 0
switch to partitions #0, OK
mmc0(part 0) is current device
=> mmc part

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

Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
  1 0x00000800 0x00000fff "vrl"
attrs: 0x0000000000000000
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
guid: 496847ab-56a1-4cd5-a1ad-47f4acf055c9
  2 0x00001000 0x000017ff "vrl_backup"
attrs: 0x0000000000000000
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
guid: 61a36fc1-8efb-4899-84d8-b61642efa723
  3 0x00001800 0x00001fff "mcuimage"
<snip>

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
7 years agofs/fat: Correct blk_dread() return value check
Tom Rini [Tue, 15 Aug 2017 01:02:08 +0000 (21:02 -0400)]
fs/fat: Correct blk_dread() return value check

The function blk_dread will return -ENOSYS on failure or on success the
number of blocks read, which must be the number asked to read (otherwise
it failed somewhere).  Correct this check.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agospl: spl_mmc.c Correct blk_dread() return value check
Tom Rini [Tue, 15 Aug 2017 01:01:30 +0000 (21:01 -0400)]
spl: spl_mmc.c Correct blk_dread() return value check

The function blk_dread will return -ENOSYS on failure or on success the
number of blocks read, which must be the number asked to read (otherwise
it failed somewhere).  Correct this check.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agocmd/read.c: Fix checking blk_dread return value
Tom Rini [Tue, 15 Aug 2017 00:58:50 +0000 (20:58 -0400)]
cmd/read.c: Fix checking blk_dread return value

The function blk_dread will return -ENOSYS on failure or on success the
number of blocks read, which must be the number asked to read (otherwise
it failed somewhere).  Correct this check.

Reported-by: Coverity (CID: 166335)
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agomtdparts: Fix various issues reported by Coverity
Tom Rini [Tue, 15 Aug 2017 00:42:27 +0000 (20:42 -0400)]
mtdparts: Fix various issues reported by Coverity

Now that sandbox is building cmd/mtdparts.c Coverity has looked at the
code and found a number of issues.  In index_partitions() it is possible
that part will be NULL, so re-work the checks and debug statements to
take this into account.  We have a number of string buffers that we
print to in the exact size of, and use string functions on, so we need
to ensure they are large enough to be NULL terminated.  In
device_parse() it is not possible for num_partitions to be 0 (we would
have hit a different error first) so remove logically dead code.
Finally, in parse_mtdparts() if we have an error we need to free the
memory allocated to dev.

Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Reported-by: Coverity (CID: 166334, 166333, 166332, 166329, 166328)
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agohash: Compile only hardware or software versions of SHA algorithms
Tom Rini [Mon, 14 Aug 2017 20:38:07 +0000 (16:38 -0400)]
hash: Compile only hardware or software versions of SHA algorithms

Commit 089df18bfe9d ("lib: move hash CONFIG options to Kconfig") moved
CONFIG_SHA1, CONFIG_SHA256, CONFIG_SHA_HW_ACCEL, and
CONFIG_SHA_PROG_HW_ACCEL config options to Kconfig. So in the case of
SPL, CONFIG_SPL_HASH_SUPPORT enables CONFIG_SHA1 and CONFIG_SHA256 which
enables SHA SW library by default.  But in the case of platforms with
SHA HW library support, SHA SW library becomes redundant and increases
size of SPL by approx 18K.  Rework the code so that we have named
members and only have either software or hardware versions of the
algorithm, depending on the relevant config options.  Update the comment
around hash_algo to reflect this as well.

Reported-by: Sumit Garg <sumit.garg@nxp.com>
Cc: Sumit Garg <sumit.garg@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Sumit Garg <sumit.garg@nxp.com>
7 years agoMakefile: honor PYTHON configuration properly
Clément Bœsch [Mon, 14 Aug 2017 06:59:11 +0000 (08:59 +0200)]
Makefile: honor PYTHON configuration properly

On some systems `python` is `python3` (for instance, Archlinux). The
`PYTHON` variable can be used to point to `python2` to have a successful
build.

The use of `PYTHON` is currently limited in the Makefile and needs to be
extended in other places:

First, pylibfdt is required to be a Python 2 binding (binman imports
pylibfdt and is only compatible Python 2), so its setup.py needs to be
called accordingly. An alternative would be to change the libfdt
setup.py shebang to python2, but the binding is actually portable. Also,
it would break on system where there is no such thing as `python2`.

Secondly, the libfdt import checks need to be done against Python 2 as
well since the Python 2 compiled modules (in this case _libdft.so) can
not be imported from Python 3.

Note on the libfdt imports: "@if ! PYTHONPATH=tools $(PYTHON) -c 'import
libfdt'; then..." is probably simpler than the currently sub-optimal
pipe.
Reviewed-by: Jonathan Gray <jsg@jsg.id.au>
7 years agoMerge git://git.denx.de/u-boot-video
Tom Rini [Sun, 20 Aug 2017 02:11:05 +0000 (22:11 -0400)]
Merge git://git.denx.de/u-boot-video

7 years agolcd: avoid possible NULL dereference
xypron.glpk@gmx.de [Sun, 30 Jul 2017 19:59:23 +0000 (21:59 +0200)]
lcd: avoid possible NULL dereference

Do not dereference bmp before the check if it is NULL.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agoMerge tag 'signed-efi-next' of git://github.com/agraf/u-boot
Tom Rini [Fri, 18 Aug 2017 22:24:58 +0000 (18:24 -0400)]
Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot

EFI Fixes for 2017.09:
  - Fix GOP w/o display
  - Fix LocateHandle
  - Fix exit return value truncation
  - Fix missing EFIAPI in efi_locate_handle (for x86)

7 years agoMerge branch 'master' of git://git.denx.de/u-boot-mmc
Tom Rini [Fri, 18 Aug 2017 22:24:36 +0000 (18:24 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mmc

7 years agoMerge branch 'master' of git://git.denx.de/u-boot-coldfire
Tom Rini [Fri, 18 Aug 2017 22:24:08 +0000 (18:24 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-coldfire

7 years agoMerge branch 'master' of git://git.denx.de/u-boot-rockchip
Tom Rini [Fri, 18 Aug 2017 22:23:58 +0000 (18:23 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-rockchip

7 years agorockchip: rk322x: pinctrl: fix IO MASK error on sdcard pin
Kever Yang [Thu, 17 Aug 2017 07:17:36 +0000 (15:17 +0800)]
rockchip: rk322x: pinctrl: fix IO MASK error on sdcard pin

Fix the IOMUX setting for SDcard CMD pin at the same time.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk322x: pinctrl: using compatible name same with dts
Kever Yang [Thu, 17 Aug 2017 07:17:35 +0000 (15:17 +0800)]
rockchip: rk322x: pinctrl: using compatible name same with dts

The dts from kernel is using rk3228-pinctrl as compatible name,
need to sync with it to make the driver work.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk322x: update MACRO for mmc clksel reg
Kever Yang [Thu, 3 Aug 2017 12:07:45 +0000 (20:07 +0800)]
rockchip: rk322x: update MACRO for mmc clksel reg

The description for eMMC/SDIO/SDMMC src is not correct,
update the CRU_CLKSEL11_CON value definition according to TRM.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk322x: update dram bank size
Kever Yang [Fri, 21 Jul 2017 10:21:07 +0000 (18:21 +0800)]
rockchip: rk322x: update dram bank size

The DRAM start address is not 0, so need to update the last bank size
as:
DRAM start addr + DRAM_SIZE - last bank start addr

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: rk3399: spl: remove unused header inclusion
Philipp Tomsich [Wed, 16 Aug 2017 17:24:02 +0000 (19:24 +0200)]
rockchip: rk3399: spl: remove unused header inclusion

fdtdec.h is included, but not used in rk3399-board-spl.c: remove the
'#include'-statement.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: dts: rk3399-evb: remove redundant gmac node
Kever Yang [Wed, 9 Aug 2017 10:51:30 +0000 (18:51 +0800)]
rockchip: dts: rk3399-evb: remove redundant gmac node

There are two same gmac node, remove one.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agoefi_loader: do not cast return value in EFI_EXIT
xypron.glpk@gmx.de [Thu, 17 Aug 2017 16:57:36 +0000 (18:57 +0200)]
efi_loader: do not cast return value in EFI_EXIT

UEFI API functions have different return types.
Some return a value of type EFI_STATUS other don't.

We therefore should not cast the return value of EFI_EXIT
to another type than the expression passed to EFI_EXIT.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agommc: Support generic PCI SD host controller
Bin Meng [Wed, 9 Aug 2017 07:21:00 +0000 (00:21 -0700)]
mmc: Support generic PCI SD host controller

This changes pci_mmc driver to use PCI_CLASS_SYSTEM_SDHCI instead of
individual vendor id & device id pair to support generic PCI SD host
controller.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agom68k: add board stmark2, mcf5441x based
Angelo Dureghello [Sun, 6 Aug 2017 23:17:18 +0000 (01:17 +0200)]
m68k: add board stmark2, mcf5441x based

Sysam stmark2 board is a generic and fully (hw and sw) open board, with
a mcf54415 Coldfire CPU, 128MB of DDR2, 16MB of SPI flash and SD card
as non volatile memories, and a wifi module included on-board.
The board is actually used mainly for Coldfire custodian testing activity
related to the mcf5441x Coldfire family.

For further information please see: http://sysam.it/cff_stmark2.html

Signed-off-by: Angelo Dureghello <angelo@sysam.it>
---

Changes in v2:
 - remove CMD_REGINFO
 - add board information in commit message

7 years agom68k: mcf5445x: allow CS0 to be undefined
Angelo Dureghello [Sun, 14 May 2017 22:17:48 +0000 (00:17 +0200)]
m68k: mcf5445x: allow CS0 to be undefined

On some boards, CONFIG_SYS_CS0_BASE can be undefined, since
CS0 is not connected to any signal.

Signed-off-by: Angelo Dureghello <angelo@sysam.it>