oweals/u-boot.git
4 years agofs: export fs_close()
AKASHI Takahiro [Mon, 7 Oct 2019 05:59:35 +0000 (14:59 +0900)]
fs: export fs_close()

fs_close() closes the connection to a file system which opened with
either fs_set_blk_dev() or fs_set_dev_with_part(). Many file system
functions implicitly call fs_close(), e.g. fs_closedir(), fs_exist(),
fs_ln(), fs_ls(), fs_mkdir(), fs_read(), fs_size(), fs_write()
and fs_unlink().
So just export it.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: device_path: check against file path length
AKASHI Takahiro [Wed, 9 Oct 2019 07:19:52 +0000 (16:19 +0900)]
efi_loader: device_path: check against file path length

device_path strcuture has 2 bytes of "length" field, and so
file path length should not exceed this limit, 65535.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMerge tag 'dm-pull-15oct19' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Wed, 16 Oct 2019 22:10:31 +0000 (18:10 -0400)]
Merge tag 'dm-pull-15oct19' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

binman enhancements:
- Dropping some test Elf files and building them from source instead
- Refactoring of x86 16-bit entries
- Support for SPL symbols within sections
- Handle the 'notes' sections and hidden symbols in recent binutils
- Improved error reporting with a tool fails

libfdt and documentation fixes
vboot required-key test
driver model power-domain controls
patman Message-Id enhancement

4 years agoMerge branch '2019-10-15-master-imports'
Tom Rini [Wed, 16 Oct 2019 22:10:01 +0000 (18:10 -0400)]
Merge branch '2019-10-15-master-imports'

- Split travis jobs again so we don't have failures due to excessive
  build times.
- Android image updates
- cscope bugfix, update ARM maintainers entry, drop H2200 platform.

4 years agotravis: Split and rename xilinx ARM in to two jobs
Tom Rini [Mon, 14 Oct 2019 22:12:59 +0000 (18:12 -0400)]
travis: Split and rename xilinx ARM in to two jobs

Split the ARMv7 and AArch64 platforms into separate jobs, to avoid them
taking too long to build overall.  Also rename them from "Xilinx" to
"Zynq*" to reflect slightly better what is being built and to pull in a
few more board matches.

Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agotravis: Split sun8i in to two jobs
Tom Rini [Tue, 15 Oct 2019 11:27:14 +0000 (07:27 -0400)]
travis: Split sun8i in to two jobs

Split the 32bit and 64bit platforms into separate jobs, to avoid them
taking too long to build overall.

Cc: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agotravis: Split i.MX jobs a bit more
Tom Rini [Tue, 15 Oct 2019 11:27:13 +0000 (07:27 -0400)]
travis: Split i.MX jobs a bit more

- Split "tqc" and "technexion" out into their own jobs and exclude
  them from the catch-all jobs
- Clarify the job labels a little more.

Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Stefano Babic <sbabic@denx.de>
4 years agoMAINTAINERS: Update ARM entry
Tom Rini [Thu, 10 Oct 2019 21:33:09 +0000 (17:33 -0400)]
MAINTAINERS: Update ARM entry

Fully take over the ARM maintainers entry.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoMakefile: Skip symbolic links to files for cscope
Andy Shevchenko [Tue, 8 Oct 2019 18:12:45 +0000 (21:12 +0300)]
Makefile: Skip symbolic links to files for cscope

cscope complains that it can't find files that appears to be symbolic links

cscope: cannot find file tools/binman/test/u_boot_binman_syms_bad.c
cscope: cannot find file tools/version.h

`find -L` tests properties, but name, and cscope can't cope with symbolic
links (a lot of bugs in upstream were simple closed as kinda invalid).

To work around the problem, exclude symbolic links from the cscope.files.
Note, it's done in two pass to speed up the process (`-exec realpath ...`
approach is not portable and introduces a 3x delay).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoarm: remove the H2200 board
Heinrich Schuchardt [Tue, 8 Oct 2019 18:54:49 +0000 (20:54 +0200)]
arm: remove the H2200 board

U-Boot cannot be built for h2200_defconfig with CONFIG_DM=y.

The maintainer Lukasz Dalek suggested to remove the board.
https://lists.denx.de/pipermail/u-boot/2019-August/380685.html

Cc: Lukasz Dalek <luk0104@gmail.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[trini: As this is the last non-toradex PXA board, update travis too]
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agosandbox: fix build error due to missing struct udevice definition
AKASHI Takahiro [Fri, 4 Oct 2019 04:45:18 +0000 (13:45 +0900)]
sandbox: fix build error due to missing struct udevice definition

Without this patch, compiling may potentially fail.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodm: Tidy up dump output when there are many devices
Patrick Delaunay [Mon, 30 Sep 2019 08:19:13 +0000 (10:19 +0200)]
dm: Tidy up dump output when there are many devices

At present the 'Index' column of 'dm tree' assumes there is
two digits, this patch increase it to 3 digits.

It also aligns output of 'dm uclass', assuming the same 3 digits index.

The boards with CONFIG_PINCTRL_FULL activated have one pinconfig
by pin configuration, so they can have more than 100 devices
pinconfig (for example with stm32mp157c-ev1 board we have
106 pinconfig node).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodm: pinctrl: introduce PINCONF_RECURSIVE option
Patrick Delaunay [Fri, 2 Aug 2019 12:48:00 +0000 (14:48 +0200)]
dm: pinctrl: introduce PINCONF_RECURSIVE option

