platform/kernel/u-boot-spacemit.git
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 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>
2 years agobinman: Add length header attribute to dtb entry
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:25 +0000 (16:25 +0200)]
binman: Add length header attribute to dtb entry

Add an optional length header attribute to the device tree blob entry
class based on the compressed data header from the utilities to compress
and decompress data.

If needed the header could be enabled with the following
attribute beside the compress attribute:
  prepend = "length";

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. Regarding the commit "this is
necessary to cope with a compressed device tree being updated in such a
way that it shrinks after the entry size is already set (an obscure
case)". This case need to be fixed without influence any compressed data
by itself.

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

Add a DecompressData function to entry class to allow override in child
classes and to centralize the compress and decompress in a single class.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Check only section data in multi section test
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:23 +0000 (16:25 +0200)]
binman: Check only section data in multi section test

Check only section data instead of the rest of the image in multi
section test.

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

Collect and thereby initialize bintools before any usage but after
generation of entries. This is needed to handle bintools for compress
and decompress like other bintools.

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

Forward AddBintools calls to base class to collect bintools of base
class.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Forward AddBintools calls to sub entries in cbfs_util
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:20 +0000 (16:25 +0200)]
binman: Forward AddBintools calls to sub entries in cbfs_util

Forward AddBintools calls to sub entries in cbfs_util to collect
bintools of sub entries.

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

Avoid duplicate entries in the list of bintools used by the image and
the list of missing bintools.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Skip elf tests if python elftools is not available
Stefan Herbrechtsmeier [Fri, 19 Aug 2022 14:25:18 +0000 (16:25 +0200)]
binman: Skip elf tests if python elftools is not available

Skip tests which requires python elftools if the tool is not available.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Allow collection to use entries from other sections
Simon Glass [Sat, 13 Aug 2022 17:40:50 +0000 (11:40 -0600)]
binman: Allow collection to use entries from other sections

At present the collections etype only works with entries in the same
section. This can be limiting, since in some cases the data may be inside
a subsection, e.g. if there are alignment constraints.

Add a function to find the entries in an etype and have it search
recursively. Make use of this for mkimage also.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Allow passing entries using -n
Simon Glass [Sat, 13 Aug 2022 17:40:49 +0000 (11:40 -0600)]
binman: Allow passing entries using -n

Also control over what goes in the file passed with -n using a separate
imagename subnode. This can include a section or any other entry type.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Allow the image name to be the data file
Simon Glass [Sat, 13 Aug 2022 17:40:48 +0000 (11:40 -0600)]
binman: Allow the image name to be the data file

Some image types use the -n parameter to pass in the data file. Add
support for this, with a new property.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Improve mkimage documentation
Simon Glass [Sat, 13 Aug 2022 17:40:47 +0000 (11:40 -0600)]
binman: Improve mkimage documentation

Expand this a little to make things clearer. Also drop the invalid
entry arg.

Series-changes 2
- Make it clear that -d data is concatenated/collected by binman
- Fix mulitple typoe
- Reword a sentence for grammar

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Avoid use of expected failure
Simon Glass [Sat, 13 Aug 2022 17:40:46 +0000 (11:40 -0600)]
binman: Avoid use of expected failure

The testReplaceSectionSimple() test is the only one which expects failure.
It looks odd in the output and takes time to glance at it to see that all
is in fact well. Also it does not check that the right exception is
generated.

Use the more common (in binman) approach of checking for an exception.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Adjust mkimage etype node reading
Simon Glass [Sat, 13 Aug 2022 17:40:45 +0000 (11:40 -0600)]
binman: Adjust mkimage etype node reading

Since this is implemented as a section, it should really be split into
several functions, one to read the node and one to read the entries. Do
this so that it matches how Entry_section works.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Add a way to check for missing properties
Simon Glass [Sat, 13 Aug 2022 17:40:44 +0000 (11:40 -0600)]
binman: Add a way to check for missing properties

