Simon Glass [Thu, 21 Jan 2021 20:57:15 +0000 (13:57 -0700)]
Add a symlink for ctype.h
Libraries that link with U-Boot typically may expect to be able to include
ctype.h but this file is in a different place in U-Boot. Add a symlink to
make this work.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 21 Jan 2021 20:57:14 +0000 (13:57 -0700)]
dm: core: Update ofnode_read_fmap_entry() to read hashes
At present this function uses the old format for reading hashes. Add
support for the current format.
Add a test while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 21 Jan 2021 20:57:13 +0000 (13:57 -0700)]
dm: core: Add a comment about pinctrl_select_state()
The use of pinctrl in the core of driver model is useful but can provoke
some strange behaviour. Add a comment to aid debugging.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 21 Jan 2021 20:57:12 +0000 (13:57 -0700)]
clk: x86: Correct the driver name
The current driver name does not match its compatible string, so
of-platdata does not work correctly. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 21 Jan 2021 20:57:11 +0000 (13:57 -0700)]
clk: Add debugging for return values
Use the log_msg_ret() mechanism to get error-return information when
clocks fail to probe, etc.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 21 Jan 2021 20:57:10 +0000 (13:57 -0700)]
dm: core: Don't inline dev_read...() calls with of-platdata
At present if these calls are used with of-platdata, a confusing error is
produced, referring to a function not actually called by the code causing
the problem.
Fix this by not inlining, so that the error mentions the dev_read_...()
function and it is more obvious what is going on.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 21 Jan 2021 20:57:09 +0000 (13:57 -0700)]
sandbox: Disable I2C emulators in SPL
These cannot work with of-platdata since they currently need the
devicetree at runtime. Disable the emulators and the sandbox I2C driver
that needs them. We can enable these later, if needed for testing.
Switch the of_plat_parent test over to use a simple bus instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Simon Glass [Thu, 21 Jan 2021 20:57:08 +0000 (13:57 -0700)]
i2c: desigware: Add an alias for Intel Apollo Lake
Add an alias so that this driver can be used in TPL on coral.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Simon Glass [Thu, 21 Jan 2021 20:57:07 +0000 (13:57 -0700)]
x86: coral: Support TPM and RTC in SPL
Update the devicetree so that the TPM and RTC can be used in SPL. Also
enable the pins used for getting the memory configuration settings while
we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 21 Jan 2021 20:57:06 +0000 (13:57 -0700)]
spl: Tidy up SPL/TPL malloc sizes
The current help talks about relocation which doesn't apply to SPL and
TPL. Update it to avoid confusion.
Also make the TPL size default to the same as the SPL size, since this is
more likely to be a useful value than the one used by U-Boot proper, which
may be quite a bit larger.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 16 Jan 2021 21:52:31 +0000 (14:52 -0700)]
cros_ec: Add vstore support
The EC can store small amounts of data for the benefit of the
verified boot process. Since the EC is seldom reset, this can allow the
AP to store data that survives a reboot or a suspend/resume cycle.
Add support for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 16 Jan 2021 21:52:30 +0000 (14:52 -0700)]
cros_ec: Allow use with of-platdata
Avoid reading the device tree when of-platdata is in use.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 16 Jan 2021 21:52:29 +0000 (14:52 -0700)]
cros_ec: Show events in human-readable form
Add a command to show the current events as a list of names. This is
easier to decipher than a bit mask.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 16 Jan 2021 21:52:28 +0000 (14:52 -0700)]
cros_ec: Add support for switches
On x86 platforms the EC provides a way to read 'switches', which are
on/off values determined by the EC.
Add a new driver method for this and implement it for LPC.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 16 Jan 2021 21:52:27 +0000 (14:52 -0700)]
cros_ec: Add documentation for cros_ec driver operations
Add comments to these methods so it is documented in this central place,
not just in each driver.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 16 Jan 2021 21:52:26 +0000 (14:52 -0700)]
cros_ec: Support reading EC features
The EC can support a variety of features and provides a way to find out
what is available. Add support for this.
Also update the feature list to the lastest available while we are here.
This is at:
https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/master/include/ec_commands.h
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 16 Jan 2021 21:52:25 +0000 (14:52 -0700)]
cros_ec: Add support for reading the SKU ID
This allows reading strapping pins attached to the EC. Add an
implementation for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 16 Jan 2021 21:52:24 +0000 (14:52 -0700)]
cros_ec: Add run-time check for input buffer overflow
This should not happen in normal operation, but the EC might have a bug,
so add a run-time check just in case.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 16 Jan 2021 21:52:23 +0000 (14:52 -0700)]
cros_ec: Tidy up a few delays
Allow a longer time for the EC to reboot. Also use a constant for the
hash delay time, so it is clear what it is for.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 16 Jan 2021 21:52:22 +0000 (14:52 -0700)]
cros_ec: Add a function for the hello message
This is used several times in this file. Put it in a function to avoid
code duplication.
Also add a test for this function. There are no cros_ec tests at present,
so it is time to update the code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Wed, 30 Dec 2020 17:10:24 +0000 (18:10 +0100)]
doc/sandbox: improve formatting of command line options
Show the command line options in bold.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Fri, 25 Dec 2020 15:04:26 +0000 (16:04 +0100)]
sandbox: fix sandbox_cmdline_cb_test_fdt()
fmt does not foresee any parameter.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Tue, 22 Dec 2020 06:53:03 +0000 (07:53 +0100)]
x86: typo segement
%s/segement/segment/
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Thu, 7 Jan 2021 04:35:19 +0000 (21:35 -0700)]
binman: Allow for skip_at_start when reading entries
The offset of an entry needs to be adjusted by its skip-at-start value.
This is currently missing when reading entry data. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 7 Jan 2021 04:35:18 +0000 (21:35 -0700)]
binman: Support alignment of files
When packing files it is sometimes useful to align the start of each file,
e.g. if the flash driver can only access 32-bit-aligned data. Provides a
new property to support this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 7 Jan 2021 04:35:17 +0000 (21:35 -0700)]
binman: Allow vblock to include devicetree blobs
At present if a devicetree blob is included in a vblock it does not deal
with updates. This is because the vblock is created once at the start and
does not have a method to update itself later, after all the entry
contents are finalised.
Fix this by adjusting how the vblock is created.
Also simplify Image.ProcessEntryContents() since it effectively duplicates
the code in Section.ProcessContents().
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 7 Jan 2021 04:35:16 +0000 (21:35 -0700)]
binman: Support reading an image with entry args
Normally when an entry is created, any entry arguments it has are required
to be provided, so it can actually generate its contents correctly.
However when an existing image is read, Entry objects are created for each
of the entries in the image. This happens as part of the process of
reading the image into binman.
In this case we don't need the entry arguments, since we do not intend to
regenerate the entries, or at least not unless requested. So there is no
sense in reporting an error for missing entry arguments.
Add a new property for the Image to handle this case. Update the error
reporting to be conditional on this property.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 7 Jan 2021 04:35:15 +0000 (21:35 -0700)]
binman: Support finding symbols in sub-sections
At present binman only supports resolving symbols in the same section as
the binary that uses it. This is quite limited because we often need to
group entries into different sections.
Enhance the algorithm to search the entire image for symbols.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 7 Jan 2021 04:35:14 +0000 (21:35 -0700)]
binman: Fix a few file comments
Two files have the wrong comment at the top of them. Fix this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 7 Jan 2021 04:35:13 +0000 (21:35 -0700)]
binman: Show the size when writing entries
Update the log output to show the size, since this is useful information.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 7 Jan 2021 04:35:12 +0000 (21:35 -0700)]
binman: Update the TODO list
Two of the items have been completed and I thought of another one. Update
the list.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 7 Jan 2021 04:35:11 +0000 (21:35 -0700)]
patman: Correct lz4 compression parameters
At present on large files, lz4 uses a larger block size (e.g. 256KB) than
the 64KB supported by the U-Boot decompression implementation. Also it is
optimised for maximum compression speed, producing larger output than we
would like.
Update the parameters to correct these problems.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 7 Jan 2021 04:35:10 +0000 (21:35 -0700)]
dtoc: binman: Drop Python 2 code
Drop a few more Python 2 relics that are no-longer needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 31 Dec 2020 16:52:16 +0000 (09:52 -0700)]
x86: coral: Enable CONFIG_BOOTARGS_SUBST
Enable this option so that the boot-script substitutions of %U works as
expected. With this, it can boot into Chrome OS.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 31 Dec 2020 16:52:15 +0000 (09:52 -0700)]
x86: coral: Update an unused pin to reduce power
GPIO_25 is not used on coral, so set it up in deep sleep.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 31 Dec 2020 16:52:14 +0000 (09:52 -0700)]
tpm: cr50: Rename driver to work with of-platdata
Update the driver name to match the compatible string, so it can work
with of-platdata.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 31 Dec 2020 16:52:13 +0000 (09:52 -0700)]
tpm: cr50: Add a better description and more debug
Update the TPM description to include the interrupt mechanicm since this
is useful to know. Also add a warning if the TPM cannot be found and a
debug line if it succeeds.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 31 Dec 2020 16:52:12 +0000 (09:52 -0700)]
tpm: cr50: Check for valid locality
When the Cr50 starts up it doesn't have a valid locality. The driver sets
it to -1 to indicate that. Tracking this allows cr50_i2c_cleanup() to
avoid releasing a locality that was not claimed.
However the helper functions that generate the flags use a u8 type which
cannot support -1, so they return a locality of 0xff.
Fix this by updating the type. With this, 'tpm startup TPM2_SU_CLEAR'
works as expected.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tom Rini [Fri, 29 Jan 2021 18:56:04 +0000 (13:56 -0500)]
configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 29 Jan 2021 18:50:06 +0000 (13:50 -0500)]
Merge branch '2021-01-29-assorted-fixes'
- Assorted test fixes
- Assorted minor FAT fixes
- Assorted Kconfig dependency fixes
- MediaTek, vexpress_aemv8a improvements
- Other assorted minor fixes
Heinrich Schuchardt [Tue, 19 Jan 2021 19:44:45 +0000 (19:44 +0000)]
cmd: add more implementation IDs to sbi command
Additional SBI implementation IDs have been added to the upcoming
next version of the SBI specification.
https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Sun, 17 Jan 2021 23:17:34 +0000 (00:17 +0100)]
test: inconsistent string tests
Excluding ut str in test/cmd_ut.c but compiling test/str_ut.c results in
failure of the Python test invoking the C unit tests as observed on
sipeed_riscv_smode_defconfig:
FAILED test/py/tests/test_ut.py::test_ut[ut_str_upper]
Allow to compile test/str_ut.c on all boards.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Sun, 17 Jan 2021 23:17:33 +0000 (00:17 +0100)]
test: inconsistent bootm tests
Excluding ut bootm in test/cmd_ut.c but compiling test/bootm.c results in
failure of the Python test invoking the C unit tests as observed on
sipeed_riscv_smode_defconfig:
FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_nop]
FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_nospace]
FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_silent]
FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_silent_var]
FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_subst]
FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_subst_both]
FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_subst_var]
Only compile test/bootm.c on the sandbox.
Fixes:
f158ba15ee0f ("bootm: Add tests for fixup_silent_linux()")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Patrick Delaunay [Mon, 4 Jan 2021 13:41:31 +0000 (14:41 +0100)]
env: sf: cosmetic: remove unnecessary space
Remove the unnecessary space before the 2 "done:" labels
in env_sf_save().
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Tom Rini [Thu, 28 Jan 2021 19:39:56 +0000 (14:39 -0500)]
test: Update test_fs to not use deprecated pytest.yield_fixture()
As noted in comments, yield_fixture has been deprecated for longer than
our minimum required version of pytest. Newer versions of pytest cause
this to be a louder warning, and as the migration is trivial, perform it
now.
Signed-off-by: Tom Rini <trini@konsulko.com>
Heinrich Schuchardt [Thu, 28 Jan 2021 11:46:11 +0000 (12:46 +0100)]
test: correct entry point to pytest
With Pytest 6.0.2 'make tests' fails:
sandbox: Traceback (most recent call last):
File "./test/py/test.py", line 20, in <module>
sys.exit(load_entry_point('pytest', 'console_scripts', 'pytest')(args))
TypeError: console_main() takes 0 positional arguments but 1 was given
The definition of console_scripts has changed as follows:
Pytest 4.6.1:
[options.entry_points]
console_scripts =
pytest=pytest:main
py.test=pytest:main
Pytest 6.0.2:
[options.entry_points]
console_scripts =
pytest=pytest:console_main
py.test=pytest:console_main
The new function console_main() has a comment:
"This function is not meant for programmable use; use `main()`"
Hence let's call pytest.main() directly.
Move args processing into the __main__ paragraph.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Tom Rini <trini@konsulko.com>
Heinrich Schuchardt [Wed, 27 Jan 2021 11:09:46 +0000 (12:09 +0100)]
test: pr_cont_test.o depends on CONFIG_LOG=y
Compiling wandboard_defconfig with CONFIG_UT_LOG=y leads to a build error:
test/log/pr_cont_test.c: In function ‘log_test_pr_cont’:
test/log/pr_cont_test.c:28:14: error:
‘gd_t’ {aka ‘volatile struct global_data’} has no member named ‘log_fmt’
log_fmt = gd->log_fmt;
We do not want to let CONFIG_UT_LOG depend on CONFIG_LOG=y because we have
tests for logging functions called with CONFIG_LOG=n.
Fix the build dependency.
Reported-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Matthias Brugger [Wed, 27 Jan 2021 09:42:30 +0000 (10:42 +0100)]
fs: btrfs: Select SHA256 in Kconfig
Since commit
565a4147d17a ("fs: btrfs: Add more checksum algorithms")
btrfs uses the sha256 checksum algorithm. But Kconfig lacks to select
it. This leads to compilation errors:
fs/built-in.o: In function `hash_sha256':
fs/btrfs/crypto/hash.c:25: undefined reference to `sha256_starts'
fs/btrfs/crypto/hash.c:26: undefined reference to `sha256_update'
fs/btrfs/crypto/hash.c:27: undefined reference to `sha256_finish'
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Heinrich Schuchardt [Mon, 25 Jan 2021 23:14:14 +0000 (00:14 +0100)]
fs: fat: remove superfluous assignments
Do not assign a value to a variable if it is not used.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Mon, 25 Jan 2021 23:04:19 +0000 (00:04 +0100)]
fs: fat: avoid out of bounds access warning
When copying short name plus extension refer to the encapsulating structure
and not to the short name element.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Mon, 25 Jan 2021 11:17:57 +0000 (12:17 +0100)]
avb: AVB_VERIFY depends on MMC
AVB Verified Boot uses functions related to MMC.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Stanislav Pinchuk [Wed, 20 Jan 2021 18:54:53 +0000 (21:54 +0300)]
vexpress_aemv8a: allow overriding BOOTCOMMAND
Re-send because of line-wraps.
This patch fixes the behaviour of the menuconfig's BOOTCOMMAND
setting. Which is just ignored without that patch on
vexpress_aemv8a platform.
Signed-off-by: Stanislav.Pinchuk@kaspersky.com
SkyLake.Huang [Wed, 20 Jan 2021 07:31:34 +0000 (15:31 +0800)]
arm: dts: enable MTK SPI NOR controller driver
1. Enable MTK SPI NOR controller driver on mt7622 & mt7629.
2. Enable quad mode for read and single mode for write.
Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
SkyLake.Huang [Wed, 20 Jan 2021 07:31:33 +0000 (15:31 +0800)]
spi: mtk_snor: add support for MTK SPI NOR controller
This patch adds support for MTK SPI NOR controller, which you
can see on mt7622 & mt7629.
1. This controller is designed only for SPI NOR. We can't adjust
its bus clock dynamically. Set clock in dts instead.
2. This controller only supports 1-1-1 write mode.
3. Remove mtk_snor_match_read() since upper SPI-MEM layer already
handles command.
4. sf read/write/update commands are tested with this driver.
Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
Tom Rini [Tue, 19 Jan 2021 19:40:10 +0000 (14:40 -0500)]
test: test_ofplatdata: Mark as sandbox specific
This test checks for output specific to the sandbox device tree, mark it
as sandbox specific.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 28 Jan 2021 16:37:58 +0000 (11:37 -0500)]
Merge branch '2021-01-27-assorted-fixes-and-improvements'
- A wide variety of fixes throughout the tree.
Marek Szyprowski [Fri, 22 Jan 2021 11:27:31 +0000 (12:27 +0100)]
cmd: misc: Fix return value for the sleep command
If sleeping has been interrupted, return CMD_RET_FAILURE instead of -1
(CMD_RET_USAGE).
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Ying-Chun Liu (PaulLiu) [Fri, 15 Jan 2021 05:53:03 +0000 (13:53 +0800)]
doc: device-tree-bindings: rtc: Abracon AB x80x i2c rtc
Document the bindings for abracon,abx80x and related compatibles.
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Ying-Chun Liu (PaulLiu) [Fri, 15 Jan 2021 05:53:02 +0000 (13:53 +0800)]
rtc: add rtc-abx80x, a driver for the Abracon AB x80x i2c rtc
This is a basic driver for the ultra-low-power Abracon AB x80x series
of RTC chips. It supports in particular, the supersets AB0805 and AB1805.
It allows reading and writing the time, and enables the supercapacitor or
battery charger.
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Yuezhang.Mo@sony.com [Fri, 15 Jan 2021 03:11:49 +0000 (03:11 +0000)]
autoboot: fix illegal memory access when stop key and delay key are empty
If both stop key and delay key are empty, the length of these
keys is 0. The subtraction operation will cause the u_int type
variable to overflow, will cause illegal memory access in key
input loop.
This commit fixes this bug by using int type instead of u_init.
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Simon Glass [Thu, 14 Jan 2021 03:29:57 +0000 (20:29 -0700)]
binman: Allow reading entries from a subnode
Some images may have multiple copies of the same thing, e.g. two versions
of the read/write U-Boots. It is necessary to read data from one or other
of these under selection of the verified-boot logic. Add a function to
select the subnode to use.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 14 Jan 2021 03:29:56 +0000 (20:29 -0700)]
binman: Move selection of the binman node into a function
Move this logic out of the main init function so it is available for
other purpose.
Use a different error when multiple-images is in use but no subnode is
available. This makes it easier to determine what is wrong.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 14 Jan 2021 03:29:55 +0000 (20:29 -0700)]
crc32: Exclude crc32 from TPL
Unfortunately the toolchain often brings in the crc32 table even if the
function is not actually used. For now, exclude it from the TPL build,
which is very sensitive to size.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 14 Jan 2021 03:29:54 +0000 (20:29 -0700)]
mmc: pci_mmc: Set the removable flag
Set this flag so that it is available to those looking at the device. For
non-removable devices there is no need to check for insertion/removable
since the media can never change.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Simon Glass [Thu, 14 Jan 2021 03:29:52 +0000 (20:29 -0700)]
mmc: pci_mmc: Only generate ACPI code for the SD card
At present if an eMMC part is in the system, the ACPI table generated
will include information about that, as well as the SD card. We only need
to include the SD card, since it has a card-detect GPIO. Use a different
compatible string for each option, and add code only for the SD card.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Simon Glass [Thu, 14 Jan 2021 03:29:51 +0000 (20:29 -0700)]
uuid: Add a comment for UUID_STR_LEN
This macro is the length of the string but excludes the terminator. Users
must add 1 when declaring a large-enough string. Add a comment to make
this clear.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 14 Jan 2021 03:29:50 +0000 (20:29 -0700)]
display_options: Use USE_TINY_PRINTF for SPL check
At present this code uses a simple printf() format if running in SPL. But
SPL can use the full printf. Use USE_TINY_PRINTF instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 14 Jan 2021 03:29:49 +0000 (20:29 -0700)]
fdtdec: Use CONFIG_IS_ENABLED in board_fdt_blob_setup()
This setting may be different in SPL and TPL. Update the code to check
the correct setting.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 14 Jan 2021 03:29:48 +0000 (20:29 -0700)]
fdtdec: Update the missing-devicetree message
This includes information about sandbox which is not relevant for most
boards. Drop it.
Also add the address to help figure out the problem.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 14 Jan 2021 03:29:47 +0000 (20:29 -0700)]
net: Use CONFIG_IS_ENABLED() in eth_dev_get_mac_address()
This function may be used in SPL where devicetree is not available.
Use the correct macro so that the function does not try to read it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 14 Jan 2021 03:29:46 +0000 (20:29 -0700)]
video: Allow syncing the entire framebuffer to the copy
In some cases so much of the framebuffer is updated that it is not worth
copying the changes piece by piece to the copy framebuffer. Add a function
to copy the whole thing.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 14 Jan 2021 03:29:44 +0000 (20:29 -0700)]
bloblist: Add missing tag names
Add tag names for recently added types.
Fixes:
d2cb7a22da0 (x86: Allow putting some tables in the bloblist)
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 14 Jan 2021 03:29:43 +0000 (20:29 -0700)]
bloblist: Support relocating to a larger space
Typically in TPL/SPL the bloblist is quite small. But U-Boot proper may
want to add a lot more to it, such as ACPI tables.
Add a way to expand the bloblist by relocating it in U-Boot proper, along
with the other relocation activities.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 14 Jan 2021 03:29:42 +0000 (20:29 -0700)]
spl: Add functions for next and previous phase
It is useful to be able to figure out which phase we are loading next and
which phase we came from. Add some functions to handle this as well as
returning the name of a phase. This allows messages like "Booting to x"
where x is the next phase.
At present, TPL says 'Jumping to U-Boot' at the end, when in fact it is
jumping to SPL. This is confusing, so use the new functions to correct
this.
Tests for this will come with an upcoming minor SPL test refactor.
Signed-off-by: Simon Glass <sjg@chromium.org>
Philippe Reynes [Tue, 12 Jan 2021 18:18:54 +0000 (19:18 +0100)]
lib: rsa: rsa-verify: don't look for keys in the FIT image
In the function rsa_verify_hash, if the "main" key doesn't
work, u-boot try others keys. But it searches those keys
in the FIT image instead of the u-boot device tree.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Stefan Roese [Tue, 12 Jan 2021 11:03:43 +0000 (12:03 +0100)]
pci: Remove CONFIG_PCI_ENUM_ONLY as it's not used (any more)
This patch completely removes CONFIG_PCI_ENUM_ONLY from the PCI code as
it is not configured for any board (any more). With this removal, some
PCI related files get cleaned up a bit.
Additional, dm_pciauto_setup_device() is now static, as it's not
referenced from any code outside of this C file.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Alexandru Gagniuc [Mon, 11 Jan 2021 14:46:58 +0000 (08:46 -0600)]
common: fit-sig: Fix error message in fit_config_verify_sig()
In fit_config_verify_sig(), when no 'signature*' subnode exists in
the configuration node, the fdt_for_each_subnode() loop is a no-op.
Therefore, no error flags are set, and 'err_,sg' is not populated
with an error string. This is incorrect behavior.
Populate err_msg to indicate that no 'signature' is found, before
entering the loop. The first call to fit_image_verify_sig() will
override clear err_msg, or set it to a more specific message.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Volodymyr Babchuk [Tue, 5 Jan 2021 20:03:11 +0000 (20:03 +0000)]
smccc: fix sign bit expansion
Signed ARM_SMCCC_FAST_CALL value is shifted to 31'st bit. Then, it is expanded
to 64 bit value, which results in 1s in higher 32 bits.
This causes corrupted values in 64-bit SMC IDs and issues in buggy handlers of
32-bit calls.
We need to make ARM_SMCCC_FAST_CALL unsigned long, so it would work properly
on 32 bit architectures.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Philippe Reynes [Fri, 11 Dec 2020 18:56:47 +0000 (19:56 +0100)]
bootcount: allow to use this feature on TPL
This commit add an option TPL_BOOTCOUNT_LIMIT to
use bootcount on TPL.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Pali Rohár [Wed, 4 Nov 2020 14:33:44 +0000 (15:33 +0100)]
Makefile: Do not call useless command 'true'
Macro 'cmd_objcopy_uboot' currently does not work with passed empty command
expanded from 'cmd_static_rela' and therefore dummy command 'true' is set
in 'cmd_static_rela' to workaround this issue.
Eliminate it now by fixing 'cmd_objcopy_uboot' macro to work also with
empty 'cmd_static_rela' macro and remove useless invocation of command
'true'.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Wed, 27 Jan 2021 16:39:31 +0000 (11:39 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
- Espressobin: Disable slot when emmc is not present (Pali)
- DS414; config header cleanup (Phil)
- PCI: auto-config enhancement (Phil)
- pci_mvebu: Also map IO region (Phil)
- serial: a3720: Implement pending method for output direction (Pali)
- turris_mox: Enable a few commands (Marek)
- helios4 & ClearFog changes (Dennis)
- Plus some minor misc changes
Tom Rini [Wed, 27 Jan 2021 16:32:23 +0000 (11:32 -0500)]
Merge tag 'doc-2021-04-rc1-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for documentation tag doc-2021-04-rc1-3
Update the build system for the HTML documentation to allow using
Sphinx 3.
Man-page for exception command.
Tom Rini [Wed, 27 Jan 2021 16:30:31 +0000 (11:30 -0500)]
Merge branch '2021-01-27-assorted-net-updates'
- e1000 fixes for MIPS
- netconsole and ping fix
- cortina_ni driver
- micrel PHY fix
- Add fdtoverlays keyword to extlinux file parsing
Neil Armstrong [Wed, 20 Jan 2021 08:54:53 +0000 (09:54 +0100)]
cmd: pxe: add support for FDT overlays
This adds support for specifying FDT overlays in an extlinux/pxelinux
configuration file.
Without this, there is no simple way to apply overlays when the kernel
and fdt is loaded by the pxe command.
This change adds the 'fdtoverlays' keyword for a label, supporting multiple
overlay files to be applied on top of the fdt specified in the 'fdt' or
'devicetree' keyword.
Example:
label linux
kernel /Image
fdt /soc-board.dtb
fdtoverlays /soc-board-function.dtbo
append console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait
This code makes usage of a new variable called fdtoverlay_addr_r used to load
the overlay files without overwritting anything important.
Cc: Tom Rini <trini@konsulko.com>
Cc: Andre Heider <a.heider@gmail.com>
Cc: Jernej Škrabec <jernej.skrabec@siol.net>
Cc: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Jernej Škrabec <jernej.skrabec@siol.net>
Reviewed-by: Jernej Škrabec <jernej.skrabec@siol.net>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Marek Vasut [Sat, 16 Jan 2021 23:16:16 +0000 (00:16 +0100)]
net: phy: micrel: Try default PHY ofnode first
The phydev structure has a PHY OF node pointer in it, use that OF node
first when looking up PHY OF node properties, since that is likely the
correct PHY OF node pointer. If the pointer is not valid, which is the
case e.g. on legacy DTs, fall back to parsing MAC ethernet-phy subnode.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Alex Nemirovsky [Thu, 14 Jan 2021 21:34:13 +0000 (13:34 -0800)]
board: presidio-asic: Add CAxxxx Ethernet support
Add CAxxxx Ethernet support for the Cortina Access
Presidio Engineering Board
Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
CC: Tom Rini <trini@konsulko.com>
Abbie Chang [Thu, 14 Jan 2021 21:34:12 +0000 (13:34 -0800)]
net: phy: ca_phy: Add driver for CAxxxx SoCs
Add phy driver support for MACs embedded inside Cortina Access SoCs
Signed-off-by: Abbie Chang <abbie.chang@cortina-access.com>
Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
CC: Joe Hershberger <joe.hershberger@ni.com>
CC: Tom Rini <trini@konsulko.com>
CC: Aaron Tseng <aaron.tseng@cortina-access.com>
Moved out PHY specific code out of Cortina NI Ethernet driver
and into a Cortina Access PHY interface driver
Aaron Tseng [Thu, 14 Jan 2021 21:34:11 +0000 (13:34 -0800)]
net: cortina_ni: Add eth support for Cortina Access CAxxxx SoCs
Add Cortina Access Ethernet device driver for CAxxxx SoCs.
This driver supports both legacy and DM_ETH network models.
Signed-off-by: Aaron Tseng <aaron.tseng@cortina-access.com>
Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
Signed-off-by: Abbie Chang <abbie.chang@cortina-access.com>
CC: Joe Hershberger <joe.hershberger@ni.com>
CC: Abbie Chang <abbie.chang@Cortina-Access.com>
CC: Tom Rini <trini@konsulko.com>
Yang Liu [Mon, 21 Dec 2020 03:44:39 +0000 (14:44 +1100)]
net: fix ping in netconsole
Should not init eth device when doing ping in netconsole.
Signed-off-by: Yang Liu <yliu@cybertec.com.au>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Stefan Roese [Mon, 16 Nov 2020 17:02:30 +0000 (18:02 +0100)]
net: e1000: Add missing address translations
Add some missing address translations from virtual address in local DRAM
to physical address, which is needed for the DMA transactions to work
correctly.
This issue was detected while testing the e1000 driver on the MIPS
Octeon III platform, which needs address translation.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Stefan Roese [Mon, 16 Nov 2020 17:02:29 +0000 (18:02 +0100)]
net: e1000: Use virt_to_phys() instead of pci_virt_to_mem()
Using (dm_)pci_virt_to_mem() is incorrect to translate the virtual
address in local DRAM to a physical address. The correct macro here
is virt_to_phys() so switch to using this macro.
As virt_to_bus() is now not used any more, this patch also removes
both definitions (DM and non-DM).
This issue was detected while testing the e1000 driver on the MIPS
Octeon III platform, which needs address translation.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Stefan Roese [Mon, 16 Nov 2020 17:02:28 +0000 (18:02 +0100)]
net: e1000: Remove unused bus_to_phys() macro
bus_to_phys() is defined but not referenced at all. This patch removes
it completely.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Marek Behún [Tue, 19 Jan 2021 14:49:26 +0000 (15:49 +0100)]
arm: mvebu: turris_mox: enable setexpr command in defconfig
Enable setexpr command in defconfig for Turris MOX. We have found that
this is sometimes useful in U-Boot scripts and there is enough space in
NOR memory on MOX.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Tue, 19 Jan 2021 14:49:25 +0000 (15:49 +0100)]
arm: mvebu: turris_mox: enable wdt command in defconfig
Enable wdt command in defconfig for Turris MOX. This is useful when
doing debugging.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Pali Rohár [Mon, 18 Jan 2021 11:09:33 +0000 (12:09 +0100)]
arm64: a37xx: pci: Fix printing debug messages
Value pcie->dev in function pcie_advk_probe() is not initialized yet
so use dev as argument for dev_dbg()/dev_warn().
Function pcie_advk_wait_pio() itself prints error message on failure
so do not print duplicate error message in caller.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Pali Rohár [Thu, 14 Jan 2021 14:46:35 +0000 (15:46 +0100)]
serial: a3720: Implement pending method for output direction
To check if some output characters are waiting either in Transmitter
Holding Register or Transmitter Shift Register we need to look at
TX_EMPTY bit of UART Status Register.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Heinrich Schuchardt [Tue, 26 Jan 2021 11:59:09 +0000 (12:59 +0100)]
doc: exception command
Create man-page for exception command.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Thu, 31 Dec 2020 22:16:46 +0000 (23:16 +0100)]
doc: update Kernel documentation build system
Update the documentation build system according to Linux v5.11-rc1.
Deactive the automarkup.py extension module which on Gitlab CI is
incompatible with Unicode.
With this patch we can build the HTML documentation using either of
Sphinx 2 and Sphinx 3.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Mon, 25 Jan 2021 21:06:25 +0000 (22:06 +0100)]
.gitlab-ci: install doc/sphinx/requirements.txt
Install all requirements according to doc/sphinx/requirements.txt in the
virtual environment used for testing 'make htmldocs'.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Mon, 25 Jan 2021 20:06:57 +0000 (21:06 +0100)]
doc: fix doc/develop/logging.rst
Sphinx 3 builds fail due to doc/develop/logging.rst producing duplicate
labels.
Include logging.h only once in the API section and use cross-references for
the enums log_level_t and log_category_t.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>