In the Linux pinctrl binding, the pin configuration nodes don't need to
be direct children of the pin controller device (may be grandchildren for
example). This behavior is managed with the pinconfig u-class which
recursively bind all the sub-node of the pin controller.

But for some binding (when pin configuration is only children of pin
controller) that is not necessary. U-Boot can save memory and reduce
the number of pinconf instance when this feature is deactivated
(for arch stm32mp for example for SPL).

This patch allows to control this feature with a new option
CONFIG_PINCONF_RECURSIVE when it is possible for each individual
pin controller device.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Fixed CONFIG_IF_ENABLED() condition, added __maybe_unused:
Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agodm: core: device: switch off power domain after device removal
Anatolij Gustschin [Fri, 27 Sep 2019 08:18:15 +0000 (13:48 +0530)]
dm: core: device: switch off power domain after device removal

The power domain associated with a device is enabled when probing,
but currently the domain remains enabled when the device is removed.
Some boards started to disable power domains for selected devices
via custom board_quiesce_devices(), but it doesn't work in many
cases, i. e. because devices still can be accessed later in
.remove() callback on behalf of dm_remove_devices_flags().

Utilize the DM core to power off the device power domain, but add a
device flag to be able to selectively let the power domain enabled
after device removal. This might be required for devices that must
remain enabled when booting OS, i. e. serial console for debug
output, etc.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agopower: domain: Introduce dev_power_domain_off
Lokesh Vutla [Fri, 27 Sep 2019 08:18:14 +0000 (13:48 +0530)]
power: domain: Introduce dev_power_domain_off

Add dev_power_domain_off() api to disable all the power-domains
corresponding to a device

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoremoteproc: k3_arm64: Enable DM_FLAG_DEFAULT_PD_CTRL_OFF
Lokesh Vutla [Fri, 27 Sep 2019 08:18:13 +0000 (13:48 +0530)]
remoteproc: k3_arm64: Enable DM_FLAG_DEFAULT_PD_CTRL_OFF

Enable DM_FLAG_DEFAULT_PD_CTRL_OFF for arm64 remote core so that
pd can be enabled after loading the image.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodm: core: Allow for not controlling the power-domain by DM framework
Lokesh Vutla [Fri, 27 Sep 2019 08:18:12 +0000 (13:48 +0530)]
dm: core: Allow for not controlling the power-domain by DM framework

In some remoteproc cases, enabling the power domain of the core will
start running the core. In such cases image should be loaded before
enabling the power domain. But the current DM framework enables the
power-domain by default during probe. This is causing the remotecore
to start and crash as there is no valid image loaded.

In order to avoid this introduce a DM flag that doesn't allow for
enabling/disabling the power-domain by DM framework.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodm: device: Fix typo in the non-DEVRES version of devm_kmalloc_array()
Jean-Jacques Hiblot [Thu, 26 Sep 2019 13:43:54 +0000 (15:43 +0200)]
dm: device: Fix typo in the non-DEVRES version of devm_kmalloc_array()

When DEVRES is not set, devm_kmalloc_array() is spelled
devm_kmaloc_array() (with one 'l' only).
Fixing it so that the name is the same with and without DEVRES.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agopatman: Use the Change-Id, version, and prefix in the Message-Id
Douglas Anderson [Fri, 27 Sep 2019 16:23:56 +0000 (09:23 -0700)]
patman: Use the Change-Id, version, and prefix in the Message-Id

As per the centithread on ksummit-discuss [1], there are folks who
feel that if a Change-Id is present in a developer's local commit that
said Change-Id could be interesting to include in upstream posts.
Specifically if two commits are posted with the same Change-Id there's
a reasonable chance that they are either the same commit or a newer
version of the same commit.  Specifically this is because that's how
gerrit has trained people to work.

There is much angst about Change-Id in upstream Linux, but one thing
that seems safe and non-controversial is to include the Change-Id as
part of the string of crud that makes up a Message-Id.

Let's give that a try.

In theory (if there is enough adoption) this could help a tool more
reliably find various versions of a commit.  This actually might work
pretty well for U-Boot where (I believe) quite a number of developers
use patman, so there could be critical mass (assuming that enough of
these people also use a git hook that adds Change-Id to their
commits).  I was able to find this git hook by searching for "gerrit
change id git hook" in my favorite search engine.

In theory one could imagine something like this could be integrated
into other tools, possibly even git-send-email.  Getting it into
patman seems like a sane first step, though.

NOTE: this patch is being posted using a patman containing this patch,
so you should be able to see the Message-Id of this patch and see that
it contains my local Change-Id, which ends in 2b9 if you want to
check.

[1] https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2019-August/006739.html

Signed-off-by: Douglas Anderson <dianders@chromium.org>
4 years agocmd: aes: use map_sysmem when accessing memory
Philippe Reynes [Tue, 24 Sep 2019 09:32:29 +0000 (11:32 +0200)]
cmd: aes: use map_sysmem when accessing memory

The aes command used to segfault when accessing memory in sandbox.
The pointer accesses should be mapped.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
4 years agosandbox64: enable command aes
Philippe Reynes [Tue, 24 Sep 2019 09:32:28 +0000 (11:32 +0200)]
sandbox64: enable command aes

This commit add the support of command aes.
Then, it may be used on pytest.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
4 years agosandbox: enable command aes
Philippe Reynes [Tue, 24 Sep 2019 09:32:27 +0000 (11:32 +0200)]
sandbox: enable command aes

