summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2021-12-02board: ae350: Support autoboot from RAMLeo Yu-Chi Liang
Add boot command "bootcmd_ram" to support autoboot from RAM. This feature could be useful at the very initial state of chip design when there is only a minimal set of peripheral. (e.g. without mmc and mac ..etc) The kernel image is default to be loaded at 0x2000000 via debug port, and the following script serves as an example: spl() { cmd="riscv64-linux-gdb -q \ -ex \"target remote $host:$port\" \ -ex \"load\" \ -ex \"thread apply all set \\\$pc=&_start\" \ -ex \"thread apply all set \\\$a0=\\\$mhartid\" \ -ex \"thread apply all set \\\$a1=<dtb address>\" \ -ex \"restore u-boot.itb binary 0x200000\" \ -ex \"restore Image binary 0x2000000\" \ -ex \"c\" \ spl/u-boot-spl " echo $cmd eval $cmd } The address where the kernel is loaded can be altered by changing the value of KERNEL_IMAGE_ADDR. Signed-off-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2021-12-02net: brcm: netXtreme driverBharat Gooty
Broadcom bnxt L2 driver support. Used by the Broadcom iproc platforms. Signed-off-by: Bharat Gooty <[email protected]> Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Roman Bacik <[email protected]>
2021-12-01pinctrl: change result for unsupported APIPatrick Delaunay
Use the return value ENOSYS for unsupported API - pinctrl_generic_set_state - pinctrl_select_state Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-12-01Convert CONFIG_FSL_DDR_BIST et al to KconfigTom Rini
This converts the following to Kconfig: CONFIG_FSL_DDR_BIST CONFIG_FSL_DDR_INTERACTIVE Signed-off-by: Tom Rini <[email protected]>
2021-12-01Convert CONFIG_SYS_BR0_PRELIM et al to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SYS_BR0_PRELIM CONFIG_SYS_OR1_PRELIM CONFIG_SYS_BR1_PRELIM CONFIG_SYS_OR2_PRELIM CONFIG_SYS_BR2_PRELIM CONFIG_SYS_OR2_PRELIM CONFIG_SYS_BR3_PRELIM CONFIG_SYS_OR3_PRELIM CONFIG_SYS_BR4_PRELIM CONFIG_SYS_OR4_PRELIM CONFIG_SYS_BR5_PRELIM CONFIG_SYS_OR5_PRELIM CONFIG_SYS_BR6_PRELIM CONFIG_SYS_OR6_PRELIM CONFIG_SYS_BR7_PRELIM CONFIG_SYS_OR7_PRELIM This also introduces CONFIG_SYS_BR0_PRELIM_BOOL as not all platforms that can set these values do so. Add the relevant SYS_BRx_PRELIM_BOOL to platforms that had not been previously migrated. Signed-off-by: Tom Rini <[email protected]>
2021-12-01Convert CONFIG_USE_BOOTCOMMAND et al to KconfigTom Rini
This converts the following to Kconfig: CONFIG_USE_BOOTCOMMAND CONFIG_BOOTCOMMAND CONFIG_RAMBOOTCOMMAND CONFIG_NFSBOOTCOMMAND Signed-off-by: Tom Rini <[email protected]>
2021-11-30common: add fdt_simplefb_enable_and_mem_rsv functionPatrick Delaunay
Add a new function to activate an existing simple frame buffer node and add the associated reserved memory, with no-map properties. This device tree update is only done when the video device is active and the video buffer is used. This patch uses '#if CONFIG_IS_ENABLED(DM_VIDEO)' because gd->video_bottom and gd->video_top are only defined when CONFIG_DM_VIDEO is activated. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2021-11-30video: Add video_is_active functionPatrick Delaunay
Add the helper function video_is_active() to test if one video device is active. This function can be used in board code to execute operation only when the display is probed / really used. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2021-11-30common: rename functions lcd_dt_simplefb to fdt_simplefbPatrick Delaunay
Rename the function named lcd_dt_simplefb* to fdt_simplefb* to be aligned with the associated file name fdt_simplefb.h/fdt_simplefb.c Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Matthias Brugger <[email protected]>
2021-11-30Convert CONFIG_LCD_DT_SIMPLEFB to KconfigPatrick Delaunay
This converts the following to Kconfig: CONFIG_LCD_DT_SIMPLEFB This patch also renames this config to CONFIG_FDT_SIMPLEFB as the code in common/lcd_simplefb.c support CONFIG_LCD and CONFIG_VIDEO. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Matthias Brugger <[email protected]>
2021-11-30ARM: stm32: Increase PHY auto-negotiation timeout to 20s on DHSOMMarek Vasut
The Micrel PHYs on known DHSOM based boards take a while to come out of reset, increase the auto-negotiation timeout to prevent it from timing out in case the ethernet is used right after the board was reset. Signed-off-by: Marek Vasut <[email protected]> Cc: Patrice Chotard <[email protected]> Cc: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2021-11-30ARM: stm32: Add update_sf script to install U-Boot into SF on DHSOMMarek Vasut
Add script to read U-Boot from SD card and write it to matching locations in the SPI NOR, thus making the SPI NOR bootable. The script erases the entire SPI NOR, including U-Boot environment, to make sure the installation is clean. To retain environment from current running U-Boot, run 'saveenv' after running the 'update_sf' script. Signed-off-by: Marek Vasut <[email protected]> Cc: Patrice Chotard <[email protected]> Cc: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2021-11-30ARM: stm32: Increase USB power-good delay on DHSOMMarek Vasut
The USB hub on STM32MP1 DHCOM boards needs to wait a bit longer until the USB Vbus is stable. Increase the USB power-good delay to 1 s. This adds default-undefined STM32MP_BOARD_EXTRA_ENV variable into stm32mp15_common.h to reduce duplication in board-specific config files adding custom environment. Signed-off-by: Marek Vasut <[email protected]> Cc: Patrice Chotard <[email protected]> Cc: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2021-11-30Fix MMC numbering issue for Raspberry Pi 3Mike Karels
Using mmc.dtbo from rpi-firmware to switch the controller for the SD card slot from sdhci to sdhost causes the numbering to change; the SD card is then not recognized at boot. Add to the range checked. Signed-off-by: Matthias Brugger <[email protected]>
2021-11-30tpm: use more algorithms than sha256 on pcr_readRuchika Gupta
The current tpm2_pcr_read is hardcoded using SHA256. Make the actual command to TPM configurable to use wider range of algorithms. The current command line is kept as is i.e limited to SHA-256 only. Signed-off-by: Ruchika Gupta <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2021-11-30efi_loader: Add check for event log passed from firmwareRuchika Gupta
Platforms may have support to measure their initial firmware components and pass the event log to u-boot. The event log address can be passed in property tpm_event_log_addr and tpm_event_log_size of the tpm node. Platforms may choose their own specific mechanism to do so. A weak function is added to check if even log has been passed to u-boot from earlier firmware components. If available, the eventlog is parsed to check for its correctness and further event logs are appended to the passed log. Signed-off-by: Ruchika Gupta <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Tested-by: Ilias Apalodimas <[email protected]>
2021-11-29Merge tag 'v2022.01-rc3' into nextTom Rini
Prepare v2022.01-rc3 Signed-off-by: Tom Rini <[email protected]>
2021-11-28dm: core: Add a way to count the devices in a uclassSimon Glass
Add a function that returns the number of devices in a uclass. This can be helpful in sizing an array that needs to hold a list of them. Signed-off-by: Simon Glass <[email protected]>
2021-11-28dm: core: Allow finding children / uclasses by partial nameSimon Glass
In some cases it is useful to search just by a partial name, such as when looking for a sibling device that has a common name substring. Add helper functions to handle these requirements. Signed-off-by: Simon Glass <[email protected]>
2021-11-28dm: core: Add a way to obtain a string listSimon Glass
At present we support reading a string list a string at a time. Apart from being inefficient, this makes it impossible to separate reading of the devicetree into the of_to_plat() method where it belongs, since any code which needs access to the string must read it from the devicetree. Add a function which returns the string property as an array of pointers to the strings, which is easily used by clients. Signed-off-by: Simon Glass <[email protected]>
2021-11-28dm: core: Fix up string-function documentationSimon Glass
The details for of_property_read_string_helper() and ofnode_read_string_index() are a little inaccurate. Fix up the comments to avoid confusion. Signed-off-by: Simon Glass <[email protected]>
2021-11-28dm: core: Fix handling of uclass pre_unbind methodSimon Glass
This method is currently called after the platform data has been freed. But the pre_unbind() method may wish to access this, e.g. to free some data structures stored there. Split the unbinding of devices into two pieces, as is done with removal. This corrects the problem. Also tidy a code-style issue in device_remove() while we are here. Signed-off-by: Simon Glass <[email protected]>
2021-11-28sandbox: Support unmapping a fileSimon Glass
Add the opposite of mapping, so that we can unmap and avoid running out of address space. Signed-off-by: Simon Glass <[email protected]>
2021-11-28command: Use a constant pointer for the helpSimon Glass
This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Jagan Teki <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2021-11-23tee: optee: define TEE error code TEE_ERROR_SHORT_BUFFEREtienne Carriere
Adds TEE_ERROR_SHORT_BUFFER as TEE error code. This error code is commonly used by TEEs to inform caller that the buffer(s) it provided is too small for the desired operation. Cc: Jens Wiklander <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]> Reviewed-by: Jens Wiklander <[email protected]> Signed-off-by: Etienne Carriere <[email protected]>
2021-11-23tee: define session login identifiersEtienne Carriere
Define identifiers for clnt_login field in struct tee_open_session_arg based in GlobalPlatform Device TEE IDs and on the REE_KERNEL identifier extension from OP-TEE OS. Cc: Jens Wiklander <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]> Reviewed-by: Jens Wiklander <[email protected]> Signed-off-by: Etienne Carriere <[email protected]>
2021-11-23firmware: scmi: fix description of an API functionEtienne Carriere
Correct inline comment describing API function devm_scmi_process_msg(). Signed-off-by: Etienne Carriere <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2021-11-23net: introduce a helper to determine whether to use in-band autonegVladimir Oltean
Certain serial SERDES protocols like 1000base-x, 2500base-x, SGMII, USXGMII can operate either in a mode where the PHY (be it on-board or inside an SFP module) passes the link parameters (speed, duplex, pause) to the MAC through in-band through control words standardized by IEEE 802.3 clause 37, or in a mode where the MAC must configure (force) its link parameters based on information obtained out-of-band (MDIO reads, guesswork etc). In Linux, the OF node property named "managed" is parsed by the phylink framework, and the convention is that if a driver uses phylink, then the presence of this property means that in-band autoneg should be enabled, otherwise it shouldn't. To be compatible with the OF node bindings of drivers that use phylink in Linux, introduce parsing support for this property in U-Boot too. Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Ramon Fried <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-11-23net: dsa: allow drivers to get the port OF nodeVladimir Oltean
In the current DSA switch driver API, only the udevice of the switch (belonging to UCLASS_DSA) is exposed, as well as an "int port" argument. So drivers do not have access to the udevice of individual ports (belonging to UCLASS_ETH), one of the reasons being that not all ports have an associated UCLASS_ETH udevice. However, all DSA ports have an OF node, and in some cases the driver needs a handle to it, for all ports including the CPU port. Example: the following Linux per-port device tree property: managed = "in-band-status"; states whether a port should operate with clause 37 in-band autoneg enabled or not. This patch exposes a function which can be called by individual drivers as needed. Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-11-23include: import if_vlan.h from LinuxVladimir Oltean
This is needed for the VLAN header structure. Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Ramon Fried <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2021-11-23net: tsec: add support for promiscuous modeVladimir Oltean
The Freescale TSEC can be a DSA master, and the ports of the attached DSA switch can have different MAC addresses compared to the TSEC. Nonetheless, the TSEC must receive the packets on behalf of those switch ports. Therefore, implement the promiscuous mode method to allow DSA to set this. Note that the init_registers() function called from eth_ops :: start overwrites this setting. There is no reason why the RCTRL register should be zero-initialized, so just stop clearing it so that the setting we applied in eth_ops :: set_promisc sticks. Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Ramon Fried <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-11-20efi_loader: bump EFI_SPECIFICATION_VERSION to 2.9Heinrich Schuchardt
We have implemented all what is new in UEFI specification 2.9 and relevant for U-Boot. Signed-off-by: Heinrich Schuchardt <[email protected]>
2021-11-20efi_loader: EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICESHeinrich Schuchardt
Implement the EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES event group handling. Add the definition of EFI_EVENT_GROUP_AFTER_READY_TO_BOOT. Signed-off-by: Heinrich Schuchardt <[email protected]>
2021-11-20efi_loader: Sphinx comments in efi_api.hHeinrich Schuchardt
Fix incorrect Sphinx comments in efi_api.h: * add missing 'struct' * correct indentation Signed-off-by: Heinrich Schuchardt <[email protected]>
2021-11-20efi: add comment for efi_system_table and efi_configuration_tableMasahisa Kojima
This commit adds the comment for efi_system_table and efi_configuration_table structure. Signed-off-by: Masahisa Kojima <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2021-11-20lmb: drop unused lmb_size_bytes()Heinrich Schuchardt
lmb_size_bytes() is unused. Signed-off-by: Heinrich Schuchardt <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
2021-11-20lmb: remove extern keyword in lmb.hHeinrich Schuchardt
The extern keyword is not needed in include/lmb.h to declare functions. Remove it. Signed-off-by: Heinrich Schuchardt <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
2021-11-20doc: add include/lmb.h to the HTML documentationHeinrich Schuchardt
Correct Sphinx style comments in include/lmb.h Add the logical memory block API to the HTML documentation. Signed-off-by: Heinrich Schuchardt <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
2021-11-20lmb: remove lmb_is_nomap() from includeHeinrich Schuchardt
Defining static functions in includes should be avoided. Function lmb_is_nomap() is only used in the unit test. So move it to the unit test. Signed-off-by: Heinrich Schuchardt <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
2021-11-19configs: meson64_android: add PANIC stage for SYSTEM failsNeil Armstrong
If bootloader was updated without running oem format, reboot will cause boot loop because the SYSTEM stage fails. Add a final PANIC stage running fastboot to permit recovery. Signed-off-by: Neil Armstrong <[email protected]> Signed-off-by: Mattijs Korpershoek <[email protected]>
2021-11-19configs: meson64_android: bypass other checks on run_fastboot=1Neil Armstrong
This can lead to GPT and BCB errors even if fastboot was selected early by usb rom boot and the eMMC is blank/invalid. Signed-off-by: Neil Armstrong <[email protected]> Signed-off-by: Mattijs Korpershoek <[email protected]>
2021-11-17configs: ast2600: Boot kernel FIT in DRAMChia-Wei Wang
AST2600 leverages the FIT hash/signature verification to fulfill secure boot trust chain. To improve the performance and save SW code size for those crypto operations, the two HW crypto engine, HACE and ACRY, are enabled. However, both of the engines can only access to data stored in DRAM space. Therefore, we need to move the FIT image into DRAM before the booting. This patch update the CONFIG_BOOTCOMMAND to execute the pre-defined ENV variable which consists of FIT image copy to memory and booting. Signed-off-by: Chia-Wei Wang <[email protected]>
2021-11-17configs: aspeed: Make EXTRA_ENV_SETTINGS board specificChia-Wei Wang
Move CONFIG_EXTRA_ENV_SETTINGS to board-specific configuration headers. Signed-off-by: Chia-Wei Wang <[email protected]>
2021-11-17pci: Add standard PCIe ECAM macrosPali Rohár
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 <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2021-11-16bootm: Tidy up use of autostart env varSimon Glass
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 <[email protected]> Suggested-by: Wolfgang Denk <[email protected]>
2021-11-16sandbox: Use a text-based environmentSimon Glass
Use a text file for the environment instead of the #define settings. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Marek Behún <[email protected]>
2021-11-16env: Allow U-Boot scripts to be placed in a .env fileSimon Glass
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 <[email protected]> Reviewed-by: Marek Behún <[email protected]> Tested-by: Marek Behún <[email protected]>
2021-11-16sandbox: Drop distro_bootSimon Glass
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 <[email protected]> Reviewed-by: Marek Behún <[email protected]>
2021-11-15image: Explicitly declare do_bdinfo()Andy Shevchenko
Compiler is not happy: common/image-board.c: In function ‘boot_get_kbd’: common/image-board.c:902:17: warning: implicit declaration of function ‘do_bdinfo’ [-Wimplicit-function-declaration] 902 | do_bdinfo(NULL, 0, 0, NULL); | ^~~~~~~~~ Move the forward declaration to a header. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-11-15configs: synquacer: Fix dfu_alt_info to use nor1Masami Hiramatsu
Fix dfu_alt_info to use nor1 instead of the device name. This reverts a part of commit 59bd18d4c4d7 ("configs: synquacer: Remove mtdparts settings and update DFU setting") because the commit a4f2d8341455 ("mtd: spi: nor: force mtd name to "nor%d"") changed the mtd device naming scheme to nor%d. Signed-off-by: Masami Hiramatsu <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>