aboutsummaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2023-07-20arm: mx5: Correct mxc_set_clock function prototypeTom Rini
With gcc-13.1 we get a warning about enum vs int here, so correct the declaration to match the implementation. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-07-20mips: octeon: Correct types in cvmx-pko3-queueTom Rini
When building with gcc-13.1 we see that the prototype for cvmx_pko3_sq_config_children does not match the declaration. Make these match and correct a typo in the function's version of the docs that the prototype did not have, as part of keeping those in-sync. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-07-19Merge tag 'fsl-qoriq-2023-7-13' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq Enable DM_SERIAL for T2080RDB, T4240RDB, T1042D4RDB, T1024RDB
2023-07-17x86: Switch QEMU over to use the bochs driverSimon Glass
This is more convenient since it does not require a video BIOS. Enable it for QEMU. Also drop use of video in SPL for the 64-bit QEMU, since it not needed now. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Make sure that the LPC is active before SDRAM initSimon Glass
Some boards need to access GPIOs to determine which SDRAM is fitted to the board, for example chromebook_link. Probe this device (if it exists) to make sure that this works as expected. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: link: Support Micron memorySimon Glass
Add the required tag so that micron memory can be set up correctly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Convert some debug statements to use loggingSimon Glass
Move from using debug() to log_debug() so that we don't have to use the __func__ parameter and can access other logging features. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Record the start and end of the tablesSimon Glass
The ACPI tables are special in that they are passed to EFI as a separate piece, independent of other tables. Also they can be spread over two areas of memory, e.g. with QEMU we end up with tables kept in high memory as well. Add new global_data fields to hold this information and update the bdinfo command to show the table areas. Move the rom_table_end variable into the loop that uses it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Refactor table-writing code a littleSimon Glass
The implementation of write_tables() is confusing because it uses the rom_table_start variable as the address pointer as it progresses. Rename it to rom_addr to make the code clearer. Move the rom_table_end variable into the block where it is used. Also update logging to use the ACPI category, now that it is available. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Allow logging to be used in SPL reliablySimon Glass
When global_data is relocated, log_head moves in memory, meaning that the items in that list point to the wrong place. Disable logging when making the change, then reenable it afterwards, so that logging works normally. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Init video in SPL if enabledSimon Glass
When video is required in SPL, set this up ready for use. Ignore any problems since it may be that video is not actually available and we still want to continue on to U-Boot proper in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Ensure SPL banner is only shown onceSimon Glass
Print the banner in SPL init only if the spl_board_init() function isn't enabled. The spl_board_init() function is in the same file, but is called later, by board_init_r(). This avoids printing two banners, which causes tests to fail. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Allow video-BIOS code to be built for SPLSimon Glass
With qemu-x86_64 we need to run the video BIOS while in 32-bit mode, i.e. SPL. Add a Kconfig option for this, adjust the Makefile rules and use CONFIG_IS_ENABLED() where needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Improve the trampoline in 64-bit modeSimon Glass
At present this leaves the stack at the pre-relocation value. This is not ideal since we want to have U-Boot running entirely from the top of memory. In addition, the new global_data pointer is not actually used, since the global_data pointer itself is relocated, then the pre-relocation value is changed, so the effective value (after relocation) does not update. Adjust the implementation to follow the 32-bit code more closely, with a trampoline function which is passed the new stack and global_data pointer. This ensures that the correct values come through even when relocating. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Show an error when a BIOS exception occursSimon Glass
Rather than silently hanging, show an error first. This can happen when there is something wrong with the video BIOS. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Correct get_sp() implementation for 64-bitSimon Glass
Use an assembler implementation as is done for i386, so that the results are equivalent for i386 and x86_64. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Show the CPU physical address size with bdinfoSimon Glass
This is useful information so show it with the bdinfo command. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Add a comment for board_init_f_r_trampoline()Simon Glass
Add a comment for this function in the header. Change the function (and the one after) to use __noreturn to keep checkpatch happy. Add docs to board_init_f_r() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Tidy up EFI code in interrupt_init()Simon Glass
The ll_boot_init() check handles the EFI case so we don't need the rest of the code. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: Allow listing MTRRs in SPLSimon Glass
Move MTRR-listing code into a common file so it can be used from SPL. Update the 'mtrr' command to call it. Use this in SPL just before adjusting the MTRRs, so we can see the state set up by the board. Only show it when debug is enabled. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-17x86: zimage: Export the function to obtain the cmdlineSimon Glass
Allow reading the command line from a zimage, so that it can be recorded in the bootflow. Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-17x86: Add a function to boot a zimageSimon Glass
Add a direct interface to booting a zimage, so that bootstd can call it without going through the command-line interface. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-14powerpc: Fix flush_cache() speed regressionChristophe Leroy
Flushing kernel image after decompression was taking 113 milliseconds with U-boot 2022.10. With U-boot 2023.01 and 2023.04, flushing the same amount of memory takes approx 1.5 seconds. With U-boot 2023.07-rc6, it takes 6.5 seconds. powerpc flush_cache() function used to call WATCHDOG_RESET() after flushing every cacheline. At that time WATCHDOG_RESET() was light so the operation was almost seamless. But commit 29caf9305b6 ("cyclic: Use schedule() instead of WATCHDOG_RESET()") replaced WATCHDOG_RESET() by schedule() and that started to hurt with U-boot 2022.10. And in U-boot 2023.07-rc6 that's even worse after commit 26e8ebcd7cb ("watchdog: mpc8xxx: Make it generic"). In the meantime commit 729c1fe656 ("powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD") gives us the opportinity to only call schedule() every given chunk of data instead of every cacheline. As explained in that commit there is no point in pinging the watchdog after every cacheline flush, so lets define a sensible default chunk size of 4k which matches to size of a page on most powerpc platforms. With that new default threshold, the culprit flushing performed after kernel image decompression now takes 85 milliseconds on a powerpc 8xx. Fixes: 29caf9305b6 ("cyclic: Use schedule() instead of WATCHDOG_RESET()") Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-07-14arch: arm: npcm8xx: add cpu version and 4G ram supportJim Liu
Add npcm8xx A2 cpu version check and add 4G RAM support Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-07-14ARM: dts: npcm8xx: fix dts node errorJim Liu
The SHA and OTP should under the ahb node Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-07-14expo: Add tests for the configuration editorSimon Glass
Add some simple tests and a helpful script to make the configuration editor easier to set up. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Support building an expo from a description fileSimon Glass
The only way to create an expo at present is by calling the functions to create each object. It is useful to have more data-driven approach, where the objects can be specified in a suitable file format and created from that. This makes testing easier as well. Add support for describing an expo in a devicetree node. This allows more complex tests to be set up, as well as providing an easier format for users. It also provides a better basis for the upcoming configuration editor. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Add spacing around menus and itemsSimon Glass
It looks better if menus have a bit of an inset, rather than be drawn hard up against the background. Also, menu items look better if they have a bit of spacing between them. Add theme options for these and implement the required changes. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14sandbox: Fix quiting when the LCD window is closedSimon Glass
With recent changes to how sandbox handles reset, closing the window currently just restarts sandbox. Use the correct sysreset type to tell it to shut down. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-13Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellTom Rini
- mvebu: Thecus: Misc enhancement and cleanup (Tony) - mvebu: Add AC5X Allied Telesis x240 board support incl NAND controller enhancements for this SoC (Chris)
2023-07-13Merge tag 'u-boot-imx-20230713' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20230713 ------------------- Merge for 2023.10. CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/16888
2023-07-13arm: mvebu: Remove unused alias from RC AC5X dtsChris Packham
The sar-reg0 alias was left over from an earlier iteration of the patches adding support for this board. Remove the unused alias. Fixes: 6cc8b5db40 ("arm: mvebu: Add RD-AC5X board") Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-07-13arm: mvebu: Add Allied Telesis x240 boardChris Packham
The x240 and SE240 are a series of L2+ switches from Allied Telesis. There are a number of them in the range but as far as U-Boot is concerned all the CPU block components are the same so there's only one board defined. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-07-13mx23_olinuxino: Convert to CONFIG_DM_SERIALFabio Estevam
The conversion to CONFIG_DM_SERIAL is mandatory, so select this option. Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-07-13mx23evk: Convert to CONFIG_DM_SERIALFabio Estevam
The conversion to CONFIG_DM_SERIAL is mandatory, so select this option. Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-07-13mx28evk: Convert to CONFIG_DM_SERIALFabio Estevam
The conversion to CONFIG_DM_SERIAL is mandatory, so select this option. Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-07-13arm64: dts: verdin-imx8mp: add ctrl_sleep_moci# hogAndrejs Cainikovs
Drive CTRL_SLEEP_MOCI# high at boot (SPL) using a GPIO hog, this signal may be used to control some power-rails on the carrier board, therefore it should be set to high when the module is booting. To do this as early as possible is generally a good idea and the issue was noticed on the Yavia carrier board where it is needed to power the I2C EEPROM on the carrier board. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2023-07-13arm64: dts: verdin-imx8mm: add ctrl_sleep_moci# hogAndrejs Cainikovs
Drive CTRL_SLEEP_MOCI# high at boot (SPL) using a GPIO hog, this signal may be used to control some power-rails on the carrier board, therefore it should be set to high when the module is booting. To do this as early as possible is generally a good idea and the issue was noticed on the Yavia carrier board where it is needed to power the I2C EEPROM on the carrier board. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2023-07-13verdin-imx8mm/verdin-imx8mp: synchronise device trees with linuxMarcel Ziswiler
Synchronise device trees with linux v6.5-rc1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2023-07-13arm: dts: imx8mp-beacon-kit: Enable USB Power domainsAdam Ford
The USB Power domains should not have been removed as it causes the board to hang if the USB is started. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-07-13arm: dts: imx8mp: Sync the DT with kernel 6.4-rc4Adam Ford
Several changes have been made to the device tree in the kernel, so update that as well as the corresponding imx8mp-u-boot.dtsi files to prevent breaking the booting. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-07-13imx8mn-var-som: adjust PHY reset gpios according to hardware configurationHugo Villeneuve
For SOM with the EC configuration, the ethernet PHY is located on the SOM itself, and connected to the CPU ethernet controller. It has a reset line controlled via GPIO1_IO9. In this configuration, the PHY located on the carrier board is not connected to anything and is therefore not used. For SOM without EC configuration, the ethernet PHY on the carrier board is connected to the CPU ethernet controller. It has a reset line controlled via the GPIO expander PCA9534_IO5. The hardware configuration (EC) is determined at runtime by reading from the SOM EEPROM. To support both hardware configurations (EC and non-EC), adjust/fix the PHY reset gpios according to the hardware configuration read at runtime from the SOM EEPROM. This adjustement is done in U-Boot (OF_BOARD_FIXUP) and kernel (OF_BOARD_SETUP) device trees. Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
2023-07-13ARM: imx: romapi: Fix signed integer bitwise ops misuseMarek Vasut
Bitwise operations on signed integers are not defined, replace them with per-call checks. Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-07-13configs: imx8m: Prepare imx8m-venice boards for HAB supportTim Harvey
In order to enable HAB, FSL_CAAM, ARCH_MISC_INIT and SPL_CRYPTO should be enabled in Kconfig like other i.MX8M boards. This also needs to occur in the SPL so enable CONFIG_SPL_BOARD_INIT and add a void spl_board_init function which calls arch_misc_init to probe the CAAM driver. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: priblob: Update to use structureMaximus Sun
Use structure to avoid define CAAM_SCFGR for each platform Signed-off-by: Maximus Sun <maximus.sun@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: imx8m: add CAAM_BASE_ADDRPeng Fan
Add CAAM_BASE_ADDR which will be used by priblob.c Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: imx8: ahab: sha256: enable image verification using ARMv8 crypto extensionGaurav Jain
add support for SHA-256 secure hash algorithm using the ARM v8 SHA-256 instructions for verifying image hash. Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: ahab: Update AHAB for iMX8 and iMX8ULPYe Li
Abstract common interfaces for AHAB authentication operations. Then share some common codes for AHAB and SPL container authentication Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: parse-container: Use malloc for container processingNitin Garg
If the container has image which conflicts with spl_get_load_buffer address, there are processing failures. Use malloc instead of spl_get_load_buffer. Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Nitin Garg <nitin.garg@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: imx8m: clock: not configure reserved SRC registerPeng Fan
i.MX8M[M,N,P] SRC not has 0x1004 offset register, so drop it. Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>