This commit enable the command aes on sandbox.
Then, it may be used on pytest.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
4 years agolibfdt: fix typo on comment
Giulio Benetti [Wed, 18 Sep 2019 15:22:13 +0000 (17:22 +0200)]
libfdt: fix typo on comment

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
4 years agorsa: Return immediately if required-key verification fails
Daniele Alessandrelli [Wed, 18 Sep 2019 14:04:54 +0000 (16:04 +0200)]
rsa: Return immediately if required-key verification fails

Currently, if image verification with a required key fails, rsa_verify()
code tries to find another key to verify the FIT image. This however, is
not the intended behavior as the documentation says that required keys
"must be verified for the image / configuration to be considered valid".

This patch fixes the issue by making rsa_verify() return immediately if
the verification of a required key fails.

Signed-off-by: Daniele Alessandrelli <daniele.alessandrelli@gmail.com>
4 years agopytest: vboot: add a test for required key
Philippe Reynes [Wed, 18 Sep 2019 14:04:53 +0000 (16:04 +0200)]
pytest: vboot: add a test for required key

This commit add a test in the vboot test to check that
when a required key is asked, only FIT signed with this
key is used/accepted by u-boot.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
4 years agodm: pinctrl: Skip not associated gpio phandle and rise a warning message
Michael Trimarchi [Tue, 17 Sep 2019 20:06:03 +0000 (22:06 +0200)]
dm: pinctrl: Skip not associated gpio phandle and rise a warning message

Skip not associated gpio phandle let register the other gpios on a group.
We need anyway to send out a warning to the user to fix their uboot-board.dtsi.
Thhe handle id can be found inside the decompiled dtb

dtc -I dtb -O dts -o devicetree.dts spl/u-boot-spl.dtb

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agocore: device: use dev_power_domain_on
Peng Fan [Tue, 17 Sep 2019 09:29:22 +0000 (09:29 +0000)]
core: device: use dev_power_domain_on

When multiple power domains attached to a device, need power on
them all, so use dev_power_domain_on to do that.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agopower: domain: add dev_power_domain_on
Peng Fan [Tue, 17 Sep 2019 09:29:19 +0000 (09:29 +0000)]
power: domain: add dev_power_domain_on

Add this new API to power on multiple domains attached
to a device.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Changed to static inline and added a condition into C file:
Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agodm: spi: Do not assume first SPI bus
Thomas Fitzsimmons [Fri, 6 Sep 2019 11:51:19 +0000 (07:51 -0400)]
dm: spi: Do not assume first SPI bus

When CONFIG_OF_PRIOR_STAGE is enabled, this workaround was needed
before device_bind_common assigned request numbers sequentially in the
absence of aliases.

Signed-off-by: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
4 years agodm: device: Request next sequence number
Thomas Fitzsimmons [Fri, 6 Sep 2019 11:51:18 +0000 (07:51 -0400)]
dm: device: Request next sequence number

For CONFIG_OF_PRIOR_STAGE, in the absence of a device tree alias for a
given device, use the next request number for that type of device.
This allows aliases to be used when they're available, while still
allowing unaliased devices to be probed.

Signed-off-by: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
4 years agotpm2: Don't assume active low reset value
Kayla Theil [Fri, 6 Sep 2019 10:40:45 +0000 (12:40 +0200)]
tpm2: Don't assume active low reset value

The reset function sets the pin to 0 then 1 but if the pin is marked
ACTIVE_LOW in the DT it gets inverted and leaves the TPM in reset.
Let the gpio driver take care of the reset polarity.

Signed-off-by: Kayla Theil <kayla.theil@mixed-mode.de>
4 years agodm: Fix default address cells return value
Matthias Brugger [Thu, 5 Sep 2019 08:48:49 +0000 (10:48 +0200)]
dm: Fix default address cells return value

Default address cells value on the livetree access function
returns the wrong value. Fix this so that the value returned
corresponds to the device tree specification.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
4 years agolibfdt: Allow #size-cells of 0
Matthias Brugger [Thu, 5 Sep 2019 08:48:48 +0000 (10:48 +0200)]
libfdt: Allow #size-cells of 0

The commit "libfdt: fdt_address_cells() and fdt_size_cells()" introduced
a bug as it consolidated code between the helpers for getting
be 0, and is frequently found so in practice for /cpus.  IEEE1275 only
requires implementations to handle 1..4 for #address-cells, although one
could make a case for #address-cells == #size-cells == 0 being used to
represent a bridge with a single port.

While we're there, it's not totally obvious that the existing implicit
cast of a u32 to int will give the correct results according to strict C,
although it does work in practice.  Straighten that up to cast only after
we've made our range checks.

This is based on upstream commit:
b8d6eca ("libfdt: Allow #size-cells of 0")
but misses the test cases,as we don't implement them in U-Boot.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
4 years agolibfdt: return correct value if #size-cells property is not present
Matthias Brugger [Thu, 5 Sep 2019 08:48:47 +0000 (10:48 +0200)]
libfdt: return correct value if #size-cells property is not present

According to the device tree specification, the default value for
was not present.

This patch also makes fdt_address_cells() and fdt_size_cells() conform
to the behaviour documented in libfdt.h. The defaults are only returned
if fdt_getprop() returns -FDT_ERR_NOTFOUND, otherwise the actual error
is returned.

