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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Tom Rini [Wed, 25 Apr 2018 00:27:43 +0000 (20:27 -0400)]
Merge git://git.denx.de/u-boot-video
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Tom Rini [Mon, 23 Apr 2018 16:21:20 +0000 (12:21 -0400)]
Merge git://git.denx.de/u-boot-uniphier
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>
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>
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>
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>
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>
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>
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>
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()
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>
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>
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>
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>
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>
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>
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>
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>
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>
Tom Rini [Sun, 22 Apr 2018 13:30:36 +0000 (09:30 -0400)]
Merge git://git.denx.de/u-boot-usb
Tom Rini [Sun, 22 Apr 2018 13:30:29 +0000 (09:30 -0400)]
Merge git://git.denx.de/u-boot-sh
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>
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>
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>
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.
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>
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>
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>
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>
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>
Tom Rini [Wed, 18 Apr 2018 20:24:26 +0000 (16:24 -0400)]
Merge git://git.denx.de/u-boot-uniphier
Tom Rini [Wed, 18 Apr 2018 20:24:14 +0000 (16:24 -0400)]
Merge git://git.denx.de/u-boot-sh
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>
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>
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>
Tom Rini [Tue, 17 Apr 2018 21:45:28 +0000 (17:45 -0400)]
Merge git://git.denx.de/u-boot-socfpga
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Tom Rini [Tue, 17 Apr 2018 13:14:33 +0000 (09:14 -0400)]
Merge git://git.denx.de/u-boot-marvell
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>
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>
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>
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>
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>
Dinh Nguyen [Wed, 4 Apr 2018 22:18:21 +0000 (17:18 -0500)]
configs: socfpga: convert i2c to dm
Enable DM I2C driver on SoCFPGA platforms.
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Dinh Nguyen [Wed, 4 Apr 2018 22:18:20 +0000 (17:18 -0500)]
reset: socfpga: add reset driver for SoCFPGA platform
Add a DM compatible reset driver for the SoCFPGA platform.
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Dinh Nguyen [Fri, 9 Mar 2018 03:39:26 +0000 (21:39 -0600)]
ARM: dts: stratix10: Add base dtsi and devkit dts
From the Linux v4.16-rc4, add the base dtsi and devkit dts files for
the Stratix10 SoCFPGA platform.
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Dinh Nguyen [Fri, 9 Mar 2018 03:39:25 +0000 (21:39 -0600)]
ARM64: stratix10: add reset manager includes
Pulled from linux v4.16-rc4.
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Chin Liang See [Fri, 9 Mar 2018 03:39:24 +0000 (21:39 -0600)]
arm: socfpga: stratix10: Add base address map for Statix10 SoC
Add the base address map for Stratix10 SoC
Signed-off-by: Chin Liang See <chin.liang.see@intel.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Marek Vasut [Tue, 17 Apr 2018 00:49:48 +0000 (02:49 +0200)]
ARM: rmobile: Ignore U-Boot env when started via JTAG on Porter
When U-Boot is started via JTAG, ignore the installed environment
as it may interfere with the recovery of the board.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Mon, 16 Apr 2018 23:07:23 +0000 (01:07 +0200)]
ARM: rmobile: Ignore U-Boot env when started via JTAG on Stout
When U-Boot is started via JTAG, ignore the installed environment
as it may interfere with the recovery of the board.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Sun, 15 Apr 2018 22:16:43 +0000 (00:16 +0200)]
ARM: rmobile: Enable fitImage support on Gen3
Enable fitImage support to be on the right side of the millenium.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Sun, 15 Apr 2018 22:56:15 +0000 (00:56 +0200)]
ARM: rmobile: Disable SDHI on R8A77970 V3M Eagle
The SDHI is not routed to a slot on the Eagle, so disable it.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Tue, 13 Feb 2018 20:34:03 +0000 (21:34 +0100)]
ARM: rmobile: Enable RPC QSPI on R8A77970 V3M Eagle
Enable the RPC QSPI driver on R8A77970 V3M Eagle and configure
the environment layout to match that used by old U-Boot.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Sat, 29 Jul 2017 19:28:34 +0000 (21:28 +0200)]
ARM: rmobile: Add Renesas RPC HF/QSPI DT nodes
Add device tree nodes for the Renesas RPC HF/QSPI controller.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Matt Pelland [Mon, 16 Apr 2018 14:08:18 +0000 (10:08 -0400)]
mmc: mv_sdhci: zero out sdhci_host structure
The mv_sdhci driver was not zeroing the sdhci_host structure it
allocates causing random access violations in parts of the mmc core
where the "ops" member pointers are checked and called if not NULL.
Signed-off-by: Matt Pelland <mpelland@starry.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Tom Rini [Tue, 17 Apr 2018 00:00:14 +0000 (20:00 -0400)]
Prepare v2018.05-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
Patrice Chotard [Mon, 16 Apr 2018 08:35:08 +0000 (10:35 +0200)]
serial: Remove duplicated line in Makefile
The line "-obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o"
is found twice in Makefile.
Fixes:
ae74de0dfd45 ("serial: stm32: Rename serial_stm32x7.c to serial_stm32.c"
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>