]> git.sur5r.net Git - u-boot/log
u-boot
5 years agoPrepare v2018.05 v2018.05
Tom Rini [Mon, 7 May 2018 15:32:36 +0000 (11:32 -0400)]
Prepare v2018.05

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agogit-mailrc: Update some addresses and aliases
Tom Rini [Mon, 7 May 2018 15:03:13 +0000 (11:03 -0400)]
git-mailrc: Update some addresses and aliases

- Based on commit 08ae21af9671 ("MAINTAINERS: Switch nxp.com domain")
  update or drop some formerly Freescale addresses.
- Update a few aliases to reflect current custodians

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoSPDX: Convert all of our multiple license tags to Linux Kernel style
Tom Rini [Sun, 6 May 2018 22:27:01 +0000 (18:27 -0400)]
SPDX: Convert all of our multiple license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have multiple licenses (in
these cases, dual license) declared in the SPDX-License-Identifier tag.
In this case we change from listing "LICENSE-A LICENSE-B" or "LICENSE-A
or LICENSE-B" or "(LICENSE-A OR LICENSE-B)" to "LICENSE-A OR LICENSE-B"
as per the Linux Kernel style document.  Note that parenthesis are
allowed so when they were used before we continue to use them.

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoSPDX: Convert all of our single license tags to Linux Kernel style
Tom Rini [Sun, 6 May 2018 21:58:06 +0000 (17:58 -0400)]
SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoarm: mach-omap2: cache: Explicitly enable I cache
Lokesh Vutla [Thu, 3 May 2018 15:04:49 +0000 (20:34 +0530)]
arm: mach-omap2: cache: Explicitly enable I cache

omap-common cache enabling sequence relies on cpu_init_cp15()
(inside start.S) for enabling I-caches. But cpu_init_cp15()
can be skipped if CONFIG_SKIP_LOWLEVEL_INIT is defined. So
enable I-caches if not enabled already.

Debugged-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Tested-by: Steve Kipisz <s-kipisz2@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Tested-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoKconfig: Add dependency on HASH to verified boot
Kelvin Cheung [Wed, 2 May 2018 10:07:18 +0000 (18:07 +0800)]
Kconfig: Add dependency on HASH to verified boot

Building with verified boot support requires hash, add that
dependency here. Otherwise the following build error will come out
without crc command.

      LD      u-boot
lib/built-in.o: In function `hash_calculate':
lib/rsa/rsa-checksum.c:29: undefined reference to
`hash_progressive_lookup_algo'
...
make[1]: *** [u-boot] Error 1

Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agoboard: ti: am43: Fix DCDC3 voltage for epos-evm
Keerthy [Wed, 2 May 2018 09:36:31 +0000 (15:06 +0530)]
board: ti: am43: Fix DCDC3 voltage for epos-evm

A common voltage of 1.35V was being programmed for all am43 board
versions. EPOS-EVM Needs 1.20V for LPDDR2.

Fixes: fc69d472621b5 (“board: ti: AM43XX: Add ddr voltage rail configuration”)
Reported-by: James Doublesin <doublesin@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoREADME.sandbox: small typos
Trevor Woerner [Mon, 30 Apr 2018 23:13:05 +0000 (19:13 -0400)]
README.sandbox: small typos

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
5 years agostdio_names: Ensure MAX_NAMES is defined before use, don't use 3 directly
Tom Rini [Thu, 3 May 2018 13:12:26 +0000 (09:12 -0400)]
stdio_names: Ensure MAX_NAMES is defined before use, don't use 3 directly

With tighter build flags the fact that <stdio_dev.h> doesn't have a
reference back to MAX_NAMES causes an error.  Include <stdio.h> here and
then in common/console.c use MAX_NAMES rather than 3 when working with
stdio_names.

Reported-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
5 years agostdio_dev.h: Drop the video section as it is unused
Tom Rini [Thu, 3 May 2018 13:12:25 +0000 (09:12 -0400)]
stdio_dev.h: Drop the video section as it is unused

With tighter build flags the fact that this header referenced
uchar/ushort without including what typedefs it causes an error.  Rather
than add another include here, drop the section in question as it is
unused.

Reported-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Thu, 3 May 2018 13:20:13 +0000 (09:20 -0400)]
Merge git://git.denx.de/u-boot-usb

5 years agoMerge git://git.denx.de/u-boot-sh
Tom Rini [Thu, 3 May 2018 13:20:02 +0000 (09:20 -0400)]
Merge git://git.denx.de/u-boot-sh

5 years agoARM: rmobile: Zap #undef DEBUG
Marek Vasut [Wed, 2 May 2018 09:55:56 +0000 (11:55 +0200)]
ARM: rmobile: Zap #undef DEBUG

The DEBUG macro is never defined unless explicitly enabled.
Drop useless #undef DEBUG in the board configs so it won't
spread any further.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: rmobile: Contain CONFIG_ARCH_RMOBILE_BOARD_STRING
Marek Vasut [Wed, 2 May 2018 09:51:46 +0000 (11:51 +0200)]
ARM: rmobile: Contain CONFIG_ARCH_RMOBILE_BOARD_STRING

Pull the symbol from the boards and zap struct rmobile_sysinfo as they
are rather useless. The entire purpose of that whole machinery was to
print board name in the CONFIG_ARCH_RMOBILE_BOARD_STRING. Do that in a
far simpler and more contained manner.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: rmobile: Convert CONFIG_ARCH_RMOBILE_BOARD_STRING to Kconfig
Marek Vasut [Wed, 2 May 2018 09:42:22 +0000 (11:42 +0200)]
ARM: rmobile: Convert CONFIG_ARCH_RMOBILE_BOARD_STRING to Kconfig

Convert the symbol to Kconfig, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: rmobile: Fix CONFIG_RMOBILE_BOARD_STRING
Marek Vasut [Wed, 2 May 2018 09:41:17 +0000 (11:41 +0200)]
ARM: rmobile: Fix CONFIG_RMOBILE_BOARD_STRING

