oweals/u-boot.git
6 years agosandbox: dts: add Sandbox TPMv2.x node
Miquel Raynal [Tue, 15 May 2018 09:57:27 +0000 (11:57 +0200)]
sandbox: dts: add Sandbox TPMv2.x node

This node declares the presence of the Sandbox TPMv2.x emulated chip,
available for testing.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agodoc: device-tree-bindings: add Sandbox TPMv2.0 module info
Miquel Raynal [Tue, 15 May 2018 09:57:26 +0000 (11:57 +0200)]
doc: device-tree-bindings: add Sandbox TPMv2.0 module info

Add Sandbox TPMv2.0 module bindings.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add a Sandbox TPMv2.x driver
Miquel Raynal [Tue, 15 May 2018 09:57:25 +0000 (11:57 +0200)]
tpm: add a Sandbox TPMv2.x driver

This driver can emulate all the basic functionalities of a TPMv2.x
chip and should behave like them during regular testing.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotest/py: add TPMv2.x test suite
Miquel Raynal [Tue, 15 May 2018 09:57:24 +0000 (11:57 +0200)]
test/py: add TPMv2.x test suite

Add tests for the TPMv2.x commands.
These commands may run both on a physical TPM and with the sandbox
driver.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agodoc: device-tree-bindings: add TIS TPMv2.0 SPI module info
Miquel Raynal [Tue, 15 May 2018 09:57:23 +0000 (11:57 +0200)]
doc: device-tree-bindings: add TIS TPMv2.0 SPI module info

Add TIS TPMv2.0 SPI module bindings.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm2: tis_spi: add the possibility to reset the chip with a gpio
Miquel Raynal [Wed, 16 May 2018 06:59:16 +0000 (08:59 +0200)]
tpm2: tis_spi: add the possibility to reset the chip with a gpio

On some designs, the reset line could not be connected to the SoC reset
line, in this case, request the GPIO and ensure the chip gets reset.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotpm: add support for TPMv2.x SPI modules
Miquel Raynal [Tue, 15 May 2018 09:57:21 +0000 (11:57 +0200)]
tpm: add support for TPMv2.x SPI modules

Add the tpm2_tis_spi driver that should support any TPMv2 compliant
(SPI) module.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotpm: add PCR authentication commands support
Miquel Raynal [Tue, 15 May 2018 09:57:20 +0000 (11:57 +0200)]
tpm: add PCR authentication commands support

Add support for the TPM2_PCR_SetAuthPolicy and
TPM2_PCR_SetAuthValue commands.

Change the command file and the help accordingly.

Note: These commands could not be tested because the TPMs available
do not support them, however they could be useful for someone else.
The user is warned by the command help.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add TPM2_HierarchyChangeAuth command support
Miquel Raynal [Tue, 15 May 2018 09:57:19 +0000 (11:57 +0200)]
tpm: add TPM2_HierarchyChangeAuth command support

Add support for the TPM2_HierarchyChangeAuth command.

Change the command file and the help accordingly.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add dictionary attack mitigation commands support
Miquel Raynal [Tue, 15 May 2018 09:57:18 +0000 (11:57 +0200)]
tpm: add dictionary attack mitigation commands support

Add support for the TPM2_DictionaryAttackParameters and
TPM2_DictionaryAttackLockReset commands.

Change the command file and the help accordingly.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add TPM2_GetCapability command support
Miquel Raynal [Tue, 15 May 2018 09:57:17 +0000 (11:57 +0200)]
tpm: add TPM2_GetCapability command support

Add support for the TPM2_GetCapability command.

Change the command file and the help accordingly.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add TPM2_PCR_Read command support
Miquel Raynal [Tue, 15 May 2018 09:57:16 +0000 (11:57 +0200)]
tpm: add TPM2_PCR_Read command support

Add support for the TPM2_PCR_Read command.

Change the command file and the help accordingly.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add TPM2_PCR_Extend command support
Miquel Raynal [Tue, 15 May 2018 09:57:15 +0000 (11:57 +0200)]
tpm: add TPM2_PCR_Extend command support

Add support for the TPM2_PCR_Extend command.

Change the command file and the help accordingly.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add TPM2_Clear command support
Miquel Raynal [Tue, 15 May 2018 09:57:14 +0000 (11:57 +0200)]
tpm: add TPM2_Clear command support

Add support for the TPM2_Clear command.

Change the command file and the help accordingly.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add TPM2_SelfTest command support
Miquel Raynal [Tue, 15 May 2018 09:57:13 +0000 (11:57 +0200)]
tpm: add TPM2_SelfTest command support

Add support for the TPM2_Selftest command.

Change the command file and the help accordingly.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add TPM2_Startup command support
Miquel Raynal [Tue, 15 May 2018 09:57:12 +0000 (11:57 +0200)]
tpm: add TPM2_Startup command support

Add support for the TPM2_Startup command.

Change the command file and the help accordingly.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: report driver error code to upper layer
Miquel Raynal [Tue, 15 May 2018 09:57:11 +0000 (11:57 +0200)]
tpm: report driver error code to upper layer

