]> git.sur5r.net Git - u-boot/log
u-boot
6 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>
6 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>
6 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

6 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

6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 years agowarp7: Allocate specific region of memory to OPTEE
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:35 +0000 (18:46 +0100)]
warp7: Allocate specific region of memory to OPTEE

Subtracts CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size.

On WaRP7 we simply define the OPTEE region as from the maximum DRAM address
minus CONFIG_OPTEE_TZDRAM_SIZE bytes.

Note the OPTEE boot process will itself subtract the DRAM region it lives
in from the memory map passed to Linux.

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 OPTEE for WaRP7
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:34 +0000 (18:46 +0100)]
warp7: defconfig: Enable OPTEE for WaRP7

Requires setting CONFIG_OPTEE=y and setting an OPTEE TrustZone DRAM base in
include/configs/warp7.h.

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 HAB enable
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:33 +0000 (18:46 +0100)]
warp7: hab: Set environment variable indicating HAB enable

This patch adds an environment variable called "hab_enabled" which gets set
to a boolean status indicating whether HAB is enabled or not.

Subsequent patches can use this environment variable to determine if its
necessary to run a given binary through the hab_auth_img console command.

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: Add a CSF location definition
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:32 +0000 (18:46 +0100)]
warp7: hab: Add a CSF location definition

In order to correctly produce an image with a IVT/DCD header we need to
define a CSF in imximage.cfg. We just use the mx7 default here.

All we have to do with this option switched on is "make u-boot.imx" and we
then will get

- u-boot.imx
- u-boot.imx.log

The log file is really important because it gives the addresses for the HAB
that we will require to sign the u-boot image using the CST. Since the
addresses can change this logfile is a critical output.

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 agoimximage: Specify default IVT offset in IMX image
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:31 +0000 (18:46 +0100)]
imximage: Specify default IVT offset in IMX image

This patch adds BOOTROM_IVT_HDR_OFFSET at 0xC00. The BootROM expects to
find the IVT header at a particular offset in an i.MX image.

Defining the expected offset of the IVT header in the first-stage BootROM
image format is of use of later stage authentication routines where those
routines continue to follow the first-stage authentication layout.

This patch defines the first stage offset which later patch make use of.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Cc: Breno Lima <breno.lima@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agotools/imximage: Fix fruity lack of 0x prefix in DCD Blocks
Bryan O'Donoghue [Tue, 24 Apr 2018 17:46:30 +0000 (18:46 +0100)]
tools/imximage: Fix fruity lack of 0x prefix in DCD Blocks

commit 8519c9c98ad6 ("tools/imximage: use 0x prefix in HAB Blocks line")
adds an 0x prefix to each HAB Block number to make it easier for host tools
to process the HAB Block output, however it neglects to apply the same
prefix to the DCD Blocks directive. You need the DCD Blocks directive if
you are making a u-boot recovery image which the BootROM will accept via
the USB upload utility.

This disparity results in a fruity output like this with HAB Blocks
prefixed but DCD Blocks not prefixed - which is pretty inconsistent.

This patch fixes the difference assuming the original commit was a
legitimate change.

Old:
Image Type:   Freescale IMX Boot Image
Image Ver:    2 (i.MX53/6/7 compatible)
Mode:         DCD
Data Size:    430080 Bytes = 420.00 KiB = 0.41 MiB
Load Address: 877ff420
Entry Point:  87800000
HAB Blocks:   0x877ff400 0x00000000 0x00066c00
DCD Blocks:   00910000 0000002c 000001d4

New:
Image Type:   Freescale IMX Boot Image
Image Ver:    2 (i.MX53/6/7 compatible)
Mode:         DCD
Data Size:    430080 Bytes = 420.00 KiB = 0.41 MiB
Load Address: 877ff420
Entry Point:  87800000
HAB Blocks:   0x877ff400 0x00000000 0x00066c00
DCD Blocks:   0x00910000 0x0000002c 0x000001d4

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Breno Lima <breno.lima@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agowarp7: configs: enable CONFIG_CMD_FS_GENERIC
Pierre-Jean TEXIER [Sat, 31 Mar 2018 22:49:05 +0000 (00:49 +0200)]
warp7: configs: enable CONFIG_CMD_FS_GENERIC