Some new entries are likely to have required properties. Support this in a
standard way, with a list of required properties which can be set up by
base classes. Check for missing properties when the entry is read.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Fix up the entry-docs for Entry_pre_load
Simon Glass [Sat, 13 Aug 2022 17:40:43 +0000 (11:40 -0600)]
binman: Fix up the entry-docs for Entry_pre_load

This has got out of sync and needs a line wrap. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agopatman: Don't buffer test output with a single test
Simon Glass [Sat, 13 Aug 2022 17:40:42 +0000 (11:40 -0600)]
patman: Don't buffer test output with a single test

When a single test is run we don't need to buffer the test output. This
has the unfortunate side effect of suppressing test output, in particular
the binman output directory normally printed with the -X option. This is
a huge problem since it blocks debugging of tests.

We don't actually know how many tests will be run when we set up the
suite, so as a work-around, assume that test_name being specified
indicates that there is likely only one.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agopatman: Put the coverage command-line last
Simon Glass [Sat, 13 Aug 2022 17:40:41 +0000 (11:40 -0600)]
patman: Put the coverage command-line last

Put this at the end so it is easier to copy it from the terminal.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobootstage: Show func name for bootstage_mark/error
Michal Simek [Fri, 12 Aug 2022 08:54:51 +0000 (10:54 +0200)]
bootstage: Show func name for bootstage_mark/error

bootstage_mark() and bootstate_error() are not recording any name and in
report it is showing as id=<value>. That's not useful and it is better to
show function name which calls it.
That's why use macros with passing __func__ as recorded name for bootstage.

Origin report looks like this:
ZynqMP> bootstage report
Timer summary in microseconds (10 records):
       Mark    Elapsed  Stage
          0          0  reset
  2,482,383  2,482,383  board_init_f
  4,278,821  1,796,438  board_init_r
  4,825,331    546,510  id=64
  4,858,409     33,078  id=65
  4,862,382      3,973  main_loop
  4,921,713     59,331  usb_start
  9,345,345  4,423,632  id=175

When this patch is applied.
ZynqMP> bootstage report
Timer summary in microseconds (31 records):
       Mark    Elapsed  Stage
          0          0  reset
  2,465,624  2,465,624  board_init_f
  4,278,628  1,813,004  board_init_r
  4,825,139    546,511  eth_common_init
  4,858,228     33,089  eth_initialize
  4,862,201      3,973  main_loop
  4,921,530     59,329  usb_start
  8,885,334  3,963,804  cli_loop

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agolog: Drop log_nop() functions
Simon Glass [Wed, 17 Mar 2021 18:18:37 +0000 (07:18 +1300)]
log: Drop log_nop() functions

These functions are not needed anymore since we now have logic which can
output to the console if logging is disabled. Drop the declarations.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Put fake files in a subdirectory
Simon Glass [Sun, 7 Aug 2022 15:46:46 +0000 (09:46 -0600)]
binman: Put fake files in a subdirectory

At present fake files from a previous build appear to be real files for
a subsequent build, since they sit in the output directory.

This can cause problems, since binman may need to parse the file, e.g.
with the Intel description.bin files.

Fix this by putting them in a 'binman-fake' subdirectory. Keep a track
of the fake filename so we only create it once. Subsequent builds will
still see that the file is missing and mark it as fake.

Update a few tests to check the behaviour.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoMerge branch '2022-08-20-assorted-updates'
Tom Rini [Sat, 20 Aug 2022 23:00:10 +0000 (19:00 -0400)]
Merge branch '2022-08-20-assorted-updates'

- Assorted updates including some updates to the rx_51 platform

2 years agogpio: aspeed: port Linux dt-bindings header file
Dhananjay Phadke [Thu, 4 Aug 2022 15:58:54 +0000 (08:58 -0700)]
gpio: aspeed: port Linux dt-bindings header file