Instead of returning a generic 'library' error, report back the actual
error code so it can be displayed to the user by the regular error path.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add possible traces to analyze buffers returned by the TPM
Miquel Raynal [Tue, 15 May 2018 09:57:10 +0000 (11:57 +0200)]
tpm: add possible traces to analyze buffers returned by the TPM

When debugging, it is welcome to get more information about what the TPM
returns. Add the possibility to print the packets received to show their
exact content.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add macros to enhance TPM commands readability
Miquel Raynal [Tue, 15 May 2018 09:57:09 +0000 (11:57 +0200)]
tpm: add macros to enhance TPM commands readability

TPM commands are much easier to read/write with these macros that will
transform words or integers into byte strings. This way, there is no
need to call pack_byte_string() while all variable length in a command
are known (and at must 4 bytes, which is a lot of them).

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: prepare support for TPMv2.x commands
Miquel Raynal [Tue, 15 May 2018 09:57:08 +0000 (11:57 +0200)]
tpm: prepare support for TPMv2.x commands

Choice between v1 and v2 compliant functions is done with the
configuration.

Create the various files that will receive TPMv2-only code on the same
scheme as for the TPMv1 code.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add missing parameter in private data structure description
Miquel Raynal [Tue, 15 May 2018 09:57:07 +0000 (11:57 +0200)]
tpm: add missing parameter in private data structure description

Both parameters 'duration_ms' and 'retry_time_ms' of the tpm_chip_priv
structure are documented is the comment above the declaration but 'buf'
was forgotten. Add the missing description.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotpm: disociate TPMv1.x specific and generic code
Miquel Raynal [Tue, 15 May 2018 09:57:06 +0000 (11:57 +0200)]
tpm: disociate TPMv1.x specific and generic code

There are no changes in this commit but a new organization of the code
as follow.

* cmd/ directory:
        > move existing code from cmd/tpm.c in cmd/tpm-common.c
> move specific code in cmd/tpm-v1.c
> create a specific header file with generic definitions for
  commands only called cmd/tpm-user-utils.h

* lib/ directory:
        > move existing code from lib/tpm.c in lib/tpm-common.c
> move specific code in lib/tpm-v1.c
> create a specific header file with generic definitions for
  the library itself called lib/tpm-utils.h

* include/ directory:
        > move existing code from include/tpm.h in include/tpm-common.h
> move specific code in include/tpm-v1.h

Code designated as 'common' is compiled if TPM are used. Code designated
as 'specific' is compiled only if the right specification has been
selected.

All files include tpm-common.h.
Files in cmd/ include tpm-user-utils.h.
Files in lib/ include tpm-utils.h.
Depending on the specification, files may include either (not both)
tpm-v1.h or tpm-v2.h.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
[trini: Fix a few more cases of tpm.h -> tpm-v1.h, some Kconfig logic]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agotpm: prepare introduction of TPMv2.x support in Kconfig
Miquel Raynal [Tue, 15 May 2018 09:57:05 +0000 (11:57 +0200)]
tpm: prepare introduction of TPMv2.x support in Kconfig

Because both major revisions are not compatible at all, let's make them
mutually exclusive in Kconfig. This way we will be sure, when using a
command or a library function that it is supported by the right
revision.

Current drivers are currently prefixed by "tpm_", we will prefix TPMv2.x
files by "tpm2_" to make the distinction without moving everything.

The Kconfig menu about TPM drivers is now divided into two sections, one
for each specification. Compliant drivers with one specification will
only show up if this specification _only_ has been selected, otherwise a
comment is displayed.

Once a driver is selected by the user, it selects automatically a
boolean value, that is needed in order to activate the TPM commands.
Selecting the TPM commands will automatically select the right
command/library files.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
[trini: Rework deps as TPM_V1 and TPM_V2 depend on TPM,
        drop TPM_DRIVER_SELECTED]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add Revision ID field in the chip structure
Miquel Raynal [Tue, 15 May 2018 09:57:04 +0000 (11:57 +0200)]
tpm: add Revision ID field in the chip structure

TPM are shipped with a few read-only register from which we can retrieve
for instance:
- vendor ID
- product ID
- revision ID

Product and vendor ID share the same register and are already referenced
in the tpm_chip structure. Add the revision ID entry which is missing.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotpm: add extra blank lines between declarations and code
Miquel Raynal [Tue, 15 May 2018 09:57:03 +0000 (11:57 +0200)]
tpm: add extra blank lines between declarations and code

Fix following checkpatch.pl issue in TPM-related code:

    WARNING: Missing a blank line after declarations

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotpm: fix spelling
Miquel Raynal [Tue, 15 May 2018 09:57:02 +0000 (11:57 +0200)]
tpm: fix spelling

Fix following checkpatch.pl issues in TPM-related code:

    CHECK: '<x>' may be misspelled - perhaps '<y>'?

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotpm: use the BIT() macro where applicable
Miquel Raynal [Tue, 15 May 2018 09:57:01 +0000 (11:57 +0200)]
tpm: use the BIT() macro where applicable

