]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
2 years agoConvert CONFIG_SYS_I2C_EEPROM_CCID et al to Kconfig
Tom Rini [Wed, 10 Aug 2022 14:29:27 +0000 (10:29 -0400)]
Convert CONFIG_SYS_I2C_EEPROM_CCID et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_I2C_EEPROM_CCID
   CONFIG_SYS_I2C_EEPROM_NXID
   CONFIG_SYS_EEPROM_BUS_NUM

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2022-08-26-assorted-platform-updates' into next
Tom Rini [Fri, 26 Aug 2022 18:47:48 +0000 (14:47 -0400)]
Merge branch '2022-08-26-assorted-platform-updates' into next

- Assorted Arm, TI and Qualcomm platform updates

2 years agofirmware: ti_sci: Move ACK checking to ti_sci_do_xfer() function
Andrew Davis [Tue, 26 Jul 2022 01:25:06 +0000 (20:25 -0500)]
firmware: ti_sci: Move ACK checking to ti_sci_do_xfer() function

We can check if the message was acknowledged in the common
ti_sci_do_xfer() which lets us remove it from after each call to this
function. This simplifies the code and reduces binary size.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agofirmware: ti_sci: Remove inline keyword from functions
Andrew Davis [Tue, 26 Jul 2022 01:25:05 +0000 (20:25 -0500)]
firmware: ti_sci: Remove inline keyword from functions

The inline hint is not needed here, the compiler will do the right thing
based on if we are compiling for speed or for code size. In this case the
inline causes this function to be placed inside each callsite which is
not the right thing to do for either speed nor size. There is no
performance benefit to this due to the larger function size reducing
cache locality, but there is a huge size penalty. Remove inline keyword.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agofirmware: ti_sci: Factor out message alloc failed message
Andrew Davis [Tue, 26 Jul 2022 01:25:04 +0000 (20:25 -0500)]
firmware: ti_sci: Factor out message alloc failed message

We don't need to print the same message in every location, just
print it in the function that fails and remove all the extra
message printouts.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agofirmware: ti_sci: Reduce output on ti_sci_do_xfer error
Andrew Davis [Tue, 26 Jul 2022 01:25:03 +0000 (20:25 -0500)]
firmware: ti_sci: Reduce output on ti_sci_do_xfer error

This ti_sci_do_xfer() function already prints out the reason for the
failure, and the caller of each of these functions should also notify
the user of the failed task. Remove this extra level of error message.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agoarm: dts: qcom: Sync pinctrl DT nodes with Linux bindings
Sumit Garg [Wed, 27 Jul 2022 08:22:04 +0000 (13:52 +0530)]
arm: dts: qcom: Sync pinctrl DT nodes with Linux bindings

Currently for all Qcom SoCs/boards there are separate compatibles for
GPIO and pinctrl. But this is inconsistent with official (upstream) Linux
bindings which requires only a single compatible "qcom,<SoC name>-pinctrl"
and there is no such compatible property as "qcom,tlmm-<SoC name>".

So fix this inconsistency for Qcom SoCs in order to comply with upstream
DT bindings. This is done via removing compatibles from "msm_gpio" driver
and via binding to "msm_gpio" driver from pinctrl driver in case
"gpio-controller" property is specified for pinctrl node.

Suggested-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agopinctrl: sdm845: Remove redundant CONFIG_SDM845 check
Sumit Garg [Wed, 27 Jul 2022 08:22:03 +0000 (13:52 +0530)]
pinctrl: sdm845: Remove redundant CONFIG_SDM845 check

DT compatible is sufficient to make platform specific differentiation,
so remove redundant CONFIG_SDM845 check.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agoqcs404evb_defconfig: Enable USB configs
Sumit Garg [Thu, 4 Aug 2022 14:27:21 +0000 (19:57 +0530)]
qcs404evb_defconfig: Enable USB configs

Enable USB config options along with its dependencies like PHY, RESET,
PMIC GPIO etc. config options.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoboard: qcs404-evb: Enable USB3 specific PMIC GPIO
Sumit Garg [Thu, 4 Aug 2022 14:27:20 +0000 (19:57 +0530)]
board: qcs404-evb: Enable USB3 specific PMIC GPIO

For USB3 host controller to detect devices on the bus it is required to
enable a PMIC GPIO: usb_vbus_boost_pin. So enable that during board
specific initialization.

And since this PMIC GPIO parsing is quite u-boot specific, so add a
DT override to qcs404-evb-uboot.dtsi to represent usb_vbus_boost_pin.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agodts: qcs404-evb: Add PMIC GPIO controller node
Sumit Garg [Thu, 4 Aug 2022 14:27:19 +0000 (19:57 +0530)]
dts: qcs404-evb: Add PMIC GPIO controller node

PMIC GPIOs are special GPIOs which are accessible through SPMI bus. So
add corresponding DT nodes.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agogpio: qcom_pmic: Add support for GPIO LV/MV subtype
Sumit Garg [Thu, 4 Aug 2022 14:27:18 +0000 (19:57 +0530)]
gpio: qcom_pmic: Add support for GPIO LV/MV subtype

