aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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>
2022-09-15cli: Reduce size of readline buffers in SPLSean Anderson1-0/+5
Normally, readline is not used int SPL. However, it may be useful to enable the Freescale DDR interactive mode in SPL, while U-Boot is still executing from SRAM. The default settings for readline result in a large buffer being allocated. Reduce the size of the maximum input line, and the number of lines of scrollback when building for SPL. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-15gpio: sandbox: Add GPIOD_IS_AF for gpio configured in alternate functionPatrice Chotard4-0/+39
This allows to test if a pin's label if displayed using gpio_get_status() when this pin is configured in alternate function. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-09-15pinctrl: pinctrl_stm32: Populate uc_priv->name[] with pinmux node's namePatrice Chotard1-2/+6
Populate uc_priv->name[] with pinmux node's name in order to indicate the pinmuxing's name in case GPIO is configured in alternate. For example, for STM32 SoC's based platform, "gpio status" command output : before Bank GPIOZ: GPIOZ0: unused : 0 [ ] GPIOZ1: unused : 0 [ ] GPIOZ2: unused : 0 [ ] GPIOZ3: unused : 0 [ ] GPIOZ4: func GPIOZ5: func GPIOZ6: unused : 0 [ ] GPIOZ7: unused : 0 [ ] GPIOZ8: unknown GPIOZ9: unknown GPIOZ10: unknown GPIOZ11: unknown GPIOZ12: unknown GPIOZ13: unknown GPIOZ14: unknown GPIOZ15: unknown After Bank GPIOZ: GPIOZ0: unused : 0 [ ] GPIOZ1: unused : 0 [ ] GPIOZ2: unused : 0 [ ] GPIOZ3: unused : 0 [ ] GPIOZ4: func i2c4-0 GPIOZ5: func i2c4-0 GPIOZ6: unused : 0 [ ] GPIOZ7: unused : 0 [ ] GPIOZ8: unknown GPIOZ9: unknown GPIOZ10: unknown GPIOZ11: unknown GPIOZ12: unknown GPIOZ13: unknown GPIOZ14: unknown GPIOZ15: unknown Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-09-15gpio: Fix pin's status display for pin with GPIOF_UNUSED functionPatrice Chotard1-1/+1
Even pin with GPIOF_UNUSED function can have a label. The criteria to add or not a space character is linked to label not to the used/unused status. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-09-15gpio: Allow to print pin's label even for pin with GPIOF_FUNC functionPatrice Chotard1-5/+11
Currently, if pin's function is GPIOF_FUNC, only "func" if displayed without any other information. It would be interesting, if information is available, to indicate which pinmuxing's name is used. For example, for STM32 SoC's based platform, "gpio status" command output : before Bank GPIOZ: GPIOZ0: unused : 0 [ ] GPIOZ1: unused : 0 [ ] GPIOZ2: unused : 0 [ ] GPIOZ3: unused : 0 [ ] GPIOZ4: func GPIOZ5: func GPIOZ6: unused : 0 [ ] GPIOZ7: unused : 0 [ ] GPIOZ8: unknown GPIOZ9: unknown GPIOZ10: unknown GPIOZ11: unknown GPIOZ12: unknown GPIOZ13: unknown GPIOZ14: unknown GPIOZ15: unknown After Bank GPIOZ: GPIOZ0: unused : 0 [ ] GPIOZ1: unused : 0 [ ] GPIOZ2: unused : 0 [ ] GPIOZ3: unused : 0 [ ] GPIOZ4: func i2c4-0 GPIOZ5: func i2c4-0 GPIOZ6: unused : 0 [ ] GPIOZ7: unused : 0 [ ] GPIOZ8: unknown GPIOZ9: unknown GPIOZ10: unknown GPIOZ11: unknown GPIOZ12: unknown GPIOZ13: unknown GPIOZ14: unknown GPIOZ15: unknown Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-09-15virtio: pci: fix bug of virtio_pci_map_capabilityXiang W1-1/+1
The bar of the structure virtio_pci_cap is the index, and each base address occupies 4 bytes, so it needs to be multiplied by 4. This patch fixes a bug reported by Felix Yan https://lists.denx.de/pipermail/u-boot/2022-August/492779.html Signed-off-by: Xiang W <wxjstz@126.com> Tested-by: Felix Yan <felixonmars@archlinux.org>
2022-09-15nvme: Fix multipage prp-listAlexander Sowarka1-4/+4
The nvme driver falsely assumed that the last entry on a page of the prp-list always points to the next page of the prp-list. This potentially can lead to the illegal creation of pages on the prp-list with only a single entry. This change now ensures that splitting the prp-list into multiple pages, behaves now as required by the NVME-Spec. Related to this, also the size of the memory allocation is adjusted accordingly. Signed-off-by: Alexander Sowarka <alexander.sowarka@aerq.com>
2022-09-15doc: cmd: loady: Document new configurationPali Rohár1-0/+7
Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-15xyz-modem: Allow to configure initial timeout for loadx and loadyPali Rohár2-2/+45
Now when loadx and loady commands could be aborted / cancelled by CTRL+C, allow to configure timeout for initial x/y-modem packet via env variable $loadxy_timeout and by default use value from new compile-time config option CONFIG_CMD_LOADXY_TIMEOUT. Value is in seconds and zero value means infinite timeout. Default value is 90s which is the value used before this change for loadx command. Other load commands loadb and loads already waits infinitely. Same behavior for loadx and loady commands can be achieved by setting $loadxy_timeout or CONFIG_CMD_LOADXY_TIMEOUT to 0. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-15post: memory: Fix format stringsSean Anderson1-18/+12
This fixes numerous cases of format strings not matching their arguments. Also keep the format strings on one line for easier grepping. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-14drivers: rng: optee_rng: register to CONFIG_OPTEE_SERVICE_DISCOVERYEtienne Carriere2-1/+7
Changes optee_rng driver to register itself has a OP-TEE service so that a device is bound for the driver when OP-TEE enumerates the PTA RNG service. Cc: Sughosh Ganu <sughosh.ganu@linaro.org> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-09-14drivers: tee: optee: discover OP-TEE servicesEtienne Carriere3-5/+208
This change defines resources for OP-TEE service drivers to register themselves for being bound to when OP-TEE firmware reports the related service is supported. OP-TEE services are discovered during optee driver probe sequence which mandates optee driver is always probe once bound. Discovery of optee services and binding to related U-Boot drivers is embedded upon configuration switch CONFIG_OPTEE_SERVICE_DISCOVERY. Cc: Jens Wiklander <jens.wiklander@linaro.org> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>