This enable generic file system commands (load, ls).

Signed-off-by: Pierre-Jean TEXIER <texier.pj2@gmail.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
6 years agowarp7: include/configs: use generic fs commands in CONFIG_EXTRA_ENV_SETTINGS
Pierre-Jean TEXIER [Sat, 31 Mar 2018 22:49:04 +0000 (00:49 +0200)]
warp7: include/configs: use generic fs commands in CONFIG_EXTRA_ENV_SETTINGS

use the generic filesystem command 'load' rather
than 'fatload' to avoid per-fs specific commands.

Signed-off-by: Pierre-Jean TEXIER <texier.pj2@gmail.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
6 years agoMerge git://git.denx.de/u-boot-spi
Tom Rini [Thu, 26 Apr 2018 00:50:28 +0000 (20:50 -0400)]
Merge git://git.denx.de/u-boot-spi

6 years agorockchip: defconfig: remove CONFIG_SYS_NS16550
Kever Yang [Thu, 19 Apr 2018 03:37:10 +0000 (11:37 +0800)]
rockchip: defconfig: remove CONFIG_SYS_NS16550

We have enable NS16550 in Kconfig, do not need enable at defconfig

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: enable SYS_NS16550 for all SoCs by default
Kever Yang [Thu, 19 Apr 2018 03:37:09 +0000 (11:37 +0800)]
rockchip: enable SYS_NS16550 for all SoCs by default

All rockchip SoCs can use ns16550 driver, enable it for all
and set SYS_NS16550_MEM32 for all SoCs.

Version-changes: 2
- use imply instead of select

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoRevert "rockchip: firefly: Add "usb start" to auto-start USB device"
Kever Yang [Wed, 18 Apr 2018 10:01:21 +0000 (18:01 +0800)]
Revert "rockchip: firefly: Add "usb start" to auto-start USB device"

This reverts commit a1903c18db13e740e6bedb8955b3272dce5104e1.

It's really bad idea to add "usb start" in preboot, it will spend
a lot of time to scan usb bus, and most of people do not need this
feature.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk322x: update MACRO for back-to-brom
Kever Yang [Wed, 18 Apr 2018 04:45:33 +0000 (12:45 +0800)]
rockchip: rk322x: update MACRO for back-to-brom

The MACRO has been update after:
ee14d29 rockchip: back-to-bootrom: split BACK_TO_BOOTROM for TPL/SPL
We need to update the C code for it.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk322x: update TPL_TEXT_BASE
Kever Yang [Wed, 18 Apr 2018 03:52:34 +0000 (11:52 +0800)]
rockchip: rk322x: update TPL_TEXT_BASE

The boot0 hook including the 4-byte TAG which is at the beginning
of the TEXT_BASE, now we can use a aligned TEXT BASE.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rv1108: add ofdata_to_platdata() method for driver
Kever Yang [Tue, 24 Apr 2018 03:27:08 +0000 (11:27 +0800)]
rockchip: rv1108: add ofdata_to_platdata() method for driver

Parse of data in dedicated api instead of in probe().

The clk_set_rate() may be called before the clk driver is probed,
after core support set default clock.
This patch fix system abort issue since:
f4fcba5 clk: implement clk_set_defaults()

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
6 years agorockchip: rk3128: add ofdata_to_platdata() method for driver
Kever Yang [Tue, 24 Apr 2018 03:27:07 +0000 (11:27 +0800)]
rockchip: rk3128: add ofdata_to_platdata() method for driver

Parse of data in dedicated api instead of in probe().

The clk_set_rate() may be called before the clk driver is probed,
after core support set default clock.
This patch fix system abort issue since:
f4fcba5 clk: implement clk_set_defaults()

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-sytems.com>
6 years agorockchip: rk3036: add ofdata_to_platdata() method for driver
Kever Yang [Tue, 24 Apr 2018 03:27:06 +0000 (11:27 +0800)]
rockchip: rk3036: add ofdata_to_platdata() method for driver