This is based on upstream commit:
aa7254d ("libfdt: return correct value if #size-cells property is not present")
but misses the test case part, as we don't implement them in U-Boot.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
4 years agolibfdt: fdt_address_cells() and fdt_size_cells()
Matthias Brugger [Thu, 5 Sep 2019 08:48:46 +0000 (10:48 +0200)]
libfdt: fdt_address_cells() and fdt_size_cells()

Add internal fdt_cells() to avoid copy and paste. Fix typo in
fdt_size_cells() documentation comment.

This is based in upstream commit:
c12b2b0 ("libfdt: fdt_address_cells() and fdt_size_cells()")
but misses the test cases, as we don't implement them in U-Boot.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agosandbox: fix cpu property in test.dts for pytest
AKASHI Takahiro [Tue, 27 Aug 2019 08:17:03 +0000 (17:17 +0900)]
sandbox: fix cpu property in test.dts for pytest

When I tried to run some new efi tests with pytest, efi_smbios_register()
triggered a segmentation fault. Here is the location where it happened:
efi_init_obj_list()
  efi_smbios_register()
    write_smbios_table()
      smbios_write_type4()
        smbios_write_type4_dm()

where dev_get_parent_platdata() should return a pointer to struct
cpu_platdata, but it is actually NULL because any cpu device on
sandbox is attached to "root_driver."

With this patch, this issue will be fixed by moving all the definitions
of cpus under "cpus" node so that they have a "cpu_bus" parent.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodoc: add full path to patman README
Ralph Siemsen [Mon, 19 Aug 2019 19:00:30 +0000 (15:00 -0400)]
doc: add full path to patman README

Make it a little easier to find the documentation.

Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodm: pinctrl: introduce PINCONF_RECURSIVE option
Patrick Delaunay [Fri, 2 Aug 2019 12:48:00 +0000 (14:48 +0200)]
dm: pinctrl: introduce PINCONF_RECURSIVE option

In the Linux pinctrl binding, the pin configuration nodes don't need to
be direct children of the pin controller device (may be grandchildren for
example). This behavior is managed with the pinconfig u-class which
recursively bind all the sub-node of the pin controller.

But for some binding (when pin configuration is only children of pin
controller) that is not necessary. U-Boot can save memory and reduce
the number of pinconf instance when this feature is deactivated
(for arch stm32mp for example for SPL).

This patch allows to control this feature with a new option
CONFIG_PINCONF_RECURSIVE when it is possible for each individual
pin controller device.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Drop comment-out code in testUpdateFdtOutput()
Simon Glass [Sat, 24 Aug 2019 13:23:14 +0000 (07:23 -0600)]
binman: Drop comment-out code in testUpdateFdtOutput()

This code is not needed so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Add logging for the number of pack passes
Simon Glass [Sat, 24 Aug 2019 13:23:13 +0000 (07:23 -0600)]
binman: Add logging for the number of pack passes

Sometimes binman takes multiple passes to complete packing an image. Add
logging to indicate this.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Write symbol info before image inclusion
Simon Glass [Sat, 24 Aug 2019 13:23:12 +0000 (07:23 -0600)]
binman: Write symbol info before image inclusion

At present the symbol information is written to binaries just before
binman exits. This is fine for entries within sections since the section
contents is calculated when it is needed, so the updated symbol values are
included in the image that is written.

However some binaries are inside entries which have already generated
their contents and do not notice that the entries have changed (e.g. Intel
IFWI).

Move the symbol writing earlier to cope with this.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Support writing symbols into entries within an IFWI
Simon Glass [Sat, 24 Aug 2019 13:23:11 +0000 (07:23 -0600)]
binman: Support writing symbols into entries within an IFWI

The Intel IFWI (Integrated Firmware Image) is effectively a section with
other entries inside it. Support writing symbol information into entries
within it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Update IFWI entry to support updates
Simon Glass [Sat, 24 Aug 2019 13:23:10 +0000 (07:23 -0600)]
binman: Update IFWI entry to support updates

Add support for the ProcessContents() method in this entry so that it is
possible to support entries which change after initial creation.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Update IFWI entry to read entries outside constructor
Simon Glass [Sat, 24 Aug 2019 13:23:09 +0000 (07:23 -0600)]
binman: Update IFWI entry to read entries outside constructor

At present this class reads its entries in the constructor. This is not
how things should be done now. Update it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Fix entry comment for Intel descriptor
Simon Glass [Sat, 24 Aug 2019 13:23:08 +0000 (07:23 -0600)]
binman: Fix entry comment for Intel descriptor

This comment references another entry type. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Add support for Intel FSP meminit
Simon Glass [Sat, 24 Aug 2019 13:23:07 +0000 (07:23 -0600)]
binman: Add support for Intel FSP meminit

The Intel FSP supports initialising memory early during boot using a binary
blob called 'fspm'. Add support for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Allow support for writing a size symbol to binaries
Simon Glass [Sat, 24 Aug 2019 13:23:05 +0000 (07:23 -0600)]
binman: Allow support for writing a size symbol to binaries

It is useful to be able to access the size of an image in SPL, with
something like:

binman_sym_declare(unsigned long, u_boot_any, size);

...
   ulong u_boot_size = binman_sym(ulong, u_boot_any, size);

Add support for this and update the tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Increase size of TPL and SPL test data
Simon Glass [Sat, 24 Aug 2019 13:23:04 +0000 (07:23 -0600)]
binman: Increase size of TPL and SPL test data

At present these are large enough to hold 20 bytes of symbol data. Add
four more bytes so we can add another test.