Rename CONFIG_RMOBILE_BOARD_STRING to CONFIG_ARCH_RMOBILE_BOARD_STRING
to make things consistent, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agodoc: rmobile: Update the README
Marek Vasut [Tue, 1 May 2018 07:28:29 +0000 (09:28 +0200)]
doc: rmobile: Update the README

Synchronize the README with the current state of U-Boot, unify
the build instructions to avoid duplication.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoclk: renesas: Drop USB extal from the R8A7792 clock driver
Marek Vasut [Wed, 2 May 2018 08:48:15 +0000 (10:48 +0200)]
clk: renesas: Drop USB extal from the R8A7792 clock driver

The R8A7792 does not have the USB extal, so drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoMerge git://git.denx.de/u-boot-mmc
Tom Rini [Wed, 2 May 2018 02:38:18 +0000 (22:38 -0400)]
Merge git://git.denx.de/u-boot-mmc

5 years agoMAINTAINERS: Switch nxp.com domain
Fabio Estevam [Tue, 1 May 2018 18:54:39 +0000 (15:54 -0300)]
MAINTAINERS: Switch nxp.com domain

freescale.com domain is no longer reachable, so switch the
maintainers' emails to nxp.com domain instead.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
5 years agodrivers:power:max77693: remove redundant logical constraint
Heinrich Schuchardt [Sun, 18 Mar 2018 10:52:45 +0000 (11:52 +0100)]
drivers:power:max77693: remove redundant logical constraint

As ret is not set when calling max77693_get_vcell() there is no
need to check ret again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agommc: zynq_sdhci: use correct quirk if CONFIG_ZYNQ_HISPD_BROKEN is defined
Hannes Schmelzer [Wed, 7 Mar 2018 07:00:57 +0000 (08:00 +0100)]
mmc: zynq_sdhci: use correct quirk if CONFIG_ZYNQ_HISPD_BROKEN is defined

The 'SDHCI_QUIRK_NO_HISPD_BIT' is used wrong here. The purpose of this
quirk is to tell the sdhci-driver that the IP-core doesn't have a "high-
speed-enable" bit in its registers.

With this commit we change this to the correct quirk:
SDHCI_QUIRK_BROKEN_HISPD_MODE

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
5 years agommc: sdhci: add SDHCI_QUIRK_BROKEN_HISPD_MODE
Hannes Schmelzer [Wed, 7 Mar 2018 07:00:56 +0000 (08:00 +0100)]
mmc: sdhci: add SDHCI_QUIRK_BROKEN_HISPD_MODE

Some IP-core implementations of the SDHCI have different troubles on the
silicon where they are placed.

On ZYNQ platform for example Xilinx doesn't accept the hold timing of an
eMMC chip which operates in High-Speed mode and must be forced to
operate in non high-speed mode. To get rid of this
"SDHCI_QUIRK_BROKEN_HISPD_MODE" is introduced.

For more details about this refer to the Xilinx answer-recor #59999
https://www.xilinx.com/support/answers/59999.html

This commit:
- doesn't set HISPD bit on the host-conroller
- reflects this fact within the host-controller capabilities

Upon this the layer above (mmc-driver) can setup the card correctly.

Otherwise the MMC card will be switched into high-speed mode and causes
possible timing violation on the host-controller side.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
5 years agommc: fix return value check condition
Peng Fan [Mon, 5 Mar 2018 08:20:40 +0000 (16:20 +0800)]
mmc: fix return value check condition

sd_read_ssr returns 0, means no error.
Fixes: 5b2e72f32721484("mmc: read ssr only if MMC write support is enabled")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agosamsung: board: init the s2mps11 pmic during booting time
Jaehoon Chung [Mon, 29 Jan 2018 04:53:19 +0000 (13:53 +0900)]
samsung: board: init the s2mps11 pmic during booting time

Exynos5422 board has s2mps11 pmic.
If CONFIG_PMIC_S2MPS11 is enabled, it can initialize PMIC and Regulators
during booting time.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Tested-by: Anand Moon <linux.amoon@gmail.com>
5 years agoPrepare v2018.05-rc3 v2018.05-rc3
Tom Rini [Tue, 1 May 2018 13:09:31 +0000 (09:09 -0400)]
Prepare v2018.05-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agousb: f_mass_storage: simplify logical expression
Heinrich Schuchardt [Sun, 18 Mar 2018 12:12:14 +0000 (13:12 +0100)]
usb: f_mass_storage: simplify logical expression

An unsigned int is always >= 0.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agousb: gadget: remove duplicate assignment.
Heinrich Schuchardt [Sun, 18 Mar 2018 12:05:58 +0000 (13:05 +0100)]
usb: gadget: remove duplicate assignment.

We should not make the same assignement twice.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMerge git://git.denx.de/u-boot-imx
Tom Rini [Mon, 30 Apr 2018 11:14:05 +0000 (07:14 -0400)]
Merge git://git.denx.de/u-boot-imx

5 years agoMerge git://git.denx.de/u-boot-sunxi
Tom Rini [Mon, 30 Apr 2018 10:52:32 +0000 (06:52 -0400)]
Merge git://git.denx.de/u-boot-sunxi

5 years agotools: mkimage: Check for datafile when type is script
Alex Kiernan [Sun, 22 Apr 2018 05:11:17 +0000 (05:11 +0000)]
tools: mkimage: Check for datafile when type is script

If generating a script image and no datafile has been passed in, mkimage
dies with SIGSEGV:

  #0  __strchr_sse2 () at ../sysdeps/x86_64/multiarch/../strchr.S:32
  #1  0x0000000000403818 in main
      at tools/mkimage.c:503