GPIO LV (low voltage)/MV (medium voltage) subtypes have different
features and register mappings than 4CH/8CH subtypes. Add support
for LV and MV subtypes.

With GPIO LV/MV subtype available, add "qcom,pms405-gpio" compatible
which requires support for GPIO MV subtype.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agopmic: Convert pm8916 driver to a generic Qcom PMIC driver
Sumit Garg [Thu, 4 Aug 2022 14:27:17 +0000 (19:57 +0530)]
pmic: Convert pm8916 driver to a generic Qcom PMIC driver

Since both pm8916.c and pm8916_gpio.c are already supporting multiple
Qcom SoCs, it makes sense to rename these drivers to pmic_qcom.c and
qcom_pmic_gpio.c respectively. Also, these driver can be extended to
support additional functionality if required for other Qcom SoCs.

Along with this import latest DT binding: qcom,spmi-pmic.txt from Linux
kernel and thereby remove pm8916.txt.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agodts: qcs404-evb: Add USB controller and PHY nodes
Sumit Garg [Thu, 4 Aug 2022 14:27:16 +0000 (19:57 +0530)]
dts: qcs404-evb: Add USB controller and PHY nodes

QCS404 SoC provides support for two USB controllers: one USB3 and the
other one being USB2. The USB3 controller supports further 2 PHY: one high
speed PHY and the other super speed PHY. The USB2 controller supports a
single high speed PHY. So add corresponding DT nodes.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoclocks: qcs404: Add support for USB clocks
Sumit Garg [Thu, 4 Aug 2022 14:27:15 +0000 (19:57 +0530)]
clocks: qcs404: Add support for USB clocks

Add support for USB controller and PHY clocks for QCS404 SoC.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoclocks: qcom: Add clock enable callback support
Sumit Garg [Thu, 4 Aug 2022 14:27:14 +0000 (19:57 +0530)]
clocks: qcom: Add clock enable callback support

Drivers like USB, ethernet etc. uses ".enable" hook to enable clocks.
So add corresponding support for Qcom clock drivers.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agodts: qcs404-evb: Add reset controller node
Sumit Garg [Thu, 4 Aug 2022 14:27:13 +0000 (19:57 +0530)]
dts: qcs404-evb: Add reset controller node

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoreset: qcom: Add support for QCS404 SoC reset table
Sumit Garg [Thu, 4 Aug 2022 14:27:12 +0000 (19:57 +0530)]
reset: qcom: Add support for QCS404 SoC reset table

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoreset: Convert ipq4019 driver to a generic Qcom driver
Sumit Garg [Thu, 4 Aug 2022 14:27:11 +0000 (19:57 +0530)]
reset: Convert ipq4019 driver to a generic Qcom driver

Since the base functionality remains the same for a reset driver on Qcom
SoCs, so leverage that to convert ipq4019 specific reset driver to a
generic Qcom reset driver. With that one just need to provide SoC specific
reset table.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agophy: Add support for drivers to enable USB on QCS404 SoC
Sumit Garg [Thu, 4 Aug 2022 14:27:10 +0000 (19:57 +0530)]
phy: Add support for drivers to enable USB on QCS404 SoC

QCS404 SoC supports two types of PHY, one supports high speed mode or
USB2 PHY and the other supports super speed mode or USB3 PHY. So add
corresponding PHY drivers.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agophy: Move qcom SoCs specific phy drivers to qcom folder
Sumit Garg [Thu, 4 Aug 2022 14:27:09 +0000 (19:57 +0530)]
phy: Move qcom SoCs specific phy drivers to qcom folder

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoarm: total_compute: enable psci
Davidson K [Tue, 9 Aug 2022 10:26:52 +0000 (15:56 +0530)]
arm: total_compute: enable psci

psci is used for system reset

Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
2 years agoconfigs: j721s2_evm_a72_defconfig: fix the bootcmd
Jayesh Choudhary [Tue, 2 Aug 2022 13:08:14 +0000 (18:38 +0530)]
configs: j721s2_evm_a72_defconfig: fix the bootcmd

Remove the main_cpsw0_qsgmii_phyinit variable from the boot
command as there is no ethernet firmware in j721s2.

Fixes: 8886341aa670 ('configs: j721s2_evm_a72_defconfig: Add A72 specific defconfig')
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2 years agoMerge commit 'ac30d240dbb520d0980f0687630feb702a14f51a' of https://source.denx.de...
Tom Rini [Wed, 24 Aug 2022 21:30:29 +0000 (17:30 -0400)]
Merge commit 'ac30d240dbb520d0980f0687630feb702a14f51a' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash into next

Re-sync again on some linux part, add some fixes for fsl_elbc from
Pali and switch
imx8mn bsh to use nand base ident

For nand subsystem tested on:
 - imx8mn  Macronix MX30LF4G18AC
 - P2020 based board Turris 1.1 for fsl_elbc

