]> git.sur5r.net Git - u-boot/log
u-boot
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 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-video
Tom Rini [Wed, 25 Apr 2018 00:27:43 +0000 (20:27 -0400)]
Merge git://git.denx.de/u-boot-video

6 years agovideo-uclass: Fix logical-not-parentheses warning
Tom Rini [Sun, 22 Apr 2018 13:47:48 +0000 (09:47 -0400)]
video-uclass: Fix logical-not-parentheses warning

With clang-4.0 and later we see:
warning: logical not is only applied to the left hand side of this bitwise
operator [-Wlogical-not-parentheses]
        if ((!gd->flags & GD_FLG_RELOC))
             ^          ~

And while the compiler suggests adding parenthesis around gd->flags, a
reading of the code says that we want to know when GD_FLG_RELOC is not
set and then return.

Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge tag 'signed-efi-2018.05' of git://github.com/agraf/u-boot
Tom Rini [Mon, 23 Apr 2018 20:17:36 +0000 (16:17 -0400)]
Merge tag 'signed-efi-2018.05' of git://github.com/agraf/u-boot

Patch queue for efi - 2018-04-23

Some last minute fixes for 2018.05. Most of them are minor fixes. On
top we have some functional improvements for the device path logic
which should also help us be more compatible.

6 years agommc: Staticize sd_select_bus_width
Marek Vasut [Sat, 14 Apr 2018 22:36:45 +0000 (00:36 +0200)]
mmc: Staticize sd_select_bus_width

Staticize the function since it's only used in mmc.c .

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Tom Rini <trini@konsulko.com>
6 years agoefi_selftest: test EFI_DEVICE_PATH_UTILITIES_PROTOCOL
Heinrich Schuchardt [Mon, 16 Apr 2018 05:59:10 +0000 (07:59 +0200)]
efi_selftest: test EFI_DEVICE_PATH_UTILITIES_PROTOCOL

Provide unit tests for the EFI_DEVICE_PATH_UTILITIES_PROTOCOL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: complete EFI_DEVICE_PATH_UTILITIES_PROTOCOL
Heinrich Schuchardt [Mon, 16 Apr 2018 05:59:09 +0000 (07:59 +0200)]
efi_loader: complete EFI_DEVICE_PATH_UTILITIES_PROTOCOL

The missing services of the EFI_DEVICE_PATH_UTILITIES_PROTOCOL are
implemented.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: correcty determine total device path length
Heinrich Schuchardt [Mon, 16 Apr 2018 05:59:08 +0000 (07:59 +0200)]
efi_loader: correcty determine total device path length

Device paths may consist of multiple instances. Up to now we have only
considered the size of the first instance. For the services of the
EFI_DEVICE_PATH_UTILITIES_PROTOCOL in most cases the total length of the
device path is relevant.

So let's rename efi_dp_size() to efi_dp_instance_size() and create a new
function efi_dp_size() that calculates the total device path length.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: correctly determine length of empty device path
Heinrich Schuchardt [Mon, 16 Apr 2018 05:59:07 +0000 (07:59 +0200)]
efi_loader: correctly determine length of empty device path

efi_dp_size() is meant to return the device path length without the end
node.

The length of a device path containing only an end node was incorrectly
reported as 4.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: fix AppendDevicePath
Heinrich Schuchardt [Mon, 16 Apr 2018 05:59:06 +0000 (07:59 +0200)]
efi_loader: fix AppendDevicePath

The logic of the AppendDevicePath service of the
EFI_DEVICE_PATH_UTILITIES_PROTOCOL is incorrectly implemented:

* if both paths are NULL an end node has to be returned
* if both paths are not NULL the end node of the second device path has to
  be kept

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: implement CreateDeviceNode
Heinrich Schuchardt [Mon, 16 Apr 2018 05:59:05 +0000 (07:59 +0200)]
efi_loader: implement CreateDeviceNode

Implement the CreateDeviceNode service of the device path utility protocol.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: fix typo in efi_selftest_devicepath.c
Heinrich Schuchardt [Mon, 16 Apr 2018 05:59:04 +0000 (07:59 +0200)]
efi_selftest: fix typo in efi_selftest_devicepath.c