Unfortunately at present this involves changing a few test files to make
room. We could adjust the test files to not specify sizes for entries.
Then we could make the tests check the actual sizes. But for now, leave it
as it is, since the effort is minor.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Avoid needing the section size in advance
Simon Glass [Sat, 24 Aug 2019 13:23:03 +0000 (07:23 -0600)]
binman: Avoid needing the section size in advance

Entries which include a section and need to obtain its contents call
GetData(), as with any other entry. But the current implementation of this
method in entry_Section requires the size of the section to be known. If
it is unknown, an error is produced, since size is None:

   TypeError: can't multiply sequence by non-int of type 'NoneType'

There is no need to know the size in advance since the code can be
adjusted to build up the section piece by piece, instead of patching each
entry into an existing bytearray.

Update the code to handle this and add a test.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Rename some two-digit test files
Simon Glass [Sat, 24 Aug 2019 13:23:02 +0000 (07:23 -0600)]
binman: Rename some two-digit test files

Two of the test files somehow were not converted to three digits. Fix
them, using the next available numbers.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Use underscore in test filenames
Simon Glass [Sat, 24 Aug 2019 13:23:01 +0000 (07:23 -0600)]
binman: Use underscore in test filenames

At present a small number of test files use hyphens instead of
underscores. Rename them for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Allow symbols to be resolved inside sections
Simon Glass [Sat, 24 Aug 2019 13:23:00 +0000 (07:23 -0600)]
binman: Allow symbols to be resolved inside sections

At present we only support symbols inside binaries which are at the top
level of an image. This restrictions seems unreasonable since more complex
images may want to group binaries within different sections.

Relax the restriction, adding a new _SetupTplElf() helper function.

Also fix a typo in the comment for testTpl().

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Clean up unnecessary code related to ELF test files
Simon Glass [Sat, 24 Aug 2019 13:22:59 +0000 (07:22 -0600)]
binman: Clean up unnecessary code related to ELF test files

We use the Makefile for all ELF test files now, so drop all the code that
checks whether to get the test file from the Makefile or from the git
repo.

Also add a comment to the Makefile indicating that it is run from binman.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Use the Makefile for u_boot_binman_syms_bad
Simon Glass [Sat, 24 Aug 2019 13:22:58 +0000 (07:22 -0600)]
binman: Use the Makefile for u_boot_binman_syms_bad

Remove this file from git and instead build it using the Makefile.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Use the Makefile for u_boot_binman_syms_size
Simon Glass [Sat, 24 Aug 2019 13:22:57 +0000 (07:22 -0600)]
binman: Use the Makefile for u_boot_binman_syms_size

Remove this file from git and instead build it using the Makefile.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Use the Makefile for u_boot_binman_syms
Simon Glass [Sat, 24 Aug 2019 13:22:56 +0000 (07:22 -0600)]
binman: Use the Makefile for u_boot_binman_syms

Remove this file from git and instead build it using the Makefile.

With this change a few things need to be adjusted:

1. The 'notes' section no-longer appears at the start of the ELF file
(before the code), so update testSymbols to adjust the offsets.

2. The dynamic linker is disabled to avoid errors like:

    "Not enough room for program headers, try linking with -N"

3. The interpreter note is moved to the end of the image, so that the
binman symbols appear first.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Use the Makefile for u_boot_no_ucode_ptr
Simon Glass [Sat, 24 Aug 2019 13:22:55 +0000 (07:22 -0600)]
binman: Use the Makefile for u_boot_no_ucode_ptr

Remove this file from git and instead build it using the Makefile.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Use the Makefile for u_boot_ucode_ptr
Simon Glass [Sat, 24 Aug 2019 13:22:54 +0000 (07:22 -0600)]
binman: Use the Makefile for u_boot_ucode_ptr

Remove this file from git and instead build it using the Makefile.

Update tools.GetInputFilename() to support reading files from an absolute
path, so that we can read the Elf test files easily. Also make sure that
the temp directory is report in ELF tests as this was commented out.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Use the Makefile to build ELF test files
Simon Glass [Sat, 24 Aug 2019 13:22:53 +0000 (07:22 -0600)]
binman: Use the Makefile to build ELF test files

At present the ELF test files are checked into the U-Boot tree. This is
covenient since the files never change and can be used on non-x86
platforms. However it is not good practice to check in binaries and in
this case it does not seem essential.

Update the binman test-file Makefile to support having source in a
different directory. Adjust binman to run it to build bss_data, as a
start. We can add other files as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Use tools.Run() to run objdump
Simon Glass [Sat, 24 Aug 2019 13:22:52 +0000 (07:22 -0600)]
binman: Use tools.Run() to run objdump

At present this command silently fails if something goes wrong. Use the
tools.Run() function instead, since it reports errors.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Fix IFWI output when using an Intel FIT image
Simon Glass [Sat, 24 Aug 2019 13:22:51 +0000 (07:22 -0600)]
binman: Fix IFWI output when using an Intel FIT image

At present this entry does not work correctly when a FIT image is used as
the input. It updates the FIT instead of the output image. The test passed
because the FIT image happened to have the right data already.

Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Add support for Intel FIT
Simon Glass [Sat, 24 Aug 2019 13:22:50 +0000 (07:22 -0600)]
binman: Add support for Intel FIT

A Firmware Image Table (FIT) is a data structure defined by Intel which
contains information about various things needed by the SoC, such as
microcode.