2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Tue, 23 Aug 2022 19:44:54 +0000 (15:44 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- kirkwood: pogo_v4 & nsa310s: Add distro boot (Tony)
- kirkwood: add DM timer support and use it on lsxl boards (Michael)
- kirkwood: convert the Buffalo Linkstation LS-CHLv2 and XHL boards
  to DM (Michael)
- mvebu: turris_mox/omnia: misc improments (Pali)
- mvebu: mbus: Fix mbus driver to work also after U-Boot relocation (Pali)

2 years agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 23 Aug 2022 19:24:14 +0000 (15:24 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoboard: lsxl: update the README
Michael Walle [Wed, 17 Aug 2022 19:38:09 +0000 (21:38 +0200)]
board: lsxl: update the README

Update the board's README to reflect all the recent changes.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: disable eth0
Michael Walle [Wed, 17 Aug 2022 19:38:08 +0000 (21:38 +0200)]
board: lsxl: disable eth0

The board has only one network interface. The linux kernel will
gracefully skip a the ethernet interface if no connected PHY could be
probed. u-boot on the other hand will throw an error message. The kernel
device tree is about to be fixed. For now, just disable the ethernet
interface in our -u-boot.dtsi.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: convert to CONFIG_TIMER
Michael Walle [Wed, 17 Aug 2022 19:38:07 +0000 (21:38 +0200)]
board: lsxl: convert to CONFIG_TIMER

Enable the orion timer driver and we are good.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: convert to DM_SERIAL
Michael Walle [Wed, 17 Aug 2022 19:38:06 +0000 (21:38 +0200)]
board: lsxl: convert to DM_SERIAL

DM_SERIAL needs early malloc. The on-chip RAM is pretty tight, it's only
2kiB, with DM_SERIAL enabled, this doesn't work anymore. Fortunately for
us, we don't need the on-chip RAM because the DRAM is already
initialized before u-boot starts. Just put the early malloc area there
and use the default early malloc size.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: convert to DM_ETH
Michael Walle [Wed, 17 Aug 2022 19:38:05 +0000 (21:38 +0200)]
board: lsxl: convert to DM_ETH

Just enabling the Kconfig option for DM_ETH and DM_MDIO is enough.
Additionally, we can remove the old hardcoded config.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: convert to DM_GPIO
Michael Walle [Wed, 17 Aug 2022 19:38:04 +0000 (21:38 +0200)]
board: lsxl: convert to DM_GPIO

Use the new mvebu GPIO driver and convert all the function calls to the
former kirkwood GPIO driver. This means that we are now using the LED
uclass and the regulator uclass. Unfortunately, the GPIO LED doesn't
offer a blinking method. Thus we are now stuck with solid on and off
states, which makes debugging a bit harder. Also, there is no GPIO fan
driver for now.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: make last resort recovery more reliable
Michael Walle [Wed, 17 Aug 2022 19:38:03 +0000 (21:38 +0200)]
board: lsxl: make last resort recovery more reliable

If something is wrong with the environment, we cannot rely on a proper
u-boot operation anymore. In fact, it is possible, that we never reach
misc_init_r() with a broken environment.

Also don't enable the netconsole by environment settings. This way the
user don't have to reconfigure the environment. Instead the network
console is only enabled when the push button is pressed during boot.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: enable ATAGS support
Michael Walle [Wed, 17 Aug 2022 19:38:02 +0000 (21:38 +0200)]
board: lsxl: enable ATAGS support

We still need to be able to boot legacy images. Esp. the debian
installer will have a kernel with an appended DTB.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: use proper *_r variables
Michael Walle [Wed, 17 Aug 2022 19:38:01 +0000 (21:38 +0200)]
board: lsxl: use proper *_r variables

Use the common kernel_addr_r, ramdisk_addr_r and fdt_addr_r variable
names.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: reorder image loading and remove ramdisk_len
Michael Walle [Wed, 17 Aug 2022 19:38:00 +0000 (21:38 +0200)]
board: lsxl: reorder image loading and remove ramdisk_len

We can load the ramdisk as the last step. This way we don't have to set
the intermediate variable 'ramdisk_len' and can remove it.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: use CONFIG_DEFAULT_FDT_FILE
Michael Walle [Wed, 17 Aug 2022 19:37:59 +0000 (21:37 +0200)]
board: lsxl: use CONFIG_DEFAULT_FDT_FILE

Drop our own CONFIG_FDTFILE handling in favor of the generic
CONFIG_DEFAULT_FDT_FILE one.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: automatically select CONFIG_MISC_INIT_R
Michael Walle [Wed, 17 Aug 2022 19:37:58 +0000 (21:37 +0200)]
board: lsxl: automatically select CONFIG_MISC_INIT_R

The board code needs this to be set. Otherwise, the recovery mechanism
doesn't work. Therefore, select this option automatically with the
board.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: remove unused header files
Michael Walle [Wed, 17 Aug 2022 19:37:57 +0000 (21:37 +0200)]
board: lsxl: remove unused header files

Cleanup the included header files in the board code. These are all
leftovers from earlier days.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: remove CONFIG_ENV_OVERWRITE
Michael Walle [Wed, 17 Aug 2022 19:37:56 +0000 (21:37 +0200)]
board: lsxl: remove CONFIG_ENV_OVERWRITE

This is not needed. The user can force setting the variables with
"setenv -f".

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: remove eraseenv script
Michael Walle [Wed, 17 Aug 2022 19:37:55 +0000 (21:37 +0200)]
board: lsxl: remove eraseenv script

This is not needed. The user can do a "env default -f -a".

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: remove unused features
Michael Walle [Wed, 17 Aug 2022 19:37:54 +0000 (21:37 +0200)]
board: lsxl: remove unused features

Make the binary smaller by removing unused features.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: limit size to 384kiB
Michael Walle [Wed, 17 Aug 2022 19:37:53 +0000 (21:37 +0200)]
board: lsxl: limit size to 384kiB

The board only has a 4Mbit flash and two sectors are reserved for the
u-boot environment and the device tree.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agobutton: gpio: add DM_GPIO dependency
Michael Walle [Wed, 17 Aug 2022 19:37:52 +0000 (21:37 +0200)]
button: gpio: add DM_GPIO dependency

The gpio-button driver depends on DM_GPIO, add it to Kconfig to avoid
build errors.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agotimer: add orion-timer support
Michael Walle [Wed, 17 Aug 2022 19:37:51 +0000 (21:37 +0200)]
timer: add orion-timer support

Add timer support for Kirkwood and MVEBU devices.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: kirkwood: make it CONFIG_TIMER aware
Michael Walle [Wed, 17 Aug 2022 19:37:50 +0000 (21:37 +0200)]
arm: kirkwood: make it CONFIG_TIMER aware

If we switch to CONFIG_TIMER, we don't need the legacy timer macros and
functions anymore. Add the proper guards to exclude them from compiling.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
Pali Rohár [Wed, 17 Aug 2022 19:37:49 +0000 (21:37 +0200)]
arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register

Bit 21 in SAR register specifies if TCLK is running at 166 MHz or 200 MHz.
This information is undocumented in public Marvell Kirkwood Functional
Specifications [2], but is available in Linux v3.15 kirkwood code [1].

Commit 8ac303d49f89 ("arm: kirkwood: Do not overwrite CONFIG_SYS_TCLK")
broke support for Marvell 88F6281 SoCs because it was expected that all
those SoCs have TCLK running at 200 MHz as specified in Marvell 88F6281
Hardware Specifications [3].

Fix broken support for 88F6281 by detecting CONFIG_SYS_TCLK from SAR
register, like it was doing Linux v3.15.

[1] - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/mach-kirkwood/common.c?h=v3.15#n542
[2] - https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
[3] - https://web.archive.org/web/20120620073511/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf

Update by Stefan 2022-08-23:
- Fix compilation error for ds109

Fixes: 8ac303d49f89 ("arm: kirkwood: Do not overwrite CONFIG_SYS_TCLK")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agotime: move the CONFIG_SYS_TIMER_RATE handling to the compiler
Michael Walle [Wed, 17 Aug 2022 19:37:48 +0000 (21:37 +0200)]
time: move the CONFIG_SYS_TIMER_RATE handling to the compiler

CONFIG_SYS_TIMER_RATE might be a dynamic value, i.e. a function call
instead of a static value, thus it has to be evaluated at runtime. If it
is a static value, the compiler should be able to optimize the unused
branches out.

This will be needed for kirkwoods dynamic CONFIG_SYS_TCLK setting.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: kirkwood: nsa310s: Add Distro boot capability
Tony Dinh [Thu, 11 Aug 2022 23:40:25 +0000 (16:40 -0700)]
arm: kirkwood: nsa310s: Add Distro boot capability

- Add distro boot to board include file and deconfig file
- Miscellaneous changes:
- Remove Gerald from maintainer list (email bounced)
- Add CONFIG_SUPPORT_PASSING_ATAGS and friends to support legacy
kernel method of booting (e.g. OpenWrt) with appended DTB.
- Add CONFIG_UBIFS_SILENCE_MSG to reduce binary size.

Note that this patch is depended on the following patch:
https://patchwork.ozlabs.org/project/uboot/patch/20220807192709.21717-1-pali@kernel.org/

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2 years agoarm: mvebu: mbus: Fix mbus driver to work also after U-Boot relocation
Pali Rohár [Wed, 10 Aug 2022 12:46:09 +0000 (14:46 +0200)]
arm: mvebu: mbus: Fix mbus driver to work also after U-Boot relocation

mbus driver is initialized from arch_cpu_init() callback which is called
before relocation. This driver stores lot of functions and structure
pointers into global variables, so it is data position dependent.

Therefore after relocations all pointers are invalid and driver does not
work anymore as all pointers referes to the old memory, which overlaps with
CONFIG_SYS_LOAD_ADDR and ${loadaddr}.

For example U-Boot fuse command crashes if loadaddr memory is cleared or
rewritten by some image loaded by U-Boot load command.

  mw.w ${loadaddr} 0x0 10000
  fuse read 0 1 2

Fix this issue by removing of all mbus global variables in which are stored
pointers to structures or functions which changes during relocation. And
replace it by direct function calls (not via pointers). With this change
fuse command finally works.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: mvebu: turris_mox: Set "sfp" label in eth1 DT node when only Mox SFP is detected
Pali Rohár [Wed, 10 Aug 2022 10:54:11 +0000 (12:54 +0200)]
arm: mvebu: turris_mox: Set "sfp" label in eth1 DT node when only Mox SFP is detected

When Mox SFP module is connected after Topaz or Peridot module then port DT
node already contains "sfp" label. But Mox SFP module can be connected also
without Topaz or Peridot module in which case it is connected directly into
he eth1 DT node, which is without any label. So add "sfp" label into eth1
DT node in this case.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: mvebu: turris_omnia: Show MCU version
Pali Rohár [Wed, 10 Aug 2022 09:00:25 +0000 (11:00 +0200)]
arm: mvebu: turris_omnia: Show MCU version

There are already more MCU firmware versions for Turris Omnia in
production, so display git commit (version) of the MCU firmware during
U-Boot startup. It will help to identify what version of MCU firmware is
Turris Omnia using.

MCU firmware for Turris Omnia is open source and available at website:
https://gitlab.nic.cz/turris/hw/omnia_hw_ctrl

It can be updated from running system via i2c bus with this tool:
https://gitlab.nic.cz/turris/omnia-mcutool

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: kirkwood: pogo_v4: Add Distro boot capability
Tony Dinh [Tue, 9 Aug 2022 03:01:34 +0000 (20:01 -0700)]
arm: kirkwood: pogo_v4: Add Distro boot capability

- Add distro boot to board include file and deconfig file
- Miscellaneous changes:
- Add CONFIG_SUPPORT_PASSING_ATAGS and friends to support legacy
kernel method of booting (e.g. OpenWrt) with appended DTB.
- Add CONFIG_LTO and CONFIG_UBIFS_SILENCE_MSG, and disable some
unused configs to reduce binary size.

Note that this patch is depended on the following patch:
https://patchwork.ozlabs.org/project/uboot/patch/20220807192709.21717-1-pali@kernel.org/

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2 years agoarm: mvebu: Define env_sf_get_env_addr() for all Armada boards in SPL
Pali Rohár [Mon, 8 Aug 2022 17:13:43 +0000 (19:13 +0200)]
arm: mvebu: Define env_sf_get_env_addr() for all Armada boards in SPL

SPI0 CS0 Flash is mapped to address range 0xD4000000 - 0xD7FFFFFF by BootROM.
Proper U-Boot removes this direct mapping. So it is available only in SPL.
This applies for all 32-bit Armada BootROMs. SPL mvebu code is used only on
32-bit Armada SoCs. So move env_sf_get_env_addr() function from Turris
Omnia board to common SPL mvebu code and add proper checks for SPI0 CS0.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoPrepare v2022.10-rc3
Tom Rini [Mon, 22 Aug 2022 22:54:48 +0000 (18:54 -0400)]
Prepare v2022.10-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge tag 'dm-pull-20aug22' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Mon, 22 Aug 2022 16:41:07 +0000 (12:41 -0400)]
Merge tag 'dm-pull-20aug22' of https://source.denx.de/u-boot/custodians/u-boot-dm

binman fixes for various things
binman clean-up of compression and addition of utilities

2 years agoMerge branch '2022-08-22-platform-removals-CI-updates'
Tom Rini [Mon, 22 Aug 2022 16:32:52 +0000 (12:32 -0400)]
Merge branch '2022-08-22-platform-removals-CI-updates'

- Remove a few more platforms, update CI to Ubuntu 22.04 and perform
  some other other minor updates to Azure.

2 years agoCI: Move to Ubuntu 2022.04 "Jammy" for CI base
Tom Rini [Wed, 10 Aug 2022 01:08:54 +0000 (21:08 -0400)]
CI: Move to Ubuntu 2022.04 "Jammy" for CI base

- We now have a new enough sbsigntools in the distro, stop building.
- Use the 20220801 tag for Jammy.
- Move to pygit2 1.9.2 (current version) as the old one doesn't build on
 "Jammy".
- Add the working directory to the list of safe directories for git.
- Move to pytest 6.2.5 to address other issues.
- This move exposed a number of minor issues in the existing scripts we
  used within CI to perform the jobs themselves.  The most notable changes
  here involve using 'set +e / set -e' to enforce when we should or should
  not make non-zero buildman status be a fatal error.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agomtd: rawnand: fsl_elbc: Fix reading address pointer from DT
Pali Rohár [Fri, 19 Aug 2022 09:20:01 +0000 (11:20 +0200)]
mtd: rawnand: fsl_elbc: Fix reading address pointer from DT

During compilation gcc throws warning:

    drivers/mtd/nand/raw/fsl_elbc_nand.c: In function ‘fsl_elbc_nand_probe’:
    drivers/mtd/nand/raw/fsl_elbc_nand.c:841:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      return fsl_elbc_chip_init(0, (void *)dev_read_addr(dev), dev);
                                   ^

Fix it by using dev_read_addr_ptr() function which returns pointer instead
of dev_read_addr() which returns integer type.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agomtd: rawnand: fsl_elbc: Remove NAND_NO_SUBPAGE_WRITE flag
Pali Rohár [Mon, 15 Aug 2022 08:01:40 +0000 (10:01 +0200)]
mtd: rawnand: fsl_elbc: Remove NAND_NO_SUBPAGE_WRITE flag

Subpage write support for freescale eLBC NAND controller driver is
implemented in U-Boot and was fixes in the commit d3963721d93f ("nand: Sync
with Linux v4.1").

So remove NAND_NO_SUBPAGE_WRITE flag from the fsl_elbc_nand.c driver. This
partially revert commit cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE
to eLBC and IFC drivers"), only eLBC driver part.

With this change U-Boot with default settings can read from NAND UBIFS
image created on Linux with Linux default settings. Prior this change
U-Boot was unable to read from NAND UBIFS images created with Linux default
settings due to differnet UBI geometry.

Linux kernel fsl_elbc_nand.c driver also does not set NAND_NO_SUBPAGE_WRITE
flag and has implemented subpage write support.

Fixes: cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE to eLBC and IFC drivers")
Fixes: d3963721d93f ("nand: Sync with Linux v4.1")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Acked-By: Michael Trimarchi<michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agoconfigs: imx8mn_bsh_smm_s2: Use nand_base ident for nand identification
Michael Trimarchi [Thu, 28 Jul 2022 12:43:09 +0000 (14:43 +0200)]
configs: imx8mn_bsh_smm_s2: Use nand_base ident for nand identification

The board can mount different nand brand type. Try to use the full scan
detection and not the onfi one

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agomtd: nand: samsung: Retrieve ECC requirements from extended
Michael Trimarchi [Mon, 25 Jul 2022 10:20:24 +0000 (12:20 +0200)]
mtd: nand: samsung: Retrieve ECC requirements from extended

Upstream linux commit 8fc82d456e40a0.

On some nand controllers with hw-ecc the controller code wants to know
the ecc strength and size and having these as 0, 0 is not accepted.

Specifying these in devicetree is possible but undesirable as the nand
may be different in different production runs of the same board, so it
is better to get this info from the nand id where possible.

This commit adds code to read the ecc strength and size from the nand
for Samsung extended-id nands. This code is based on the info for the 5th
id byte in the datasheets for the following Samsung nands: K9GAG08U0E,
K9GAG08U0F, K9GAG08X0D, K9GBG08U0A, K9GBG08U0B. These all use these bits
in the exact same way.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agomtd: nand: Rename nand_get_flash_type() into nand_detect()
Michael Trimarchi [Mon, 25 Jul 2022 08:18:51 +0000 (10:18 +0200)]
mtd: nand: Rename nand_get_flash_type() into nand_detect()

Upstream linux commit 7bb427990ee364.

Rename the function to match this new behavior.

NOTE: fix nand_detect/nand_get_flash_type parameters in
mxs_nand_spl. This code seems never executed by any board
as alternative for nand detect

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agomtd: nand: change return type of nand_get_flash_type() to int
Michael Trimarchi [Mon, 25 Jul 2022 08:06:06 +0000 (10:06 +0200)]
mtd: nand: change return type of nand_get_flash_type() to int

Upstream linux commit 4722c0e958e636.

The returned "type" is never used in nand_scan_ident() and spl code

Make nand_get_flash_type() simply return an integer value in order
to avoid unnecessary ERR_PTR/PTR_ERR dance.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agomtd: nand: Rename the nand_manufacturers struct
Michael Trimarchi [Tue, 26 Jul 2022 16:33:11 +0000 (18:33 +0200)]
mtd: nand: Rename the nand_manufacturers struct

Upstream linux commit 8cfb9ab68f9070.

Drop the 's' at the end of nand_manufacturers since the struct is actually
describing a single manufacturer, not a manufacturer table.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agoCI: Azure: Merge PowerPC jobs in to one
Tom Rini [Wed, 10 Aug 2022 01:08:52 +0000 (21:08 -0400)]
CI: Azure: Merge PowerPC jobs in to one

At this point given the number of PowerPC platforms we have, a single
job to build them all fits within the time limit we have in Azure.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agopowerpc: remove support for kmtergr1 and MPC8309
Holger Brunck [Fri, 19 Aug 2022 14:55:06 +0000 (16:55 +0200)]
powerpc: remove support for kmtergr1 and MPC8309

The kmtegr1 board is out of maintenance and can be removed. As it is the
only board in the tree using MPC8309 the support for this CPU is dropped
completely.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2 years agoarm: Remove warp board
Tom Rini [Wed, 3 Aug 2022 16:11:00 +0000 (12:11 -0400)]
arm: Remove warp board

This board is missing migration to CONFIG_DM, which had a deadline of
v2020.01, which is now more than 2 years passed due.  Remove it.

Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2022-08-20-enforce-DM_ETH-migration'
Tom Rini [Sun, 21 Aug 2022 02:39:42 +0000 (22:39 -0400)]
Merge branch '2022-08-20-enforce-DM_ETH-migration'

Enforce requiring DM_ETH to be enabled for ethernet drivers, as the
migration deadline has well passed. To facilitate this, we remove some
non-migrated platforms and disable networking on a few others. Finally
we remove some of the now-useless non-DM_ETH code in some platforms as a
prerequisite for DM_ETH being set.

2 years agonet: Make DM_ETH be selected by NETDEVICE
Tom Rini [Tue, 2 Aug 2022 11:33:47 +0000 (07:33 -0400)]
net: Make DM_ETH be selected by NETDEVICE

The deadline for DM_ETH migration passed 2 years ago.  Now that
platforms which cannot be migrated have been either removed or had
drivers disabled, and platforms that needed minor help to migrate have
been forcefully migrated, we can complete the migration.

This entails select'ing DM_ETH under NETDEVICES, and then removing now
extraneous depends on lines.  In a few places, we can now either remove
options or just simplify later dependencies.

Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Ramon Fried <rfried.dev@gmail.com>
2 years agosmdkc100: Remove legacy non-DM_ETH code
Tom Rini [Tue, 2 Aug 2022 11:33:46 +0000 (07:33 -0400)]
smdkc100: Remove legacy non-DM_ETH code

Now that we are about to enable DM_ETH by default, remove legacy code.

Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agowarp7: Remove legacy non-DM_ETH code
Tom Rini [Tue, 2 Aug 2022 11:33:45 +0000 (07:33 -0400)]
warp7: Remove legacy non-DM_ETH code

Now that we are about to enable DM_ETH by default, remove legacy code.

Cc: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agovinco: Remove legacy non-DM_ETH code
Tom Rini [Tue, 2 Aug 2022 11:33:44 +0000 (07:33 -0400)]
vinco: Remove legacy non-DM_ETH code

Now that we are about to enable DM_ETH by default, remove legacy code.

Cc: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agols1021aqds/ls1021aiot: Remove legacy non-DM_ETH code
Tom Rini [Tue, 2 Aug 2022 11:33:43 +0000 (07:33 -0400)]
ls1021aqds/ls1021aiot: Remove legacy non-DM_ETH code

Now that we are about to enable DM_ETH by default, remove legacy code.

Cc: Alison Wang <alison.wang@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoam335x_sl50: Disable SPL_NET
Tom Rini [Tue, 2 Aug 2022 11:33:42 +0000 (07:33 -0400)]
am335x_sl50: Disable SPL_NET

Now that we are about to enable DM_ETH by default, disable SPL_NET as
SPL_DM is not enabled currently.

Cc: Enric Balletbo i Serra <eballetbo@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoigep00x0: Disable networking
Tom Rini [Tue, 2 Aug 2022 11:33:41 +0000 (07:33 -0400)]
igep00x0: Disable networking

This platform needs to be converted to use DM_ETH as the deadline is 2
years passed due.  Disable networking support for now.

Cc: Enric Balletbo i Serra <eballetbo@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: ks8851_mll: Remove legacy non-DM_ETH code and callers
Tom Rini [Tue, 2 Aug 2022 11:33:40 +0000 (07:33 -0400)]
net: ks8851_mll: Remove legacy non-DM_ETH code and callers

As this driver has been converted to DM_ETH and the migration deadline
is 2 years passed, remove the legacy code and callers.

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Ramon Fried <rfried.dev@gmail.com>
2 years agompc8548cds: Guard old ethernet code with !DM_ETH
Tom Rini [Tue, 2 Aug 2022 11:33:39 +0000 (07:33 -0400)]
mpc8548cds: Guard old ethernet code with !DM_ETH

There is some code here for the legacy non-DM_ETH case, add a guard
around it.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoppc: Remove corenet_ds boards
Tom Rini [Tue, 9 Aug 2022 14:16:21 +0000 (10:16 -0400)]
ppc: Remove corenet_ds boards

These boards have been orphaned for some time and are behind on various
DM migrations. Remove them.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agolayerscape: Disable CONFIG_FMAN_ENET on *aqds* platforms
Tom Rini [Tue, 9 Aug 2022 14:16:22 +0000 (10:16 -0400)]
layerscape: Disable CONFIG_FMAN_ENET on *aqds* platforms

The *aqds* platforms have not been migrated to be able to enable
CONFIG_DM_ETH with CONFIG_FMAN_ENET. Disable CONFIG_FMAN_ENET on these
platforms.

Cc: Mingkai Hu <mingkai.hu@nxp.com>
Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Cc: Pramod Kumar <pramod.kumar_1@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agofsl-mc: Update dependencies for DM_ETH
Tom Rini [Tue, 2 Aug 2022 11:33:37 +0000 (07:33 -0400)]
fsl-mc: Update dependencies for DM_ETH

When using DM_ETH, which should be the default now, we need to always
have DM_MDIO and FSL_LS_MDIO enabled, so select them.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Cc: Wasim Khan <wasim.khan@nxp.com>
Cc: Udit Agarwal <udit.agarwal@nxp.com>
Cc: Ashish Kumar <Ashish.Kumar@nxp.com>
Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Manish Tomar <Manish.Tomar@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: lpc32xx_eth.c ethernet driver
Tom Rini [Tue, 2 Aug 2022 11:33:36 +0000 (07:33 -0400)]
net: lpc32xx_eth.c ethernet driver

This driver has not been converted to DM_ETH.  The migration
deadline passed 2 years ago.

Cc: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Ramon Fried <rfried.dev@gmail.com>
2 years agoarm: Remove kzm9g board
Tom Rini [Tue, 2 Aug 2022 11:33:34 +0000 (07:33 -0400)]
arm: Remove kzm9g board

This board is behind on several mandatory DM migrations and is missing
OF_CONTROL support that makes other conversions impossible. Remove it.

Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: Remove armadillo-800eva board
Tom Rini [Tue, 2 Aug 2022 11:33:33 +0000 (07:33 -0400)]
arm: Remove armadillo-800eva board

This board is behind on several mandatory DM migrations and is missing
OF_CONTROL support that makes other conversions impossible. Remove it.

Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: Remove cm_t335 board
Tom Rini [Tue, 2 Aug 2022 11:33:32 +0000 (07:33 -0400)]
arm: Remove cm_t335 board

This board is behind on several mandatory DM migrations and is missing
OF_CONTROL support that makes other conversions impossible. Remove it.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Uri Mashiach <uri.mashiach@compulab.co.il>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: Remove edminiv2 board
Tom Rini [Tue, 2 Aug 2022 11:33:31 +0000 (07:33 -0400)]
arm: Remove edminiv2 board

This board is not converted to use CONFIG_DM, well passed the migration
deadline.  Remove it.

Cc: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agomx28evk: Remove AUART/NAND/SPI variants
Fabio Estevam [Wed, 3 Aug 2022 02:04:04 +0000 (23:04 -0300)]
mx28evk: Remove AUART/NAND/SPI variants

To ease maintenance, let's keep only the main mx28evk_defconfig
and remove the other variants that have not been migrated to DM.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2 years agobinman: Add zstd bintool
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:38 +0000 (16:25 +0200)]
binman: Add zstd bintool

Add zstd bintool to binman to support on-the-fly compression.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Add xz bintool
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:37 +0000 (16:25 +0200)]
binman: Add xz bintool