%s/provice/provide/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: do not execute test if setup failed
Heinrich Schuchardt [Mon, 16 Apr 2018 05:59:03 +0000 (07:59 +0200)]
efi_selftest: do not execute test if setup failed

Executing a test after failed setup may lead to unexpected behavior like
an illegal memory access. So after a setup failure we should skip to
teardown.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: no support for ARMV7_NONSEC=y
Heinrich Schuchardt [Tue, 10 Apr 2018 22:41:52 +0000 (00:41 +0200)]
efi_loader: no support for ARMV7_NONSEC=y

We do not support bootefi booting ARMv7 in non-secure mode.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agolog: fix typo LOGL_EFI
Heinrich Schuchardt [Fri, 23 Mar 2018 20:12:17 +0000 (21:12 +0100)]
log: fix typo LOGL_EFI

According to the documentation the EFI log category is called LOGC_EFI.
All other categories start with LOGC_. So let's fix it.

Fixes: 1973b381a1b3 ("log: add category LOGC_EFI")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoMerge git://git.denx.de/u-boot-uniphier
Tom Rini [Mon, 23 Apr 2018 16:21:20 +0000 (12:21 -0400)]
Merge git://git.denx.de/u-boot-uniphier

6 years agoARM: uniphier: move SPL stack address
Masahiro Yamada [Mon, 23 Apr 2018 06:10:51 +0000 (15:10 +0900)]
ARM: uniphier: move SPL stack address

Currently, the address region, 0xf8000 - 0x100000, is used for SPL
stack for the 32bit SoCs.  Because the U-Boot proper image starts
from 0x70000, the maximum size of the U-Boot proper image is 544KB
(0x70000 - 0xf8000) for the NOR boot mode.  Now uniphier_v7_defconfig
is almost hitting this size limit.  Changing CONFIG_SPL_STACK can
raise the size limit with less impact.  With this, the size limit
will increase to 576KB (0x70000 - 0x100000).  If we need to increase
it even more, we would be able to change CONFIG_SYS_UBOOT_BASE at the
cost of the flashing command changes.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: uniphier: select a correct mmc device before flashing images
Masahiro Yamada [Fri, 20 Apr 2018 09:38:27 +0000 (18:38 +0900)]
ARM: uniphier: select a correct mmc device before flashing images

Some boards support an SD card and an eMMC device at the same time.
Since both belong to 'mmc', they are identified by a device number.
When the device number of the eMMC is 1 instead 0, "mmc dev" command
must be performed to switch the target device before flashing images.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoclk: uniphier: disable SPL_CLK
Masahiro Yamada [Fri, 20 Apr 2018 09:14:27 +0000 (18:14 +0900)]
clk: uniphier: disable SPL_CLK

The last clock consumer in SPL, SD/eMMC driver, gave up using the
clock driver.  The clock driver is only used in U-Boot proper.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: dts: uniphier: drop u-boot, dm-pre-reloc from SD/eMMC clock node
Masahiro Yamada [Fri, 20 Apr 2018 09:14:26 +0000 (18:14 +0900)]
ARM: dts: uniphier: drop u-boot, dm-pre-reloc from SD/eMMC clock node

Now that the SD/eMMC driver does not use the clock driver in SPL,
remove u-boot,dm-pre-reloc properties to let the fdtgrep tool drop
the unnecessary nodes.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agommc: uniphier-sd: skip clock set-up for SPL
Masahiro Yamada [Fri, 20 Apr 2018 09:14:25 +0000 (18:14 +0900)]
mmc: uniphier-sd: skip clock set-up for SPL

The size of SPL is hitting the limit (64KB) for uniphier_v7_defconfig.
When booting from SD/eMMC, obviously its clock has been properly set up
by the boot ROM.  Acutually, no need to re-initialize the clock in SPL.

Using a clock driver would generalize the SoC specific code, but
solving the memory footprint problem would win.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agommc: tmio: move clk_enable() to each driver's probe function
Masahiro Yamada [Fri, 20 Apr 2018 09:14:24 +0000 (18:14 +0900)]
mmc: tmio: move clk_enable() to each driver's probe function