Add support for this entry as well as the pointer to it. The contents of
FIT are fixed at present. Future work is needed to support adding
microcode, etc.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: x86: Separate out 16-bit reset and init code
Simon Glass [Sat, 24 Aug 2019 13:22:49 +0000 (07:22 -0600)]
binman: x86: Separate out 16-bit reset and init code

At present these two sections of code are linked together into a single
2KB chunk in a single file. Some Intel SoCs like to have a FIT (Firmware
Interface Table) in the ROM and the pointer for this needs to go at
0xffffffc0 which is in the middle of these two sections.

Make use of the new 'reset' entry and change the existing 16-bit entry to
include just the 16-bit data.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Add support for an x86 'reset' section
Simon Glass [Sat, 24 Aug 2019 13:22:48 +0000 (07:22 -0600)]
binman: Add support for an x86 'reset' section

At present binman has a single entry type for the 16-bit code code needed
to start up an x86 processor. This entry is intended to include both the
reset vector itself as well as the code to move to 32-bit mode.

However this is not very flexible since in some cases other data needs to
be included at the top of the SPI flash, in between these two pieces. For
example Intel requires that a FIT (Firmware Image Table) pointer be placed
0x40 bytes before the end of the ROM.

To deal with this, add a new reset entry for just the reset vector. A
subsequent change will adjust the existing 'start16' entry.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Correct use of 'replace' in IFWI tests
Simon Glass [Sat, 24 Aug 2019 13:22:47 +0000 (07:22 -0600)]
binman: Correct use of 'replace' in IFWI tests

At present the Intel IFWI entry uses 'replace' without the 'ifwi-' prefix.
This is a fairly generic name which might conflict with the main Entry
base class at some point, if more features are added. Add a prefix.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Handle hidden symbols in ELF files
Simon Glass [Sat, 24 Aug 2019 13:22:46 +0000 (07:22 -0600)]
binman: Handle hidden symbols in ELF files

Some versions of binutils generate hidden symbols which are currently not
parsed by binman. Correct this.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Drop .note section from ELF
Simon Glass [Sat, 24 Aug 2019 13:22:45 +0000 (07:22 -0600)]
binman: Drop .note section from ELF

Recent versions of binutils add a '.note.gnu.property' into the ELF file.
This is not required and interferes with the expected output. Drop it.

Also fix testMakeElf() to use a different file for input and output.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobinman: Allow use of help and entry-docs without libfdt
Simon Glass [Sat, 24 Aug 2019 13:22:44 +0000 (07:22 -0600)]
binman: Allow use of help and entry-docs without libfdt

At present if libfdt is not available binman can't do anything much.
Improve the situation a little.

Ideally there should be a test to cover this, but I'm not quite sure how
to fake this.

Signed-off-by: Simon Glass <sjg@chromium.org>
(fixed up missing ReadChildData() enty test)

4 years agobinman: Use cls instead of self for class methods
Simon Glass [Sat, 24 Aug 2019 13:22:43 +0000 (07:22 -0600)]
binman: Use cls instead of self for class methods

It is more common to use the name 'cls' for the class object of a class
method, to distinguish it from normal methods, which use 'self' Update the
binman tests accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agopatman: Update command.Run() to handle failure better
Simon Glass [Sat, 24 Aug 2019 13:22:42 +0000 (07:22 -0600)]
patman: Update command.Run() to handle failure better

At present tools are not expected to fail. If they do an exception is
raised but there is no detail about what went wrong. This makes it hard
to debug if something does actually go wrong.

Fix this by outputting both stderr and stdout on failure.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agopatman: Drop binary parameter
Simon Glass [Sat, 24 Aug 2019 13:22:41 +0000 (07:22 -0600)]
patman: Drop binary parameter

Since cros_subprocess use bytestrings now, this feature not needed. Drop
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoimage: android: Support boot image v1 and v2
Sam Protsenko [Thu, 15 Aug 2019 17:25:07 +0000 (20:25 +0300)]
image: android: Support boot image v1 and v2

In new versions of Android Boot Image next fields are added to the
header (and corresponding payloads are added to the image itself):
  - v1: Recovery DTBO
  - v2: DTB

Account for these new fields in next functions:
  1. android_image_get_end(): as v1 and v2 have new payloads in the
     image, the calculation of image end address should be extended
     correspondingly; this is used e.g. by "bootm" command when booting
     the kernel from Android Boot Image
  2. android_print_contents(): new fields values in v1 and v2 should be
     printed; the result of this function can be seen e.g. in "iminfo"
     command

This commit doesn't add the means for working with new payloads in v1
and v2 images (it will be done in further commits), it only updates
existing functions w.r.t. changes in boot image v1/v2.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
4 years agoimage: android: Fix possible build errors
Sam Protsenko [Fri, 9 Aug 2019 12:31:29 +0000 (15:31 +0300)]
image: android: Fix possible build errors

As android_image.h uses types like u32, we need to include corresponding
headers in place. Otherwise the user will be forced to include those in
C file, or next build error can occur:

    include/android_image.h:32:5: error: unknown type name 'u32'
         u32 kernel_size; /* size in bytes */

Include required headers for data types used. While at it, remove
typedef struct, which is prohibited by kernel coding style, and fix the
comment.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
4 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Tue, 15 Oct 2019 01:00:10 +0000 (21:00 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

- vining_fpga updates

4 years agoMerge tag 'u-boot-imx-20191014' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Mon, 14 Oct 2019 17:00:51 +0000 (13:00 -0400)]
Merge tag 'u-boot-imx-20191014' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