Add xz bintool to binman to support on-the-fly compression.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Add lzop bintool
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:36 +0000 (16:25 +0200)]
binman: Add lzop bintool

Add lzop bintool to binman to support on-the-fly compression.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Add gzip bintool
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:35 +0000 (16:25 +0200)]
binman: Add gzip bintool

Add gzip bintool to binman to support on-the-fly compression of Linux
kernel images and FPGA bitstreams. The SPL basic fitImage implementation
supports only gzip decompression.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Rename the module and support this, since gzip.py is a system module:
Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Add bzip2 bintool
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:34 +0000 (16:25 +0200)]
binman: Add bzip2 bintool

Add bzip2 bintool to binman to support on-the-fly compression.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Add BintoolPacker class to bintool
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:33 +0000 (16:25 +0200)]
binman: Add BintoolPacker class to bintool

Add a bintools base class for packers which compression / decompression
entry contents.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Dropped dead/untested code in version():
Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Add compression tests
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:32 +0000 (16:25 +0200)]
binman: Add compression tests

Add common test functions to test all supported compressions.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Support missing compression tools
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:31 +0000 (16:25 +0200)]
binman: Support missing compression tools

Handle missing compression tools by returning empty data and record
missing bintool.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Move compression bintool management into entry class
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:30 +0000 (16:25 +0200)]
binman: Move compression bintool management into entry class

