aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2021-11-17pci: Add standard PCIe ECAM macrosPali Rohár1-0/+26
Lot of PCIe controllers are using ECAM addressing. So add common ECAM macros into U-Boot's pci.h header file which can be suitable for most PCI controller drivers. Replace custom ECAM address macros in every PCI controller driver by new ECAM macros from U-Boot's pci.h header file. Similar macros are defined also in Linux kernel. There is a small difference between Linux and these new U-Boot macros. U-Boot's PCIE_ECAM_OFFSET() takes device and function numbers in separate arguments. Linux's PCIE_ECAM_OFFSET() takes device and function numbers encoded in one argument. The reason is that U-Boot's PCI_DEVFN() macro is different than Linux's PCI_SLOT() macro. So having device and function numbers in separate arguments makes code more straightforward. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2021-11-16bootm: Tidy up use of autostart env varWIP/2021-11-16-env-reworkSimon Glass1-0/+7
This has different semantics in different places. Go with the bootm method and put it in a common function so that the behaviour is consistent in U-Boot. Update the docs. To be clear, this changes the way that 'bootelf' and standalone boot work. Before, if autostart was set to "fred" or "YES", for example, they would consider that a "yes". This may change behaviour for some boards, but the only in-tree boards which mention autostart use "no" to disable it, which will still work. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Wolfgang Denk <wd@denx.de>
2021-11-16sandbox: Use a text-based environmentSimon Glass1-29/+0
Use a text file for the environment instead of the #define settings. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Behún <marek.behun@nic.cz>
2021-11-16env: Allow U-Boot scripts to be placed in a .env fileSimon Glass1-0/+11
At present U-Boot environment variables, and thus scripts, are defined by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text to this file and dealing with quoting and newlines is harder than it should be. It would be better if we could just type the script into a text file and have it included by U-Boot. Add a feature that brings in a .env file associated with the board config, if present. To use it, create a file in a board/<vendor> directory, typically called <board>.env and controlled by the CONFIG_ENV_SOURCE_FILE option. The environment variables should be of the form "var=value". Values can extend to multiple lines. See the README under 'Environment Variables:' for more information and an example. In many cases environment variables need access to the U-Boot CONFIG variables to select different options. Enable this so that the environment scripts can be as useful as the ones currently in the board config files. This uses the C preprocessor, means that comments can be included in the environment using /* ... */ Also support += to allow variables to be appended to. This is needed when using the preprocessor. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Tested-by: Marek Behún <marek.behun@nic.cz>
2021-11-16sandbox: Drop distro_bootSimon Glass1-11/+0
This is a complicated set of #defines and it is painful to convert to a text file. We can (once pending patches are applied) provide the same functionality with bootmethod. Drop this for sandbox to allow conversion to a text-file environment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Behún <marek.behun@nic.cz>
2021-11-13Merge tag 'efi-2022-01-rc2-2' of ↵Tom Rini1-0/+1
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-01-rc2-2 UEFI: * fix measurement of BootOrder variable for TCG2 protocol TPM: * TIS mmio driver. This driver supports QEMU's emulated TPM.
2021-11-12Convert CONFIG_LAST_STAGE_INIT to KconfigWIP/2021-11-12-Kconfig-migrationsTom Rini2-5/+0
This converts the following to Kconfig: CONFIG_LAST_STAGE_INIT Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Remove CONFIG_SERIAL_MULTITom Rini2-2/+0
This symbol has been functionally dead for a long time. Remove the last and recent re-introductions of setting it, and update the whitelist so it will not be re-introduced again. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_PL011_SERIAL et al to KconfigTom Rini2-2/+0
This converts the following to Kconfig: CONFIG_PL011_SERIAL CONFIG_PL01X_SERIAL Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_MACB to KconfigTom Rini9-9/+0
This converts the following to Kconfig: CONFIG_MACB Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_MD5 to KconfigTom Rini2-2/+0
This converts the following to Kconfig: CONFIG_MD5 Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_MX6 et al to KconfigTom Rini2-8/+0
This converts the following to Kconfig: CONFIG_MX6 CONFIG_MX7 Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_IMX_BOOTAUX et al to KconfigTom Rini5-10/+0
This converts the following to Kconfig: CONFIG_IMX_BOOTAUX CONFIG_IMX_THERMAL Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_SYS_PROMPT et al to KconfigTom Rini10-23/+0
This converts the following to Kconfig: CONFIG_SYS_PROMPT CONFIG_SYS_PROMPT_HUSH_PS2 Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_I2C_EDID et al to KconfigTom Rini4-13/+0
This converts the following to Kconfig: CONFIG_I2C_EDID CONFIG_I2C_EEPROM Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_PHYLIB et al to KconfigTom Rini11-19/+0
This converts the following to Kconfig: CONFIG_PHYLIB CONFIG_PHY_ATHEROS CONFIG_PHY_GIGE CONFIG_MII Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_MISC_INIT_F et al to KconfigTom Rini4-10/+0
This converts the following to Kconfig: CONFIG_MISC_INIT_F CONFIG_MISC_INIT_R Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_TRACE et al to KconfigTom Rini2-16/+0
This converts the following to Kconfig: CONFIG_TRACE CONFIG_TRACE_BUFFER_SIZE CONFIG_TRACE_EARLY CONFIG_TRACE_EARLY_ADDR CONFIG_TRACE_EARLY_SIZE Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_SYS_CONSOLE_IS_IN_ENV to KconfigTom Rini1-1/+0
This converts the following to Kconfig: CONFIG_SYS_CONSOLE_IS_IN_ENV Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_ENV_IS_IN_SPI_FLASH et al to KconfigTom Rini13-50/+0
This converts the following to Kconfig: CONFIG_ENV_IS_IN_SPI_FLASH CONFIG_ENV_IS_NOWHERE CONFIG_ENV_OFFSET CONFIG_ENV_OVERWRITE CONFIG_ENV_SECT_SIZE CONFIG_SYS_MMC_ENV_DEV CONFIG_SYS_MMC_ENV_PART Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_FSL_USDHC to KconfigTom Rini10-11/+0
This converts the following to Kconfig: CONFIG_FSL_USDHC Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_FSL_LAYERSCAPE to KconfigTom Rini1-1/+0
This converts the following to Kconfig: CONFIG_FSL_LAYERSCAPE Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_BITBANGMII to KconfigTom Rini1-1/+0
This converts the following to Kconfig: CONFIG_BITBANGMII Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_DOS_PARTITION to KconfigTom Rini3-3/+0
This converts the following to Kconfig: CONFIG_DOS_PARTITION Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_E1000 to KconfigTom Rini1-3/+0
This converts the following to Kconfig: CONFIG_E1000 Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-12Convert CONFIG_ARCH_CPU_INIT to KconfigTom Rini1-1/+0
This converts the following to Kconfig: CONFIG_ARCH_CPU_INIT Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-11Remove LYNX KDI remaindersThomas Huth2-25/+0
The last board that used to set CONFIG_LYNXKDI has been removed in commit 242836a893ae ("powerpc: ppc4xx: remove pcs440ep support"), doc/README.lynxkdi only talks about a MPC8260 board being supported, and the mpc8260 support has been removed four years ago in commit 2eb48ff7a210d ("powerpc, 8260: remove support for mpc8260") already, and common/lynxkdi.c only consists of an "#error" statement these days, so it seems like the LYNX KDI code is dead code nowadays. Let's remove it now. Signed-off-by: Thomas Huth <thuth@redhat.com>
2021-11-11pxe: Allow calling the pxe_get logic directlySimon Glass1-0/+14
Refactor this code so that we can call the 'pxe get' command without going through the command-line interpreter. This makes it easier to get the information we need, without going through environment variables. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Artem Lapkin <email2tema@gmail.com> Tested-by: Artem Lapkin <email2tema@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-11-11pxe: Return the file size from the getfile() functionSimon Glass1-1/+12
It is pretty strange that the pxe code uses the 'filesize' environment variable find the size of a file it has just read. Partly this is because it uses the command-line interpreter to parse its request to load the file. As a first step towards unwinding this, return it directly from the getfile() function. This makes the code a bit longer, for now, but will be cleaned up in future patches. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Artem Lapkin <email2tema@gmail.com> Tested-by: Artem Lapkin <email2tema@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-11-11lib: Add a function to convert a string to a hex valueSimon Glass1-2/+14
Add an xtoa() function, similar to itoa() but for hex instead. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Artem Lapkin <email2tema@gmail.com> Tested-by: Artem Lapkin <email2tema@gmail.com>
2021-11-11lib: Add tests for simple_itoa()Simon Glass1-1/+12
Add test and a comment for this function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Artem Lapkin <email2tema@gmail.com>
2021-11-11pxe: Drop get_bootfile_path()Simon Glass1-1/+2
This function no longer makes sense, since it is pretty easy to prepend the boot directory to the filename. Drop it and update its only caller. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Artem Lapkin <email2tema@gmail.com> Tested-by: Artem Lapkin <email2tema@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-11-11pxe: Clean up the use of bootfileSimon Glass1-3/+16
The 'bootfile' environment variable is read in the bowels of pxe_util to provide a directory to which all loaded files are relative. This is not obvious from the API to PXE and it is strange to make the caller set an environment variable rather than pass this as a parameter. The code is also convoluted, which this feature implemented by get_bootfile_path(). Update the API to improve this. Unfortunately this means that pxe_setup_ctx() can fail, so add error checking. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Artem Lapkin <email2tema@gmail.com> Tested-by: Artem Lapkin <email2tema@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-11-11pxe: Move common parsing coding into pxe_utilSimon Glass1-0/+9
Both the syslinux and pxe commands use essentially the same code to parse and run extlinux.conf files. Move this into a common function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Artem Lapkin <email2tema@gmail.com> Tested-by: Artem Lapkin <email2tema@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-11-11pxe: Move pxe_utils filesSimon Glass1-0/+205
Move the header file into the main include/ directory so we can use it from the bootmethod code. Move the C file into boot/ since it relates to booting. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Artem Lapkin <email2tema@gmail.com> Tested-by: Artem Lapkin <email2tema@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-11-11Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriqWIP/11Nov2021Tom Rini23-270/+56
- device-tree sync-up with Linux for ls1028a - fixes/update in fsl-ddr driver, fsl-validate, lx2162a, fsl-mc, spintable code, configs, qspi node, pci - enable EFI_SET_TIME support in sl28 - powerpc: Drop -mstring
2021-11-10tpm2: Introduce TIS tpm coreIlias Apalodimas1-0/+1
There's a lot of code duplication in U-Boot right now. All the TPM TIS compatible drivers we have at the moment have their own copy of a TIS implementation. So let's create a common layer which implements the core TIS functions. Any driver added from now own, which is compatible with the TIS spec, will only have to provide the underlying bus communication mechanisms. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-10Merge tag 'u-boot-stm32-20211110' of ↵WIP/10Nov2021Tom Rini3-23/+82
https://source.denx.de/u-boot/custodians/u-boot-stm - DHSOM update: - Remove nWP GPIO hog - Increase SF bus frequency to 50Mhz and enable SFDP - Disable video output for DHSOM - Disable EFI - Enable DFU_MTD support - Create include file for STM32 gpio driver private data - Split board and SOC STM32MP15 configuration - Device tree alignement with v5.15-rc6 for STM32MP15 - Add binman support for STM32MP15x - Normalise newlines for stm32prog - Update OTP shadow registers in SPL
2021-11-10stm32mp15: replace CONFIG_TFABOOT when it is possiblePatrick Delaunay1-1/+1
In some part of STM32MP15 support the CONFIG_TFABOOT can be replaced by other config: CONFIG_ARMV7_PSCI and CONFIG_ARM_SMCCC. This patch also simplifies the code in cpu.c, stm32mp1_ram.c and clk_stml32mp1.c as execution of U-Boot in sysram (boot without SPL and without TFA) is not supported: the associated initialization code is present only in SPL. This cleanup patch is a preliminary step to support SPL load of OP-TEE in secure world, with SPL in secure world and U-Boot in no-secure world. Reported-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-11-10board: stmp32mp1: split board and SOC STM32MP15 configurationPatrick Delaunay3-22/+81
Add a configuration file "stm32mp15_st_common.h" to handle the STMicroelectronics boards configuration and rename stm32mp1.h to "stm32mp15_common.h" to handle the generic STM32MP15x series configuration. The configuration file "dh_stm32mp1.h" is also renamed to "stm32mp15_dh_dhcom" for the configuration of board based on the dhelectronics STM32MP15x SOM. In the STMicroelectronics board configuration the default bootcmd "bootcmd_stm32mp" is updated to only select the extlinux file found on SD-Card on STM32MP15x EV1 for boot from NOR device. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-11-09Merge https://source.denx.de/u-boot/custodians/u-boot-samsungTom Rini1-1/+0
[trini: Migrate CONFIG_EXYNOS7420 as part of merging, so espresso7420 still builds] Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-09configs: fsl: migrate FMAN/QE specific defines to KconfigRajesh Bhagat17-261/+4
Use moveconfig.py script to convert CONFIG_SYS_FMAN_FW_ADDR, CONFIG_SYS_QE_FW_ADDR and CONFIG_SYS_QE_FMAN_FW_LENGTH to Kconfig and move these entries to defconfigs. Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> [Rebased] Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09configs: ls1046aqds: Move CONFIG_SPI_FLASH_* definitions to defconfigsKuldeep Singh1-7/+0
LS1046A-QDS has CONFIG_SPI_FLASH_SST, CONFIG_SPI_FLASH_EON and CONFIG_SPI_FLASH_STMICRO defines present in header. Move these entries from header to defconfigs. Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com> [Rebased] Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09dm: core: add ofnode_for_each_compatible_node()Michael Walle1-0/+24
Add a helper to iterate over all nodes with a given compatible string. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09arm: dts: ls1028a: sync the fsl-ls1028a.dtsi with linuxMichael Walle1-0/+15
Now that everything is prepared, copy the fsl-ls1028a.dtsi from the linux kernel v5.14.12. Notable changes: - second watchdog added - the number of chip selects of the SPI controller is now correct and reflects what the hardware offers - the LPUARTs have the correct clock parent - USB controllers are enabled by default, which was already the case before this sync because all board enabled all the USB controller nodes. A linux patch to fix this is pending. - the eSDHC controller changes from big-endian to little-endian, but that property seems to be not used at all. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09drivers: net: fsl-mc: add a command which dumps the MC logCosmin-Florin Aluchenesei1-0/+9
Extended fsl_mc command adding an extra option dump_log Signed-off-by: Cosmin-Florin Aluchenesei <aluchenesei.cosmin-florin@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09board: sl28: enable EFI UpdateCapsule supportMichael Walle1-0/+2
Enable support for update over EFI UpdateCapsule mechanism. This board doesn't support setting EFI variables after ExitBootservices(). Therefore, we are also enabling EFI_IGNORE_OSINDICATIONS. Signed-off-by: Michael Walle <michael@walle.cc> [Rebased] Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-09lx2162a : Rename emmc boot command variableMeenakshi Aggarwal1-2/+2
Rename emmc_bootcmd environment variable to sd2_bootcmd to fix emmc boot on lx2162aqds board. Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-11-07efi: Add video support to the appSimon Glass1-3/+3
The current EFI video driver only works when running in the stub. In that case the stub calls boot services (before jumping to U-Boot proper) and copies the graphics info over to the efi table. This is necessary because the stub exits boot services before jumping to U-Boot. The app maintains access to boot services throughout its life, so does not need to do this. Update the driver to support calling boot services directly. Enable video output for the app. Note that this uses the EFI_GRAPHICS_OUTPUT_PROTOCOL protocol, even though it mentions vesa. A sample qemu command-line for this case is: qemu-system-x86_64 -bios /usr/share/edk2.git/ovmf-ia32/OVMF-pure-efi.fd -drive id=disk,file=try.img,if=none,format=raw -nic none -device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-11-07efi: Add a way to obtain boot services in the appSimon Glass1-1/+7
Add a function to return this information along with a stub for the efi_info_get() function, since calling it otherwise hangs U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>