Add explicit test for datafile to fix this.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
5 years agotools: mkenvimage: Fix possible segfault on stdin input
Alexander Dahl [Fri, 20 Apr 2018 13:29:31 +0000 (15:29 +0200)]
tools: mkenvimage: Fix possible segfault on stdin input

The size of 'filebuf' was not increased as more and more bytes are read
from stdin, but 'filebuf' was always reallocated to the same fix size.
This works as long as only less bytes than the initial buffer size come
in, for more input this will segfault. (It actually does, I tested
that.) So for each loop cycle the buffer size has to be increased by the
number of bytes we want to read.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
5 years agotools: mkenvimage: Fix read() stdin error handling
Alexander Dahl [Fri, 20 Apr 2018 13:29:30 +0000 (15:29 +0200)]
tools: mkenvimage: Fix read() stdin error handling

On success read() returns the number of bytes read or zero for EOF. On
error -1 is returned and errno is set, so the right way to test if read
had failed is to test the return value instead of errno.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
5 years agoserial: serial_stm32: Rename status register flags
Patrice Chotard [Fri, 20 Apr 2018 06:59:07 +0000 (08:59 +0200)]
serial: serial_stm32: Rename status register flags

Uart status register is named USART_ISR on STM32F7, STM32H7
and STM32MP1 SoCs family, but USART_SR only on STM32F4 SoCs.

Use USART_ISR_ prefix instead of USART_SR_ .

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agoserial: serial_stm32: Enable overrun
Patrice Chotard [Fri, 20 Apr 2018 06:59:06 +0000 (08:59 +0200)]
serial: serial_stm32: Enable overrun

Enable uart overrun feature which allows to benefits of uart
FIFO usage.

Previously overrun management was disabled, this has to effect
to bypassed the uart FIFO usage even if FIFO was enabled.
In particular configuration, for example when video console is
enabled, copy/pasting a long command line in console results in
corruption. This is due to the fact that a lot of time is consumed
in flushing the cache during frame buffer update, so uart chars are
not read fast enough.

By using uart FIFO and managing overrun, long command line can by
copy/paste in console without being corrupted.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agospl: disk: usb: Add dependencies to sprintf/strto*
Alex Kiernan [Thu, 19 Apr 2018 04:32:57 +0000 (04:32 +0000)]
spl: disk: usb: Add dependencies to sprintf/strto*

If SPL serial support is disabled nothing brings in sprintf, snprintf
or simple_strtoul:

  env/built-in.o: In function `regex_callback':
  env/attr.c:128: undefined reference to `sprintf'
  disk/built-in.o: In function `blk_get_device_by_str':
  disk/part.c:386: undefined reference to `simple_strtoul'
  disk/part.c:395: undefined reference to `simple_strtoul'
  disk/built-in.o: In function `blk_get_device_part_str':
  disk/part.c:522: undefined reference to `simple_strtoul'
  disk/built-in.o: In function `part_set_generic_name':
  disk/part.c:704: undefined reference to `sprintf'
  drivers/built-in.o: In function `init_peripheral_ep':
  drivers/usb/musb-new/musb_gadget.c:1826: undefined reference to `sprintf'
  drivers/built-in.o: In function `musb_core_init':
  drivers/usb/musb-new/musb_core.c:1451: undefined reference to `snprintf'

Add those dependencies here.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
5 years agoConsolidate __assert_failed into one implementation
Alex Kiernan [Thu, 19 Apr 2018 04:32:56 +0000 (04:32 +0000)]
Consolidate __assert_failed into one implementation

We had two implementations of __assert_failed which were almost identical,
combine them into one.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
5 years agospl: Disable printf if not required
Alex Kiernan [Thu, 19 Apr 2018 04:32:55 +0000 (04:32 +0000)]
spl: Disable printf if not required

Now we have a guard for printf, disable it in the build if it's not
selected.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
5 years agospl: Split sprintf, strto* from SPL serial in Kconfig
Alex Kiernan [Thu, 19 Apr 2018 04:32:54 +0000 (04:32 +0000)]
spl: Split sprintf, strto* from SPL serial in Kconfig

When SPL serial is disabled, callers who need sprintf or strtoul fail
because their inclusion is guarded by CONFIG_SPL_SERIAL_SUPPORT/
CONFIG_TPL_SERIAL_SUPPORT.

Split printf, sprintf and strto into their own entries and then select
all of them if SERIAL_SUPPORT is enabled to match the current behaviour.

Include panic.o unconditionally as it can be called from anywhere which
uses BUG_ON().

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
5 years agospl: ti: Avoid serial calls when serial support is disabled
Alex Kiernan [Thu, 19 Apr 2018 04:32:53 +0000 (04:32 +0000)]
spl: ti: Avoid serial calls when serial support is disabled

If CONFIG_SPL_SERIAL_SUPPORT is not set, then the build will fail:

board/ti/am335x/built-in.o: In function `spl_start_uboot':
board/ti/am335x/board.c:247: undefined reference to `serial_tstc'
board/ti/am335x/board.c:247: undefined reference to `serial_getc'

Avoid the calls to the serial functions in that case.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
5 years agospl: Add dependency on serial to Ymodem
Alex Kiernan [Thu, 19 Apr 2018 04:32:52 +0000 (04:32 +0000)]
spl: Add dependency on serial to Ymodem

Building with Ymodem support requires serial in SPL/TPL, add that
dependency here.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
5 years agoCleanup CONFIG_SPL_SERIAL_SUPPORT migration
Alex Kiernan [Thu, 19 Apr 2018 04:32:50 +0000 (04:32 +0000)]
Cleanup CONFIG_SPL_SERIAL_SUPPORT migration

CONFIG_SPL_SERIAL_SUPPORT had already been migrated to Kconfig, but
existed in some include files; fix those up here.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
5 years agospl: ti: Avoid preloader_console_init if !CONFIG_SPL_SERIAL_SUPPORT
Alex Kiernan [Thu, 19 Apr 2018 04:32:51 +0000 (04:32 +0000)]
spl: ti: Avoid preloader_console_init if !CONFIG_SPL_SERIAL_SUPPORT

