Wolfgang Wallner [Tue, 23 Mar 2021 08:54:58 +0000 (09:54 +0100)]
dt-bindings: fsp: Fix Apollo Lake FSP-S devicetree bindings
An entry is missing in the FSP-S devicetree bindings, and as a result
the description for the next few following entries is off by one line.
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tom Rini [Tue, 13 Apr 2021 13:50:45 +0000 (09:50 -0400)]
Merge branch '2021-04-13-assorted-improvements'
- A large assortment of bug fixes, code cleanups and a few feature
enhancements.
Marek Vasut [Tue, 6 Apr 2021 12:00:24 +0000 (14:00 +0200)]
cmd: exit: Fix return value
In case exit is called in a script without parameter, the command
returns -2 ; in case exit is called with a numerical parameter,
the command returns -2 and lower. This leads to the following problem:
=> setenv foo 'echo bar ; exit 1' ; run foo ; echo $?
bar
0
=> setenv foo 'echo bar ; exit 0' ; run foo ; echo $?
bar
0
=> setenv foo 'echo bar ; exit -2' ; run foo ; echo $?
bar
0
That is, no matter what the 'exit' command argument is, the return
value is always 0 and so it is not possible to use script return
value in subsequent tests.
Fix this and simplify the exit command such that if exit is called with
no argument, the command returns 0, just like 'true' in cmd/test.c. In
case the command is called with any argument that is positive integer,
the argument is set as return value.
=> setenv foo 'echo bar ; exit 1' ; run foo ; echo $?
bar
1
=> setenv foo 'echo bar ; exit 0' ; run foo ; echo $?
bar
0
=> setenv foo 'echo bar ; exit -2' ; run foo ; echo $?
bar
0
Note that this does change ABI established in 2004 , although it is
unclear whether that ABI was originally OK or not.
Fixes:
c26e454dfc6
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Tom Rini <trini@konsulko.com>
Patrick Delaunay [Tue, 30 Mar 2021 13:29:03 +0000 (15:29 +0200)]
scmi: translate the resource only when livetree is not activated
Call the translation function on the ofnode_read_resource result only
when the livetree is not activated.
Today of_address_to_resource() calls ofnode_read_resource() for livetree
support and fdt_get_resource() when livetree is not supported.
The fdt_get_resource() doesn't do the address translation
so when it is required when livetree is activated but this address
translation is already done by ofnode_read_resource().
Fixes:
240720e9052f ("firmware: scmi: mailbox/smt agent device")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Simon Glass [Tue, 23 Mar 2021 01:52:07 +0000 (14:52 +1300)]
gpio: Drop dm_gpio_set_dir()
This function is not used. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Simon Glass [Tue, 23 Mar 2021 01:52:06 +0000 (14:52 +1300)]
gpio: i2c-gpio: Drop use of dm_gpio_set_dir()
This is the only driver that uses this function. Update it to use the
alternative which is dm_gpio_clrset_flags().
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Harm Berntsen <harm.berntsen@nedap.com>
Asherah Connor [Fri, 19 Mar 2021 07:21:43 +0000 (18:21 +1100)]
qemu: arm: select QFW, MMIO on qemu-arm
Select CMD_QFW and QFW_MMIO in the qemu-arm board (covers arm and
arm64).
Signed-off-by: Asherah Connor <ashe@kivikakk.ee>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Asherah Connor [Fri, 19 Mar 2021 07:21:42 +0000 (18:21 +1100)]
qemu: add MMIO driver for QFW
Add MMIO driver for QFW.
Note that there is no consumer as of this patch.
Signed-off-by: Asherah Connor <ashe@kivikakk.ee>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Asherah Connor [Fri, 19 Mar 2021 07:21:41 +0000 (18:21 +1100)]
test: qemu: add qfw sandbox driver, dm tests, qemu tests
A sandbox driver and test are added for the qfw uclass, and a test in
QEMU added for qfw functionality to confirm it doesn't break in real
world use.
Signed-off-by: Asherah Connor <ashe@kivikakk.ee>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Asherah Connor [Fri, 19 Mar 2021 07:21:40 +0000 (18:21 +1100)]
x86: qemu: move QFW to its own uclass
We move qfw into its own uclass and split the PIO functions into a
specific driver for that uclass. The PIO driver is selected in the
qemu-x86 board config (this covers x86 and x86_64).
include/qfw.h is cleaned up and documentation added.
Signed-off-by: Asherah Connor <ashe@kivikakk.ee>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Patrick Delaunay [Tue, 16 Mar 2021 08:29:40 +0000 (09:29 +0100)]
scmi: correctly configure MMU for SCMI buffer
Align the MMU area for SCMI shared buffer on section size;
use the ALIGN macro in mmu_set_region_dcache_behaviour call.
Since commit
d877f8fd0f09 ("arm: provide a function for boards init
code to modify MMU virtual-physical map") the parameter of
mmu_set_region_dcache_behaviour need to be MMU_SECTION_SIZE
aligned.
Fixes:
240720e9052f ("firmware: scmi: mailbox/smt agent device")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Trevor Woerner [Mon, 15 Mar 2021 16:01:33 +0000 (12:01 -0400)]
moveconfig.py: add to the "do not process" list
Skip the processing of *.aml and *.dat files while iterating through the
source in order to process header files.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Sean Anderson [Thu, 11 Mar 2021 05:15:45 +0000 (00:15 -0500)]
checkpatch: Add warnings for using strn(cat|cpy)
strn(cat|cpy) has a bad habit of not nul-terminating the destination,
resulting in constructions like
strncpy(foo, bar, sizeof(foo) - 1);
foo[sizeof(foo) - 1] = '\0';
However, it is very easy to forget about this behavior and accidentally
leave a string unterminated. This has shown up in some recent coverity
scans [1, 2] (including code recently touched by yours truly).
Fortunately, the guys at OpenBSD came up with strl(cat|cpy), which always
nul-terminate strings. These functions are already in U-Boot, so we should
encourage new code to use them instead of strn(cat|cpy).
[1] https://lists.denx.de/pipermail/u-boot/2021-March/442888.html
[2] https://lists.denx.de/pipermail/u-boot/2021-January/438073.html
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Sean Anderson [Thu, 11 Mar 2021 05:15:44 +0000 (00:15 -0500)]
fastboot: Fix possible buffer overrun
This fixes several uses of strn(cpy|cat) which did not terminate their
destinations properly.
Fixes
de1728ce4c ("fastboot: Allow u-boot-style partitions")
Reported-by: Coverity Scan
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Sean Anderson [Thu, 11 Mar 2021 05:15:43 +0000 (00:15 -0500)]
test: Add test for strlcat
This test is adapted from glibc, which is very concerned about alignment.
It also tests strlcpy by dependency.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Sean Anderson [Thu, 11 Mar 2021 05:15:42 +0000 (00:15 -0500)]
lib: string: Implement strlcat
This introduces strlcat, which provides a safer interface than strncat. It
never copies more than its size bytes, including the terminating nul. In
addition, it never reads past dest[size - 1], even if dest is not
nul-terminated.
This also removes the stub for dwc3 now that we have a proper
implementation.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Sean Anderson [Thu, 11 Mar 2021 05:15:41 +0000 (00:15 -0500)]
lib: string: Fix strlcpy return value
strlcpy should always return the number of bytes copied. We were
accidentally missing the nul-terminator. We also always used to return a
non-zero value, even if we did not actually copy anything.
Fixes:
23cd138503 ("Integrate USB gadget layer and USB CDC driver layer")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Ilias Apalodimas [Wed, 10 Mar 2021 13:35:11 +0000 (15:35 +0200)]
tee: optee: Change printing during optee_probe
Right now the error messages when optee has a version mismatch or shared
memory is not configured are done with a debug().
That's not very convenient since you have to enable debugging to figure
out what's going on, although this is an actual error.
So let's switch the debug() -> dev_err() and report those explicitly.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Asherah Connor [Wed, 10 Mar 2021 11:39:24 +0000 (22:39 +1100)]
terminal: only serial_reinit_all if available
serial_reinit_all() is only available if CONFIG_SERIAL is defined (i.e.
!CONFIG_DM_SERIAL).
Signed-off-by: Asherah Connor <ashe@kivikakk.ee>
Reviewed-by: Simon Glass <sjg@chromium.org>
Asherah Connor [Wed, 10 Mar 2021 11:39:23 +0000 (22:39 +1100)]
terminal: correct stdio_dev invocations
stdio_dev methods have taken a pointer to themselves since
709ea543
(nearly 7 years ago).
Signed-off-by: Asherah Connor <ashe@kivikakk.ee>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heiko Schocher [Wed, 10 Mar 2021 07:15:00 +0000 (08:15 +0100)]
rtc: add support for rv3028 rtc
Add support for rtc3028 rtc from microcrystal.
based on linux dirver:
commit
a38fd8748464: ("Linux 5.12-rc2")
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Etienne Carriere [Mon, 8 Mar 2021 21:38:09 +0000 (22:38 +0100)]
test: scmi: add local variables for scmi agent reference
Add local variables agent0/agent1 to refer to SCMI sandbox context
agent and ease readability of the test.
For consistency, rename regul_dev to regul0_dev and remove sandbox_voltd
in dm_test_scmi_voltage_domains().
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Etienne Carriere [Mon, 8 Mar 2021 21:38:08 +0000 (22:38 +0100)]
firmware: scmi: fix inline comments and minor coding style issues
Fix inline comments and empty line in scmi driver and test files.
Remove test on IS_ENABLED(CONFIG_*_SCMI) in test/dm/scmi.c since these
configuration are expected enabled when CONFIG_FIRMWARE_SCMI is enabled
in sandbox configuration.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Etienne Carriere [Mon, 8 Mar 2021 21:38:07 +0000 (22:38 +0100)]
firmware: scmi: sandbox test for voltage regulator
Implement sandbox regulator devices for SCMI voltage domains
and test them in DM scmi tests.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Etienne Carriere [Mon, 8 Mar 2021 21:38:06 +0000 (22:38 +0100)]
firmware: scmi: voltage regulator
Implement voltage regulators interfaced by the SCMI voltage domain
protocol. The DT bindings are defined in the Linux kernel since
SCMI voltage domain and regulators patches [1] and [2] integration
in v5.11-rc7.
Link: [1] https://github.com/torvalds/linux/commit/
0f80fcec08e9c50b8d2992cf26495673765ebaba
Link: [2] https://github.com/torvalds/linux/commit/
2add5cacff3531e54c50b0832128299faa9f0563
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Stefan Herbrechtsmeier [Mon, 8 Mar 2021 16:07:11 +0000 (16:07 +0000)]
disk: gpt: verify alternate LBA points to last usable LBA
The gpt command require the GPT backup header at the standard location
at the end of the device. Check the alternate LBA value before reading
the GPT backup header from the last usable LBA of the device.
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Sean Anderson [Thu, 4 Mar 2021 16:34:23 +0000 (11:34 -0500)]
cmd: xtrace: Convert to bool
This variable is a boolean, not a string.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Phil Sutter [Wed, 3 Mar 2021 00:57:35 +0000 (01:57 +0100)]
pci: Mark 64bit Memory BARs as such
Just a bit more info to the reader.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
Sean Anderson [Sun, 28 Feb 2021 21:29:51 +0000 (16:29 -0500)]
hush: Fix assignments being misinterpreted as commands
If there were no variable substitutions in a command, then initial
assignments would be misinterpreted as commands, instead of being skipped
over. This is demonstrated by the following example:
=> foo=bar echo baz
Unknown command 'foo=bar' - try 'help'
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Farhan Ali [Wed, 24 Feb 2021 23:25:53 +0000 (15:25 -0800)]
mtd: Update fail_addr when erase fails due to bad blocks
For all other erase failures, the fail_addr is updated with the
failing address. Only in the case of erase failure due to bad block
detection, the fail_addr is not updated. This change simply updates
the fail_addr for this specific scenario so that it is consistent with
the rest of the code.
Signed-off-by: Farhan Ali <farhan.ali@broadcom.com>
Peter Robinson [Wed, 17 Feb 2021 17:06:53 +0000 (17:06 +0000)]
Tegra: remove e2220-1170 board
It's an old bringup board with out upstream Linux or L4T support
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Heinrich Schuchardt [Wed, 17 Feb 2021 11:55:54 +0000 (12:55 +0100)]
bootm: do not hang on failure
On ARMv8 systems
load mmc 0:1 $loadaddr vmlinuz-5.10.0-3-arm64
booti
leads to a hanging system requiring to physically reset the system:
FDT and ATAGS support not compiled in - hanging
### ERROR ### Please RESET the board ###
For systems where physical access is difficult hanging is a poor choice.
It is preferable to reset the system when U-Boot reaches a state that is
not recoverable.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Joel Stanley [Wed, 17 Feb 2021 03:20:42 +0000 (13:50 +1030)]
hash: Allow for SHA512 hardware implementations
Similar to support for SHA1 and SHA256, allow the use of hardware hashing
engine by enabling the algorithm and setting CONFIG_SHA_HW_ACCEL /
CONFIG_SHA_PROG_HW_ACCEL.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Joel Stanley [Wed, 17 Feb 2021 03:20:40 +0000 (13:50 +1030)]
hw_sha: Fix coding style errors
Checkpatch complains about:
ERROR: "foo * bar" should be "foo *bar"
and
CHECK: Alignment should match open parenthesis
Signed-off-by: Joel Stanley <joel@jms.id.au>
Patrick Delaunay [Mon, 8 Feb 2021 12:54:31 +0000 (13:54 +0100)]
lib: optee: migration optee_copy_fdt_nodes for OF_LIVE support
The optee_copy_fdt_nodes is only used to copy op-tee nodes
of U-Boot device tree (from gd->fdt_blob when OF_LIVE is not activated)
to external device tree but it is not compatible with OF_LIVE.
This patch migrates all used function fdt_ functions to read node on
old_blob to ofnode functions, compatible with OF_LIVE and remove this
parameter "old_blob".
The generated "device tree" is checked on stm32mp platform with OF_LIVE
activated.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Jaehoon Chung [Thu, 28 Jan 2021 11:42:34 +0000 (20:42 +0900)]
power: pmic: remove pmic_max77696.c file
Remove pmic_max77696.c file.
The maintaining pmic_max77696.c file is useless.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Thu, 28 Jan 2021 11:42:33 +0000 (20:42 +0900)]
board: warp: add power_max77696_init() function
Add power_max77696_init() function.
Since warp doesn't support DM, the keeping its code in board file is
better than maintainig the file of driver.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Tom Rini [Sun, 11 Apr 2021 18:11:05 +0000 (14:11 -0400)]
Merge branch '2021-04-11-remove-non-migrated-boards'
- Remove a large number of boards that have not migrated to DM_MMC, for
which the migration deadline with 2 years ago at v2019.04.
Tom Rini [Sun, 11 Apr 2021 11:40:25 +0000 (07:40 -0400)]
Merge tag 'video-2021-07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-video
- rk3399 eDP support
- pwm backlight without a known period_ns
- add Chrome OS EC PWM driver
- Kconfig SIMPLE_PANEL DM_GPIO dependency
- remove mb862xx driver remnants
- fix KiB format in reserve_video() debug trace
- fix tegra124 sor CSTM LVDS_EN_ENABLE/DISABLE config
- fix line padding calculation for 16 and 24 BPP bitmaps
Tom Rini [Sat, 10 Apr 2021 20:56:59 +0000 (16:56 -0400)]
Merge tag 'efi-2021-07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2021-07-rc1
Bug fixes:
* support EFI, HOST, VIRTIO in fsinfo command
* simplify efi_get_device_path_text()
* add missing EFI_UNACCEPTED_MEMORY_TYPE
* mkeficapsule: improve online help
* avoid several build warnings
Documentation:
* UEFI documentation for initrd loading options
* describe building OP-TEE with for UEFI variables
* mmc man-page
Tom Rini [Sat, 10 Apr 2021 14:58:56 +0000 (10:58 -0400)]
ppc: Remove MPC837XEMDS board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Sylwester Nawrocki [Tue, 1 Dec 2020 11:30:50 +0000 (12:30 +0100)]
video: Fix line padding calculation for 16 and 24 BPP bitmaps
Each row in the pixel array in the bitmap file is padded
if necessary so the row size is always a multiple of 4 bytes.
In current code the complement of row size to a multiple of
4 bytes is further unnecessarily multiplied by the pixel size.
This results in incorrect displaying of bitmaps having row size
that is not a multiple of 4 bytes. Fix this by removing
the unnecessary multiplication.
Tested with 24BPP bitmap and XRGB32 display.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Heinrich Schuchardt [Sun, 4 Apr 2021 23:48:51 +0000 (01:48 +0200)]
tegra: video: fix tegra_dc_sor_config_panel()
Bitwise OR has a higher operator precedence than the ternary conditional.
Add the missing parentheses.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Patrick Delaunay [Fri, 9 Apr 2021 16:02:06 +0000 (18:02 +0200)]
board_f: cosmetic: change the debug trace to KB in reserve_video
Update the debug trace for the reserved video memory to KB as indicated
in the message with "%luk"; before the patch the computed size
gd->relocaddr - addr is in bytes.
This patch aligns the debug trace in reserve_video() with others
functions, for example on stm32mp157c-dk2:
- Reserving 3080192k for video at:
dfd00000
+ Reserving 3008k for video at:
dfd00000
Reserving 873k for U-Boot at:
dfc25000
Reserving 32776k for malloc() at:
ddc23000
Reserving 72 Bytes for Board Info at:
ddc22fb0
Reserving 280 Bytes for Global Data at:
ddc22e90
Reserving 119072 Bytes for FDT at:
ddc05d70
Reserving 0x278 Bytes for bootstage at:
ddc05af0
Fixes:
5630d2fbc50f3035 ("board: Show memory for frame buffers")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Trevor Woerner [Mon, 15 Mar 2021 22:52:45 +0000 (18:52 -0400)]
finish removing mb862xx video driver
drivers/video/mb862xx.c was removed in commit
9c1e098fb92de38f0017585658dd50c3009c84ab from December 2020, however, this
last little remnant in drivers/video/cfb_console.c remained.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Asherah Connor [Wed, 3 Mar 2021 03:46:47 +0000 (14:46 +1100)]
video: SIMPLE_PANEL depends on DM_GPIO
SIMPLE_PANEL currently only depends on PANEL && BACKLIGHT, but the code
makes references to dm_gpio_set_value and gpio_request_by_name. These
are defined in drivers/gpio/gpio-uclass.c, so a dependency on DM_GPIO
corrects these link errors:
aarch64-linux-gnu-ld.bfd: drivers/built-in.o: in function `simple_panel_set_backlight':
/home/kameliya/u-boot/drivers/video/simple_panel.c:42: undefined reference to `dm_gpio_set_value'
aarch64-linux-gnu-ld.bfd: drivers/built-in.o: in function `simple_panel_enable_backlight':
/home/kameliya/u-boot/drivers/video/simple_panel.c:27: undefined reference to `dm_gpio_set_value'
aarch64-linux-gnu-ld.bfd: drivers/built-in.o: in function `simple_panel_of_to_plat':
/home/kameliya/u-boot/drivers/video/simple_panel.c:72: undefined reference to `gpio_request_by_name'
This issue is only exposed if you have a board which enables
CONFIG_DM_VIDEO without CONFIG_DM_GPIO; so far, none do, but soon a QEMU
board may.
Signed-off-by: Asherah Connor <ashe@kivikakk.ee>
Alper Nebi Yasak [Thu, 22 Oct 2020 20:49:27 +0000 (23:49 +0300)]
pwm: Add a driver for Chrome OS EC PWM
This PWM is used in rk3399-gru-bob and rk3399-gru-kevin to control
the display brightness. We can only change the duty cycle, so on
set_config() we just try to match the duty cycle that dividing duty_ns
by period_ns gives us. To disable, we set the duty cycle to zero while
keeping the old value for when we want to re-enable it.
The cros_ec_set_pwm_duty() function is taken from Depthcharge's
cros_ec_set_bl_pwm_duty() but modified to use the generic pwm type.
The driver itself is very loosely based on rk_pwm.c for the general pwm
driver structure.
The devicetree binding file is from Linux, before it was converted to
YAML at
5df5a577a6b4 ("dt-bindings: pwm: Convert google,cros-ec-pwm.txt
to YAML format") in their repo.
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Alper Nebi Yasak [Thu, 22 Oct 2020 20:49:26 +0000 (23:49 +0300)]
video: backlight: Support PWMs without a known period_ns
The PWM device provided by Chrome OS EC doesn't really support anything
other than setting a relative duty cycle. To support it as a backlight,
this patch makes the PWM period optional in the device tree and pretends
the valid brightness range is its period_ns.
Also adds a sandbox test for a PWM channel that has a fixed period,
checking that the resulting duty_cycle matches on a set_config() even if
the requested period_ns can't be set.
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Sun, 21 Feb 2021 01:06:30 +0000 (20:06 -0500)]
ppc: Remove Cyrus_P5020 and P5040 boards
These boards have not been converted to CONFIG_DM_MMC by the deadline.
Remove them. As the P5020 is the last ARCH_P5020 platform, remove that
support as well.
Cc: Andy Fleming <afleming@gmail.com>
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Tom Rini [Sun, 21 Feb 2021 01:06:26 +0000 (20:06 -0500)]
ppc: Remove ARCH_P1022 support
With the last of the ARCH_P1022 platforms removed, finish removing the
rest of the platform support.
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Tom Rini [Sun, 21 Feb 2021 01:06:25 +0000 (20:06 -0500)]
ppc: Remove controlcenterd boards
These boards have not been converted to CONFIG_DM_MMC by the deadline.
Remove them.
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:24 +0000 (20:06 -0500)]
ppc: Remove gdsys hrcon boards
These boards have not been converted to CONFIG_DM_MMC, along with other
DM conversions, by the deadline. Remove them.
Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:23 +0000 (20:06 -0500)]
ppc: Remove gdsys strider boards
These boards have not been converted to CONFIG_DM_MMC, along with other
DM conversions, by the deadline. Remove them.
Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:22 +0000 (20:06 -0500)]
ppc: Remove MPC8308RDB board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:21 +0000 (20:06 -0500)]
ppc: Remove T2081QDS board and ARCH_T2081 support
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it. It is also the only ARCH_T2081 board so remove that support
as well.
Cc: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Cc: Ruchika Gupta <ruchika.gupta@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:20 +0000 (20:06 -0500)]
ppc: Remove TARGET_T1040QDS references
The TARGET_T1040QDS platforms have been removed already, drop some
remaining references in the code.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:18 +0000 (20:06 -0500)]
arm: Remove tqma6s_wru4_mmc config
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:16 +0000 (20:06 -0500)]
arm: Remove mx6dlarm2 board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Jason Liu <jason.hui.liu@nxp.com>
Cc: Ye Li <ye.li@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:15 +0000 (20:06 -0500)]
arm: Remove cgtqmx6eval board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:14 +0000 (20:06 -0500)]
arm: Remove titanium board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:13 +0000 (20:06 -0500)]
arm: Remove ts4800 board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Lucile Quirion <lucile.quirion@savoirfairelinux.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:11 +0000 (20:06 -0500)]
arm: Remove mx53evk board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Jason Liu <jason.hui.liu@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:09 +0000 (20:06 -0500)]
arm: Remove pfla02 board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:08 +0000 (20:06 -0500)]
arm: Remove zc5202 and zc5601 boards
These boards have not been converted to CONFIG_DM_MMC by the deadline.
Remove them.
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:06 +0000 (20:06 -0500)]
arm: Remove xpress board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:04 +0000 (20:06 -0500)]
arm: Remove kc1 board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Paul Kocialkowski <contact@paulk.fr>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:03 +0000 (20:06 -0500)]
arm: Remove am3517_crane board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Nagendra T S <nagendra@mistralsolutions.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:02 +0000 (20:06 -0500)]
arm: Remove omap3_ha board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Stefan Roese <sr@denx.de>
Cc: Tapani Utriainen <linuxfae@technexion.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:06:01 +0000 (20:06 -0500)]
arm: Remove tricorder board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Thomas Weber <weber@corscience.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:58 +0000 (20:05 -0500)]
arm: Remove platinum_picon board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:57 +0000 (20:05 -0500)]
arm: Remove Broadcom Cygnus boards
These boards have not been converted to CONFIG_DM by the deadline.
Remove them.
Cc: Steve Rae <steve.rae@raedomain.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:55 +0000 (20:05 -0500)]
arm: Remove bcm23550_w1d board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Steve Rae <steve.rae@raedomain.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:54 +0000 (20:05 -0500)]
arm: Remove bcm28155_ap board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Steve Rae <steve.rae@raedomain.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:53 +0000 (20:05 -0500)]
arm: Remove picosam9g45 board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Erik van Luijk <evanluijk@interact.nl>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:52 +0000 (20:05 -0500)]
arm: Remove wb50n board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Ben Whitten <ben.whitten@lairdtech.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:51 +0000 (20:05 -0500)]
arm: Remove wb45n board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Ben Whitten <ben.whitten@lairdtech.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:50 +0000 (20:05 -0500)]
arm: Remove bcm958712k board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Jon Mason <jon.mason@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:49 +0000 (20:05 -0500)]
arm: Remove s32v234evb board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Eddy Petrișor <eddy.petrisor@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:48 +0000 (20:05 -0500)]
arm: Remove secomx6quq7 board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:47 +0000 (20:05 -0500)]
arm: Remove vexpress_ca15_tc2 board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:43 +0000 (20:05 -0500)]
arm: Remove apf27 board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Philippe Reynes <tremyfr@yahoo.fr>
Cc: Eric Jarrige <eric.jarrige@armadeus.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:42 +0000 (20:05 -0500)]
arm: Remove ts4600 board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:41 +0000 (20:05 -0500)]
arm: Remove sc_sps_1 board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:40 +0000 (20:05 -0500)]
arm: Remove SANSA_FUZE_PLUS board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 21 Feb 2021 01:05:38 +0000 (20:05 -0500)]
arm: Remove xfi3 board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 10 Feb 2021 02:42:56 +0000 (21:42 -0500)]
drivers: ata: Remove mvsata_ide driver
The mvsata_ide driver was due for DM conversion by v2019.07. As that
has long passed, remove the driver and disable it in the boards which
had enabled it.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 10 Feb 2021 02:42:50 +0000 (21:42 -0500)]
ppc: Remove MPC8349ITX board
This board relies on using CONFIG_LIBATA but does not enable CONFIG_AHCI. The
deadline for this conversion was the v2019.07 release. The use of CONFIG_AHCI
requires CONFIG_DM. The deadline for this conversion was v2020.01. Remove
this board.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 10 Feb 2021 02:42:48 +0000 (21:42 -0500)]
arm: Remove ot1200 board
This board relies on using CONFIG_LIBATA but does not enable CONFIG_AHCI. The
deadline for this conversion was the v2019.07 release. In order to
convert to using the DWC SATA driver under DM further migrations are
required.
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tom Rini [Wed, 10 Feb 2021 02:42:47 +0000 (21:42 -0500)]
arm: Remove dms-ba16 board
This board relies on using CONFIG_LIBATA but does not enable CONFIG_AHCI. The
deadline for this conversion was the v2019.07 release. The use of CONFIG_AHCI
requires CONFIG_DM. The deadline for this conversion was v2020.01. Remove
this board.
Cc: Akshay Bhat <akshaybhat@timesys.com>
Cc: Ken Lin <Ken.Lin@advantech.com.tw>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 10 Feb 2021 02:42:44 +0000 (21:42 -0500)]
ata: DWC_AHSATA depends on BLK
The dwc ahsata driver is written such that CONFIG_BLK must be enabled,
add this as a dependency in Kconfig.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 10 Feb 2021 02:42:43 +0000 (21:42 -0500)]
am57xx_hs_evm_usb: Enable AHCI and BLK
Enable the AHCI and BLK features to complete migration of various
drivers.
Cc: Andrew F. Davis <afd@ti.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 10 Feb 2021 02:42:42 +0000 (21:42 -0500)]
ls1012aqds_tfa_SECURE_BOOT: Remove unused CONFIG_SCSI_AHCI
Signed-off-by: Tom Rini <trini@konsulko.com>
Ilias Apalodimas [Mon, 29 Mar 2021 21:42:36 +0000 (00:42 +0300)]
efi_loader: Change ptr arithmetics tcg eventlog buffer
Although ptr arithmetics are allowed with extensions in gcc, they
are not allowed by the C spec. So switch to (void *)(uintptr_t) instead
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Heinrich Schuchardt [Thu, 8 Apr 2021 20:02:29 +0000 (22:02 +0200)]
tools/mkeficapsule: improve online help
Show short arguments along with long arguments in online help:
$ tools/mkeficapsule -h
Usage: mkeficapsule [options] <output file>
Options:
-f, --fit <fit image> new FIT image file
-r, --raw <raw image> new raw image file
-i, --index <index> update image index
-I, --instance <instance> update hardware instance
-K, --public-key <key file> public key esl file
-D, --dtb <dtb file> dtb file
-O, --overlay the dtb file is an overlay
-h, --help print a help message
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Thu, 8 Apr 2021 07:15:52 +0000 (09:15 +0200)]
efi_loader: esrt: wrong type for LocateHandleBuffer()
efi_locate_handle_buffer() expects no_handles to be of type efi_uintn_t *.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Thu, 8 Apr 2021 10:15:26 +0000 (12:15 +0200)]
efi_loader: use correct printf codes
For printing u32 use %u not %d.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Sughosh Ganu [Thu, 8 Apr 2021 07:00:55 +0000 (12:30 +0530)]
efi_loader: efi_esrt: Fix the build warning for 32 bit systems
Fix the build warning when building for 32 bit systems by using the
length modifier for size_t.
lib/efi_loader/efi_esrt.c: In function ‘efi_esrt_populate’:
include/efi_loader.h:126:8: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 8 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Sughosh Ganu [Wed, 7 Apr 2021 11:53:31 +0000 (17:23 +0530)]
efi_loader: Kconfig: Select IMAGE_SIGN_INFO when capsule authentication is enabled
Enable building of the crypto helper functions used during capsule
authentication by selecting IMAGE_SIGN_INFO.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Fri, 2 Apr 2021 20:16:22 +0000 (22:16 +0200)]
efi_loader: EFI_UNACCEPTED_MEMORY_TYPE
* UEFI spec 2.9 introduced a new memory type EFI_UNACCEPTED_MEMORY_TYPE.
Add it to enum EFI_MEMORY_TYPE.
* Add missing EFI_MEMORY_CPU_CRYPTO constant
* Improve description of EFI_PERSISTENT_MEMORY_TYPE
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Fri, 2 Apr 2021 09:30:02 +0000 (11:30 +0200)]
efi_loader: simplify efi_get_device_path_text()
Replace static function efi_get_device_handle_info() by a simplified
function efi_get_device_path_text() avoiding EFI_CALL().
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>