aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2022-04-27Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xxWIP/27Apr2022Tom Rini21-35/+54
fsl-qoriq: Fixes and updates on fsl-layerscape mpc85xx: fixes and code cleanup
2022-04-26board: freescale: p1_p2_rdb_pc: Define SW macros for lower and upper NOR banksPali Rohár1-2/+11
Replace hardcoded i2c hex values for NOR banks by named SW macros in map_lowernorbank/map_uppernorbank env commands. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2022-04-26board: freescale: p1_p2_rdb_pc: Use named macros for i2c bus num and addressPali Rohár1-12/+12
Replace hardcoded boot i2c bus num and address by existing macros when generating env for CONFIG_EXTRA_ENV_SETTINGS. Same macros are used in U-Boot board code when reading information from boot i2c data. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2022-04-26board: freescale: p1_p2_rdb_pc: Fix env $vscfw_addrPali Rohár1-2/+6
Do not stringify env $vscfw_addr two times (once implicitly via string operator "" and second time explicitly via __stringify() macro) and allow to compile U-Boot without CONFIG_VSC7385_ENET (when __VSCFW_ADDR was not defined and so macro name was stringified into CONFIG_EXTRA_ENV_SETTINGS). Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2022-04-26board: freescale: p1_p2_rdb_pc: Detect both P2020 SD switch configurationsPali Rohár1-1/+2
As written in comment, P2020 has two possible SD switch configurations. Extend code to detect both of them. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2022-04-26powerpc: mpc85xx: Remove duplicate u-boot-nand.ldsPali Rohár6-0/+20
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2022-04-26mmc: fsl_esdhc: Define macro ESDHCCTL_SNOOP for Snoop attributePali Rohár1-0/+1
Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2022-04-26include: configs: at91/sam: remove stray #ifdef/#elseEugen Hristev6-52/+0
With the commit that moves the BOOTCOMMAND to Kconfig: 970bf8603b ("Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig") some stray ifdefs have been left in the header files which are now useless. Clean up the include files to remove these lines. Fixes: 970bf8603b ("Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig") Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2022-04-26board: Add sam9x60_curiosity supportDurai Manickam KR1-0/+31
Add board files, Kconfig, Makefile and MAINTAINERS. Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com>
2022-04-25nds32: Remove the architectureWIP/25Apr2022Tom Rini2-485/+0
As removal of nds32 has been ack'd for the Linux kernel, remove support here as well. Cc: Rick Chen <rick@andestech.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Rick Chen <rick@andestech.com>
2022-04-25Merge branch '2022-04-25-initial-implementation-of-stdboot'Tom Rini15-53/+1054
To quote the author: The bootflow feature provide a built-in way for U-Boot to automatically boot an Operating System without custom scripting and other customisation. This is called 'standard boot' since it provides a standard way for U-Boot to boot a distro, without scripting. It introduces the following concepts: - bootdev - a device which can hold a distro - bootmeth - a method to scan a bootdev to find bootflows (owned by U-Boot) - bootflow - a description of how to boot (owned by the distro) This series provides an implementation of these, enabled to scan for bootflows from MMC, USB and Ethernet. It supports the existing distro boot as well as the EFI loader flow (bootefi/bootmgr). It works similiarly to the existing script-based approach, but is native to U-Boot. With this we can boot on a Raspberry Pi 3 with just one command: bootflow scan -lb which means to scan, listing (-l) each bootflow and trying to boot each one (-b). The final patch shows this. With a standard way to identify boot devices, booting become easier. It also should be possible to support U-Boot scripts, for backwards compatibility only. ... The design is described in these two documents: https://drive.google.com/file/d/1ggW0KJpUOR__vBkj3l61L2dav4ZkNC12/view?usp=sharing https://drive.google.com/file/d/1kTrflO9vvGlKp-ZH_jlgb9TY3WYG6FF9/view?usp=sharing
2022-04-25bootstd: Add tests for bootstd including all uclassesSimon Glass1-0/+2
Add a set of combined tests for the bootdev, bootflow and bootmeth commands, along with associated functionality. Expand the sandbox console-recording limit so that these can work. These tests rely on a filesystem script which is not yet added to the Python tests. It is included here as a shell script. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: mmc: Add a bootdev driverSimon Glass1-1/+11
Add a bootdev driver for MMC. It mostly just calls the bootdev helper function. Add a function to obtain the block device for an MMC controller. Fix up the comment for mmc_get_blk_desc() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add an implementation of distro bootSimon Glass1-0/+24
Add a bootmeth driver which handles distro boot from a disk, so we can boot a bootflow using this commonly used mechanism. In effect, this provides the same functionality as the 'sysboot' command and shares the same code. But the interface into it is via a bootmeth. For now this requires the 'pxe' command be enabled. Future work may tidy this up so that it can be used without CONFIG_CMDLINE being enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add support for bootflowsSimon Glass1-0/+50
Add support for bootflows, including maintaining a list of them and iterating to find them. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add the bootmeth uclass and helpersSimon Glass3-0/+242
A bootmeth is a method of locating an operating system. For now, just add the uclass itself. Drivers for particular bootmeths are added later. If no bootmeths devices are included in the devicetree, create them automatically. This avoids the need for boilerplate in the devicetree files. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add the bootdev uclassSimon Glass2-0/+276
A 'bootdev' is a device which can be used to boot an operating system. It is a child of the media device (e.g. MMC) which handles reading files from that device, such as a bootflow file. Add a uclass for bootdev and the various helpers needed to make it work. Also add a binding file, empty for now. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add the bootstd uclass and core implementationSimon Glass2-0/+81
The 'bootstd' device provides the central information about U-Boot standard boot. Add a uclass for bootstd and the various helpers needed to make it work. Also add a binding file. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25bootstd: Add the concept of a bootflowSimon Glass1-0/+260
A bootflow encapsulates the process used to boot an operating system. It typically has a control file (such as extlinux.conf) and information about which 'bootdev' it came from. Add the header file for this first, since it is needed by all other files. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25fs: Add a function to set the filesystem typeSimon Glass1-0/+11
When sandbox is used with hostfs we won't have a block device, but still must set up the filesystem type before any filesystem operation, such as loading a file. Add a function to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25dm: blk: Add a function to return the device typeSimon Glass1-0/+8
Use the uclass name to get the device type for a block device. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25dm: core: Allow finding a uclass device by partial nameSimon Glass2-1/+17
In some cases two devices are related and the only way to tell is to check that the names partially patch. Add a way to check this without needing to create a new string for the comparison. Fix the comment for device_find_child_by_namelen() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25dm: core: Rename and fix uclass_get_by_name_len()Simon Glass1-3/+3
It seems that namelen is more common in U-Boot. Rename this function to fit in better. Also fix a bug where it breaks the operation of uclass_get_by_name() and add a test. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reported-by: Tim Harvey <tharvey@gateworks.com>
2022-04-25lib: Add a way to find the postiion of a trailing numberSimon Glass1-0/+18
At present it is not possible to find out which part of the string is the number part and which is before it. Add a new variant which provides this feature, so we can separate the two in the caller. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25lib: Fix a few bugs in trailing_strtoln()Simon Glass1-0/+3
At present this has a minor bug in that it reads the byte before the start of the string, if it is empty. Also it doesn't handle a non-numeric prefix which is only one character long. Fix these bugs with a reworked implementation. Add a test for the second case. The first one is hard to test. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25lib: Correct comment formatting to avoid sphinx problemsSimon Glass1-46/+46
Tweak a few comments to kep sphinx happy, in case we want to include this file one day. Also fix the 'exxamine' typo. Patch-notes: This uses: sed -i 's/@param \(\S*\)\s*/@\1: /' include/vsprintf.h to convert the @param to the new format. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25test: Add tests for trailing_strtol()Simon Glass1-2/+2
This function currently has no tests. Add some. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-25configs: Layerscape: Remove the 'fdt_addr' envHou Zhiqiang14-20/+4
On Layerscape platforms, the DTB is loaded from boot filesystem, per the fdt_addr description in doc/README.distro, it must be removed. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> [Rebased] Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2022-04-23Merge tag 'efi-2022-07-rc1-3' of ↵WIP/23Apr2022Tom Rini4-5/+43
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-07-rc1-3 Documentation: * Document image size parameter of bootefi command UEFI: * avoid building partition support in SPL/TPL where not required * improve integration of EFI subsystem and driver model * restore ability to boot arbitrary blob
2022-04-23dm: disk: add read/write interfaces with udeviceAKASHI Takahiro1-0/+7
In include/blk.h, Simon suggested: ===> /* * These functions should take struct udevice instead of struct blk_desc, * but this is convenient for migration to driver model. Add a 'd' prefix * to the function operations, so that blk_read(), etc. can be reserved for * functions with the correct arguments. */ unsigned long blk_dread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, void *buffer); unsigned long blk_dwrite(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, const void *buffer); unsigned long blk_derase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt); <=== So new interfaces are provided with this patch. They are expected to be used everywhere in U-Boot at the end. The exceptions are block device drivers, partition drivers and efi_disk which should know details of blk_desc structure. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2022-04-23efi_loader: disk: a helper function to create efi_disk objects from udeviceAKASHI Takahiro1-2/+2
Add efi_disk_probe() function. This function creates an efi_disk object for a raw disk device (UCLASS_BLK) and additional objects for related partitions (UCLASS_PARTITION). So this function is expected to be called through driver model's "probe" interface every time one raw disk device is detected and activated. We assume that partition devices (UCLASS_PARTITION) have been created when this function is invoked. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2022-04-23efi_loader: split efi_init_obj_list() into two stagesAKASHI Takahiro1-0/+2
In the next commit, CONFIG_EFI_SETUP_EARLY will become mandated in order to support dynamic enumeration of efi_disk objects. This can, however, be problematic particularly in case of file-based variable storage (efi_variable.c, default). Non-volatile variables are to be restored from EFI system partition by efi_init_variables() in efi_init_obj_list(). When efi_init_obj_list() is called in board_init_r(), we don't know yet what disk devices we have since none of device probing commands (say, scsi rescan) has not been executed at that stage. So in this commit, a preparatory change is made; efi_init_obj_list() is broken into the two functions; * efi_init_early(), and * new efi_init_obj_list() Only efi_init_early() will be called in board_init_r(), which allows us to execute any of device probing commands, either though "preboot" variable or normal command line, before calling efi_init_obj_list() which is to be invoked at the first execution of an efi-related command (or at efi_launch_capsules()) as used to be. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2022-04-23dm: disk: add UCLASS_PARTITIONAKASHI Takahiro2-0/+11
NOTE: probably we have to update config dependencies, in particular, SPL/TPL_PRINTF? With this new function, UCLASS_PARTITION devices will be created as child nodes of UCLASS_BLK device. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2022-04-23sandbox: move a function prototypeAKASHI Takahiro2-1/+2
Since host_get_dev_errr() is defined in drivers/block/sandbox.c, the associated function prototype should be in a more appropriate header file. Fixes: commit 4101f6879256 ("dm: Drop the block_dev_desc_t typedef") Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2022-04-23disk: define nullified functions for !PARTITIONSAKASHI Takahiro1-0/+16
Some defconfig enables CMD_PART even if none of any partition table types (CONFIG_*_PARTITION) are enabled. This will lead to the size growth in SPL/TPL code since disk/part.c will be compiled in any way. We will change disk/Kconfig later so that CONFIG_PARTITIONS is only enabled when, at least, one of CONFIG_*_PARTITION is enabled. To make the build work (in particular, "part" command) correctly, a few functions should be defined as void functions in case of !CONFIG_PARTITIONS. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2022-04-23disk: enable function prototypes in part.h for SPL/TPLAKASHI Takahiro1-2/+2
Since CONFIG_[SPL|TPL]_PARTITIONS were introduced, part.h has not been updated. Due to this, while the build won't fail, some functionality may possibly break as some partition-related functions are nullified even though some partition table types are enabled for SPL/TPL. Fixes: commit 88ca8e26958b ("disk: Add an option for partitions in SPL") Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2022-04-23disk: include errno.h explicitly in part.hAKASHI Takahiro1-0/+1
Some errno numbers are used in defining inline functions. So "errno.h" should be explicitly included to avoid possible build errors. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2022-04-22fdt: Add -q option to fdt addr for distro_bootcmdPeter Hoyes1-3/+3
distro_bootcmd uses this construct a few times to test $fdt_addr_r, and fall back on $fdtcontroladdr if not set/invalid: if fdt addr ${fdt_addr_r}; then ... else ... fi If the `fdt addr` test fails, it prints the following message on the console, suggesting there is an error when there is not: libfdt fdt_check_header(): FDT_ERR_BADMAGIC To remove this potentially confusing error message, this patch adds -q as a 'quiet' option for fdt addr, and uses this flag in config_distro_bootcmd.h Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
2022-04-22Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usbTom Rini1-1/+1
2022-04-22Merge tag 'u-boot-imx-20220422' of ↵Tom Rini63-541/+240
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20220422 ------------------- - Switch to DM_SERIAL - Drop MMCROOT - several cleanup CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/11815
2022-04-22generic-phy: s/CONFIG_PHY/CONFIG_IS_ENABLED(PHY)/Michal Simek1-1/+1
Allow to disable PHY driver in SPL because it checks the CONFIG_SPL_PHY variable for SPL builds. The same change was done for usb by commit fd09c205fc57 ("usb: s/CONFIG_DM_USB/CONFIG_IS_ENABLED(DM_USB)/"). Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2022-04-21ARM: imx: imx8mn-evk: change environment address variablesHeiko Thiery1-4/+12
Currently the space between kernel_addr_r and the fdt_addr_r is only 32MB. To have enough space to load kernel images bigger than 32MB change the variables to a feasible value. The new environment variables layout is based on the scheme from "include/configs/ti_armv7_common.h". The CONFIG_SYS_LOAD_ADDR value is set to 0x42000000. With that we have the same value as for the kernel_addr_r. Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-04-21configs: imx: drop IMX_FEC_BASEPeng Fan17-18/+0
IMX_FEC_BASE is not used in these boards, so drop it. Reviewed-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-04-21include/configs: drop COUNTER_FREQUENCYPeng Fan68-154/+1
Since we have CONFIG_COUNTER_FREQUENCY enabled, no need COUNTER_FREQUENCY Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-04-21crc16: Move standard CRC-16 implementation from ubifs to libPali Rohár1-0/+3
This implementation provides standard CRC-16 algorithm with polynomial x^16 + x^15 + x^2 + 1. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-04-21crc16: Rename fs/ubifs/crc16.h to include/linux/crc16.hPali Rohár1-0/+29
File fs/ubifs/crc16.h is standard linux's crc16.h include file. So move it from fs/ubifs to include/linux where are also other linux include files. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-04-21crc16-ccitt: Rename file with CRC-16-CCITT implementation to crc16-ccitt.cPali Rohár1-1/+1
U-Boot CRC-16 implementation uses polynomial x^16 + x^12 + x^5 + 1 which is not standard CRC-16 algorithm, but it is known as CRC-16-CCITT. Rename file crc16.c to crc16-ccitt.c to reduce confusion. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-04-21Merge https://source.denx.de/u-boot/custodians/u-boot-marvellWIP/21Apr2022Tom Rini1-15/+4
- mrvl_uart.sh: Remove script (Pali) - Fix Espressobin build for configs where ENV is not in SPI (Rogier) - mvebu: a37xx: Add support for reading OTP (Pali) - mvebu: uDPU: Ethernet fixes and misc DT and defconfig changes (Robert) - mvebu: Add support for reading LD0 and LD1 eFuse (Pali) - kwboot: Replace fstat()+st_size by lseek()+SEEK_END (Pali) - mvebu: turris_omnia: Enable CONFIG_CMD_FUSE (Pali) - arm: Add CONFIG_SPL_SYS_NO_VECTOR_TABLE used on 32bit MVEBU (Pali) - mvebu: a37xx: Add support for writing Security OTP values (Pali) - mvebu: turris: Misc enhancements and cleanups / fixes (Pali) - Sheevaplug : Use Marvell uclass mvgbe and PHY driver for Ethernet (Tony)
2022-04-21configs: drop CONFIG_MMCROOTPeng Fan27-51/+23
CONFIG_MMCROOT is only used to set mmcroot, no need a dedicated macro. Script as below " for i in `ls include/configs/*.h` do mmcroot=`sed -n '/define.*MMCROOT/ p' $i | awk -F\" '{ print $2;}'` if [ ! -n "$mmcroot" ]; then continue fi sed -i '/define.*MMCROOT/ d' $i sed -i 's,\" CONFIG_MMCROOT \",'$mmcroot',g' $i done " Reviewed-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-04-21board: ti: am335x: Add support for BBE Extended WiFiPaul Barker1-0/+2
The Sancloud BeagleBone Enhanced Extended WiFi (BBE Extended WiFi) has its own devicetree file and the board can be identified by the 2nd letter of the config string within the common EEPROM. Signed-off-by: Paul Barker <paul.barker@sancloud.com>