Makes it easier to add readable GPIO definitions in DTS files
for Aspeed SOC based boards.

Ported with small edits to add IBM copyright statement and fix
for checkpatch warning.

Signed-off-by: Dhananjay Phadke <dphadke@linux.microsoft.com>
Reviewed-by: Billy Tsai <billy_tsai@aspeedtech.com>
Acked-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
2 years agohwconfig: Allow to use restricted env
Pali Rohár [Sun, 7 Aug 2022 19:06:04 +0000 (21:06 +0200)]
hwconfig: Allow to use restricted env

During early boot phase GD_FLG_ENV_READY is not set but env_get() may work
when env is ready in restricted mode. Do not fail with error message
"WARNING: Calling __hwconfig without a buffer and before environment is ready"
when env is already working by checking for ENV_VALID flag.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoarm: k3: Correct an awk warning
Simon Glass [Sun, 7 Aug 2022 13:12:19 +0000 (07:12 -0600)]
arm: k3: Correct an awk warning

The k3_gen_x509_cert.sh script produced this warning on gitlab and also
on my machine, e.g. with j7200_evm_r5:

awk: cmd. line:1: warning: regexp escape sequence `\ ' is not a known
   regexp operator

There is no need to escape spaces, so drop the backslashes. Also split
the line so it is a more reasonable length.

This script should really be deleted and binman used instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoarm64: explicitly disable pointer authentication instructions
Rasmus Villemoes [Mon, 8 Aug 2022 14:12:30 +0000 (16:12 +0200)]
arm64: explicitly disable pointer authentication instructions

The Yocto project builds their aarch64 cross-compiler with the
configure knob --enable-standard-branch-protection, which means that
their gcc behaves as if -mbranch-protection=standard is passed; the
default (lacking that configure knob) is -mbranch-protection=none.

This means that when building U-Boot using the Yocto toolchain, most
functions end up containing paciasp/autiasp/bti instructions. However,
since U-Boot is not an ordinary userspace application, there's no OS
kernel which has set up the required authentication keys, so these
instructions do nothing at all (even on arm64 hardware that does have
the pointer authentication capability). They do however make the image
larger.

It is theoretically possible for U-Boot to make use of the pointer
authentication protection - cf. the linux kernel's
CONFIG_ARM64_PTR_AUTH_KERNEL - but it is far from trivial, and it's
hard to see just what threat model it would protect against in a
bootloader context. Regardless, we certainly have none of the required
infrastructure now, so explicitly pass -mbranch-protection=none to
ensure those useless instructions do not get emitted.

For a toolchain not configured with
--enable-standard-branch-protection, this changes nothing. For the
Yocto toolchain, this reduces the size of both SPL and U-Boot proper
by about 3% for my imx8mp target.

If you don't have a Yocto toolchain, the effect can easily be
reproduced by applying this patch and changing =none to =standard.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoRestore pcm051_rev3_defconfig config
Matwey V. Kornilov [Thu, 11 Aug 2022 14:18:12 +0000 (17:18 +0300)]
Restore pcm051_rev3_defconfig config

pcm051_rev3_defconfig config (Phytec Wega board) has been dropped in

    64efd11d ("arm: Remove pcm051 board")

due to expired migration deadlines. Here, pcm051_rev3_defconfig support is
reintroduced.

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoNokia RX-51: Move board required options from defconfig to Kconfig
Pali Rohár [Thu, 11 Aug 2022 20:27:25 +0000 (22:27 +0200)]
Nokia RX-51: Move board required options from defconfig to Kconfig

Some of config options are board specific and should be set in into their
default values automatically. So move them from defconfig file to Kconfig
definitions to ensure that possible user custom defconfig files would have
these required options also enabled.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoNokia RX-51: Simplify calculation of attached kernel image address
Pali Rohár [Thu, 11 Aug 2022 20:27:24 +0000 (22:27 +0200)]
Nokia RX-51: Simplify calculation of attached kernel image address

Now when board starup code does not copy image to CONFIG_SYS_TEXT_BASE
address there is no need to calculate all addresses from base address at
runtime. The only address which needs to be calculated is attached kernel
image address which can be simplified at compile time without need to know
CONFIG_SYS_TEXT_BASE address or relocation address at the runtime.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoNokia RX-51: Simplify copy kernel code
Pali Rohár [Thu, 11 Aug 2022 20:27:23 +0000 (22:27 +0200)]
Nokia RX-51: Simplify copy kernel code

Expression (r + (r0 - r1)) produce same result as (r - (r1 - r0)). So it
does not matter which one is called. Always call the first option and
remove second one.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoNokia RX-51: Use U-Boot generic position independent code
Pali Rohár [Thu, 11 Aug 2022 20:27:22 +0000 (22:27 +0200)]
Nokia RX-51: Use U-Boot generic position independent code

Switch from custom board specific fixup/copy code to U-Boot generic
position independent code provided by config option POSITION_INDEPENDENT.

This also slightly decrease size of u-boot.bin binary (by 52 bytes). Note
that option POSITION_INDEPENDENT increase size but not more than custom
board fixup/copy code which is being deleted (as it is not needed anymore).

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoNokia RX-51: Fix invalidating zImage kernel format
Pali Rohár [Thu, 11 Aug 2022 20:27:21 +0000 (22:27 +0200)]
Nokia RX-51: Fix invalidating zImage kernel format

Prior starting copy of kernel image to target location, invalidate also
zImage magic header. This ensures that on target location would be image
with valid header only in the case valid header was also in the source
location and copy from source to target finished successfully. Copy is
always skipped when kernel image in source location is invalid.

Add also comment to the code which explain what is the code doing.

Fixes: cc434fccba4c ("Nokia RX-51: Add support for booting kernel in zImage format")
Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoarm: Set default MACH_TYPE in Kconfig
Pali Rohár [Thu, 11 Aug 2022 20:29:03 +0000 (22:29 +0200)]
arm: Set default MACH_TYPE in Kconfig

For boards which requires correct MACH_TYPE, set their correct default
values directly in Kconfig.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoMAINTAINERS: Update email of Neil Armstrong
Neil Armstrong [Tue, 16 Aug 2022 09:58:08 +0000 (11:58 +0200)]
MAINTAINERS: Update email of Neil Armstrong

My professional e-mail will change and the BayLibre one will
bounce after mid-september of 2022.

This updates the MAINTAINERS files and adds an entry in the
.mailmap file.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2 years agoMerge tag 'efi-2022-10-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 20 Aug 2022 17:26:17 +0000 (13:26 -0400)]
Merge tag 'efi-2022-10-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2022-10-rc3-2

Documentation:

* improve description of device probing
* describe booting RISC-V with KVM and QEMU

UEFI

* fix Makefile for mkeficapsule

2 years agotools: mkeficapsule: use pkg-config for each lib separat
Heiko Thiery [Sat, 6 Aug 2022 11:22:53 +0000 (13:22 +0200)]
tools: mkeficapsule: use pkg-config for each lib separat

Call pkg-config for each library individually.
This improves fallback handling.

Suggested-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Fixes: 31a7688cbe0e ("tools: mkeficapsule: use pkg-config to get -luuid and -lgnutls")
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_loader: disk: remove unused field
AKASHI Takahiro [Fri, 19 Aug 2022 00:48:30 +0000 (09:48 +0900)]
efi_loader: disk: remove unused field

The field, ifname, in efi_disk_obj is set but never used anywhere.
Just remove it.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agodoc: dm: clarify activation.
Michal Suchanek [Thu, 4 Aug 2022 17:57:45 +0000 (19:57 +0200)]
doc: dm: clarify activation.

Explain when devices should get activated.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>