Move management of the bintool to compress and decompress data into the
entry class and add the bintool to the list of required bintools.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Select compression bintools in cbfs_util class
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:29 +0000 (16:25 +0200)]
binman: Select compression bintools in cbfs_util class

Select the lz4 and lzma_alone bintools in cbfs_util class to centralize
the supported compression algorithm evaluation inside the class and over
multiple classes.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Move compression bintools creation into test setup
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:28 +0000 (16:25 +0200)]
binman: Move compression bintools creation into test setup

Move compression bintools (packer) creation into test setup to reuse
bintool objects between tests.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Put comp_util import back in, since it is still needed here:
Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Remove obsolete compressed data header handling
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:27 +0000 (16:25 +0200)]
binman: Remove obsolete compressed data header handling

Remove the obsolete compressed data header handling from the utilities
to compress and decompress data. The header is uncommon, not supported
by U-Boot and incompatible with external compressed artifacts.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Disable compressed data header
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:26 +0000 (16:25 +0200)]
binman: Disable compressed data header

Disable the compressed data header of the utilities to compress and
decompress data. The header is uncommon, not supported by U-Boot and
incompatible with external compressed artifacts.

The header was introduced as part of commit eb0f4a4cb402 ("binman:
Support replacing data in a cbfs") to allow device tree entries to be
larger than the compressed contents.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>