Fix following checkpatch.pl issue in TPM-related code:

    CHECK: Prefer using the BIT macro

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotpm: align arguments with open parenthesis
Miquel Raynal [Tue, 15 May 2018 09:57:00 +0000 (11:57 +0200)]
tpm: align arguments with open parenthesis

Fix following checkpatch.pl issue in TPM-related code:

    CHECK: Alignment should match open parenthesis

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotpm: substitute deprecated uint<x>_t types with their u<x> equivalent
Miquel Raynal [Tue, 15 May 2018 09:56:59 +0000 (11:56 +0200)]
tpm: substitute deprecated uint<x>_t types with their u<x> equivalent

Fix following checkpatch.pl issues in TPM-related code:

    CHECK: Prefer kernel type 'u8' over 'uint8_t'
    CHECK: Prefer kernel type 'u16' over 'uint16_t'
    CHECK: Prefer kernel type 'u32' over 'uint32_t'

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotpm: remove extra spaces between a function and its opening bracket
Miquel Raynal [Tue, 15 May 2018 09:56:58 +0000 (11:56 +0200)]
tpm: remove extra spaces between a function and its opening bracket

Fix following checkpatch.pl issue in TPM-related code:

    WARNING: space prohibited between function name and open
    parenthesis '('

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotpm: remove redundant blank line
Miquel Raynal [Tue, 15 May 2018 09:56:57 +0000 (11:56 +0200)]
tpm: remove redundant blank line

Fix following checkpatch.pl issue in TPM-related code:

    CHECK: Please don't use multiple blank lines

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoMerge tag 'arc-uart-updates-for-2018.07-rc1' of git://git.denx.de/u-boot-arc
Tom Rini [Thu, 24 May 2018 13:54:25 +0000 (09:54 -0400)]
Merge tag 'arc-uart-updates-for-2018.07-rc1' of git://git.denx.de/u-boot-arc

Add support for DEBUG_UART on ARC devboards

This required us to do 2 things:
 1) Insert a call to debug_uart_init() in early boot code
 2) Convert serial_arc to Kconfig

Once both items above are done we just patched defconfigs.

6 years agoMerge tag 'signed-rpi-next' of git://github.com/agraf/u-boot
Tom Rini [Thu, 24 May 2018 13:54:14 +0000 (09:54 -0400)]
Merge tag 'signed-rpi-next' of git://github.com/agraf/u-boot

Patch queue for rpi - 2018-05-24

Some minor fixes for the Raspberry Pi:

  - Fix SD writes on new sdhost controller
  - Sanitize default load addresses, allowing for better payload placement

6 years agoARC: Enable debug UART on nSIM boards
Alexey Brodkin [Mon, 21 May 2018 13:55:20 +0000 (16:55 +0300)]
ARC: Enable debug UART on nSIM boards

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoserial/serial_arc: Implement debug serial
Alexey Brodkin [Mon, 21 May 2018 13:42:07 +0000 (16:42 +0300)]
serial/serial_arc: Implement debug serial

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoserial: Convert ARC_SERIAL to Kconfig
Alexey Brodkin [Mon, 21 May 2018 13:40:05 +0000 (16:40 +0300)]
serial: Convert ARC_SERIAL to Kconfig

One step closer to completely Kconfig-driven target configuration in
U-Boot :)

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoARC: enable debug uart for HSDK and AXS10x boards
Eugeniy Paltsev [Thu, 3 May 2018 12:01:59 +0000 (15:01 +0300)]
ARC: enable debug uart for HSDK and AXS10x boards

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoARC: init debug uart in early common arc code
Eugeniy Paltsev [Thu, 3 May 2018 12:01:58 +0000 (15:01 +0300)]
ARC: init debug uart in early common arc code

The debug UART is intended for use very early in U-Boot to debug
problems before serial drivers are up.

Call debug_uart_init right before board_init_f.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agorpi: Change load addresses to make more room for the kernel & DTB
Tuomas Tynkkynen [Fri, 20 Apr 2018 10:03:49 +0000 (13:03 +0300)]
rpi: Change load addresses to make more room for the kernel & DTB

As of Linux 4.16, a multiplatform AArch64 kernel with our distro config
takes 26M. The current space reservation leaves only 17M for the kernel
and if it goes over it, the initrd gets overwritten when loading the
kernel from the filesystem.

A similar problem happens on ARMv7 with the DTBs taken from the
downstream Raspberry Pi foundation kernel. I guess they compile them
with DT overlay support enabled which grows them just enough.

Fix both of these problems by rewriting the memory map, which now allows
kernels to be up to 36M and DTBs up to 1M. Also the comment block was
kind of obsolete ever since the introduction of AArch64 support and the
firmware-loaded DTB doesn't get placed at 0x100 anymore either, so that
is fixed as well.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agospl: Add full fitImage support
Marek Vasut [Sat, 12 May 2018 22:23:17 +0000 (00:23 +0200)]
spl: Add full fitImage support

