summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-05-11x86: mrc: Correct SPL debug messageSimon Glass
SPL printf() does not normally support %#x so just use %x instead. Hex is expected in U-Boot anyway. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11x86: Tidy up availability of string functionsSimon Glass
For now, just enable the fast-but-large string functions in 32-boot U-Boot proper only. Avoid using them in SPL. We cannot use then in 64-bit builds since we only have 32-bit assembly. Reviewed-by: Bin Meng <[email protected]> Signed-off-by: Simon Glass <[email protected]>
2023-05-11x86: Support debug UART in 64-bit modeSimon Glass
The debug UART is already set up in SPL, so there is no need to do anything here. We must provide the (empty) function though. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11x86: samus: Drop EFI_LOADERSimon Glass
This adds a lot of code so that it cannot be built with the binary blobs. It is not used on this board. Drop it. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11x86: ivybridge: Ensure LPC is available for GPIO baseSimon Glass
The bd82x6x_get_gpio_base() does not work if the LPC is not set up. Probe it early to avoid this problem. In chromebook_link64 this problem shows up as an inability to read the GPIO straps for the memory type. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11sf: Rename spi-nor-tiny functionsSimon Glass
The 'tiny' SPI nor functions have the same name as their big brothers, which can be confusing. Use different names so it is clear which version is in the image. Signed-off-by: Simon Glass <[email protected]> Acked-by: Vignesh Raghavendra <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11sf: Guard against zero erasesizeSimon Glass
With tiny SPI flash the erasesize is 0 which can cause a divide-by-zero error. Check for this and return a proper error instead. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11binman: Support writing symbols for ucode etypesSimon Glass
Allow symbol writing in these cases so that U-Boot can find the position and size of U-Boot at runtime. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11dm: Emit the arch_cpu_init_dm() even only before relocationSimon Glass
The original function was only called once, before relocation. The new one is called again after relocation. This was not the intent of the original call. Fix this by renaming and updating the calling logic. With this, chromebook_link64 makes it through SPL. Fixes: 7fe32b3442f0 ("event: Convert arch_cpu_init_dm() to use events") Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11coreboot: Enable ms commandSimon Glass
This is useful when looking for tables in memory. Enable it for coreboot. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11x86: nvme: coreboot: Enable NVMeSimon Glass
Enable support for NVMe storage devices. Update the driver to enable the bus master bit, since coreboot does not do that automatically. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11nvme: Enable PCI bus masteringSimon Glass
U-Boot sets up devices ready for use, but coreboot does not. Enable this so that NVMe works OK from coreboot. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11x86: coreboot: Show unimplemented sysinfo tagsSimon Glass
Sometimes coreboot adds new tags that U-Boot does not know about. These are silently ignored, but it is useful to at least know what we are missing. Add a way to collect this information. For Brya it shows: Unimpl. 38 41 37 34 42 40 These are: LB_TAG_PLATFORM_BLOB_VERSION LB_TAG_ACPI_CNVS LB_TAG_FMAP LB_TAG_VBOOT_WORKBUF LB_TAG_TYPE_C_INFO LB_TAG_BOARD_CONFIG Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]> Tested-by: Bin Meng <[email protected]>
2023-05-11x86: coreboot: Log function names and line numbersSimon Glass
Turn these options on to make it easier to debug things. Also enable dhrystone so we can get some measure of performance. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11x86: coreboot: Scan PCI after relocationSimon Glass
Enable this so that PCI devices can be used correctly without needing to do a manual scan. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]> Tested-by: Bin Meng <[email protected]>
2023-05-11x86: coreboot: Document how to enable the debug UARTSimon Glass
This is not obvious so add a little note about how it works. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11x86: coreboot: Use a memory-mapped UARTSimon Glass
This is much more common on modern hardware, so default to using it. This does not affect the normal UART, but does allow the debug UART to work, since it uses serial_out_shift(), etc. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]> Tested-by: Bin Meng <[email protected]>
2023-05-11pci: coreboot: Don't read regions when bootingSimon Glass
When U-Boot is the second-stage bootloader, PCI is already set up. We cannot read the regions from the device tree. There is no point anyway, since PCI devices have already been allocated according to the regions and it is not safe for U-Boot to make any changes. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]> Fixes: f2ebaaa9f38d ("pci: Handle failed calloc in decode_regions()") Tested-by: Christian Gmeiner <[email protected]> Tested-by: Bin Meng <[email protected]>
2023-05-11x86: Allow locating the UART from ACPI tablesSimon Glass
When coreboot does not pass a UART in its sysinfo struct, there is no easy way to find it out. Since coreboot does not actually init the serial device when serial is disabled, it is not possible to make it add this information to the sysinfo table. Add a way to obtain this information from the DBG2 ACPI table, which is normally set up by coreboot. For now this only supports a memory-mapped 16550-style UART. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11x86: coreboot: Collect the address of the ACPI tablesSimon Glass
At present any ACPI tables created by prior-stage firmware are ignored. It is useful to be able to view these in U-Boot. Pick this up from the sysinfo tables and display it with the cbsysinfo command. This allows the 'acpi list' command to work when booting from coreboot. Adjust the global_data condition so that acpi_start is available even if table-generation is disabled. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]> Tested-by: Bin Meng <[email protected]>
2023-05-11acpi: Move the table-finding functions into the libarySimon Glass
This is useful for other features. Move the function into library code so it can be used outside just the 'acpi' command. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]> Tested-by: Bin Meng <[email protected]>
2023-05-11acpi: Create a new Kconfig for ACPISimon Glass
We have several Kconfig options for ACPI, but all relate to specific functions, such as generating tables and AML code. Add a new option which controls including basic ACPI library code, including the lib/acpi directory. This will allow us to add functions which are available even if table generation is not supported. Adjust the command to avoid a build error when ACPIGEN is not enabled. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11input: Flush the keyboard buffer before resetting itSimon Glass
If U-Boot is not the first-stage bootloader the keyboard may already be set up. Make sure to flush any data before trying to reset it. This avoids a long timeout / hang. Add some comments and a log category while we are here. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11x86: Adjust search range for sysinfo tableSimon Glass
Avoid searching starting at 0 since this memory may not be available, e.g. if protection against NULL-pointer access is enabled. The table cannot be there anyway, since the first 1KB of memory was originally used for the interrupt table and coreboot avoids it. Start at 0x400 instead. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11mtrr: Don't show an invalid CPU numberSimon Glass
When U-Boot did not do the MP init, we don't get an actual CPU number here. Skip printing it in that case. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-10power: pmic: add dm style definitions if not CONFIG_IS_ENABLED(POWER_LEGACY)Troy Kisky
This avoids an error in converting to CONFIG_IS_ENABLED(DM_PMIC). Many boards SPL code needs these definitions to compile, even if the functions are not linked. Signed-off-by: Troy Kisky <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-05-10arm: mach-imx: use CONFIG_$(SPL_)SATA instead of CONFIG_SATATroy Kisky
This avoid an error with enable_sata_clock when defined(CONFIG_SATA) is changed to CONFIG_IS_ENABLED(SATA). Signed-off-by: Troy Kisky <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-05-10wandboard: use CONFIG_IS_ENABLED(SATA) instead of ifdef CONFIG_SATATroy Kisky
Prepare for linking setup_sata only when CONFIG_SATA/CONFIG_SPL_SATA is defined. Signed-off-by: Troy Kisky <[email protected]>
2023-05-10solidrun: mx6cuboxi: use CONFIG_IS_ENABLED(SATA) instead of ifdef CONFIG_SATATroy Kisky
Prepare for linking setup_sata only when CONFIG_SATA/CONFIG_SPL_SATA is defined. Signed-off-by: Troy Kisky <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-05-10freescale: common: pfuze: define pfuze_mode_init only if defined(CONFIG_DM_PMIC)Troy Kisky
pfuze_mode_init calls pmic_reg_read which is only available from obj-$(CONFIG_$(SPL_TPL_)DM_PMIC) += pmic-uclass.o Prepare for conversion of defined(CONFIG_DM_PMIC) to CONFIG_IS_ENABLED(DM_PMIC). Signed-off-by: Troy Kisky <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-05-10m53menlo: define ft_board_setup only if CONFIG_IS_ENABLED(OF_LIBFDT)Troy Kisky
The function ft_board_setup calls do_fixup_by_path_string which is only available on CONFIG_IS_ENABLED(OF_LIBFDT). This prepares for the conversion. ft_board_setup is only called from image-fdt which is linked by obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o Signed-off-by: Troy Kisky <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-05-10ofnode: fdt_support definitions needed if OF_CONTROL is enabledTroy Kisky
With the use of CONFIG_IS_ENABLED in code, instead of at the preprocessor level, these defines are still needed if OF_CONTROL is enabled. Signed-off-by: Troy Kisky <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-05-10config_distro_bootcmd: remove booting environment variables from SPL environmentTroy Kisky
SPL environments don't need commands that they can never use. Avoid errors with CONFIG_IS_ENABLED conversions by skipping them now. Signed-off-by: Troy Kisky <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-05-10x86: cpu: qemu: qemu: remove SPL use with CONFIG_IS_ENABLEDTroy Kisky
CONFIG_IS_ENABLED(SPL_X86_32BIT_INIT) would check for CONFIG_SPL_SPL_X86_32BIT_INIT for SPL builds Signed-off-by: Troy Kisky <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-05-09Merge tag 'u-boot-rockchip-20230509' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip - Rockchip NFC driver update and dev addr pointer api update; - use standard dr_mode for usb driver; - rock pi boards dts update; - Add rk3566 Anbernic boards; - Misc fixes for drivers;
2023-05-09cmd: nvedit: remove error check, handle with KconfigTroy Kisky
Avoid error messages when SPL,TPL,VPL build don't have the environment options of the main build. This is needed when defined(CONFIG_ENV_IS_IN_xxx) is changed to CONFIG_IS_ENABLED(ENV_IS_IN_xxx). Signed-off-by: Troy Kisky <[email protected]>
2023-05-09clk: rockchip: rk3588: add hardcoded assigned clocks valuesEugen Hristev
The CRU is being probed with a default set of assigned clocks, which are not implemented in the driver at all. Hence, when clk_set_defaults is called, it fails with ENOENT. This would not be a problem, as the CRU still handles all the required clocks, and the assigned clocks are default configs which are preprogrammed or not required for Uboot operations. However, the rockchip reset driver is being bound by the same DT node as CRU, as the reset driver has no DT node. But, when probing the reset node, it will call again the clk_set_defaults for the CRU node, and failing because of missing those specific clocks in the rk3588 clock driver. To avoid this, simply implement a basic set/get that will just return success and the default corresponding rate for the required assigned clocks. As those clocks were not supported in Uboot, not required for Uboot operations, there is no need to do any different kind of initialization. Signed-off-by: Eugen Hristev <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-05-09rockchip: handle peripheral as well as otg dr_modeJohn Keeping
The OTG port is identified by inspecting the "dr_mode" property which is expected to be "otg" for this port. But it will work just as well as a device controller when dr_mode is set to "peripheral", which may be required if the mode detection pin is not set up correctly and the device controller needs to be programmed to override this. Signed-off-by: John Keeping <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-05-09rockchip: use standard dr_mode parsing functionJohn Keeping
Instead of duplicating the string values here, use usb_get_dr_mode() to handle the property lookup and converting the values to an enum. This is implemented with a switch in preparation for the next patch which adds extra handling for peripheral mode. Signed-off-by: John Keeping <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-05-09arm: dts: rockchip: rock-3a: drop u-boot,spl-boot-orderFUKAUMI Naoki
use common one defined in rk356x-u-boot.dtsi. Signed-off-by: FUKAUMI Naoki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-05-09arm: dts: rk356x: Makefile: sortFUKAUMI Naoki
sort alphanumerically. Signed-off-by: FUKAUMI Naoki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-05-09doc: rockchip: update list of Radxa ROCK (Pi) 4 boardsFUKAUMI Naoki
add Radxa ROCK (Pi) 4 variants. Signed-off-by: FUKAUMI Naoki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-05-09configs: rockchip: add Radxa ROCK 4C+FUKAUMI Naoki
add defconfig for Radxa ROCK 4C+. Signed-off-by: FUKAUMI Naoki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-05-09arm: dts: rockchip: add Radxa ROCK 4C+FUKAUMI Naoki
Linux commit 246450344dad arm64: dts: rockchip: rk3399: Radxa ROCK 4C+ Add support for Radxa ROCK 4C+ SBC. Key differences of 4C+ compared to previous ROCK Pi 4. - Rockchip RK3399-T SoC - DP from 4C replaced with micro HDMI 2K@60fps - 4-lane MIPI DSI with 1920*1080 - RK817 Audio codec Also, an official naming convention from Radxa mention to remove Pi from board name, so this 4C+ is named as Radxa ROCK 4C+ not Radxa ROCK Pi 4C+. Signed-off-by: Stephen Chen <[email protected]> Signed-off-by: Manoj Sai <[email protected]> Signed-off-by: Jagan Teki <[email protected]> Signed-off-by: FUKAUMI Naoki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-05-09configs: rockchip: rock-pi-4: use dtb for ROCK Pi 4A instead of 4BFUKAUMI Naoki
rk3399-rock-pi-4a.dtb is enough for Radxa ROCK Pi 4A/B/A+/B+ and ROCK 4SE. Signed-off-by: FUKAUMI Naoki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-05-09arm: dts: rockchip: rock-pi-4: sync with Linux 6.3FUKAUMI Naoki
sync dts{,i} files for Radxa ROCK Pi 4 series with Linux 6.3. because rk3399-rock-pi-4a.dts is enough for ROCK Pi 4A/B/A+/B+ and ROCK 4SE, delete dts{,i} for ROCK Pi 4B. Signed-off-by: FUKAUMI Naoki <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-05-09rockchip: rk3328: Add support for FriendlyARM NanoPi R2CTianling Shen
The NanoPi R2C is a minor variant of NanoPi R2S with the on-board NIC chip changed from rtl8211e to yt8521s, and otherwise identical to R2S. The device tree is taken from the kernel linux-next branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=004589ff9df5b75672a78b6c3c4cba93202b14c9 Signed-off-by: Tianling Shen <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-05-09reset: reset-rockchip: fix trivial line spacing alignmentEugen Hristev
Fix line spacing aligment in bind function Fixes: 760188c1aa5b ("rockchip: reset: support a (common) rockchip reset drivers") Signed-off-by: Eugen Hristev <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-05-09clk: rockchip: correct trivial typo in debug messageEugen Hristev
s/faile/failed in debug message Signed-off-by: Eugen Hristev <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-05-09pci: pcie_dw_rockchip: release resources on failing probeEugen Hristev
Implement a resource release mechanism on failing probe. Without this, a strange situation can happen e.g. when init port fails, or attempting to get the PHY fails, because the gpios have been requested first, and if the user tries to do 'pci enum' again, the driver will fail with 'can't find reset gpios' even if the gpios are there, just because they were blocked by a previous probe attempt. It is only natural to release the acquired resources if the probe fails, just for consistency if nothing else. This way on subsequent probe attempts, the user will get the same error message, and not something different that doesn't make sense. Signed-off-by: Eugen Hristev <[email protected]> Reviewed-by: Kever Yang <[email protected]>