aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-09-18Merge branch 'next' of ↵WIP/18Sep2022-nextTom Rini108-333/+311
https://source.denx.de/u-boot/custodians/u-boot-watchdog into next - Migrate watchdog reset to cyclic infrastructure (Stefan)
2022-09-18watchdog: Further cleanupStefan Roese1-4/+2
Remove some now unused macros and #ifdef's. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
2022-09-18watchdog: Remove WATCHDOG_RESET macroStefan Roese1-36/+0
Now that we've globally replaced all WATCHDOG_RESET occurances, let's remove the ugly macro itself in the header. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
2022-09-18watchdog: Get rid of ASSEMBLY hacksStefan Roese2-36/+19
Only one occurance of WATCHDOG_RESET is left in one assembler file. This patch changes this occurance to a direct call to watchdog_reset and then removes all the ASSEMBLY ifdef'ery in watchdog.h, as it's not needed any more to clean this mess a bit up. Signed-off-by: Stefan Roese <sr@denx.de> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
2022-09-18cyclic: Use schedule() instead of WATCHDOG_RESET()Stefan Roese103-241/+235
Globally replace all occurances of WATCHDOG_RESET() with schedule(), which handles the HW_WATCHDOG functionality and the cyclic infrastructure. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
2022-09-18cyclic: Introduce schedule() functionStefan Roese2-0/+28
This patch introduces a schedule() function, which shall be used instead of the old WATCHDOG_RESET. Follow-up patches will make sure, that this new function is used. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
2022-09-18watchdog: Integrate watchdog triggering into the cyclic frameworkStefan Roese2-32/+43
This patch integrates the watchdog triggering into the recently added cyclic infrastructure. Each watchdog device that shall be triggered registers it's own cyclic function. This way, multiple watchdog devices are still supported, each via a cyclic function with separate trigger intervals. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
2022-09-16configs: Resync with savedefconfigTom Rini33-59/+13
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2022-09-16Merge branch '2022-09-16-rationalize-the-block-interface' into nextTom Rini76-358/+291
The block interface has two separate implementations, one using driver model and one not. The latter is really only needed for SPL, where size constraints allegedly don't allow use of driver model. Of course we still need space for filesystems and other code, so it isn't clear that driver model is anything more than the straw that breaks the camel's back. The driver model version uses a uclass ID for the interface time, but converts back and forth between that and if_type, which is the legacy type. The HAVE_BLOCK_DEVICE define is mostly a hangover from the old days. At present its main purpose is to enable the legacy block implementation in SPL. Finally the use of 'select' to enable BLK does not work very well. It causes kconfig errors when another option depends on BLK and it is not recommended by the kconfig style guide. This series aims to clean things up: - Enable BLK based on whether different media types are used, but still allow boards to disable it - Rename HAVE_BLOCK_DEVICE to indicates its real purpose - Drop if_type and use the uclass instead - Drop some obsolete if_type values An issue not resolved by this series is that the sandbox host interface does not actually have a device. At present it uses the root device, which was convenience for the driver model conversion but not really correct. It should be possible to clean this up, in a future series. Another minor issue is the use of UCLASS_USB for a mass-storage device. This has been the case for a while and is not addresed by this series, other than to add a comment. Note that this test relies on Tom Rini's series to drop various boards including warp and cm_t335 Finally, a patch is included to make binman put fake files in a subdirectory, since repeated runs of certain boards can cause unrelated failues (e.g. chromebook_coral) when fake files are left around.
2022-09-16blk: Drop if_typeWIP/2022-09-16-rationalize-the-block-interfaceSimon Glass5-51/+48
Use the uclass ID instead. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-09-16disk: Handle UCLASS_EFI_MEDIA in dev_print()Simon Glass1-1/+4
This is currently missing. Add it. Fix the code style for the function while we are here. Suggested-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Switch over to using uclass IDsSimon Glass41-159/+151
We currently have an if_type (interface type) and a uclass id. These are closely related and we don't need to have both. Drop the if_type values and use the uclass ones instead. Maintain the existing, subtle, one-way conversion between UCLASS_USB and UCLASS_MASS_STORAGE for now, and add a comment. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16efi: Correct assumption about if_typeSimon Glass1-1/+1
efi_set_blk_dev_to_system_partition() assumes that 0 is an invalid if_type. This is true now but is about to be false. Fix this bug to avoid a test failure. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Rewrite if_type to name functionsSimon Glass1-18/+27
These are currently using a simple array lookup in one direction, and relying on if_type being sequential. With the move to uclass IDs this needs to change. Update the code to prepare for the new way. This patch is intended to introduce no functional change. The returning of "(none)" from blk_get_if_type_name() is handling a case that should not happen in either case. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Rename var in blk_get_devnum_by_typename()Simon Glass1-6/+6
At present we use a variable with the same name as the enum. Change this since we plan to #define the enum to uclass_id. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Drop IF_TYPE_SDSimon Glass3-5/+0
This is not really needed since it does the same things as MMC. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Drop IF_TYPE_ATAPISimon Glass3-8/+0
This is not really needed since it does the same things as IDE. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16ide: Use a flag for an ATAPI deviceSimon Glass1-3/+3
Rather than setting a different interface type, use a flag to indicate that a device is ATAPI. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Drop IF_TYPE_DOCSimon Glass3-12/+0
This doesn't seem to be used for anything and it isn't clear what it is. It dates from the first U-Boot commit. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Hide the BLK and SPL_LEGACY_BLOCK optionsSimon Glass1-2/+2
We don't want boards to be able to change these. They can be handled as dependencies of options that need them, such as SPL_MMC. There is no point in enabling the block interface without any storage devices to create a block device. Hide both options from the 'menuconfig' display and deny their use in defconfig files. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Drop unnecessary CONFIG_SPL_LEGACY_BLOCK in defconfigsSimon Glass5-5/+0
This is defined automatically when needed, so drop it from the few defconfig files that define it manually. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Select SPL_LEGACY_BLOCK automaticallySimon Glass8-12/+7
Selecting this option can be handled in the Kconfig option itself, as it is with BLK. Update this an drop the various 'select' clauses. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Rename HAVE_BLOCK_DEVICESimon Glass19-25/+25
This option is fact really related to SPL. For U-Boot proper we always use driver model for block devices, so CONFIG_BLK is enabled if block devices are in use. It is only for SPL that we have two cases: - SPL_BLK is enabled, in which case we use driver model and blk-uclass.c - SPL_BLK is not enabled, in which case (if we need block devices) we must use blk_legacy.c Rename the symbol to SPL_LEGACY_BLOCK to make this clear. This is different enough from BLK and SPL_BLK that there should be no confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Drop unnecessary #ifdef in in blk_legacySimon Glass1-2/+0
We can rely on the compiler to eliminate any dead code. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16cmd: Drop use of HAVE_BLOCK_DEVICESimon Glass2-6/+1
This condition is not needed for these commands, since BLK is enabled for all boards which use block devices and commands are not available in SPL, so even if SPL_BLK is not enabled, it doesn't affect commands. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Use a function for whether block devices are availableSimon Glass4-50/+40
At present we use HAVE_BLOCK_DEVICE to indicate when block devices are available. This is a very strange option, since it partially duplicates the BLK option used by driver model. It also covers both U-Boot proper and SPL, even though one might have block devices and another not. As a first step towards correcting this, create a new inline function called blk_enabled() which indicates if block devices are available. This cannot be used in Makefiles, or #if clauses, but can be used in C code. A function is useful because we cannot use CONFIG_IS_ENABLED(BLK) to decide if block devices are needed, since we must consider the legacy block interface, enabled by HAVE_BLOCK_DEVICE Update a few places where it can be used and drop some unnecessary #if checks around some functions in disk/part.c - rely on the compiler's dead-code elimination instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16disk: Use Makefile to omit partition driversSimon Glass7-17/+5
At present these files have an #ifdef covering the whole file. Move the condition to the Makefile instead. Add BLK to the condition since future patches will adjust things so that HAVE_BLOCK_DEVICE is only for SPL, but the partition drivers are needed in U-Boot proper too. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16sandbox: Avoid defining HAVE_BLOCK_DEVICE in KonfigSimon Glass1-1/+0
This is not needed as it is implied or selected by other options anyway. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16ata: Fix an instance of SPL_SATA_SUPPORTSimon Glass1-1/+1
The _SUPPORT suffix should be dropped. This happened because the rename was applied around the same time as this new option, so did not include renaming the new option. The relevant commits are: f7560376ae sata: Rename SATA_SUPPORT to SATA 73059529b2 ata: ahci-pci: Add new option CONFIG_SPL_AHCI_PCI Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Enable CONFIG_BLK for all mediaSimon Glass7-6/+3
Enable this option on all boards which support block devices. Drop the related depencies on BLK since these are not needed anymore. Disable BLOCK_CACHE on M5253DEMO as this causes a build error. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16disk: Correct help for TPL_PARTITIONSSimon Glass1-4/+4
Fix a few typos in this help text. Fix a typo in SPL_PARTITIONS while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-15Merge branch '2022-09-15-TI-platform-updates' into nextTom Rini20-1345/+1001
- Updated for assorted platforms using various TI SoCs.
2022-09-15Nokia RX-51: Add booting from UBI into test scriptPali Rohár1-18/+77
Compile U-Boot with UBI/UBIFS support according to doc/board/nokia/rx51.rst instructions and add test case for loading kernel image from UBI volume. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-15Nokia RX-51: Add comment describing kernel image type into test scriptPali Rohár1-2/+2
Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-15Nokia RX-51: Do not set useless ARCH= in test scriptPali Rohár1-1/+1
U-Boot ignores ARCH= variable. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-15Nokia RX-51: Fix documentation how to enable UBI supportPali Rohár1-2/+1
Disable UBI fastmap support which is not supported by original Maemo 5 kernel and explicitly set UBI BEB limit to 10%, which is the value used by original Maemo 5 kernel. U-Boot default value is 20%. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-15Nokia RX-51: Call bootm in test script only when image is validPali Rohár1-1/+1
When reading of image fails then do not call bootm. This prevents false positive test result in case something bootable is present in memory. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-15Nokia RX-51: Change UBIFS volume size to 1870 LEBs in test scriptPali Rohár1-1/+1
Original Nokia UBIFS system image has 1870 LEBs, so set UBIFS volume size in test script to the same value. Number of 1870 LEBs corresponds to 230MiB (LEB size * num of LEBs = 126KiB * 1870 = 230MiB). Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-15Nokia RX-51: Set default SYS_LOAD_ADDR to 0x80008000Pali Rohár1-1/+1
At address 0x80000100 are stored initial atags passed to U-Boot by NOLO. So do not overwrite them when using $loadaddr variable which value is set from CONFIG_SYS_LOAD_ADDR option. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-15Nokia RX-51: Do not clear unknown memory in lowlevel_init.SPali Rohár1-3/+3
If kernel image in uImage or zImage format is not detected by lowlevel_init.S code then do not clear memory location where image was expected. If image is not detected then this memory region is unknown. So do not unconditionally clear it. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-15Nokia RX-51: Remove label copy_kernel_start from lowlevel_init.SPali Rohár1-1/+0
Label copy_kernel_start is now unused. Remove it. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-15configs: Add configs for j721s2 High Security EVMJayesh Choudhary3-0/+397
Add j721s2 High Security EVM defconfig. These configs are same as for the non-secure part, except for: CONFIG_TI_SECURE_DEVICE option set to 'y' CONFIG_FIT_IMAGE_POST_PROCESS option set to 'y' CONFIG_SPL_FIT_IMAGE_POST_PROCESS option set to 'y' CONFIG_BOOTCOMMAND uses FIT images for booting Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2022-09-15configs: Add configs for J7200 High Security EVMAndrew Davis3-1/+383
Add J7200 High Security EVM defconfig. These defconfigs are the same as for the non-secure part, except for: CONFIG_TI_SECURE_DEVICE option set to 'y' CONFIG_BOOTCOMMAND uses FIT images for booting Signed-off-by: Andrew Davis <afd@ti.com> [j-choudhary@ti.com: add few configs from GP variant which were missing] Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2022-09-15brppt1: Update environment to support new boot conceptBernhard Messerklinger2-7/+15
* Drop legacy /boot/PPTImage.md5 check * Update device tree naming * Update t30args#0 root cmd line property to support latest kernel versions (root=/dev/mmcblk0p2 for linux < 4 and root=/dev/mmcblk1p2 for linux >= 4) * Add custom bootloader version string * Destroy invalid dtb at ${dtbaddr} and configuration script at ${cfgaddr} to ensure proper boot in warm restart case. Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
2022-09-15include: configs: brppt1: Fix commit 0ea4fc4dcf90Bernhard Messerklinger2-2/+1
Commit 0ea4fc4dcf90 ("board/BuR: invalidate ${dtbaddr} before cfgscr") destroys the boot targets b_t30lgcy#0 and b_t30lgcy#1. The reason behind this is, that b_t30lgcy#0 and b_t30lgcy#1 both load the for booting needed device trees from mmc and the cfgscr script patches those. Because of this, cfgscr is not allowed to destroy the previously loaded device tree otherwise cfgscr will fail. This patch moves the device trees invalidation on warm restart to the PREBOOT cmd to fix that issue. Fixes: 0ea4fc4dcf90 ("board/BuR: invalidate ${dtbaddr} before cfgscr") Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
2022-09-15brppt1: Cleanup device treeBernhard Messerklinger2-201/+32
* Remove unnecessary device tree nodes which are not needed in U-Boot directly. * Move all U-Boot specific device tree properties to u-boot dtsi. Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
2022-09-15brppt1: Fix SPL boot stageBernhard Messerklinger2-1/+81
Commit 6337d53fdf45 ("arm: dts: sync am33xx with Linux 5.9-rc7") syncs the am335x device tree with the latest linux kernel am335x device tree. That causes problems with device tree in SPL stage. To fix the issues CONFIG_SPL_OF_TRANSLATE must be set to handle the synced bus addresses correctly. A custom U-Boot device tree is also needed since the SPL build removes bus properties from bus nodes which are not explicitly marked with the u-boot,dm-spl or u-boot,dm-pre-reloc flag. Therefore all parent buses of the in the SPL needed devices must be marked with u-boot,dm-pre-reloc. Also since there is no driver for "ti,sysc" compatible property in SPL the buses marked with this compatible string must also be marked with compatible = "simple-bus" to make the underlying devices visible in SPL. Otherwise the matching device drivers aren't found and the uclass drivers are dropped. Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
2022-09-15brppt1: Remove unused board variantsBernhard Messerklinger8-1105/+7
The SPI and NAND board variants never went into production. Drop those board variants. Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
2022-09-15Merge branch '2022-09-15-general-improvements' into nextTom Rini31-55/+671
- Add uncompressed kernel image support to falcon mode, TEE improvements, make xyz-modem timeout configurable, gpio updates and other assorted improvements.
2022-09-15lib: rsa: fix padding_pss_verifyHeinrich Schuchardt1-0/+5
Check the that the hash length is shorter than the message length. This avoids: ./tools/../lib/rsa/rsa-verify.c:275:11: warning: ‘*db’ may be used uninitialized [-Wmaybe-uninitialized] 275 | db[0] &= 0xff >> leftmost_bits; Fixes: 061daa0b61f0 ("rsa: add support of padding pss") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>