Add support for loading U-Boot and optionally FDT from a fitImage
in SPL by using the full fitImage support from U-Boot. While we do
have limited SPL loading support in SPL with a small footprint, it
is missing a lot of important features, like checking signatures.
This support has all the fitImage features, while the footprint is
obviously larger.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agopylibfdt: Add missing CC and LD to Makefile
Marek Vasut [Fri, 18 May 2018 07:56:53 +0000 (09:56 +0200)]
pylibfdt: Add missing CC and LD to Makefile

Add missing CC and LDSHARED variables to the Makefile to pass the
correct C compiler and linker path to the build of _libfdt.so .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoscripts: add decodecode from Linux
Heinrich Schuchardt [Tue, 15 May 2018 17:42:24 +0000 (19:42 +0200)]
scripts: add decodecode from Linux

The script decodecode can be used to disassemble the 'Code:' line  written
when an exception occurs.

The script is copied from Linux v4.16.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoarm: print instructions pointed to by pc
Heinrich Schuchardt [Tue, 15 May 2018 17:42:23 +0000 (19:42 +0200)]
arm: print instructions pointed to by pc

If an exception occurs in a loaded image and the relocation offset is
unknown, it is helful to know the instructions pointed to by the
program counter. This patch adds the missing output.

A possible output is:
    Code: e1c560d0 e12fff1e e120077b e12fff1e (e7f7defb)

The parentheses indicate the instruction causing the exception.

The output can be disassembled using the decodecode script provided
by the Linux kernel project.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoarm64: timer: Create timer_get_bootus for bootstage support
Michal Simek [Tue, 15 May 2018 14:47:02 +0000 (16:47 +0200)]
arm64: timer: Create timer_get_bootus for bootstage support

Implement timer_get_boot_us() based on available functions to support
bootstage command.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoMakefile: adopt --std=gnu11 for HOSTCFLAGS on Linux
Philipp Tomsich [Mon, 14 May 2018 13:22:06 +0000 (15:22 +0200)]
Makefile: adopt --std=gnu11 for HOSTCFLAGS on Linux

Following the conversion of the SPDX license tags, a number of files
compiled with -pedantic now generate warnings similar to the following
for using C99-style '//' comments in ISO C90 code:

  tools/gen_eth_addr.c:1:1: warning: C++ style comments are not allowed in ISO C90
   // SPDX-License-Identifier: GPL-2.0+
   ^

The SPDX comment-style change means that these files have adopted C99,
so need to change the language-standard to --std=gnu99 or --std=gnu11
to let the compiler know this.

As we now require GCC 6 or newer for the cross-compiler, the project has
implicitly moved the project to GNU11: let older GCC versions on various
Linux distros know to treat our host tools as GNU11 as well.

References: commit 83d290c56fab ("SPDX: Convert all of our single license tags to Linux Kernel style")
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotwister: Let SPL load U-Boot from MMC
Ladislav Michl [Mon, 14 May 2018 07:17:45 +0000 (09:17 +0200)]
twister: Let SPL load U-Boot from MMC

MMC is not initialized in SPL, so it cannot load u-boot.img
preventing boot from MMC.

Also driver specific functions are guarded with generic
configuration options which leads to build failures when device
driver is not enabled in config. Fix that by using driver
specific defines.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Stefano Babic <sbabic@denx.de>
6 years agofit: Add standalone image type handling
Marek Vasut [Sat, 12 May 2018 22:22:54 +0000 (00:22 +0200)]
fit: Add standalone image type handling

Just add IH_TYPE_STANDALONE to fit_get_image_type_property().

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agofit: Add empty fit_print_contents() and fit_image_print()
Marek Vasut [Sat, 12 May 2018 22:22:53 +0000 (00:22 +0200)]
fit: Add empty fit_print_contents() and fit_image_print()

These functions may be needed in SPL, so add empty variants of them
if CONFIG_SPL_FIT_PRINT is disabled.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agofit: Fix CONFIG_FIT_SPL_PRINT
Marek Vasut [Sat, 12 May 2018 22:22:52 +0000 (00:22 +0200)]
fit: Fix CONFIG_FIT_SPL_PRINT

Rename CONFIG_FIT_SPL_PRINT to CONFIG_SPL_FIT_PRINT and add Kconfig
entry for it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agospl: fit: Add support for loading FPGA bitstream
Marek Vasut [Sat, 12 May 2018 20:25:28 +0000 (22:25 +0200)]
spl: fit: Add support for loading FPGA bitstream

Add support for loading FPGA into the SPL fitImage support. The
mechanism is flexible and allows user to override the actual
function for loading the FPGA itself. This is because on some
systems, the FPGA must be programmed to allow DRAM access, so
loading the full fitImage may not be possible if it contains
the bitstream. Instead, the spl_load_fpga_image() provides all
the tools to load the bitstream in parts while programming it
into the FPGA.