I need to differentiate the clock handling for uniphier-sd.  Move it
to each driver's probe function from the tmio common code so that
renesas-sdhi will not be affected.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: uniphier: increase CONFIG_SYS_MONITOR_LEN
Masahiro Yamada [Fri, 20 Apr 2018 08:42:29 +0000 (17:42 +0900)]
ARM: uniphier: increase CONFIG_SYS_MONITOR_LEN

With the recent changes, the size of the U-Boot proper image for
uniphier_v7_defconfig exceeded the current limit, 512KB, then SPL
fails to load the whole of the U-Boot proper.  Increase the size.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoMerge tag 'xilinx-for-v2018.05-rc3' of git://git.denx.de/u-boot-microblaze
Tom Rini [Mon, 23 Apr 2018 14:50:38 +0000 (10:50 -0400)]
Merge tag 'xilinx-for-v2018.05-rc3' of git://git.denx.de/u-boot-microblaze

Xilinx fixes for v2018.05-rc3

- Fix nand initialization
- Runtime ddr detection for static DDR setting
- Enable rewriting env locations
- Sync defconfig for zc770 xm011
- Remove useless ioremap in watchdog
- Check return value from soc_clk_dump()

6 years agommc: avoid division by zero in meson_mmc_config_clock
Heinrich Schuchardt [Sat, 17 Mar 2018 22:49:36 +0000 (22:49 +0000)]
mmc: avoid division by zero in meson_mmc_config_clock

The Odroid C2 fails to read from mmc with U-Boot v2018.03.
The change avoids a division by zero.

The fix was suggested by Jaehoon in
https://lists.denx.de/pipermail/u-boot/2018-January/318577.html

Reported-by: Vagrant Cascadian <vagrant@debian.org>
Suggested-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Vagrant Cascadian <vagrant@debian.org>
6 years agocmd: clk: Check return value from soc_clk_dump
Michal Simek [Thu, 19 Apr 2018 13:15:25 +0000 (15:15 +0200)]
cmd: clk: Check return value from soc_clk_dump

In case of error in soc_clk_dump function are returned different values
then CMD return values (-1, 0, 1).

For example:
ZynqMP> clk dump
exit not allowed from main input shel

The patch is checking all negative return values and return
CMD_RET_FAILURE which is proper reaction for these cases.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agowatchdog: cadence: Remove useless ioremap
Michal Simek [Thu, 19 Apr 2018 11:51:50 +0000 (13:51 +0200)]
watchdog: cadence: Remove useless ioremap

There is no need to call ioremap. Also reg pointer is completely unused
in the driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Sync zc770 xm011 defconfigs
Michal Simek [Thu, 12 Apr 2018 10:34:14 +0000 (12:34 +0200)]
arm: zynq: Sync zc770 xm011 defconfigs

x8 and x16 configurations should be in sync.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Make ENV_SIZE and ENV_OFFSET optional via board file
Michal Simek [Wed, 11 Apr 2018 14:13:55 +0000 (16:13 +0200)]
arm: zynq: Make ENV_SIZE and ENV_OFFSET optional via board file

Boards have an option to rewrite variable locations in their own board
files. This is necessary for qspi and nand configurations where boot
image can be bigger then 896k(current limit).

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Wire automatic ddr detection for Zynq and ZynqMP case
Michal Simek [Wed, 11 Apr 2018 14:12:28 +0000 (16:12 +0200)]
arm: zynq: Wire automatic ddr detection for Zynq and ZynqMP case

When static memory configuration is used U-Boot has capability to detect
memory size in setup range. Enable this feature for static
configuration.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Enable setup board name for different boards
Michal Simek [Sun, 4 Mar 2018 15:15:15 +0000 (16:15 +0100)]
arm: zynq: Enable setup board name for different boards

There is no need to use zynq name as SYS_BOARD for all boards.
The patch is adding an option to change it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agonand: zynq: Cleanup initialization
Ezequiel Garcia [Sat, 13 Jan 2018 17:56:17 +0000 (14:56 -0300)]
nand: zynq: Cleanup initialization

CONFIG_NAND_ZYNQ selects CONFIG_SYS_NAND_SELF_INIT, so the
driver doesn't have to play any ifdef game.