u-boot-imx-20191014
-------------------

Travis: https://travis-ci.org/sbabic/u-boot-imx/builds/597498628

- logicpd pinmux
- i.MX7ULP: imx_ddr_size
- fixes Toradex i.MX6/i.MX7
- pico-imx7d
- tpc70 converted to DM
- New Board: meerkat96
- add HAB version command
- i.MX8 :
       imx8: Jump from alias to OCRAM address at SPL init
       imx8qm/qxp: Set SPL TEXT base to OCRAM base

4 years agoMerge tag 'video-for-2020.01' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Mon, 14 Oct 2019 11:30:16 +0000 (07:30 -0400)]
Merge tag 'video-for-2020.01' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

- panel bridge support in stm32 ltdc
- DSI host uclass
- sandbox DSI host uclass test driver and DSI host test
- MIPI DSI helpers
- Synopsys Designware MIPI DSI host bridge driver
- STM32 DSI controller driver
- OTM800A and RM68200 panel support
- DSI host updates for stm32f769 and stm32mp1 dtsi files
- splash screen for stm32f769 and stm32mp1 boards
- stm32 defconfig updates for display support

4 years agoMerge tag 'mmc-10-10-2019' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Mon, 14 Oct 2019 11:28:32 +0000 (07:28 -0400)]
Merge tag 'mmc-10-10-2019' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc

- Add sdhci driver for Broadcom iProc platform
- Add a driver callback for power-cycle for mmc
- Implement host_power_cycle callback for stm32_sdmmc2
- spl: dm_mmc: Initialize only the required mmc device

4 years agoi2c: imx_lpi2c: add ipg clk
Peng Fan [Wed, 24 Jul 2019 08:54:16 +0000 (08:54 +0000)]
i2c: imx_lpi2c: add ipg clk

The controller needs two clk, per clk and ipg clk,
so let's add ipg clk.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx :hab: Add hab version command
Sjoerd Simons [Tue, 18 Jun 2019 21:08:59 +0000 (23:08 +0200)]
imx :hab: Add hab version command

THe RVT data includes a major and minor version in its header
parameter. Add a new command to print this out.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
4 years agoimx: imx8mm_evk: add board_mmc_get_env_dev
Peng Fan [Wed, 9 Oct 2019 03:08:17 +0000 (03:08 +0000)]
imx: imx8mm_evk: add board_mmc_get_env_dev

Add board_mmc_get_env_dev to correctly return devno for mmc env

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agomx7ulp_evk: Use imx_ddr_size()
Fabio Estevam [Thu, 18 Jul 2019 18:04:25 +0000 (15:04 -0300)]
mx7ulp_evk: Use imx_ddr_size()

Use imx_ddr_size() to retrieve the total DDR size instead
of passing a hardcoded memory size.

imx_ddr_size() calculates the memory size based on the actual
MMDC registers values and is useful to detect misconfigurations,
so switch to this more robust approach.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx: mmdc_size: Allow building it for i.MX7ULP
Fabio Estevam [Thu, 18 Jul 2019 18:04:24 +0000 (15:04 -0300)]
imx: mmdc_size: Allow building it for i.MX7ULP

i.MX7ULP uses the same MMDC controller IP as found on i.MX53
and i.MX6, so build mmdc_size.c for i.MX7ULP as well.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx: mmdc_size: Fix checkpatch warnings
Fabio Estevam [Thu, 18 Jul 2019 18:04:23 +0000 (15:04 -0300)]
imx: mmdc_size: Fix checkpatch warnings

The original imx_ddr_size() implementation had some
issues reported by checkpatch like this:

CHECK: Prefer kernel type 'u32' over 'uint32_t'
#127: FILE: arch/arm/mach-imx/mmdc_size.c:16:
+ uint32_t ctl;

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
#151: FILE: arch/arm/mach-imx/mmdc_size.c:40:
+ unsigned ctl = readl(&mem->ctl);

Fix all of them.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx: Place imx_ddr_size() into a separate file
Fabio Estevam [Thu, 18 Jul 2019 18:04:22 +0000 (15:04 -0300)]
imx: Place imx_ddr_size() into a separate file

Place imx_ddr_size() into a separate file.

The motivation for doing this is to be able to easily reuse
imx_ddr_size() on i.MX7ULP.

Currently imx_ddr_size() is inside arch/arm/mach-imx/cpu.c, which
is not built for i.MX7ULP.

Changing the logic to allow building cpu.c for i.MX7UP would
require adding several ifdef's, leading to a not a very elegant
solution.

To allow better reuse, just place imx_ddr_size() into a common
mmdc_size.c file.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
4 years agostm32mp1: configs: add display devices
Yannick Fertré [Mon, 7 Oct 2019 13:29:15 +0000 (15:29 +0200)]
stm32mp1: configs: add display devices

Add support of panels otm8009A, RM68200 & DSI controller.
Limit resolution to 1280x800.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
4 years agostm32mp1: configs: update video
Yannick Fertré [Mon, 7 Oct 2019 13:29:14 +0000 (15:29 +0200)]
stm32mp1: configs: update video

Update video configs to support bitmap 16bpp, 24bpp,
32bpp & RLE8.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
4 years agoARM: dts: stm32mp1: add dsi host for stm32mp157c-dk2 board
Yannick Fertré [Mon, 7 Oct 2019 13:29:13 +0000 (15:29 +0200)]
ARM: dts: stm32mp1: add dsi host for stm32mp157c-dk2 board