Signed-off-by: Marek Vasut <marex@denx.de>
[trini: Don't always have a branch to print out type]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agobootcount: Add bootcount command
Alex Kiernan [Sat, 12 May 2018 05:49:47 +0000 (05:49 +0000)]
bootcount: Add bootcount command

Add a command to manipulate the bootcounter. This is useful if you can
run device recovery from inside U-Boot and need to reset the bootcounter
after executing that process as part of altbootcmd.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
6 years agoconfigs: sama5d2_xplained: fix bootcmd/args for spi+emmc demo
Eugen Hristev [Fri, 11 May 2018 08:14:32 +0000 (11:14 +0300)]
configs: sama5d2_xplained: fix bootcmd/args for spi+emmc demo

For sama5d2_xplained_spiflash_defconfig, we have the demo layout
as presented on this link:
http://www.at91.com/linux4sam/bin/view/Linux4SAM/Sama5d2XplainedMainPage#SPI_eMMC_Flash_demo_Memory_map

on SPI Flash (4 Mbyte) we have Bootstrap (second level bootloader), U-boot + env

and kernel+dtb we keep on eMMC on single partition in /boot directory, formatted
with ext4.

Thus, changing the boot command to reflect this demo for the spiflash config,
and fixing up bootargs. Sama5d2_xplained does not have NAND flash, so the
bootargs were completely wrong.

Fixes: "5abc1a45": common: Move CONFIG_BOOTARGS to Kconfig
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: sama5d2_xplained: set default FAT env location to SD-Card
Eugen Hristev [Fri, 11 May 2018 08:14:31 +0000 (11:14 +0300)]
configs: sama5d2_xplained: set default FAT env location to SD-Card

For sama5d2_xplained_mmc_defconfig, we have the following layout for SD-Card:
partition 1: FAT: contains bootstrap binary (second level bootloader),
U-boot, U-boot env, kernel, dtb
partition 2: EXT4: Rootfs.

Add to defconfig CONFIG_ENV_FAT_DEVICE_AND_PART to have environment
by default on SD-Card, to align with our demo layout.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agodoc: expand README.commands
Heinrich Schuchardt [Thu, 10 May 2018 13:57:27 +0000 (15:57 +0200)]
doc: expand README.commands

Describe U_BOOT_CMD_COMPLETE.
Describe the arguments of U_BOOT_CMD and U_BOOT_CMD_COMPLETE.
Describe the arguments of the command function.
Describe the arguments of the completion function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agotest: fs: fs-test: Modified test 1 to do a ls to a nonexistent dir
Eugen Hristev [Wed, 9 May 2018 13:28:38 +0000 (16:28 +0300)]
test: fs: fs-test: Modified test 1 to do a ls to a nonexistent dir

Added a simple ls to a nonexistent directory for test 1.
In case the driver is broken for a nonexistent directory, U-boot
might crash.

Here is an example failed output:

=> # Test Case 1 - ls
=> ext4ls host 0:0
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>       4096 SUBDIR
      2621440000 2.5GB.file
         1048576 1MB.file
=> # In addition, test with a nonexistent directory to see if we crash.
=> ext4ls host 0:0 invalid_d
** Can not find directory. **
./test/fs/fs-test.sh: line 161: 25786 Segmentation fault      (core dumped) $UBOOT  <<EOF

Subsequent tests will fail if U-boot crashes.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agofs: ext4: fix crash on ext4ls
Eugen Hristev [Wed, 9 May 2018 13:28:37 +0000 (16:28 +0300)]
fs: ext4: fix crash on ext4ls

Found a crash while issuing ext4ls with a non-existent directory.
Crash test:

=> ext4ls mmc 0 1
** Can not find directory. **
data abort
pc : [<3fd7c2ec>]          lr : [<3fd93ed8>]
reloc pc : [<26f142ec>]    lr : [<26f2bed8>]
sp : 3f963338  ip : 3fdc3dc4     fp : 3fd6b370
r10: 00000004  r9 : 3f967ec0     r8 : 3f96db68
r7 : 3fdc99b4  r6 : 00000000     r5 : 3f96dc88  r4 : 3fdcbc8c
r3 : fffffffa  r2 : 00000000     r1 : 3f96e0bc  r0 : 00000002
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

resetting ...

Tested on SAMA5D2_Xplained board (sama5d2_xplained_mmc_defconfig)

Looks like crash is introduced by commit:
"fa9ca8a" fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls

Issue is that dirnode is not initialized, and then freed if the call
to ext4_ls fails. ext4_ls will not change the value of dirnode in this case
thus we have a crash with data abort.

I added initialization and a check for dirname being NULL.

Fixes: "fa9ca8a" fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls
Cc: Stefan BrĂ¼ns <stefan.bruens@rwth-aachen.de>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoi2c: Drop CONFIG_SH_SH7734_I2C
Tuomas Tynkkynen [Wed, 9 May 2018 12:24:35 +0000 (15:24 +0300)]
i2c: Drop CONFIG_SH_SH7734_I2C

Last user of this driver went away in May 2017 in commit
eb5ba3aefdf0f6c ("i2c: Drop use of CONFIG_I2C_HARD").

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Acked-by: Heiko Schocher <hs@denx.de>
6 years agoi2c: Drop CONFIG_TSI108_I2C
Tuomas Tynkkynen [Wed, 9 May 2018 12:24:34 +0000 (15:24 +0300)]
i2c: Drop CONFIG_TSI108_I2C

Last user of this driver went away in June 2015 in commit
d928664f4101e24 ("powerpc: 74xx_7xx: remove 74xx_7xx cpu support")

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Acked-by: Heiko Schocher <hs@denx.de>
6 years agonet: Drop CONFIG_TSI108_ETH
Tuomas Tynkkynen [Wed, 9 May 2018 12:24:33 +0000 (15:24 +0300)]
net: Drop CONFIG_TSI108_ETH

Last user of this driver went away in June 2015 in commit
d928664f4101e24 ("powerpc: 74xx_7xx: remove 74xx_7xx cpu support")

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoconfigs: sama5d2_xplained: enable ext4 command support
Eugen Hristev [Wed, 9 May 2018 10:08:01 +0000 (13:08 +0300)]
configs: sama5d2_xplained: enable ext4 command support

To support loading the zImage + DTB from the rootfs ext4 partitions,
enable the ext4 command support.

Based on original work by Wenyou Yang

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoclk: at91: clk-h32mx: replace dm_warn with dev_dbg
Eugen Hristev [Wed, 9 May 2018 07:58:30 +0000 (10:58 +0300)]
clk: at91: clk-h32mx: replace dm_warn with dev_dbg

dm_warn is too noisy, replace with dev_dbg for less noise.

Based on original work by Wenyou Yang

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: at91sam9x5ek: updated mtdparts variable in bootargs
Eugen Hristev [Wed, 9 May 2018 07:30:26 +0000 (10:30 +0300)]
configs: at91sam9x5ek: updated mtdparts variable in bootargs

We have a new demo layout of our sama5 boards for the NAND Flash
memory.
According to this new layout, adjust the mtdparts variable in bootargs
to align with this, which is available at :
http://www.at91.com/linux4sam/bin/view/Linux4SAM/Sama5d3XplainedMainPage#NAND_Flash_demo_Memory_map,

Based on original work by Wenyou Yang

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: at91: Adjust CONFIG_ENV_OFFSET to match sama5 address
Nicolas Ferre [Wed, 9 May 2018 07:30:25 +0000 (10:30 +0300)]
configs: at91: Adjust CONFIG_ENV_OFFSET to match sama5 address

In order to have a single ENV_OFFSET to manage, use the same as the sama5 one.
This address matches our NAND flash map available at:
http://www.at91.com/linux4sam/bin/view/Linux4SAM/Sama5d3XplainedMainPage#NAND_Flash_demo_Memory_map

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
[eugen.hristev@microchip.com: rework on latest version of u-boot]
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: at91: sama5_common: Adjust CONFIG_ENV_OFFSET to match block alignment
Nicolas Ferre [Wed, 9 May 2018 07:30:24 +0000 (10:30 +0300)]
configs: at91: sama5_common: Adjust CONFIG_ENV_OFFSET to match block alignment

Fix the unaligned environment address.
This address matches our NAND flash map available at:
http://www.at91.com/linux4sam/bin/view/Linux4SAM/Sama5d3XplainedMainPage#NAND_Flash_demo_Memory_map

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
[eugen.hristev@microchip.com: rework on latest version of u-boot]
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoFIT: Make fit_conf_print() be a static function
Tom Rini [Tue, 8 May 2018 18:34:05 +0000 (14:34 -0400)]
FIT: Make fit_conf_print() be a static function

We only call fit_conf_print from one place in the code, so mark it as
static and move it up to where we call it.  This in turn has us move a
few other already static functions up further as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoLicenses/README: Update some style and add explicit license to the document
Tom Rini [Tue, 8 May 2018 15:34:36 +0000 (11:34 -0400)]
Licenses/README: Update some style and add explicit license to the document

- Add an SPDX license tag to the file, saying it's GPL-2.0.
- From the Linux Kernel v4.17-rc4, import the "License identifier
  syntax" section as-is from Documentation/process/license-rules.rst
  and then change it to be clearer about examples from the Linux Kernel
  vs examples found in U-Boot, and when we're talking about U-Boot.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoConvert CONFIG_SUPPORT_EMMC_RPMB to Kconfig
Alex Kiernan [Tue, 8 May 2018 04:43:31 +0000 (04:43 +0000)]
Convert CONFIG_SUPPORT_EMMC_RPMB to Kconfig

Convert CONFIG_SUPPORT_EMMC_RPMB to Kconfig. Split the command handling
from the underlying support and expose this through CMD_MMC_RPMB.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agommc: Unirqify bcm2835_sdhost and fix writes
Alexander Graf [Wed, 23 May 2018 20:24:51 +0000 (22:24 +0200)]
mmc: Unirqify bcm2835_sdhost and fix writes

The bcm2835 sdhost driver has a problem with "write multiple" commands.
It seems to boil down to the fact that the controller dislikes its FIFO
to get drained at the end of a block when a write multiple blocks command
is in flight.

The easy fix is to simply get rid of all the IRQ driven logic and make
the driver push as much data into the FIFO as it can. That way we never
drain and we never run into the problem.

Reported-by: Jan Leonhardt <jan@cyberdesigner.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agorpi: Adjust fdt_addr_r to a sane address
Alexander Graf [Fri, 13 Apr 2018 15:37:34 +0000 (17:37 +0200)]
rpi: Adjust fdt_addr_r to a sane address

Back in the old days, 0x100 was used as the address to pass the device tree
from firmware into the kernel. This has since changed to a more dynamic
location, so using 0x100 actually breaks more things than it helps with.

Let's move the device tree default location for distro boot to a more sane
place that gives us enough head room in low memory.

Reported-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoarm: armv7m: Clean up some thumb / compiler flag options
Tom Rini [Tue, 8 May 2018 00:46:52 +0000 (20:46 -0400)]
arm: armv7m: Clean up some thumb / compiler flag options

- The correct way to build with thumb mode is to select SYS_THUMB_BUILD
- We should be setting -march=armv7-m in arch/arm/Makefile not the
  sub-config.mk file.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years ago.travis.yml: Further optimizations
Tom Rini [Thu, 10 May 2018 11:15:54 +0000 (07:15 -0400)]
.travis.yml: Further optimizations

- Xilinx aarch64 is caught in the general xilinx arm job, exclude from
  the general aarch64 job.
- Give the generic aarch64 job a better name
- Re-sort the PowerPC jobs so that we can complete them a bit quicker.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agobuildman: support newer gcc versions from kernel.org
Daniel Schwierzeck [Thu, 10 May 2018 11:15:53 +0000 (07:15 -0400)]
buildman: support newer gcc versions from 

Add support for gcc versions 7.3.0, 6.4.0 and 4.9.4.

Also use a regex for matching the tarball names. Some gcc versions
use '-ARCH-' instead of '_ARCH-'.

As part of this, we switch TravisCI to also using these toolchains for
all platforms.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoat91: Minor tweaks to SPL logic for space savings on smartweb
Tom Rini [Thu, 10 May 2018 11:15:52 +0000 (07:15 -0400)]
at91: Minor tweaks to SPL logic for space savings on smartweb

- spl_board_init is empty on smartweb so drop that function
- When CONFIG_AT91SAM9_WATCHDOG is set we do not disable the watchdog in
  SPL and instead let full U-Boot handle it.  Instead of an empty
  function just do not call a function.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Tue, 22 May 2018 17:53:26 +0000 (13:53 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

6 years agoARM: dts: uniphier: sync with Linux 4.17-rc6
Masahiro Yamada [Tue, 22 May 2018 15:30:54 +0000 (00:30 +0900)]
ARM: dts: uniphier: sync with Linux 4.17-rc6

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: uniphier: rename environment variable fdt_file to fdtfile
Masahiro Yamada [Thu, 17 May 2018 10:55:20 +0000 (19:55 +0900)]
ARM: uniphier: rename environment variable fdt_file to fdtfile

For booting Linux in the generic distro mechanism, cmd/pxe.c
retrieves the FDT file name from "fdtfile" environment variable.

Rename "fdt_file" to "fdtfile" for easier migration to distro boot.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: dts: uniphier: change phy-mode to 'internal' for LD11
Kunihiko Hayashi [Fri, 11 May 2018 09:49:17 +0000 (18:49 +0900)]
ARM: dts: uniphier: change phy-mode to 'internal' for LD11

Change the phy-mode property to 'internal' that means to use a built-in PHY
implemented on LD11 SoC.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: dts: uniphier: add clock-names and reset-names to ethernet node
Kunihiko Hayashi [Fri, 11 May 2018 09:49:16 +0000 (18:49 +0900)]
ARM: dts: uniphier: add clock-names and reset-names to ethernet node

Add clock-names and reset-names because this node recognizes multiple
clocks and resets.  ("ether", and so on, for each)

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: dts: uniphier: add required clocks and resets to Pro4 ethernet node
Kunihiko Hayashi [Fri, 11 May 2018 09:49:15 +0000 (18:49 +0900)]
ARM: dts: uniphier: add required clocks and resets to Pro4 ethernet node

The GIO clock/reset, another MAC clock, and the PHY clock are required
for the ethernet of Pro4 SoC.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: dts: uniphier: add syscon-phy-mode property to each ethernet node
Kunihiko Hayashi [Fri, 11 May 2018 09:49:14 +0000 (18:49 +0900)]
ARM: dts: uniphier: add syscon-phy-mode property to each ethernet node

Add syscon-phy-mode property specifying a phandle of system controller
to each ethernet node.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoSPDX: Fixup SPDX tags in a few new files
Tom Rini [Sun, 20 May 2018 13:47:45 +0000 (09:47 -0400)]
SPDX: Fixup SPDX tags in a few new files

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Sun, 20 May 2018 13:44:38 +0000 (09:44 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

6 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Sun, 20 May 2018 13:44:13 +0000 (09:44 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

6 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Sun, 20 May 2018 13:44:05 +0000 (09:44 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

6 years agoARM: rmobile: Unify Gen2 Makefile entry
Marek Vasut [Wed, 2 May 2018 10:09:23 +0000 (12:09 +0200)]
ARM: rmobile: Unify Gen2 Makefile entry

Drop per-SoC Makefile entries and replace them with one unified entry
now that the PFC tables are gone. Shuffle the Makefile around a bit
to make it more organized.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Drop old R8A7794 PFC tables
Marek Vasut [Wed, 2 May 2018 10:07:45 +0000 (12:07 +0200)]
ARM: rmobile: Drop old R8A7794 PFC tables

All the boards use new modern PFC framework, the old PFC tables
are no longer used, so remove them.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Drop old R8A7793 PFC tables
Marek Vasut [Wed, 2 May 2018 10:07:18 +0000 (12:07 +0200)]
ARM: rmobile: Drop old R8A7793 PFC tables

All the boards use new modern PFC framework, the old PFC tables
are no longer used, so remove them.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Drop old R8A7792 PFC tables
Marek Vasut [Wed, 2 May 2018 10:06:48 +0000 (12:06 +0200)]
ARM: rmobile: Drop old R8A7792 PFC tables

All the boards use new modern PFC framework, the old PFC tables
are no longer used, so remove them.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Drop old R8A7791 PFC tables
Marek Vasut [Wed, 2 May 2018 10:06:08 +0000 (12:06 +0200)]
ARM: rmobile: Drop old R8A7791 PFC tables

All the boards use new modern PFC framework, the old PFC tables
are no longer used, so remove them.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Drop old R8A7790 PFC tables
Marek Vasut [Wed, 2 May 2018 10:05:08 +0000 (12:05 +0200)]
ARM: rmobile: Drop old R8A7790 PFC tables

All the boards use new modern PFC framework, the old PFC tables
are no longer used, so remove them.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Update V2H Blanche
Marek Vasut [Mon, 30 Apr 2018 12:10:36 +0000 (14:10 +0200)]
ARM: rmobile: Update V2H Blanche

The V2H Blanche port was broken since some time. This patch updates
the V2H Blanche port to use modern frameworks, DM, DT probing, SPL
for the preloading and puts it on par with the M2 Porter board.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Enable DM capable RCar I2C driver on Silk
Marek Vasut [Tue, 1 May 2018 06:57:25 +0000 (08:57 +0200)]
ARM: rmobile: Enable DM capable RCar I2C driver on Silk

Enable the DM capable driver instead of the legacy one.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Enable DM capable RCar I2C driver on Lager
Marek Vasut [Tue, 1 May 2018 06:57:20 +0000 (08:57 +0200)]
ARM: rmobile: Enable DM capable RCar I2C driver on Lager

Enable the DM capable driver instead of the legacy one.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoi2c: rcar_i2c: Add DM and DT capable I2C driver
Marek Vasut [Sat, 21 Apr 2018 16:57:28 +0000 (18:57 +0200)]
i2c: rcar_i2c: Add DM and DT capable I2C driver

Add derivative of the rcar_i2c driver which is capable of
probing itself from DM and uses DT.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoi2c: rcar_i2c: Remove the driver
Marek Vasut [Sat, 21 Apr 2018 16:54:27 +0000 (18:54 +0200)]
i2c: rcar_i2c: Remove the driver

Remove the rcar_i2c driver, since it's no longer used by any
board and will be superseded by a DM and DT capable variant.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoFixup various SPDX tags from the latest merge
Tom Rini [Fri, 18 May 2018 21:54:39 +0000 (17:54 -0400)]
Fixup various SPDX tags from the latest merge

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agodrivers: usb: dwc3: remove devm_zalloc from linux_compact
Mugunthan V N [Fri, 18 May 2018 11:10:27 +0000 (13:10 +0200)]
drivers: usb: dwc3: remove devm_zalloc from linux_compact

devm_zalloc() is already defined in dm/device.h header, so
devm_zalloc can be removed from linux_compact.h beader file.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agousb: xhci: zynqmp: Remove support for !DM_USB
Michal Simek [Fri, 18 May 2018 11:15:09 +0000 (13:15 +0200)]
usb: xhci: zynqmp: Remove support for !DM_USB

Switch to DM_USB was done and there is no need to keep !DM_USB code in
tree.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoarm64: zynqmp: Use DWC3 generic driver and DM_USB
Michal Simek [Fri, 18 May 2018 11:15:08 +0000 (13:15 +0200)]
arm64: zynqmp: Use DWC3 generic driver and DM_USB

Remove harcoded XHCI lists and detect mode, speed based on DT.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Serial-changes: 2
- Remove also XHCI macros from hardware.h
- Remove additional new line in zcu106

6 years agousb: xhci: zynqmp: Add support for DM_USB
Michal Simek [Fri, 18 May 2018 11:15:07 +0000 (13:15 +0200)]
usb: xhci: zynqmp: Add support for DM_USB

The patch is adding support for DM_USB for xhci driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>