Also, we can mark zynq_nand_init() as static and get rid
of the mach-specific nand.h header.

This is really a revert of:
"mtd: zynq: nand: Move board_nand_init() function to board.c"
(sha1: 310995d9f91ae56082b49be06fe8c3d01424f8f6)

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agonand: zynq: Fix driver initialization
Ezequiel Garcia [Fri, 12 Jan 2018 18:30:55 +0000 (15:30 -0300)]
nand: zynq: Fix driver initialization

This driver is currently broken, refusing to initialize properly.

The reason is that get_nand_dev_by_index() was being called before
nand_register(), thus returning a pointer into uninitialized memory.
In other words, the struct mtd_info used by the driver is total junk.

Fix it by getting the correct struct mtd_info, via nand_to_mtd()
on the driver's struct nand_chip.

Tested on a custom board, where the CPU is halted without this patch.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Sun, 22 Apr 2018 13:30:36 +0000 (09:30 -0400)]
Merge git://git.denx.de/u-boot-usb

6 years agoMerge git://git.denx.de/u-boot-sh
Tom Rini [Sun, 22 Apr 2018 13:30:29 +0000 (09:30 -0400)]
Merge git://git.denx.de/u-boot-sh

6 years agousb: dwc3-of-simple: fix error check of clk_get_bulk when disabled
Neil Armstrong [Thu, 12 Apr 2018 08:13:50 +0000 (10:13 +0200)]
usb: dwc3-of-simple: fix error check of clk_get_bulk when disabled

The disabled clk API returns -ENOSYS unlike the reset API returning -ENOTSUPP.

Fixes: ca7fdc8b1267 ("usb: host: Add simple of glue driver for DWC3 USB Controllers integration")
Reported-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
6 years agousb: dwc3-of-simple: Add support for DRA7/AM57 platforms.
Jean-Jacques Hiblot [Thu, 12 Apr 2018 08:41:11 +0000 (10:41 +0200)]
usb: dwc3-of-simple: Add support for DRA7/AM57 platforms.

Add the compatibility with "ti,dwc3" and enable it by default if DM_USB
is enabled.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agousb: dwc3-of-simple: Fix dependencies
Jean-Jacques Hiblot [Thu, 12 Apr 2018 08:41:10 +0000 (10:41 +0200)]
usb: dwc3-of-simple: Fix dependencies

This simple glue layer does not require CONFIG_MISC, but it does require
CONFIG_DM_USB.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agoARM: rmobile: Update E2 Silk
Marek Vasut [Sat, 21 Apr 2018 14:19:56 +0000 (16:19 +0200)]
ARM: rmobile: Update E2 Silk

The E2 Silk port was broken since some time. This patch updates
the E2 Silk 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>
---
NOTE: The port is missing support for I2C1 for DA9063 reset, since the
      I2C driver needs to be converted to DM and DT probing. That's not
      an issue for this patch though, since the reset was broken on Silk
      since forever.

6 years agommc: sh_mmcif: Migrate configs to CONFIG_SH_MMCIF
Marek Vasut [Sat, 21 Apr 2018 15:53:07 +0000 (17:53 +0200)]
mmc: sh_mmcif: Migrate configs to CONFIG_SH_MMCIF

Migrate the U-Boot configs to Kconfig CONFIG_SH_MMCIF .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
6 years agommc: sh_mmcif: Add Kconfig entry
Marek Vasut [Sat, 21 Apr 2018 15:40:20 +0000 (17:40 +0200)]
mmc: sh_mmcif: Add Kconfig entry

Add Kconfig entry for SH MMCIF driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
6 years agommc: sh_mmcif: Add DM and DT probing support
Marek Vasut [Sat, 21 Apr 2018 15:27:11 +0000 (17:27 +0200)]
mmc: sh_mmcif: Add DM and DT probing support

Add MMC DM and DT probing support into the SH MMCIF driver.
This patch abstracts out the common bits of the send command
and set ios functions, so they can be used both by DM and non
DM setups and adds the DM probe support.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
6 years agoclk: renesas: Minor clean up of the R8A7794 clock driver
Marek Vasut [Sat, 21 Apr 2018 14:35:49 +0000 (16:35 +0200)]
clk: renesas: Minor clean up of the R8A7794 clock driver