If CONFIG_SPL_SERIAL_SUPPORT is disabled then the build fails because
serial_init is undefined. Guard preloader_console_init() appropriately
to fix this.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
5 years agotest: dm: regmap: fix license header
Masahiro Yamada [Thu, 26 Apr 2018 16:07:21 +0000 (01:07 +0900)]
test: dm: regmap: fix license header

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoarm: move SYS_ARCH_TIMER to KConfig
Andre Przywara [Thu, 12 Apr 2018 01:24:46 +0000 (04:24 +0300)]
arm: move SYS_ARCH_TIMER to KConfig

SYS_ARCH_TIMER guards the usage of the ARM Generic Timer (aka arch
timer) in U-Boot.
At the moment it is mandatory for ARMv8 and used by a few ARMv7 boards.
Add a proper Kconfig symbol to express this dependency properly,
allowing certain board configuration to later disable arch timer in case
there are any problems with it.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
[tuomas: rebase + fix conflicts and resync with moveconfig & use select]
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
5 years agoARM: qemu-arm: Dynamically determine timer frequency
Tuomas Tynkkynen [Thu, 12 Apr 2018 01:24:45 +0000 (04:24 +0300)]
ARM: qemu-arm: Dynamically determine timer frequency

After commit 46fc679ede5f69 ("arm: timer: get frequency for arch timer
armv7 in cp15 cntfrq") the ARM architected timer driver knows how to
determine the timer frequency at runtime by reading the CNTFRQ register,
so we don't need to hardcode the timer frequency anymore.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
5 years agoconfigs: Resync with savedefconfig
Tom Rini [Sat, 28 Apr 2018 14:45:55 +0000 (10:45 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agodistro: select CMD_ENV_EXISTS
Masahiro Yamada [Wed, 25 Apr 2018 10:16:48 +0000 (19:16 +0900)]
distro: select CMD_ENV_EXISTS

'env exists' is used for scripting in include/config_distro_bootcmd.h
This command is available only when CONFIG_CMD_ENV_EXISTS is enabled.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
5 years agodistro: use imply to enable DISTRO_DEFAULTS as SoC default
Masahiro Yamada [Wed, 25 Apr 2018 09:47:52 +0000 (18:47 +0900)]
distro: use imply to enable DISTRO_DEFAULTS as SoC default

The default of DISTRO_DEFAULTS is messy.  Using the 'imply' keyword
is equivalent and cleaner.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agopowerpc: fix typo in kgdb.c
Heinrich Schuchardt [Mon, 23 Apr 2018 20:27:41 +0000 (22:27 +0200)]
powerpc: fix typo in kgdb.c

%s/alingment/alignment/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agolib/rsa: Kconfig: Remove superfluous 'depends on RSA'
Eugeniu Rosca [Sat, 21 Apr 2018 12:00:10 +0000 (14:00 +0200)]
lib/rsa: Kconfig: Remove superfluous 'depends on RSA'

RSA_SOFTWARE_EXP and RSA_FREESCALE_EXP are wrapped inside:

if RSA
...
endif

So, remove the redundant "depends on RSA" from their depends expression.
In addition, move SPL_RSA into the same "if RSA ... endif" block, since
its only direct dependeny is CONFIG_RSA. This tidies up and simplifies
reading of lib/rsa/Kconfig.

No functional change intended.

Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoMigrate IMAGE_FORMAT_LEGACY to Kconfig
Alex Kiernan [Fri, 20 Apr 2018 21:25:38 +0000 (21:25 +0000)]
Migrate IMAGE_FORMAT_LEGACY to Kconfig

This converts IMAGE_FORMAT_LEGACY to Kconfig

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agocmd: CONFIG_CMD_LOG select CONFIG_LOG
Heinrich Schuchardt [Thu, 19 Apr 2018 20:02:46 +0000 (22:02 +0200)]
cmd: CONFIG_CMD_LOG select CONFIG_LOG

CONFIG_CMD_LOG without CONFIG_LOG leads to a build error:
‘gd_t {aka volatile struct global_data}’ has no member named
‘default_log_level’

So CMD_LOG should select LOG.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agolog: CONFIG_LOG should select CONFIG_DM
Heinrich Schuchardt [Thu, 19 Apr 2018 19:59:04 +0000 (21:59 +0200)]
log: CONFIG_LOG should select CONFIG_DM

Compling with CONFIG_LOG and without CONFIG_DM results in
common/log.c:47: undefined reference to `uclass_get_name'

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agokbuild: use -fmacro-prefix-map to make __FILE__ a relative path
Masahiro Yamada [Mon, 16 Apr 2018 04:18:31 +0000 (13:18 +0900)]
kbuild: use -fmacro-prefix-map to make __FILE__ a relative path

The __FILE__ macro is used everywhere in U-Boot to locate the file
printing the log message, such as WARN_ON(), etc.  If U-Boot is
built out of tree, this can be a long absolute path.

This is because Kbuild runs in the objtree instead of the srctree,
then __FILE__ is expanded to a file path prefixed with $(srctree)/.

A brand-new option from GCC, -fmacro-prefix-map, solves this problem.
If your compiler supports it, __FILE__ is the relative path from the
srctree regardless of O= option.  This provides more readable log,
more reproducible builds, and smaller image size.

[ Linux commit: a73619a845d5625079cc1b3b820f44c899618388 ]

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoserial: Migrate CONFIG_FSL_LINFLEXUART to Kconfig
Tuomas Tynkkynen [Mon, 9 Apr 2018 01:34:34 +0000 (04:34 +0300)]
serial: Migrate CONFIG_FSL_LINFLEXUART to Kconfig

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
5 years agoARM: s32v234evb: Set CONFIG_DM & CONFIG_DM_SERIAL in Kconfig
Tuomas Tynkkynen [Mon, 9 Apr 2018 01:34:33 +0000 (04:34 +0300)]
ARM: s32v234evb: Set CONFIG_DM & CONFIG_DM_SERIAL in Kconfig

These symbols are declared in Kconfig, so it's wrong to set them in
header files.

Note that this is not size-neutral - some 'default y' options will now
get turned on by Kconfig, such as CONFIG_CMD_DM=y and CONFIG_DM_STDIO=y.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
5 years agoconfigs: Drop CONFIG_NET_MULTI
Tom Rini [Mon, 23 Apr 2018 13:13:09 +0000 (09:13 -0400)]
configs: Drop CONFIG_NET_MULTI

We have not had CONFIG_NET_MULTI be meaningful for quite some time, drop
the last remnants.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoclang: Update documentation
Tom Rini [Sun, 22 Apr 2018 23:15:03 +0000 (19:15 -0400)]
clang: Update documentation

As of clang-5.0, things have changed a bit.  First, we cannot
automatically guess -target values as if we do not pass one with CC then
cc-option will fail.  Second, to disable movt/movw relocations the
argument has become -mno-movt.

Related to the target part, we cannot use arm-none-eabi as that ends up
being too generic of an ARM target for things like say rpi_3_32b to
work.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMakefile: Update clang warning disables from Linux
Tom Rini [Sun, 22 Apr 2018 14:20:50 +0000 (10:20 -0400)]
Makefile: Update clang warning disables from Linux

Re-sync the logic about which clang warnings to disable from v4.17-rc1.
Note that we don't disable all of the same ones as for now we haven't
run into any cases of warnings from clang in code from upstream Linux.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoRemove unnecessary instances of DECLARE_GLOBAL_DATA_PTR
Tom Rini [Wed, 18 Apr 2018 17:50:47 +0000 (13:50 -0400)]
Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTR

We have a large number of places where while we historically referenced
gd in the code we no longer do, as well as cases where the code added
that line "just in case" during development and never dropped it.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoConvert CONFIG_SPI to Kconfig
Adam Ford [Sun, 15 Apr 2018 17:51:26 +0000 (13:51 -0400)]
Convert CONFIG_SPI to Kconfig

This converts the following to Kconfig:
   CONFIG_SPI

This partly involves updating code that assumes that CONFIG_SPI implies
things that are specific to the MPC8xx SPI driver.  For now, just update
the CONFIG tests.  This also involves reworking the default for
CONFIG_SYS_DEF_EEPROM_ADDR so that we don't set it when we cannot make a
reasonable default, as it does not cause any compile failures.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoARM: mxs: support full SPL framework
Mans Rullgard [Sat, 21 Apr 2018 15:11:10 +0000 (16:11 +0100)]
ARM: mxs: support full SPL framework

This allows using the full SPL framework on mxs devices.  In this
mode, the u-boot.sb image loaded by the boot ROM contains only the
SPL which then loads U-Boot proper or a kernel in falcon mode.

Signed-off-by: Mans Rullgard <mans@mansr.com>
6 years agoARM: mxs: move spl data
Mans Rullgard [Sat, 21 Apr 2018 15:11:09 +0000 (16:11 +0100)]
ARM: mxs: move spl data

With full SPL enabled, the loaded image overwrites the mxs_spl_data
location.  Moving it a slightly lower address fixes this.

Signed-off-by: Mans Rullgard <mans@mansr.com>
6 years agoARM: spl: include arm/thumb glue sections
Mans Rullgard [Sat, 21 Apr 2018 15:11:08 +0000 (16:11 +0100)]
ARM: spl: include arm/thumb glue sections

When building in Thumb mode, the linker might generate mode switching
stubs in .glue sections.  Include these in the final link.

Signed-off-by: Mans Rullgard <mans@mansr.com>
6 years agoARM: arm926ejs: fix lowlevel_init call
Mans Rullgard [Sat, 21 Apr 2018 15:11:07 +0000 (16:11 +0100)]
ARM: arm926ejs: fix lowlevel_init call

The code attempts to preserve the value of LR by storing it in R12/IP
across the lowevel_init() call.  However, this register is not saved
by the callee.  Use a register that guaranteed to be preserved instead.

Signed-off-by: Mans Rullgard <mans@mansr.com>
6 years agoARM: mxs: make lowlevel_init() weak
Mans Rullgard [Sat, 21 Apr 2018 15:11:06 +0000 (16:11 +0100)]
ARM: mxs: make lowlevel_init() weak

With the full SPL framework enabled, lowlevel_init() is required.
Make the empty stub weak so boards can override it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
6 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Fri, 27 Apr 2018 02:09:11 +0000 (22:09 -0400)]
Merge git://git.denx.de/u-boot-usb

6 years agoMerge git://git.denx.de/u-boot-socfpga
Tom Rini [Fri, 27 Apr 2018 02:09:03 +0000 (22:09 -0400)]
Merge git://git.denx.de/u-boot-socfpga

6 years agoMerge git://git.denx.de/u-boot-sh
Tom Rini [Fri, 27 Apr 2018 02:08:58 +0000 (22:08 -0400)]
Merge git://git.denx.de/u-boot-sh

6 years agoarm: socfpga: Fix with the correct polling on bit is set
Tien Fong Chee [Tue, 5 Dec 2017 07:57:58 +0000 (15:57 +0800)]
arm: socfpga: Fix with the correct polling on bit is set

Commit 2baa997240d ("arm: socfpga: Add FPGA driver support for Arria 10")
Polling on wrong cleared bit. Fix with correct polling on bit is set.

Fixes: 2baa997240d ("arm: socfpga: Add FPGA driver support for Arria 10")
Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
6 years agousb: gadget: composite: fix NULL pointer when a non standard request is received
Christophe Kerello [Thu, 15 Mar 2018 08:34:17 +0000 (09:34 +0100)]
usb: gadget: composite: fix NULL pointer when a non standard request is received

In case usb configuration is unknown (cdev->config == NULL), non standard
request should not be processed.
Remove also the cdev->config check below which will never happen.

This issue was seen using ums feature.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agousb: host: dwc3: fix phys init
Neil Armstrong [Wed, 25 Apr 2018 09:39:08 +0000 (11:39 +0200)]
usb: host: dwc3: fix phys init

When no PHYs are declared in the dwc3 node, the phy init fails.
This patch checks if the "phys" property is presend and reports
the error returned by dev_count_phandle_with_args().

This patchs also fixes the styles issues added in last commit.

This patch should fix the DWC3 support on the UniPhier SoC family.

Fixes: 7c839ea70c49 ("usb: host: dwc3: Add support for multiple PHYs")
Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
6 years agoARM: rmobile: Fix PMIC address on E2 Silk
Marek Vasut [Sun, 22 Apr 2018 02:44:05 +0000 (04:44 +0200)]
ARM: rmobile: Fix PMIC address on E2 Silk

The PMIC is at 0x5a, fix the address.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Update E2 Alt
Marek Vasut [Mon, 23 Apr 2018 18:24:16 +0000 (20:24 +0200)]
ARM: rmobile: Update E2 Alt

The E2 Alt port was broken since some time. This patch updates
the E2 Alt 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: Update M2-N Gose
Marek Vasut [Mon, 23 Apr 2018 18:24:10 +0000 (20:24 +0200)]
ARM: rmobile: Update M2-N Gose

The M2-N Gose port was broken since some time. This patch updates
the M2-N Gose 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: Update H2 Lager
Marek Vasut [Mon, 23 Apr 2018 18:24:06 +0000 (20:24 +0200)]
ARM: rmobile: Update H2 Lager

The H2 Lager port was broken since some time. This patch updates
the H2 Lager 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 HS200 support on M3N Salvator-X
Marek Vasut [Tue, 24 Apr 2018 11:00:34 +0000 (13:00 +0200)]
ARM: rmobile: Enable HS200 support on M3N Salvator-X

Enable the HS200 support on M3N Salvator-X .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Thu, 26 Apr 2018 11:21:41 +0000 (07:21 -0400)]
Merge git://git.denx.de/u-boot-rockchip

6 years agoimx6ul: opos6ul: in Serial Downloader boot mode use ymodem
Sébastien Szymanski [Tue, 17 Apr 2018 15:29:32 +0000 (17:29 +0200)]
imx6ul: opos6ul: in Serial Downloader boot mode use ymodem

When booting in Serial Downloader mode load the U-Boot image using
ymodem.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
6 years agoimx6ul: opos6ul: add SPL_DM support
Sébastien Szymanski [Tue, 17 Apr 2018 15:29:31 +0000 (17:29 +0200)]
imx6ul: opos6ul: add SPL_DM support

Since commit commit 152038ea1886 ("i.MX6UL: icore: Add SPL_OF_CONTROL
support") the OPOS6UL board doesn't boot anymore. Adding SPL_DM support
makes the board boot again.

Fixes: commit 152038ea1886 ("i.MX6UL: icore: Add SPL_OF_CONTROL support")
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
6 years agowarp7: defconfig: Fix CAAM on boot with tip-of-tree
Bryan O'Donoghue [Tue, 24 Apr 2018 17:44:30 +0000 (18:44 +0100)]
warp7: defconfig: Fix CAAM on boot with tip-of-tree

Booting the following image with tip-of-tree we get a CAAM DECO error (and
subsequent crash due to a kernel bug in 4.1).

http://freescale.github.io/#download -> BoardsWaRPboard community - WaRP -
Wearable Reference PlatformFSL Community BSP 2.3fsl-image-multimediawayland

Image: fsl-image-multimedia-imx7s-warp-20180323-90.rootfs.sdcard

Error:
caam 30900000.caam: Entropy delay = 3200
caam 30900000.caam: failed to acquire DECO 0
<snip>
caam 30900000.caam: failed to acquire DECO 0
caam 30900000.caam: Entropy delay = 12400
caam 30900000.caam: failed to acquire DECO 0
caam 30900000.caam: failed to instantiate RNG
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at
/home/jenkins/workspace/fsl-community-bsp-pyro_xwayland_2/build/tmp/work-shared/imx7s-warp/kernel-source/mm/vmalloc.c:1465
caam_remove+0x6)
Trying to vfree() nonexistent vm area (88047000)
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted
4.1.36-4.1-1.0.x-imx-warp7+ga543d1b #1
Hardware name: Freescale i.MX7 Dual (Device Tree)
[<80015d54>] (unwind_backtrace) from [<80012688>] (show_stack+0x10/0x14)
[<80012688>] (show_stack) from [<8076e810>] (dump_stack+0x78/0x8c)
[<8076e810>] (dump_stack) from [<800346a0>]
(warn_slowpath_common+0x80/0xb0)
[<800346a0>] (warn_slowpath_common) from [<80034700>]
(warn_slowpath_fmt+0x30/0x40)
[<80034700>] (warn_slowpath_fmt) from [<8054c278>] (caam_remove+0x6c/0x3f4)
[<8054c278>] (caam_remove) from [<8054ce74>] (caam_probe+0x874/0xfa8)
[<8054ce74>] (caam_probe) from [<80382a7c>] (platform_drv_probe+0x48/0xa4)
[<80382a7c>] (platform_drv_probe) from [<80381328>]
(driver_probe_device+0x174/0x2a8)
[<80381328>] (driver_probe_device) from [<8038152c>]
(__driver_attach+0x8c/0x90)
[<8038152c>] (__driver_attach) from [<8037f9d4>]
(bus_for_each_dev+0x68/0x9c)
[<8037f9d4>] (bus_for_each_dev) from [<80380a68>]
(bus_add_driver+0xf4/0x1e8)
[<80380a68>] (bus_add_driver) from [<80381b38>] (driver_register+0x78/0xf4)
[<80381b38>] (driver_register) from [<80009738>]
(do_one_initcall+0x8c/0x1d0)
[<80009738>] (do_one_initcall) from [<80a66dac>]
(kernel_init_freeable+0x140/0x1d0)
[<80a66dac>] (kernel_init_freeable) from [<8076aa38>]
(kernel_init+0x8/0xe8)
[<8076aa38>] (kernel_init) from [<8000f468>] (ret_from_fork+0x14/0x2c)
---[ end trace d5f941204ed8cb28 ]---
caam: probe of 30900000.caam failed with error -11
Unable to handle kernel NULL pointer dereference at virtual address
00000004
pgd = 80004000
[00000004] *pgd=00000000
Internal error: Oops: 805 [#1] PREEMPT SMP ARM
<snip>
[<8055cdf8>] (caam_sm_startup) from [<80aa83c8>] (caam_sm_init+0x50/0x58)
[<80aa83c8>] (caam_sm_init) from [<80009738>] (do_one_initcall+0x8c/0x1d0)
[<80009738>] (do_one_initcall) from [<80a66dac>]
(kernel_init_freeable+0x140/0x1d0)
[<80a66dac>] (kernel_init_freeable) from [<8076aa38>]
(kernel_init+0x8/0xe8)
[<8076aa38>] (kernel_init) from [<8000f468>] (ret_from_fork+0x14/0x2c)
Code: e59d300c e2832010 e5843008 e5834068 (e58a2004)
---[ end trace d5f941204ed8cb29 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

Fix: Enable the CAAM correctly by setting CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
in the upstream defconfig.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Breno Lima <breno.lima@nxp.com>
6 years agowarp7: secure_defconfig: Remove secure_defconfig
Bryan O'Donoghue [Tue, 24 Apr 2018 17:44:31 +0000 (18:44 +0100)]
warp7: secure_defconfig: Remove secure_defconfig

This patch removes warp7_secure_defconfig. A previous patch set
CONFIG_ARMV7_BOOT_SEC_DEFAULT=y on the unsecure WaRP7 config. Fabio asked
if I could confirm that the NXP and upstream kernels will boot on the WaRP7
with CONFIG_ARMV7_BOOT_SEC_DEFAULT=y. I can confirm that this is the case,
so there's no need to support the secure defconfig - drop it now.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Suggested-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agodts: dm: fec: imx53: Provide proper compatible string for imx53 fec driver
Lukasz Majewski [Sun, 15 Apr 2018 19:54:22 +0000 (21:54 +0200)]
dts: dm: fec: imx53: Provide proper compatible string for imx53 fec driver

After this change the DM FEC ETH driver can be also reused on some imx53
devices.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
6 years agoeth: dm: fec: Change FEC PHY mask setting from CONFIG_PHYLIB to CONFIG_FEC_MXC_PHYADDR
Lukasz Majewski [Sun, 15 Apr 2018 19:45:54 +0000 (21:45 +0200)]
eth: dm: fec: Change FEC PHY mask setting from CONFIG_PHYLIB to CONFIG_FEC_MXC_PHYADDR

Without this commit we do have an explicit dependency on CONFIG_PHYLIB
when one wants to set PHY ADDR on a iMX board (FEC + driver model).

This shall be changed to CONFIG_FEC_MXC_PHYADDR, as only when we do have
it set, we shall mask out other devices.

As a side effect, when CONFIG_FEC_MXC_PHYADDR is not set, we scan PHY bus
for connected PHY devices.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
6 years agoRevert "imximage: Remove failure when no IVT offset is found"
Fabio Estevam [Sun, 15 Apr 2018 10:37:36 +0000 (07:37 -0300)]
Revert "imximage: Remove failure when no IVT offset is found"

This reverts commit b5b0e4e351e20a606de22db6a56ad6bc1e2aa8fd.

Commit f916757300c1 ("imx: Create distinct pre-processed mkimage
config files") provided a proper fix for the parallel mkimage
config files build failure, so the original workaround can be
safely reverted now.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agomx7dsabresd: Remove the mx7dsabresd_secure_defconfig target
Fabio Estevam [Thu, 19 Apr 2018 20:34:10 +0000 (17:34 -0300)]
mx7dsabresd: Remove the mx7dsabresd_secure_defconfig target

mx7dsabresd_secure_defconfig was introduced to allow booting NXP kernel
that has CAAM support and needs to boot in secure mode.

Instead of keeping two different config targets for the same board,
remove mx7dsabresd_secure_defconfig and select
CONFIG_ARMV7_BOOT_SEC_DEFAULT inside mx7dsabresd_defconfig so that
this target could be used to boot both mainline and the vendor kernel.

This makes maintenance task easier and avoid potentially confusion
for the end user.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
6 years agoarm,imx6: fix PAD_CTL_SPEED_LOW constant
Mark Jonas [Mon, 16 Apr 2018 16:11:50 +0000 (18:11 +0200)]
arm,imx6: fix PAD_CTL_SPEED_LOW constant

For most i.MX6 processors the PAD_CTL_SPEED_LOW constant is the same.
Only the i.MX6 SoloLite is an exemption. So far the code did not
consider that. Additionally, for a few i.MX6 processors the code used
the wrong value for the constant.

This patch fixes the PAD_CTL_SPEED_LOW constant for:
 - i.MX6 Solo [1]
 - i.MX6 DualLite [1]
 - i.MX6 Dual [2]
 - i.MX6 Quad [2]
 - i.MX6 DualPlus [3]
 - i.MX6 QuadPlus [3]

Before, it was already correct for:
 - i.MX6 SoloLite [4]
 - i.MX6 SoloX [5]
 - i.MX6 UtraLite [6]
 - i.MX6 ULL [7]

[1] https://www.nxp.com/docs/en/reference-manual/IMX6SDLRM.pdf
[2] https://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf
[3] https://www.nxp.com/docs/en/reference-manual/iMX6DQPRM.pdf
[4] https://www.nxp.com/docs/en/reference-manual/IMX6SLRM.pdf
[5] https://www.nxp.com/docs/en/reference-manual/IMX6SXRM.pdf
[6] https://www.nxp.com/docs/en/reference-manual/IMX6ULRM.pdf
[7] https://www.nxp.com/docs/en/reference-manual/IMX6ULLRM.pdf

Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
6 years agowarp7: Add support for automated secure boot.scr verification
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:47 +0000 (18:46 +0100)]
warp7: Add support for automated secure boot.scr verification

This patch adds support for verifying a signed boot.scr. With this in place
it's possible for run-time Linux to update boot.scr to set different
variables such as switching between different boot partitions, pointing to
different kernels etc and for u-boot to verify these changes via the HAB
prior to executing the commands contained in boot.scr.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agowarp7: defconfig: Enable CMD_SETEXPR
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:46 +0000 (18:46 +0100)]
warp7: defconfig: Enable CMD_SETEXPR

setexpr allows us to do arithmetic for env variables - something that is
both useful and required when doing HAB authentication without hard-coding
HAB load addresses.

This patch enables CMD_SETEXPR for the WaRP7 defconfig.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agowarp7: hab: Set environment variable indicating IVT offset
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:45 +0000 (18:46 +0100)]
warp7: hab: Set environment variable indicating IVT offset

This patch introduces the environment variable ivt_offset. When we define a
load address for Linux or DTB or any file the IVT associated with that file
is prepended. We extract the actual load addresses from u-boot.cfg and feed
these values into the code-signing process - hence we want u-boot to have
the real load addresses exported in uboot.cfg.

ivt_offset represents the addition or subtraction from the load address
that must happen to find an IVT header.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agowarp7: add warp7_auth_or_fail
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:44 +0000 (18:46 +0100)]
warp7: add warp7_auth_or_fail

Doing secure boot on the WaRP7 using a common image format and the same
variable to represent the base address for each call means we can reduce
down the command to a single environment command.

This patch adds warp7_auth_or_fail as a wrapper around
"hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0".

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agowarp7: Define the name of a signed boot-script file
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:43 +0000 (18:46 +0100)]
warp7: Define the name of a signed boot-script file

We need to know the name of a signed boot-script, its better to have a
separate variable for this then to simply append some fixed string to an
existing image name.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agowarp7: select uuid partition based on rootpart
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:42 +0000 (18:46 +0100)]
warp7: select uuid partition based on rootpart

Assigning the UUID discovery path to a tweakable environment variable means
that later steps in the boot process - particularly a boot script can
change the target root partition of a particular Linux boot.

Retargeting the rootfs is an important feature when doing ping/pong
upgrades allowing a boot script to select ping or pong as necessary without
reprogramming the bootloader.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agowarp7: Add Kconfig WARP7_ROOT_PART
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:41 +0000 (18:46 +0100)]
warp7: Add Kconfig WARP7_ROOT_PART

Adding CONFIG_WARP7_ROOT_PART allows a defconfig to specify which partition
is use as the root partition on WaRP7, this is a desirable change in order
to support a different partitioning schemes. The default is the current
partition #2.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agowarp7: Make CONFIG_SYS_FDT_ADDR a define
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:40 +0000 (18:46 +0100)]
warp7: Make CONFIG_SYS_FDT_ADDR a define

In order to sign images with the IMX code-signing-tool (CST) we need to
know the load address of a given image. The best way to derive this load
address is to make it into a define - so that u-boot.cfg contains the
address - which we can then parse when generating the IMX CST headers.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agowarp7: defconfig: Enable CONFIG_BOOTM_TEE
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:39 +0000 (18:46 +0100)]
warp7: defconfig: Enable CONFIG_BOOTM_TEE

This patch enables CONFIG_BOOTM_TEE. Once enabled its possible to
chain-load Linux through OPTEE.

Loading kernel to 0x80800000
=> run loadimage

Load FDT to 0x83000000
=> run loadfdt

Load OPTEE to 0x84000000
=> fatload mmc 0:5 0x84000000 /lib/firmware/uTee.optee

Then chain-load to the kernel via OPTEE

=> bootm 0x84000000 - 0x83000000

   Image Name:
   Image Type:   ARM Trusted Execution Environment Kernel Image (uncompressed)
   Data Size:    249844 Bytes = 244 KiB
   Load Address: 9dffffe4
   Entry Point:  9e000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agowarp7: defconfig: Enable CONFIG_SECURE_BOOT
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:38 +0000 (18:46 +0100)]
warp7: defconfig: Enable CONFIG_SECURE_BOOT

Various function associated with booting the WaRP7 in High Assurance Boot
(HAB) mode are enabled by switching on CONFIG_SECURE_BOOT.

This patch enables CONFIG_SECURE_BOOT for the WaRP7 defconfig.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agowarp7: Specify CONFIG_OPTEE_LOAD_ADDR
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:37 +0000 (18:46 +0100)]
warp7: Specify CONFIG_OPTEE_LOAD_ADDR

In order to sign images with the IMX code-signing-tool (CST) we need to
know the load address of a given image. The best way to derive this load
address is to make it into a define - so that u-boot.cfg contains the
address - which we can then parse when generating the IMX CST headers.

This patch makes the OPTEE_LOAD_ADDR available via u-boot.cfg for further
parsing by external tools.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agowarp7: Print out the OPTEE DRAM region
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:36 +0000 (18:46 +0100)]
warp7: Print out the OPTEE DRAM region

Right now a region of 0x300000 bytes is allocated at the end of DRAM for
the purposes of loading an OPTEE firmware inside of it. This patch adds the
printout of the relevant address ranges.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>