summaryrefslogtreecommitdiff
path: root/arch/xtensa
AgeCommit message (Collapse)Author
2026-03-18xtensa: Call bootm_final()Simon Glass
Add a call to bootm_final() before jumping to the kernel. This adds the "Starting kernel" message, bootstage tracking, board_quiesce_devices() and dm_remove_devices_active() which were not previously called on Xtensa. Signed-off-by: Simon Glass <[email protected]>
2026-02-17treewide: Clean up DECLARE_GLOBAL_DATA_PTR usagePeng Fan
Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and drop the unnecessary inclusion of asm/global_data.h. Headers should be included directly by the files that need them, rather than indirectly via global_data.h. Reviewed-by: Patrice Chotard <[email protected]> #STMicroelectronics boards and STM32MP1 ram test driver Tested-by: Anshul Dalal <[email protected]> #TI boards Acked-by: Yao Zi <[email protected]> #TH1520 Signed-off-by: Peng Fan <[email protected]>
2026-02-17xtensa: relocate: Add missing headersPeng Fan
memset and size_t are used in this file, so add missing headers. Signed-off-by: Peng Fan <[email protected]>
2025-11-28xtensa: Fix big endian buildMarek Vasut
Make sure the correct PLATFORM_...FLAGS are assigned in each case, consistently. Assign PLATFORM_ELFFLAGS for both LE and BE case. The previous PLATFORM_CPPFLAGS makes no sense for these particular parameters, which are passed to objcopy. Signed-off-by: Marek Vasut <[email protected]>
2025-11-28xtensa: Assure end of U-Boot is at 8-byte aligned offsetMarek Vasut
Make sure the end of U-Boot is at 8-byte aligned offset, not 4-byte aligned offset. This allows safely appending DT at the end of U-Boot with the guarantee that the DT will be at 8-byte aligned offset. This 8-byte alignment is now checked by newer libfdt 1.7.2 . Signed-off-by: Marek Vasut <[email protected]>
2025-03-14treewide: Add a function to change page permissionsIlias Apalodimas
For armv8 we are adding proper page permissions for the relocated U-Boot binary. Add a weak function that can be used across architectures to change the page permissions Tested-by: Neil Armstrong <[email protected]> # on AML-S905X-CC Signed-off-by: Ilias Apalodimas <[email protected]>
2024-10-14dts: Deduplicate dtbs targetMarek Vasut
The dtbs: target is almost identical in all architecture Makefiles. All architecture Makefiles include scripts/Makefile.dts . Deduplicate the dtbs: target into scripts/Makefile.dts . No functional change. Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested-by: Caleb Connolly <[email protected]> #qcom, OF_UPSTREAM
2024-09-10treewide: drop redundant "type string" for SYS_SOC and friendsRasmus Villemoes
The Kconfig symbols SYS_ARCH, SYS_CPU, SYS_SOC, SYS_VENDOR and SYS_BOARD are defined in arch/Kconfig as having type string, and most board files simply amend those definition with suitable default "foo" or default "foo" if BAR stanzas. But some also include a redundant repetition of the type. Homogenize the code base by removing those lines. Generated by find arch/*/ board -name Kconfig | xargs perl -i -g -pe 's/(config SYS_(ARCH|CPU|SOC|VENDOR|BOARD)\n)\s*string\n/\1/gs' with the trailing slash in arch/*/ ensuring that arch/Kconfig itself is not found. This does not change boards which add a prompt string, e.g. string "Board name" because I think those change the semantics of the symbol into being user-settable. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2024-09-03lmb: do away with arch_lmb_reserve()Sughosh Ganu
All of the current definitions of arch_lmb_reserve() are doing the same thing -- reserve the region of memory occupied by U-Boot, starting from the current stack address to the ram_top. Introduce a function lmb_reserve_uboot_region() which does this, and do away with the arch_lmb_reserve() function. Instead of using the current value of stack pointer for starting the reserved region, have a fixed value, considering the stack size config value. Signed-off-by: Sughosh Ganu <[email protected]> Reviewed-by: Simon Glass <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
2024-09-03lmb: make LMB memory map persistent and globalSughosh Ganu
The current LMB API's for allocating and reserving memory use a per-caller based memory view. Memory allocated by a caller can then be overwritten by another caller. Make these allocations and reservations persistent using the alloced list data structure. Two alloced lists are declared -- one for the available(free) memory, and one for the used memory. Once full, the list can then be extended at runtime. [sjg: Use a stack to store pointer of lmb struct when running lmb tests] Signed-off-by: Sughosh Ganu <[email protected]> Signed-off-by: Simon Glass <[email protected]> [sjg: Optimise the logic to add a region in lmb_add_region_flags()]
2024-07-15xtensa: Remove duplicate newlinesMarek Vasut
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <[email protected]>
2024-07-04board: emulation: New board qemu-xtensaJiaxun Yang
Introduce the new board, define every bits. Tested-by: Max Filippov <[email protected]> Signed-off-by: Jiaxun Yang <[email protected]>
2024-07-04xtensa: Bring in semihosting headers and config optionsJiaxun Yang
They are all directly imported from Linux kernel. Reviewed-by: Max Filippov <[email protected]> Tested-by: Max Filippov <[email protected]> Signed-off-by: Jiaxun Yang <[email protected]>
2024-07-04xtensa: Define PLATFORM_ELFFLAGSJiaxun Yang
u-boot.elf target requires it to work. Tested-by: Max Filippov <[email protected]> Signed-off-by: Jiaxun Yang <[email protected]>
2024-07-04xtensa: Implement phys virt conversion for PTP_MMUJiaxun Yang
For PTP_MMU our physical address is not directly mapped into virtual address space, we need to access physical memory from those fixed map segments. Implement phys_to_virt and virt_to_phys hook to reflect this setting. Tested-by: Max Filippov <[email protected]> Signed-off-by: Jiaxun Yang <[email protected]>
2024-07-04xtensa: Correct define of _end symbolJiaxun Yang
So U-Boot is using _end symbol to detect location of devicetree appended at the end of the ROM. It needs to be calculated based on end of .data load address, as in our lds .current address is address in RAM. Tested-by: Max Filippov <[email protected]> Signed-off-by: Jiaxun Yang <[email protected]>
2024-07-04xtensa: Move dram_init to xtfpga board fileJiaxun Yang
This is a board level stuff. Tested-by: Max Filippov <[email protected]> Signed-off-by: Jiaxun Yang <[email protected]>
2024-05-06global: Make <asm/global_data.h> include <asm/u-boot.h>Tom Rini
This follows the example of RISC-V where <asm/global_data.h> includes <asm/u-boot.h> directly as "gd" includes a reference to bd_info already and so the first must include the second anyhow. We then remove <asm/u-boot.h> from all of the places which include references to "gd" an so have <asm/global_data.h> already. Signed-off-by: Tom Rini <[email protected]>
2024-05-06xtensa: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from all xtensa architecture files and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-04-18Revert "Merge patch series "pxe: Allow extlinux booting without CMDLINE ↵Tom Rini
enabled"" As reported by Jonas Karlman this series breaks booting on some AArch64 platforms with common use cases. For now the best path forward is to revert the series. This reverts commit 777c28460947371ada40868dc994dfe8537d7115, reversing changes made to ab3453e7b12daef47b9e91da2a2a3d48615dc6fc. Link: https://lore.kernel.org/u-boot/[email protected]/ Signed-off-by: Tom Rini <[email protected]>
2024-04-10Merge patch series "pxe: Allow extlinux booting without CMDLINE enabled"Tom Rini
Simon Glass <[email protected]> says: This series is the culmanation of the current line of refactoring series. It adjusts pxe to call the booting functionality directly rather than going through the command-line interface. With this is is possible to boot using the extlinux bootmeth without the command line enabled. It also updates fastboot to do a similar thing.
2024-04-10treewide: Make arch-specific bootm code depend on BOOTMSimon Glass
Allow these functions to be compiled in when CONFIG_BOOTM is enabled, even if CONFIG_CMD_BOOTM is not. Signed-off-by: Simon Glass <[email protected]> Acked-by: Angelo Dureghello <[email protected]>
2023-12-21bootm: Adjust arguments of boot_os_fnSimon Glass
Adjust boot_os_fn to use struct bootm_info instead of the separate argc, argv and image parameters. Update the handlers accordingly. Few of the functions make use of the arguments, so this improves code size slightly. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2023-11-28xtensa: io.h: Add defines for ins/outs functionsIgor Prusov
Add defines for {in,out}s{b,w,l}() functions to make asm-generic/io.h aware of them. Signed-off-by: Igor Prusov <[email protected]>
2023-08-09treewide: unify the linker symbol reference formatShiji Yang
Now all linker symbols are declared as type char[]. Though we can reference the address via both the array name 'var' and its address '&var'. It's better to unify them to avoid confusing developers. This patch converts all '&var' linker symbol refrences to the most commonly used format 'var'. Signed-off-by: Shiji Yang <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2022-12-23global: Migrate CONFIG_MAX_MEM_MAPPED to CFGTom Rini
Perform a simple rename of CONFIG_MAX_MEM_MAPPED to CFG_MAX_MEM_MAPPED Signed-off-by: Tom Rini <[email protected]>
2022-12-22global: Remove unused CONFIG symbolsTom Rini
This removes the following unreferenced CONFIG symbols: CONFIG_FDTADDR CONFIG_FDTFILE CONFIG_FLASH_SECTOR_SIZE CONFIG_FSL_CPLD CONFIG_HDMI_ENCODER_I2C_ADDR CONFIG_I2C_MVTWSI CONFIG_I2C_RTC_ADDR CONFIG_IRAM_END CONFIG_IRAM_SIZE CONFIG_KSNET_MDIO_PHY_CONFIG_ENABLE CONFIG_L1_INIT_RAM CONFIG_MACB_SEARCH_PHY CONFIG_MIU_2BIT_21_7_INTERLEAVED CONFIG_MTD_NAND_VERIFY_WRITE CONFIG_MVGBE_PORTS CONFIG_NETDEV CONFIG_NUM_DSP_CPUS CONFIG_PHY_BASE_ADR CONFIG_PHY_INTERFACE_MODE CONFIG_PSRAM_SCFG CONFIG_RAMBOOT_SPIFLASH CONFIG_RAMBOOT_TEXT_BASE CONFIG_RD_LVL CONFIG_ROCKCHIP_SDHCI_MAX_FREQ CONFIG_SETUP_INITRD_TAG CONFIG_SH_QSPI_BASE CONFIG_SMDK5420 CONFIG_SOCRATES CONFIG_SPI_ADDR CONFIG_SPI_FLASH_QUAD CONFIG_SPI_FLASH_SIZE CONFIG_SPI_HALF_DUPLEX CONFIG_SPI_N25Q256A_RESET CONFIG_TEGRA_SLINK_CTRLS CONFIG_TPM_TIS_BASE_ADDRESS CONFIG_UBOOT_SECTOR_COUNT CONFIG_UBOOT_SECTOR_START CONFIG_VAR_SIZE_SPL CONFIG_VERY_BIG_RAM And also: BL1_SIZE PHY_NO RESERVE_BLOCK_SIZE Signed-off-by: Tom Rini <[email protected]>
2022-12-05global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-12-05global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_SDRAM namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-09-29treewide: Drop bootm_headers_t typedefSimon Glass
This is not needed and we should avoid typedefs. Use the struct instead. Signed-off-by: Simon Glass <[email protected]>
2022-06-28xtensa: Switch to using CONFIG_XTENSA for building device treesTom Rini
The only use of CONFIG_XTFPGA was to build all of the in-tree device trees. Switch to using CONFIG_XTENSA instead of a non-Kconfig symbol. Signed-off-by: Tom Rini <[email protected]>
2022-06-23linker_lists: Rename sections to remove . prefixAndrew Scull
Rename the sections used to implement linker lists so they begin with '__u_boot_list' rather than '.u_boot_list'. The double underscore at the start is still distinct from the single underscore used by the symbol names. Having a '.' in the section names conflicts with clang's ASAN instrumentation which tries to add redzones between the linker list elements, causing expected accesses to fail. However, clang doesn't try to add redzones to user sections, which are names with all alphanumeric and underscore characters. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-03-03Convert CONFIG_BOARD_POSTCLK_INIT to KconfigTom Rini
This converts the following to Kconfig: CONFIG_BOARD_POSTCLK_INIT Signed-off-by: Tom Rini <[email protected]>
2022-02-09dts: automatically build necessary .dtb filesRasmus Villemoes
When building for a custom board, it is quite common to maintain a private branch which include some defconfig and .dts files. But to hook up those .dts files requires modifying a file "belonging" to upstream U-Boot, the arch/*/dts/Makefile. Forward-porting that branch to a newer upstream then often results in a conflict which, while it is trivial to resolve by hand, makes it harder to have a CI do "try to build our board against latest upstream". The .config usually includes information on precisely what .dtb(s) are needed, so to avoid having to modify the Makefile, simply add the files in (SPL_)OF_LIST to dtb-y. A technicality is that (SPL_)OF_LIST is not always defined, so rework the Kconfig symbols so that (SPL_)OF_LIST is always defined (when (SPL_)OF_CONTROL), but only prompted for in the cases which used to be their "depends on". nios2 and microblaze already have something like this in their dts/Makefile, and the rationale in commit 41f59f68539 is similar to the above. So this simply generalizes existing practice. Followup patches could remove the logic in those two makefiles, just as there's potential for moving some common boilerplate from all the arch/*/dts/Makefile files to the new scripts/Makefile.dts. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-12-27Finish conversion of CONFIG_SYS_CLK_FREQ to KconfigTom Rini
In order to finish moving this symbol to Kconfig for all platforms, we need to do a few more things. First, for all platforms that define this to a function, introduce CONFIG_DYNAMIC_SYS_CLK_FREQ, similar to CONFIG_DYNAMIC_DDR_CLK_FREQ and populate clock_legacy.h. This entails also switching all users from CONFIG_SYS_CLK_FREQ to get_board_sys_clk() and updating a few preprocessor tests. With that done, all platforms that define a value here can be converted to Kconfig, and a fall-back of zero is sufficiently safe to use (and what is used today in cases where code may or may not have this available). Make sure that code which calls this function includes <clock_legacy.h> to get the prototype. Signed-off-by: Tom Rini <[email protected]>
2021-09-30WS cleanup: remove SPACE(s) followed by TABWolfgang Denk
Signed-off-by: Wolfgang Denk <[email protected]>
2021-09-30WS cleanup: remove trailing white spaceWolfgang Denk
Signed-off-by: Wolfgang Denk <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-09-30WS cleanup: remove excessive empty linesWolfgang Denk
Signed-off-by: Wolfgang Denk <[email protected]>
2021-09-30WS cleanup: remove trailing empty linesWolfgang Denk
Signed-off-by: Wolfgang Denk <[email protected]>
2021-09-23lmb: xtensa: Add arch_lmb_reserve()Marek Vasut
Add arch_lmb_reserve() implemented using arch_lmb_reserve_generic(). It is rather likely this architecture also needs to cover U-Boot with LMB before booting Linux. Signed-off-by: Marek Vasut <[email protected]> Cc: Chris Zankel <[email protected]> Cc: Simon Goldschmidt <[email protected]> Cc: Tom Rini <[email protected]>
2021-08-31Kconfig: Remove all default n/no optionsMichal Simek
default n/no doesn't need to be specified. It is default option anyway. Signed-off-by: Michal Simek <[email protected]> [trini: Rework FSP_USE_UPD portion] Signed-off-by: Tom Rini <[email protected]>
2021-05-24treewide: Convert macro and uses of __section(foo) to __section("foo")Marek Behún
This commit does the same thing as Linux commit 33def8498fdd. Use a more generic form for __section that requires quotes to avoid complications with clang and gcc differences. Remove the quote operator # from compiler_attributes.h __section macro. Convert all unquoted __section(foo) uses to quoted __section("foo"). Also convert __attribute__((section("foo"))) uses to __section("foo") even if the __attribute__ has multiple list entry forms. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-04-22lmb: move CONFIG_LMB in KconfigPatrick Delaunay
Migrate CONFIG_LMB in Kconfig. Signed-off-by: Patrick Delaunay <[email protected]>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2021-01-05arc: m68k: nds32: nios2: sh: xtensa: Add empty spl.h headerSimon Glass
At present it is not possible to include spl.h in on these architectures since the asm/spl.h file is not present. We want to be able to use the spl_phase() function, so add empty headers to make things build. Signed-off-by: Simon Glass <[email protected]>
2020-08-26xtensa: Remove arch_setup_bdinfo()Stefan Roese
arch_setup_bdinfo() only configures the deprecated bi_memstart & bi_memsize values, which should not be needed any more. Lets remove this file completely. Signed-off-by: Stefan Roese <[email protected]> Reviewed-by: Ovidiu Panait <[email protected]>
2020-08-26global: Move from bi_memstart/memsize -> gd->ram_base/ram_sizeStefan Roese
With the planned removal of bi_memstart & bi_memsize, this patch now moves the references to the better suiting gd->ram_base/ram_size variables. Signed-off-by: Stefan Roese <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2020-08-06board_f: Factor out bdinfo bi_mem{start, size} to setup_bdinfoOvidiu Panait
Move all assignments to gd->bd->bi_mem{start,size} to generic code in setup_bdinfo. Xtensa architecture is special in this regard as it defines its own handling of gd->bd->bi_mem{start,size} fields. In order to avoid defining a weak SDRAM function, let arch_setup_bdinfo overwrite the generic flags. For ARC architecture, remove ARCH_EARLY_INIT_R from Kconfig since it is not needed anymore. Also, use gd->ram_base to populate bi_memstart to avoid an ifdef. Signed-off-by: Ovidiu Panait <[email protected]> Acked-by: Alexey Brodkin <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2020-07-01Remove CROSS_COMPILE default from arch/*/config.mkTom Rini
In order to support the compiler providing information used within Kconfig itself we cannot have the compiler be determined by arch/*/config.mk as we will not be able to evaluate that yet. Given that most documentation tells people to specify CROSS_COMPILE, remove these references. Cc: Huan Wang <[email protected]> Cc: Angelo Dureghello <[email protected]> Cc: Michal Simek <[email protected]> Cc: Rick Chen <[email protected]> Cc: Thomas Chou <[email protected]> Cc: Wolfgang Denk <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Nobuhiro Iwamatsu <[email protected]> Cc: Simon Glass <[email protected]> Cc: Bin Meng <[email protected]> Cc: Max Filippov <[email protected]> Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]> Acked-by: Michal Simek <[email protected]>
2020-05-18common: Drop linux/delay.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <[email protected]>