The initconst is not used in U-Boot, drop it. The r8a7794_crit_mod_clks
is also not used in U-Boot, so drop it too.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Minor clean up of the R8A7792 clock driver
Marek Vasut [Sat, 21 Apr 2018 14:36:54 +0000 (16:36 +0200)]
clk: renesas: Minor clean up of the R8A7792 clock driver

The initconst is not used in U-Boot, drop it. The r8a7792_crit_mod_clks
is also not used in U-Boot, so drop it too.

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-uniphier
Tom Rini [Wed, 18 Apr 2018 20:24:26 +0000 (16:24 -0400)]
Merge git://git.denx.de/u-boot-uniphier

6 years agoMerge git://git.denx.de/u-boot-sh
Tom Rini [Wed, 18 Apr 2018 20:24:14 +0000 (16:24 -0400)]
Merge git://git.denx.de/u-boot-sh

6 years agoreset: uniphier: add ethernet reset control support
Kunihiko Hayashi [Wed, 18 Apr 2018 01:06:07 +0000 (10:06 +0900)]
reset: uniphier: add ethernet reset control support

Add reset lines for ethernet controller on each SoC.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoclk: uniphier: add ethernet clock control support
Kunihiko Hayashi [Wed, 18 Apr 2018 01:05:33 +0000 (10:05 +0900)]
clk: uniphier: add ethernet clock control support

Add clock control for ethernet controller on each SoC.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: dts: uniphier: sync DT with Linux 4.17-rc1
Masahiro Yamada [Mon, 16 Apr 2018 03:35:33 +0000 (12:35 +0900)]
ARM: dts: uniphier: sync DT with Linux 4.17-rc1

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoMerge git://git.denx.de/u-boot-socfpga
Tom Rini [Tue, 17 Apr 2018 21:45:28 +0000 (17:45 -0400)]
Merge git://git.denx.de/u-boot-socfpga

6 years agoMerge tag 'arc-for-2018.05-rc3' of git://git.denx.de/u-boot-arc
Tom Rini [Tue, 17 Apr 2018 21:45:18 +0000 (17:45 -0400)]
Merge tag 'arc-for-2018.05-rc3' of git://git.denx.de/u-boot-arc

Subtle ARC fixes for v2018.05-RC3

These are only very subtle clean-ups here and there including:

 * Correctly specified CPU freq for HSDK
   (production boards are all shipped with 500MHZ as opposed
    to early batch running at 1GHz)

 * Addition of SNPS internal group email to MAINTAINERS file
 * Switch to Hush shell on AXS10x boards

6 years agoreset: fix bulk API when DM_RESET is disabled
Neil Armstrong [Thu, 12 Apr 2018 08:03:19 +0000 (10:03 +0200)]
reset: fix bulk API when DM_RESET is disabled

In the commit "reset: Add get/assert/deassert/release for bulk of reset signals"
the disabled reset_release_bulk() and reset_get_bulk() used the wrong
struct clk_bulk instead of struct reset_ctl_bulk.

Fixes: 0c28233903b5 ("reset: Add get/assert/deassert/release for bulk of reset signals")
Reported-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agobootm: Align cache flush begin address
Bryan O'Donoghue [Sun, 15 Apr 2018 10:48:17 +0000 (11:48 +0100)]
bootm: Align cache flush begin address

commit b4d956f6bc0f ("bootm: Align cache flush end address correctly")
aligns the end address of the cache flush operation to a cache-line size to
ensure lower-layers in the code accept the range provided and flush.

A similar action should be taken for the begin address of a cache flush
operation. The load address may not be aligned to a cache-line boundary, so
ensure the passed address is aligned.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reported-by: Breno Matheus Lima <brenomatheus@gmail.com>
Suggested-by: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoclk: fix clk_get_bulk when phandle error
Neil Armstrong [Tue, 17 Apr 2018 09:30:31 +0000 (11:30 +0200)]
clk: fix clk_get_bulk when phandle error

This fixes the Coverity Defect CID 175347 when dev_count_phandle_with_args()
returns a negative value.