The new class dsi host allows the management of the bridge DPI to DSI.
This bridge is embedded in the chipset mp1 (come from synopsys company).

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
4 years agoARM: dts: stm32mp1: add dsi host for stm32mp157c-ev1 board
Yannick Fertré [Mon, 7 Oct 2019 13:29:12 +0000 (15:29 +0200)]
ARM: dts: stm32mp1: add dsi host for stm32mp157c-ev1 board

The new class dsi host allows the management of the bridge DPI to DSI.
This bridge is embedded in the chipset mp1 (come from synopsys company).

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
4 years agoARM: dts: stm32f769: add display for STM32F769 disco board
Yannick Fertré [Mon, 7 Oct 2019 13:29:11 +0000 (15:29 +0200)]
ARM: dts: stm32f769: add display for STM32F769 disco board

Enable the display controller, mipi dsi bridge & panel.
Set panel display timings.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
4 years agoboard: Add STM32F769 SoC, discovery board support
Yannick Fertré [Mon, 7 Oct 2019 13:29:10 +0000 (15:29 +0200)]
board: Add STM32F769 SoC, discovery board support

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
4 years agovideo: add support of panel RM68200
Yannick Fertré [Mon, 7 Oct 2019 13:29:09 +0000 (15:29 +0200)]
video: add support of panel RM68200

Support for Raydium RM68200 720p dsi 2dl video mode panel.
This rm68200 panel driver is based on the Linux Kernel driver from
drivers/gpu/drm/panel/panel-raydium-rm68200.c.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
4 years agovideo: add support of panel OTM8009A
Yannick Fertré [Mon, 7 Oct 2019 13:29:08 +0000 (15:29 +0200)]
video: add support of panel OTM8009A

Support for Orise Tech otm8009a 480p dsi 2dl video mode panel.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
4 years agovideo: add support of STM32 MIPI DSI controller driver
Yannick Fertré [Mon, 7 Oct 2019 13:29:07 +0000 (15:29 +0200)]
video: add support of STM32 MIPI DSI controller driver

Add the STM32 DSI controller driver that uses the Synopsys DesignWare
MIPI DSI host controller bridge.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
4 years agovideo: add MIPI DSI host controller bridge
Yannick Fertré [Mon, 7 Oct 2019 13:29:06 +0000 (15:29 +0200)]
video: add MIPI DSI host controller bridge

Add a Synopsys Designware MIPI DSI host bridge driver, based on the
Rockchip version from rockchip/dw-mipi-dsi.c with phy & bridge APIs.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
4 years agodm: Add a dsi host uclass
Yannick Fertré [Mon, 7 Oct 2019 13:29:05 +0000 (15:29 +0200)]
dm: Add a dsi host uclass

Display Serial Interface (DSI) host can usefully be modelled
as their own uclass.
DSI defines a serial bus and a communication protocol
between the host and the device (panel, bridge).

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
4 years agoconfigs: icorem6: Enable nandbcb command
Shyam Saini [Fri, 14 Jun 2019 07:35:34 +0000 (13:05 +0530)]
configs: icorem6: Enable nandbcb command

This also enables mtd configs which are required by nandbcb command.

This command would be used to configure boot control block(BCB) while
writing spl image on nand device.

Signed-off-by: Shyam Saini <shyam.saini@amarulasolutions.com>
4 years agocolibri_imx7: provide proper node name to pmic_get
Igor Opaniuk [Mon, 22 Jul 2019 09:05:06 +0000 (12:05 +0300)]
colibri_imx7: provide proper node name to pmic_get

Implementation of pmic_get() uses uclass_find_device_by_name(), which
behaviour was changed in 4213609cc7
("drivers: core: use strcmp when find device by name"). Now we have to
supply full node name with unit address.

Fixes boot issue:
U-Boot 2019.07-00788-g0ef6e69a1e-dirty (Jul 19 2019 - 15:27:02 +0300)

CPU:   Freescale i.MX7D rev1.3 1000 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 41C
Reset cause: POR
DRAM:  512 MiB
initcall sequence 9ffd3a4c failed at call 87803c61 (err=-19)
ERROR Please RESET the board

Fixes: 4213609cc7("drivers: core: use strcmp when find device by name")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
4 years agospl, Makefile: Take external offset into account for fit images
Sjoerd Simons [Tue, 18 Jun 2019 20:13:20 +0000 (22:13 +0200)]
spl, Makefile: Take external offset into account for fit images

When building a FIT image for SPL to load also take into account the
configured external offset. This allows the SPL to load the u-boot FIT
image correctly when configuring SECURE_BOOT on i.mx6 is enabled
(with CONFIG_FIT_EXTERNAL_OFFSET=0x3000).

Note this doesn't allow secure booting; but it does allow an unsigned
SPL/u-boot with secure boot support eanbled to boot on open device.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
4 years agocolibri_imx7: remove legacy sdboot wrapper
Igor Opaniuk [Fri, 11 Oct 2019 09:57:09 +0000 (12:57 +0300)]
colibri_imx7: remove legacy sdboot wrapper

Remove legacy sdboot wrapper as distroboot can be used instead.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri_imx6: remove legacy sdboot wrapper
Igor Opaniuk [Fri, 11 Oct 2019 09:57:08 +0000 (12:57 +0300)]
colibri_imx6: remove legacy sdboot wrapper

Remove legacy sdboot wrapper as distroboot can be used instead.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>