Parse of data in dedicated api instead of in probe().

The clk_set_rate() may be called before the clk driver is probed,
after core support set default clock.
This patch fix system abort issue since:
f4fcba5 clk: implement clk_set_defaults()

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoconfig: evb-rk3399: enable make uboot.itb
Peter Robinson [Wed, 25 Apr 2018 09:50:05 +0000 (10:50 +0100)]
config: evb-rk3399: enable make uboot.itb

Similar to firefly 3399 enable the ability to create a FIT image
with combined arm-trusted-firmware.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoarm: rockchip: make_fit_atf: remove unneeded imports
Patrick Uiterwijk [Wed, 25 Apr 2018 09:50:04 +0000 (10:50 +0100)]
arm: rockchip: make_fit_atf: remove unneeded imports

These imports are entirely unused in the entire script.

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3188: use DM timer instead of rk_timer
Kever Yang [Wed, 18 Apr 2018 03:13:46 +0000 (11:13 +0800)]
rockchip: rk3188: use DM timer instead of rk_timer

Disable rk_timer as SYS timer and use DM timer instead,
so that we can get a better timer framework, the rk_timer
is going to be clean after we conver to use DM timer or
ARM arch/generic timer.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3188: add timer3 node
Kever Yang [Wed, 18 Apr 2018 03:13:45 +0000 (11:13 +0800)]
rockchip: rk3188: add timer3 node

Add dts node for timer3.
Because of the rockchip timer can only KNOWN "dtd_rockchip_rk3368_timer"
with OF_PLATDATA enable, so we override its compatible to
"rockchip,rk3368-timer".

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3188: add -u-boot.dtsi for rock-rk3188
Kever Yang [Wed, 18 Apr 2018 03:13:44 +0000 (11:13 +0800)]
rockchip: rk3188: add -u-boot.dtsi for rock-rk3188

We should a -u-boot.dtsi for those config need by U-Boot only,
and other part sync with kernel.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: timer: add compatible strings for rk3188 and rk3288
Philipp Tomsich [Wed, 25 Apr 2018 12:07:06 +0000 (14:07 +0200)]
rockchip: timer: add compatible strings for rk3188 and rk3288

The DM driver for ockchip timer blocks is also applicable to the
RK3188 and RK3288 timer blocks: add 'rockchip,rk3188-timer' and
'rockchip,rk3288-timer' to its compatible list to support devices
claiming compatibility with these.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: defconfig: puma-rk3399: enable RTC
Klaus Goger [Fri, 13 Apr 2018 08:54:28 +0000 (10:54 +0200)]
rockchip: defconfig: puma-rk3399: enable RTC

commit: 52280315a4 ("rtc: rewrite isl1208 to support DM") enables us to
use the on-module RTC emulation with the rk3399 device model i2c driver.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3288: provide ${fdtfile}
Heinrich Schuchardt [Thu, 12 Apr 2018 22:45:57 +0000 (00:45 +0200)]
rockchip: rk3288: provide ${fdtfile}

All rk3288 default configs define CONFIG_DEFAULT_DEVICE_TREE.
So we can use it to define ${fdtfile} in rk3288_common.h.

This variable is needed by the distro boot command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: clk: rk3288: add clk_enable function and support USB HOST0/HSIC
Wadim Egorov [Mon, 19 Mar 2018 15:39:29 +0000 (16:39 +0100)]
rockchip: clk: rk3288: add clk_enable function and support USB HOST0/HSIC

The generic ehci-driver (ehci-generic.c) will try to enable the clocks
listed in the DTSI. If this fails (e.g. due to clk_enable not being
implemented in a driver and -ENOSYS being returned by the clk-uclass),
the driver will bail our and print an error message.

This implements a minimal clk_enable for the RK3288 and supports the
clocks mandatory for the EHCI controllers; as these are enabled by
default we simply return success.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>