Fixes: a855be87da49 ("clk: Add get/enable/disable/release for a bulk of clocks")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
6 years agoreset: fix reset_get_bulk when phandle error
Neil Armstrong [Tue, 17 Apr 2018 09:30:22 +0000 (11:30 +0200)]
reset: fix reset_get_bulk when phandle error

This fixes the Coverity Defect CID 175348 when dev_count_phandle_with_args()
returns a negative value.

Fixes: 0c28233903b5 ("reset: Add get/assert/deassert/release for bulk of reset signals")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
6 years agoARM: rmobile: Update M2 Koelsch
Marek Vasut [Tue, 17 Apr 2018 12:13:11 +0000 (14:13 +0200)]
ARM: rmobile: Update M2 Koelsch

The M2 Koelsch port was broken since some time. This patch updates
the M2 Koelsch 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 agoARC: Remove unused DECLARE_GLOBAL_DATA_PTR from init_helpers.c
Eugeniy Paltsev [Tue, 17 Apr 2018 16:01:15 +0000 (19:01 +0300)]
ARC: Remove unused DECLARE_GLOBAL_DATA_PTR from init_helpers.c

"Global data" structure "gd" is not used in init_helpers.c
thus DECLARE_GLOBAL_DATA_PTR might be safely removed.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoARC: Update ARC architecture maintainers
Eugeniy Paltsev [Tue, 17 Apr 2018 14:30:40 +0000 (17:30 +0300)]
ARC: Update ARC architecture maintainers

Update ARC architecture maintainers and add
uboot-snps-arc@synopsys.com mailing list.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoARC: AXS10x: Enable hush shell
Eugeniy Paltsev [Tue, 17 Apr 2018 14:15:31 +0000 (17:15 +0300)]
ARC: AXS10x: Enable hush shell

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoARC: HSDK: Fix CPU frequency value
Eugeniy Paltsev [Tue, 17 Apr 2018 13:27:15 +0000 (16:27 +0300)]
ARC: HSDK: Fix CPU frequency value

CPU on HSDK board runs at 500MHz after preloader so fix
wrong CPU frequency value in hsdk_defconfig.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
6 years agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 17 Apr 2018 13:22:31 +0000 (09:22 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Tue, 17 Apr 2018 13:14:33 +0000 (09:14 -0400)]
Merge git://git.denx.de/u-boot-marvell

6 years agoconfigs: socfpga: disable EFI and ISO partition types
Dinh Nguyen [Thu, 12 Apr 2018 14:03:37 +0000 (09:03 -0500)]
configs: socfpga: disable EFI and ISO partition types

None of the SoCFPGA platforms will support EFI/ISO partition types that
is needed for DISTRO_DEFAULTS. SoCFPGA bootroom will only support 0xa2
partition type.

This is needed to help limit the size of the SPL to within the 64k limit
that is required for SoCFPGA.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
6 years agoconfigs: socfpga: add DM_RESET
Dinh Nguyen [Wed, 4 Apr 2018 22:18:25 +0000 (17:18 -0500)]
configs: socfpga: add DM_RESET

Add the DM reset driver to socfpga defconfigs.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
6 years agoi2c: designware: add reset ctrl to driver
Dinh Nguyen [Wed, 4 Apr 2018 22:18:24 +0000 (17:18 -0500)]
i2c: designware: add reset ctrl to driver

Add code to look for a reset manager property. Specifically, look for the
reset-names of 'i2c'. A reset property is an optional feature, so only print
out a warning and do not fail if a reset property is not present.

If a reset property is discovered, then use it to deassert, thus bringing the
IP out of reset.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
6 years agoarm: dts: socfpga: add reset property
Dinh Nguyen [Wed, 4 Apr 2018 22:18:23 +0000 (17:18 -0500)]
arm: dts: socfpga: add reset property

Add reset dts property to the i2c nodes.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
6 years agoarm: dts: socfpga: enables i2c0 in socfpga_de0_nano
Dinh Nguyen [Wed, 4 Apr 2018 22:18:22 +0000 (17:18 -0500)]
arm: dts: socfpga: enables i2c0 in socfpga_de0_nano

Add all the appropriate i2c alias in the base socfpga dtsi and enables
the i2c node on the DE0 NANO board.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>