Heinrich Schuchardt [Fri, 30 Oct 2020 11:23:59 +0000 (12:23 +0100)]
test: unit test for efi_create_indexed_name()
Provide a unit test for function efi_create_indexed_name().
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
AKASHI Takahiro [Thu, 29 Oct 2020 04:47:46 +0000 (13:47 +0900)]
efi_loader: add efi_create_indexed_name()
This function will be used from several places in UEFI subsystem
to generate some specific form of utf-16 variable name.
For example, L"Capsule0001"
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Move function to separate module.
Use char * as argument instead of u16 *.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
AKASHI Takahiro [Thu, 29 Oct 2020 04:47:45 +0000 (13:47 +0900)]
efi_loader: add option to initialise EFI subsystem early
If this option, CONFIG_EFI_SETUP_EARLY, is enabled, the initialisation
of UEFI subsystem will be done as part of U-Boot initialisation.
Please note that this option won't be enabled explicitly by users,
instead, should be enabled implicitly by other configuration options.
Specifically, this feature will be utilised in implementing capsule-on-disk
feature.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
AKASHI Takahiro [Thu, 29 Oct 2020 04:47:52 +0000 (13:47 +0900)]
dfu: add dfu_write_by_alt()
This function is a variant of dfu_write_by_name() and takes a DFU alt
setting number for dfu configuration.
It will be utilised to implement UEFI capsule management protocol for
raw image in a later commit.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
AKASHI Takahiro [Thu, 29 Oct 2020 04:47:44 +0000 (13:47 +0900)]
dfu: export dfu_list
This variable will be utilized to enumerate all dfu entities
for UEFI capsule firmware update in a later commit.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
AKASHI Takahiro [Thu, 29 Oct 2020 04:47:43 +0000 (13:47 +0900)]
common: update: add a generic interface for FIT image
The main purpose of this patch is to separate a generic interface for
updating firmware using DFU drivers from "auto-update" via tftp.
This function will also be used in implementing UEFI capsule update
in a later commit.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
AKASHI Takahiro [Thu, 29 Oct 2020 04:47:42 +0000 (13:47 +0900)]
dfu: modify an argument type for an address
The range of an addressable pointer can go beyond 'integer'.
So change the argument type to a void pointer.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
AKASHI Takahiro [Thu, 29 Oct 2020 04:47:41 +0000 (13:47 +0900)]
dfu: rename dfu_tftp_write() to dfu_write_by_name()
This function is essentially independent from tftp, and will also be
utilised in implementing UEFI capsule update in a later commit.
So just give it a more generic name.
In addition, a new configuration option, CONFIG_DFU_WRITE_ALT, was
introduced so that the file will be compiled with different options,
particularly one added in a later commit.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Heinrich Schuchardt [Fri, 30 Oct 2020 11:14:16 +0000 (12:14 +0100)]
efi_loader: typo in function description of u16_strnlen
%/u16_strlen/u16_strnlen()/
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Fri, 30 Oct 2020 02:27:22 +0000 (03:27 +0100)]
rtc: initialize emulated RTC from environment variable
Up to now the emulated RTC is initialized using the U-Boot build time.
With this patch the environment variable 'rtc_emul_epoch' can be used to
provide a better initial time. The variable is a decimal string with
the number of seconds since 1970-01-01. Here is an example where the RTC
had not been probed yet:
=> setenv rtc_emul_epoch
1610109000
=> date
Date: 2021-01-08 (Friday) Time: 12:30:00
If the variable does not exist, the U-Boot build time is used as fallback.
The environment variable may be set when shutting down the operating system
if the U-Boot environment is exposed to the OS (cf. ENV_IS_IN_FAT and
ENV_IS_IN_EXT4).
Suggested-by: Pablo Sebastián Greco <pgreco@centosproject.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Fri, 30 Oct 2020 02:05:47 +0000 (03:05 +0100)]
rtc: use probe() to initialize emulated RTC
Currently the emulated RTC is initialized in the emul_rtc_get() get
function. This does not match the design of the driver model.
Move the initialization of the emulated RTC to the probe() function.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Wed, 28 Oct 2020 17:45:47 +0000 (18:45 +0100)]
efi_loader: fix DisconnectController() for sole child
If ChildHandle indicates the sole child of the driver, disconnect the
driver.
This fixes the test results for UEFI SCT 2.6 A
sub-tests 5.1.3.12.43, 5.1.3.12.44, 5.1.3.12.45.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tom Rini [Thu, 29 Oct 2020 14:48:01 +0000 (10:48 -0400)]
configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py
Signed-off-by: Tom Rini <trini@konsulko.com>
Andre Przywara [Wed, 28 Oct 2020 23:37:43 +0000 (23:37 +0000)]
MAINTAINERS, git-mailrc: Update sunxi maintainers
Maxime mentioned that he feels not having the time to be an Allwinner
maintainer anymore. Take over from him.
Maxime, many thanks for your great work in the past! I hope I can still
relay the occasional technical question to you in the future.
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tom Rini [Thu, 29 Oct 2020 13:10:24 +0000 (09:10 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
- Bug fixes and updates on vid, ls1088a lx2160a and other layerscape
platforms.
- Add optee_rpmb support for LX2 & Kontron sl28 support
Tom Rini [Wed, 28 Oct 2020 20:30:06 +0000 (16:30 -0400)]
Prepare v2021.01-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 28 Oct 2020 18:50:09 +0000 (14:50 -0400)]
Merge branch '2020-10-28-mux-driver-framework'
- Add a framework for mux drivers
Pratyush Yadav [Fri, 16 Oct 2020 10:46:36 +0000 (16:16 +0530)]
test: mux-cmd: Add tests for the 'mux' command
Tests tests run the three mux subcommands: list, select, and deselect,
and verify that the commands do what we expect.
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Pratyush Yadav [Fri, 16 Oct 2020 10:46:35 +0000 (16:16 +0530)]
cmd: Add a mux command
This command lets the user list, select, and deselect mux controllers
introduced with the mux framework on the fly. It has 3 subcommands:
list, select, and deselect.
List: Lists all the mux present on the system. The muxes are listed for
each chip. The chip is identified by its device name. Each chip can have
a number of mux controllers. Each is listed in sequence and is assigned
a sequential ID based on its position in the mux chip. It lists details
like ID, whether the mux is currently selected or not, the current
state, the idle state, and the number of states.
A sample output would look something like:
=> mux list
a-mux-controller:
ID Selected Current State Idle State Num States
0 no unknown as-is 0x4
1 no 0x2 0x2 0x10
2 no 0x73 0x73 0x100
another-mux-controller:
ID Selected Current State Idle State Num States
0 no 0x1 0x1 0x4
1 no 0x2 0x2 0x4
Select: Selects a given mux and puts it in the specified state. This
subcommand takes 3 arguments: mux chip, mux ID, state to set
the mux in. The arguments mux chip and mux ID are used to identify which
mux needs to be selected, and then it is selected to the given state.
The mux needs to be deselected before it can be selected again in
another state. The state should be a hexadecimal number.
For example:
=> mux list
a-mux-controller:
ID Selected Current State Idle State Num States
0 no 0x1 0x1 0x4
1 no 0x1 0x1 0x4
=> mux select a-mux-controller 0 0x3
=> mux list
a-mux-controller:
ID Selected Current State Idle State Num States
0 yes 0x3 0x1 0x4
1 no 0x1 0x1 0x4
Deselect: Deselects a given mux and puts it in its idle state. This
subcommand takes 2 arguments: the mux chip and mux ID to identify which
mux needs to be deselected. So in the above example, we can deselect mux
0 using:
=> mux deselect a-mux-controller 0
=> mux list
a-mux-controller:
ID Selected Current State Idle State Num States
0 no 0x1 0x1 0x4
1 no 0x1 0x1 0x4
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Jean-Jacques Hiblot [Fri, 16 Oct 2020 10:46:34 +0000 (16:16 +0530)]
test: Add tests for the multiplexer framework
Provide tests to check the behavior of the multiplexer framework.
Two sets of tests are added. One is using an emulated multiplexer driver
that can be used to test basic functionality like select, deselect, etc.
The other is using the mmio mux which adds tests specific to it.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Pratyush Yadav [Fri, 16 Oct 2020 10:46:33 +0000 (16:16 +0530)]
Kconfig: Increase the pre-relocation memory
The memory is close to full and adding a syscon node in test.dts makes
it go over the limit and makes malloc() fail on startup.
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Jean-Jacques Hiblot [Fri, 16 Oct 2020 10:46:32 +0000 (16:16 +0530)]
drivers: mux: mmio-based syscon mux controller
This adds a driver for mmio-based syscon multiplexers controlled by
bitfields in a syscon register range.
This is heavily based on the linux mmio-mux driver.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Jean-Jacques Hiblot [Fri, 16 Oct 2020 10:46:31 +0000 (16:16 +0530)]
dm: board: complete the initialization of the muxes in initr_dm()
This will probe the multiplexer devices that have a "u-boot,mux-autoprobe"
property. As a consequence they will be put in their idle state.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Jean-Jacques Hiblot [Fri, 16 Oct 2020 10:46:30 +0000 (16:16 +0530)]
drivers: Add a new framework for multiplexer devices
Add a new subsystem that handles multiplexer controllers. The API is the
same as in Linux.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
[trini: Update some error calls to use different functions or pass
correct arguments]
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 28 Oct 2020 12:35:28 +0000 (08:35 -0400)]
Merge tag 'efi-2021-01-rc2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2021-01-rc2
A software RTC driver is supplied for UEFI SCT testing.
The following UEFI related bugs are fixed:
* correct handling of daylight saving time in GetTime() and SetTime()
* handling of the gd register in function tracing on RISC-V
* disable U-Boot devices in ExitBootServices()
Tom Rini [Wed, 28 Oct 2020 12:34:11 +0000 (08:34 -0400)]
Merge branch '2020-10-27-further-log-enhancements'
- Allow for log message continuation.
- Test fix, build time error checking for new categories
Heinrich Schuchardt [Fri, 23 Oct 2020 11:00:01 +0000 (13:00 +0200)]
log: correct and check array size of log categories
The log command has led to NULL dereferences if an unknown category name
name was used due to missing entries in the list of category names.
Add compile time checks for the array sizes of log_cat_name and
log_lvl_name to avoid future mishaps.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Fri, 23 Oct 2020 03:30:29 +0000 (05:30 +0200)]
efi_loader: daylight saving time
Adjust the SetTime() and GetTime() runtime services to correctly convert
the daylight saving time information when communicating with the RTC.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Ilias Apalodimas [Wed, 21 Oct 2020 22:04:21 +0000 (01:04 +0300)]
efi_loader: Disable devices before handing over control
U-Boot Driver Model is supposed to remove devices with either
DM_REMOVE_ACTIVE_DMA or DM_REMOVE_OS_PREPARE flags set, before exiting.
Our bootm command does that by explicitly calling calling
"dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL);" and we also disable any
USB devices.
The EFI equivalent is doing none of those at the moment. As a result
probing an fTPM driver now renders it unusable in Linux. During our
(*probe) callback we open a session with OP-TEE, which is supposed to
close with our (*remove) callback. Since the (*remove) is never called,
once we boot into Linux and try to probe the device again we are getting
a busy error response. Moreover all uclass (*preremove) functions won't
run.
So let's fix this by mimicking what bootm does and disconnect devices
when efi_exit_boot_services() is called.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Ilias Apalodimas [Wed, 21 Oct 2020 22:04:20 +0000 (01:04 +0300)]
efi_loader: Sort header file ordering
Order header files according to https://www.denx.de/wiki/U-Boot/CodingStyle
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Thu, 15 Oct 2020 10:30:09 +0000 (12:30 +0200)]
trace: conserve gd register on RISC-V
An UEFI application may change the value of the register that gd lives in.
But some of our functions like get_ticks() access this register. So we
have to set the gd register to the U-Boot value when entering a trace
point and set it back to the application value when exiting the trace
point.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Thu, 22 Oct 2020 21:52:14 +0000 (23:52 +0200)]
rtc: provide an emulated RTC
On a board without hardware clock this software real time clock can be
used. The build time is used to initialize the RTC. So you will have
to adjust the time either manually using the 'date' command or use
the 'sntp' to update the RTC with the time from a network time server.
See CONFIG_CMD_SNTP and CONFIG_BOOTP_NTPSERVER. The RTC time is
advanced according to CPU ticks.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Sun, 25 Oct 2020 06:25:05 +0000 (07:25 +0100)]
Makefile: provide constant with seconds since epoch
Provide a constant U_BOOT_EPOCH with the number of seconds since
1970-01-01. This constant can be used to initialize a software
real time clock until it is updated via the 'sntp' command.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Sat, 17 Oct 2020 12:31:59 +0000 (14:31 +0200)]
test: log: test message continuation
Provide a unit test checking that a continuation message will use the same
log level and log category as the previous message.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Sat, 17 Oct 2020 12:31:58 +0000 (14:31 +0200)]
log: allow for message continuation
Some drivers use macro pr_cont() for continuing a message sent via printk.
Hence if we want to convert printk messaging to using the logging system,
we must support continuation of log messages too.
As pr_cont() does not provide a message level we need a means of
remembering the last log level.
With the patch a pseudo log level LOGL_CONT as well as a pseudo log
category LOGC_CONT are introduced. Using these results in the application
of the same log level and category as in the previous log message.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Sat, 17 Oct 2020 12:31:57 +0000 (14:31 +0200)]
log: move processing_msg to global data
Replace the static variable processing_msg by a field in the global data.
Make the field bool at it can only be true or false.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Anatolij Gustschin [Tue, 27 Oct 2020 07:47:17 +0000 (08:47 +0100)]
nokia_rx51: re-enable CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV
With disabled legacy VIDEO option CONSOLE_MUX is not auto-selected
any more, re-enable it.
Fixes:
9dec5a0ea130 ("nokia_rx51: disable obsolete VIDEO config")
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Pali Rohár <pali@kernel.org>
Tom Rini [Mon, 26 Oct 2020 21:27:38 +0000 (17:27 -0400)]
Merge tag 'video-for-2021.01-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-video
- disable CONFIG_VIDEO to remove DM conversion warnings
for boards: at91sam9, eb_cpu5282, ls1021aqds, ls1021atwr,
mx23evk, mx6sxsabresd, mx7dsabresd, nokia_rx51, picosam9g45,
sansa_fuze_plus, xfi3
Anatolij Gustschin [Mon, 26 Oct 2020 18:50:58 +0000 (19:50 +0100)]
nokia_rx51: disable obsolete VIDEO config
Disable VIDEO config to fix DM_VIDEO conversion
deadline warning.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Anatolij Gustschin [Sun, 18 Oct 2020 18:32:35 +0000 (20:32 +0200)]
eb_cpu5282: fix CONFIG_DM_VIDEO build warnings
Remove CONFIG_VIDEO dependency to fix board removal warnings.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Jens Scharsig <esw@bus-elektronik.de>
Anatolij Gustschin [Sun, 18 Oct 2020 17:32:06 +0000 (19:32 +0200)]
sansa_fuze_plus: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Anatolij Gustschin [Sun, 18 Oct 2020 16:36:23 +0000 (18:36 +0200)]
xfi3: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Anatolij Gustschin [Sun, 18 Oct 2020 16:33:45 +0000 (18:33 +0200)]
mx23evk: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Anatolij Gustschin [Sun, 18 Oct 2020 17:29:07 +0000 (19:29 +0200)]
at91sam9n12ek: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.
Boards should convert to DM_VIDEO if they need video console
support.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Anatolij Gustschin [Sun, 18 Oct 2020 16:04:34 +0000 (18:04 +0200)]
at91sam9: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Anatolij Gustschin [Sun, 18 Oct 2020 16:00:35 +0000 (18:00 +0200)]
picosam9g45: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Erik van Luijk <evanluijk@interact.nl>
Anatolij Gustschin [Sun, 18 Oct 2020 15:58:21 +0000 (17:58 +0200)]
ls1021atwr: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Anatolij Gustschin [Sun, 18 Oct 2020 15:57:25 +0000 (17:57 +0200)]
ls1021aqds: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Alison Wang <alison.wang@nxp.com>
Anatolij Gustschin [Sun, 18 Oct 2020 15:55:20 +0000 (17:55 +0200)]
imx: mx7dsabresd: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Anatolij Gustschin [Sun, 18 Oct 2020 15:54:05 +0000 (17:54 +0200)]
imx: mx6sxsabresd: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Tom Rini [Mon, 26 Oct 2020 12:25:37 +0000 (08:25 -0400)]
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-riscv
- No need to check before free in kendryte clk.
- Only enable OF_BOARD_FIXUP if U-Boot is configured for S-Mode.
- Reduce k210 dts DMA block size
- Move timers into drivers/timer
- Correct fu540 dts reg size of clint node
Pragnesh Patel [Tue, 20 Oct 2020 05:33:02 +0000 (11:03 +0530)]
riscv: fu540: dts: Correct reg size of clint node
Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Sean Anderson [Mon, 26 Oct 2020 01:46:58 +0000 (21:46 -0400)]
riscv: Move timer portions of SiFive CLINT to drivers/timer
Half of this driver is a DM-based timer driver, and half is RISC-V-specific
IPI code. Move the timer portions in with the other timer drivers. The
KConfig is not moved, since it also enables IPIs. It could also be split
into two configs, but no boards use the timer but not the IPI atm, so I
haven't split it.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>
Sean Anderson [Mon, 26 Oct 2020 01:46:57 +0000 (21:46 -0400)]
timer: Add _TIMER suffix to Andes PLMT Kconfig
This matches the naming scheme of other timer drivers.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>
Sean Anderson [Mon, 26 Oct 2020 01:46:56 +0000 (21:46 -0400)]
riscv: Move Andes PLMT driver to drivers/timer
This is a regular timer driver, and should live with the other timer
drivers.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>
Sean Anderson [Mon, 12 Oct 2020 18:18:15 +0000 (14:18 -0400)]
riscv: k210: Reduce DMA block size
Although the max DMA size supported by the hardware register is 22 bits (or
4M), the Linux driver for this device only supports transfers of up to 2M.
On a device with 8M total memory, I don't think it will make too much of a
difference.
Reported-by: Damien Le Moal <Damien.LeMoal@wdc.com>
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Sean Anderson [Sat, 5 Sep 2020 13:22:11 +0000 (09:22 -0400)]
riscv: Only enable OF_BOARD_FIXUP for S-Mode
It is unsafe to enable OF_BOARD_FIXUP only based on OF_SEPARATE.
OF_SEPARATE may indicate that the user wishes U-Boot to use a different
device tree than one obtained via OF_PRIOR_STAGE. However, OF_SEPARATE may
also indicate that the device tree which would be obtained via
OF_PRIOR_STAGE is invalid, nonexistant, or otherwise unusable. In this
latter case, enabling OF_BOARD_FIXUP will result in corruption of the
device tree. To remedy this, only enable OF_BOARD_FIXUP if U-Boot is
configured for S-Mode.
Fixes:
1c17e55594a394ced7de88d91be294eaf8c564c1
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Leo Liang <ycliang@andestech.com>
Heinrich Schuchardt [Tue, 29 Sep 2020 19:52:12 +0000 (21:52 +0200)]
clk: kendryte: no need to check argument of free()
free() checks if its argument is NULL. No need to check it twice.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Tom Rini [Sat, 24 Oct 2020 14:49:28 +0000 (10:49 -0400)]
Merge branch '2020-10-23-misc-changes'
Highlights:
- Fix a problem with the bootm overlap tests
- Remove duplicated code in fatwrite
- Cleanup our current "misc" command code and add a new one for misc
class devices.
- Various GPIO fixes
Peng Fan [Thu, 15 Oct 2020 10:06:48 +0000 (18:06 +0800)]
power: regulator: add dummy helper
Add dummy helper to enabling the header could be included when
DM REGULATOR not enabled.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 15 Oct 2020 10:05:58 +0000 (18:05 +0800)]
phy: nop-phy: add clk bulk
Add clk bulk for nop-phy driver.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Jaehoon Chung [Wed, 21 Oct 2020 05:17:03 +0000 (14:17 +0900)]
bootm: fix wrong conditions about images overlap
It doesn't need to consider start byte address.
If ramdisk size is 0x800000 and start address is 0x2700000, then it's
used until 0x02efffff, not 0x02f00000. But it's detected to overlapt RD
image, when kernel start address is 0x02f00000.
Because it's doing wrong calculation about rd_len.
This patch fixed wrong calculation address position when check
condition.
In addition, it needs to check one more condition about overlapping
entire area.
Fixes: commit
fbde7589ce30 ("common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS image")
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Lad Prabhakar [Tue, 20 Oct 2020 07:45:46 +0000 (08:45 +0100)]
cmd: fat: Use do_save() for fatwrite
do_save() function defined in fs.c also supports FAT file system
re-use the same for fatwrite command.
Also fix the FAT test script to match the expected output.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Heinrich Schuchardt [Thu, 22 Oct 2020 19:45:28 +0000 (21:45 +0200)]
test: unit tests for print_freq(), print_size()
Provide unit tests for functions print_freq() and print_size().
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Bin Meng [Wed, 14 Oct 2020 06:34:52 +0000 (14:34 +0800)]
cmd: Add a 'misc' command to access miscellaneous devices
Enable the command "misc" for accessing miscellaneous devices with
a MISC uclass driver. The command provides listing all MISC devices
as well as read and write functionalities via their drivers.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Bin Meng [Tue, 13 Oct 2020 10:45:06 +0000 (18:45 +0800)]
cmd: Split out timer command from the sleep command
CONFIG_CMD_TIMER merits a single file instead of co-exist in the
sleep command file.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Bin Meng [Tue, 13 Oct 2020 10:45:05 +0000 (18:45 +0800)]
cmd: Rename CMD_MISC to CMD_SLEEP
The "cmd/Kconfig" has a TODO description for CMD_MISC that it should
really be named as CMD_SLEEP. Change it in the whole source tree.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Pali Rohár [Wed, 7 Oct 2020 13:39:40 +0000 (15:39 +0200)]
Makefile: Fix u-boot-nodtb.bin target
This change fixes two issues when building u-boot-nodtb.bin target:
* Remove intermediate binary u-boot-nodtb.bin from disk when static_rela
call (which modifies u-boot-nodtb.bin binary) failed. It is required
because previous objcopy call creates binary and static_rela finish it.
* Do not call static_rela cmd when u-boot-nodtb.bin binary was not
created/updated by previous objcopy call.
Second fix would ensure that u-boot-nodtb.bin binary is not updated when
all prerequisites were up-to-date. And therefore final binary u-boot.bin
is not updated in case all prerequisites were not modified and were
up-to-date.
Now running 'make SOURCE_DATE_EPOCH=0 u-boot.bin' second time now does not
touch u-boot.bin binary in case nothing was modified, so GNU make can
correctly detect that everything is up-to-date.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Patrick Delaunay [Thu, 10 Sep 2020 16:25:09 +0000 (18:25 +0200)]
i2c: i2c-gpio: Convert to use APIs which support live DT
Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the
driver can support live DT.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Patrick Delaunay [Thu, 10 Sep 2020 16:18:17 +0000 (18:18 +0200)]
power: regulator: gpio-regulator: Convert to use APIs which support live DT
Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the
driver can support live DT.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Patrick Delaunay [Thu, 10 Sep 2020 16:18:16 +0000 (18:18 +0200)]
power: regulator: gpio-regulator: protect count value
Update the size of states_array to avoid overflow for
dev_pdata->voltages[j] and dev_pdata->states[j].
As the size of array is GPIO_REGULATOR_MAX_STATES, the size of
states_array is limited by GPIO_REGULATOR_MAX_STATES * 2 = 4
instead of 8 previously.
The value of the "count" variable is limited by the third parameter of
fdtdec_get_int_array_count.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Mon, 3 Aug 2020 20:12:13 +0000 (22:12 +0200)]
post: remove redundant condition
(A && A == 0x20) is only true for (A == 0x20).
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Fri, 23 Oct 2020 13:19:12 +0000 (09:19 -0400)]
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-samsung
Tom Rini [Fri, 23 Oct 2020 13:16:20 +0000 (09:16 -0400)]
Merge branch '2020-10-23-revert-xen-changes'
I had inadvertently merged the Xen series before everything was fully
happy with the board maintainer. Revert the series.
Tom Rini [Fri, 23 Oct 2020 13:16:13 +0000 (09:16 -0400)]
Revert "serial: serial_xen: print U-Boot banner and others"
This reverts commit
18426bf02217de2e9bb2b41eaa74d769892c55ef.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 23 Oct 2020 13:16:07 +0000 (09:16 -0400)]
Revert "arch: arm/xen: add putc() for debugging"
This reverts commit
3a51b2a2c3cedc0d2a9ce981b8e00ab8cefcb6b7.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 23 Oct 2020 13:16:01 +0000 (09:16 -0400)]
Revert "xen: add definitions for console_io"
This reverts commit
16389a74c516470c8f0fd8c712e1638f80384b92.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 23 Oct 2020 13:15:55 +0000 (09:15 -0400)]
Revert "serial: serial_xen: add DEBUG_UART support"
This reverts commit
82e21b391bd315f6fe0e0b79326af8a141e9cca7.
Signed-off-by: Tom Rini <trini@konsulko.com>
Ioana Ciornei [Tue, 20 Oct 2020 09:09:58 +0000 (12:09 +0300)]
configs: ls1088a: enable CMD_MDIO
Enable the CMD_MDIO Kconfig option by removing the "is not set"
indication from all the defconfigs for this SoC.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Michael Walle [Fri, 16 Oct 2020 17:38:18 +0000 (19:38 +0200)]
armv8: layerscape: don't remove crypto node if just partially disabled
On all newer Layerscape SoCs, only the export-controlled ciphers of the
crypto module are disabled on non-E parts. Thus it doesn't make sense to
completely remove the node. Linux will figure out what is there and what
is not.
Just remove it for older SoCs, where the module is indeed completely
disabled on non-E parts.
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Biwen Li [Mon, 12 Oct 2020 12:07:35 +0000 (20:07 +0800)]
board/freescale/vid: enables writes to all commands for LTC3882
Enable writes to all commands for LTC3882
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Priyanka Singh [Fri, 16 Oct 2020 09:15:44 +0000 (14:45 +0530)]
board: freescale: vid.c: Initialize variable 'i2caddress'
Initialize variable 'i2caddress' in print_vdd() to zero
Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Michael Walle [Thu, 15 Oct 2020 21:08:58 +0000 (23:08 +0200)]
board: sl28: add board specific nvm command
The board supports 16 configuration bits which can be manipulated with
this command. See the board's README for a detailed explanation on each
bit.
Signed-off-by: Michael Walle <michael@walle.cc>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Michael Walle [Thu, 15 Oct 2020 21:08:57 +0000 (23:08 +0200)]
board: kontron: add sl28 support
Add basic support for the Kontron SMARC-sAL28 board. This includes just
the bare minimum to be able to bring up the board and boot linux.
For now, the Single and Dual PHY variant is supported. Other variants
will fall back to the basic variant.
In particular, there is no watchdog support for now. This means that you
have to disable the default watchdog, otherwise you'll end up in the
recovery bootloader. See the board README for details.
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Hou Zhiqiang [Thu, 15 Oct 2020 06:54:34 +0000 (14:54 +0800)]
dm: pci: fsl: Correct the workaround of erratum A-007815
The register to enable/disable the write-permission of DBI RO
registers should be accessed via the CFG_ADDR/CFG_DATA registers
instead of accessing directly.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Razvan Ionut Cirjan [Fri, 23 Oct 2020 10:50:38 +0000 (16:20 +0530)]
net: lx2160a.c: Update to set ECx_PMUX precedence
As per hardware documentation, ECx_PMUX has precedence
over SerDes protocol.
For LX2160/LX2162 if DPMACs 17 and 18 are enabled as SGMII
through SerDes protocol but ECx_PMUX configured them as RGMII,
then the ports will be configured as RGMII and not SGMII.
Signed-off-by: Razvan Ionut Cirjan <razvanionut.cirjan@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
hui.song [Thu, 24 Sep 2020 13:40:50 +0000 (21:40 +0800)]
gpio: mpc8xxx: support fsl-layerscape platform
Make the MPC8XXX gpio driver to support the fsl-layerscape.
Signed-off-by: hui.song <hui.song_1@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Ruchika Gupta [Fri, 23 Oct 2020 08:13:57 +0000 (13:43 +0530)]
configs: lx2160a: Enable OPTEE support
Enable support to compile OPTEE driver, access AVB TA
and RPMB API's access via RPC from OPTEE for lx2160
Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Ruchika Gupta [Fri, 23 Oct 2020 08:09:33 +0000 (13:39 +0530)]
cmd: optee_rpmb command for read/write of rpmb from optee
Enable "optee_rpmb" command to write/read named persistent values
created on RPMB by opening session with OPTEE AVB TA.
This provides easy test for establishing a session with OPTEE
TA and storage of persistent data in MMC RPMB.
It includes following subcommands:
optee_rpmb read_pvalue:read persistent values on rpmb via OPTEE AVB TA
optee_rpmb write_pvalue:write persistent values on rpmb via OPTEE AVB
TA
Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Laurentiu Tudor [Thu, 10 Sep 2020 09:42:19 +0000 (12:42 +0300)]
pci: layerscape: add a way of specifying additional iommu mappings
In the current implementation, u-boot creates iommu mappings only
for PCI devices enumarated at boot time thus does not take into
account more dynamic scenarios such as SR-IOV or PCI hot-plug.
Add an u-boot env var and a device tree property (to be used for
example in more static scenarios such as hardwired PCI endpoints
that get initialized later in the system setup) that would allow
two things:
- for a SRIOV capable PCI EP identified by its B.D.F specify
the maximum number of VFs that will ever be created for it
- for hot-plug case, specify the B.D.F with which the device
will show up on the PCI bus
More details can be found in the included documentation:
arch/arm/cpu/armv8/fsl-layerscape/doc/README.pci_iommu_extra
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Laurentiu Tudor [Thu, 10 Sep 2020 09:42:18 +0000 (12:42 +0300)]
pci: add a few ARI related defines
Add a few defines related to PCI ARI configuration.
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Laurentiu Tudor [Thu, 10 Sep 2020 09:42:17 +0000 (12:42 +0300)]
pci: layerscape: move pci node search in a common function
Fix duplication of this code by placing it in a common function.
Furthermore, the resulting function will be re-used in upcoming
patches.
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Laurentiu Tudor [Fri, 23 Oct 2020 08:05:27 +0000 (13:35 +0530)]
pci: layerscape: move per-pci device fdt fixup in a function
Move the pci device related fdt fixup in a function in order to
re-use it in a following patch. While at it, improve the error
handling.
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Wasim Khan [Thu, 27 Aug 2020 13:48:21 +0000 (19:18 +0530)]
configs: Enable NVME support for Layerscape platforms
Enable CONFIG_NVME and CONFIG_CMD_NVME for Layerscape
platforms
Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Tom Rini [Fri, 23 Oct 2020 00:32:02 +0000 (20:32 -0400)]
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi
- sun8i emac changes (Andre)
- SCP firmware (Samuel)
Tom Rini [Thu, 22 Oct 2020 18:36:47 +0000 (14:36 -0400)]
Merge branch '2020-10-22-misc-changes'
- Assorted updates for Xen, IPQ40xx, ASpeed, Keymile
- Assorted typo / documentation fixes
- Fix default preboot cmd to act like before with USB_STORAGE set
- A number of other bugfixes throughout the code
Heiko Schocher [Fri, 16 Oct 2020 08:41:46 +0000 (10:41 +0200)]
rtc: move pcf8563 to Kconfig
add Kconfig option for pcf8563 driver and
run tools/moveconfig.py
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Fabien Parent [Thu, 15 Oct 2020 16:38:18 +0000 (18:38 +0200)]
mmc: mtk-sd: change some dev_err into dev_dbg
dev_err has been used for debugging and a few dev_err message are
printed for normal code execution. Make them dev_dbg instead.
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
AKASHI Takahiro [Thu, 15 Oct 2020 04:25:16 +0000 (13:25 +0900)]
serial: serial_xen: add DEBUG_UART support
By using a hypervisor call, we can implement DEBUG_UART on xen.
This will allow us to see messages even earlier than serial_init().
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
AKASHI Takahiro [Thu, 15 Oct 2020 04:25:15 +0000 (13:25 +0900)]
xen: add definitions for console_io
Those definitions added are used with HYPERVISOR_console_io().
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>