aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa
Commit message (Collapse)AuthorAgeFilesLines
* dts: Deduplicate dtbs targetWIP/14Oct2024Marek Vasut2024-10-141-8/+0
| | | | | | | | | | | 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 <sumit.garg@linaro.org> Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Caleb Connolly <caleb.connolly@linaro.org> #qcom, OF_UPSTREAM
* treewide: drop redundant "type string" for SYS_SOC and friendsRasmus Villemoes2024-09-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <rasmus.villemoes@prevas.dk> Reviewed-by: Tom Rini <trini@konsulko.com>
* lmb: do away with arch_lmb_reserve()Sughosh Ganu2024-09-031-13/+0
| | | | | | | | | | | | | | | | 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 <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* lmb: make LMB memory map persistent and globalSughosh Ganu2024-09-031-2/+2
| | | | | | | | | | | | | | | | | 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 <sughosh.ganu@linaro.org> Signed-off-by: Simon Glass <sjg@chromium.org> [sjg: Optimise the logic to add a region in lmb_add_region_flags()]
* xtensa: Remove duplicate newlinesMarek Vasut2024-07-1512-74/+0
| | | | | | Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
* board: emulation: New board qemu-xtensaJiaxun Yang2024-07-042-0/+22
| | | | | | | Introduce the new board, define every bits. Tested-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
* xtensa: Bring in semihosting headers and config optionsJiaxun Yang2024-07-044-0/+244
| | | | | | | | They are all directly imported from Linux kernel. Reviewed-by: Max Filippov <jcmvbkbc@gmail.com> Tested-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
* xtensa: Define PLATFORM_ELFFLAGSJiaxun Yang2024-07-041-0/+6
| | | | | | | u-boot.elf target requires it to work. Tested-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
* xtensa: Implement phys virt conversion for PTP_MMUJiaxun Yang2024-07-042-0/+34
| | | | | | | | | | | | 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 <jcmvbkbc@gmail.com> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
* xtensa: Correct define of _end symbolJiaxun Yang2024-07-042-1/+2
| | | | | | | | | | | 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 <jcmvbkbc@gmail.com> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
* xtensa: Move dram_init to xtfpga board fileJiaxun Yang2024-07-041-5/+0
| | | | | | | This is a board level stuff. Tested-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
* global: Make <asm/global_data.h> include <asm/u-boot.h>Tom Rini2024-05-061-0/+2
| | | | | | | | | | 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 <trini@konsulko.com>
* xtensa: Remove <common.h> and add needed includesTom Rini2024-05-065-5/+2
| | | | | | | Remove <common.h> from all xtensa architecture files and when needed add missing include files directly. Signed-off-by: Tom Rini <trini@konsulko.com>
* Revert "Merge patch series "pxe: Allow extlinux booting without CMDLINE ↵Tom Rini2024-04-181-1/+1
| | | | | | | | | | | | | | 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/50dfa3d6-a1ca-4492-a3fc-8d8c56b40b43@kwiboo.se/ Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge patch series "pxe: Allow extlinux booting without CMDLINE enabled"Tom Rini2024-04-101-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Simon Glass <sjg@chromium.org> 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.
| * treewide: Make arch-specific bootm code depend on BOOTMSimon Glass2024-04-101-1/+1
| | | | | | | | | | | | | | | | Allow these functions to be compiled in when CONFIG_BOOTM is enabled, even if CONFIG_CMD_BOOTM is not. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Angelo Dureghello <angelo@kernel-space.org>
* | bootm: Adjust arguments of boot_os_fnSimon Glass2023-12-211-1/+3
|/ | | | | | | | | | 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 <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* xtensa: io.h: Add defines for ins/outs functionsIgor Prusov2023-11-281-0/+6
| | | | | | | Add defines for {in,out}s{b,w,l}() functions to make asm-generic/io.h aware of them. Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
* treewide: unify the linker symbol reference formatShiji Yang2023-08-091-2/+2
| | | | | | | | | | | 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 <yangshiji66@outlook.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* global: Migrate CONFIG_MAX_MEM_MAPPED to CFGTom Rini2022-12-231-1/+1
| | | | | | Perform a simple rename of CONFIG_MAX_MEM_MAPPED to CFG_MAX_MEM_MAPPED Signed-off-by: Tom Rini <trini@konsulko.com>
* global: Remove unused CONFIG symbolsTom Rini2022-12-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <trini@konsulko.com>
* global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini2022-12-051-2/+2
| | | | | | | | | | 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 <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_*Tom Rini2022-12-051-1/+1
| | | | | | | | | | 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 <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* treewide: Drop bootm_headers_t typedefSimon Glass2022-09-291-1/+1
| | | | | | This is not needed and we should avoid typedefs. Use the struct instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* xtensa: Switch to using CONFIG_XTENSA for building device treesTom Rini2022-06-281-1/+1
| | | | | | | 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 <trini@konsulko.com>
* linker_lists: Rename sections to remove . prefixAndrew Scull2022-06-232-6/+11
| | | | | | | | | | | | | | | | 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 <ascull@google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Convert CONFIG_BOARD_POSTCLK_INIT to KconfigTom Rini2022-03-031-0/+1
| | | | | | | This converts the following to Kconfig: CONFIG_BOARD_POSTCLK_INIT Signed-off-by: Tom Rini <trini@konsulko.com>
* dts: automatically build necessary .dtb filesRasmus Villemoes2022-02-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
* Finish conversion of CONFIG_SYS_CLK_FREQ to KconfigTom Rini2021-12-271-4/+5
| | | | | | | | | | | | | | | | | 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 <trini@konsulko.com>
* WS cleanup: remove SPACE(s) followed by TABWIP/2021-09-30-whitespace-cleanupsWolfgang Denk2021-09-303-49/+49
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* WS cleanup: remove trailing white spaceWolfgang Denk2021-09-301-1/+1
| | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* WS cleanup: remove excessive empty linesWolfgang Denk2021-09-306-18/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* WS cleanup: remove trailing empty linesWolfgang Denk2021-09-3011-11/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* lmb: xtensa: Add arch_lmb_reserve()Marek Vasut2021-09-231-0/+12
| | | | | | | | | | | 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 <marek.vasut+renesas@gmail.com> Cc: Chris Zankel <chris@zankel.net> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com>
* Kconfig: Remove all default n/no optionsMichal Simek2021-08-311-2/+0
| | | | | | | | default n/no doesn't need to be specified. It is default option anyway. Signed-off-by: Michal Simek <michal.simek@xilinx.com> [trini: Rework FSP_USE_UPD portion] Signed-off-by: Tom Rini <trini@konsulko.com>
* treewide: Convert macro and uses of __section(foo) to __section("foo")Marek Behún2021-05-241-1/+1
| | | | | | | | | | | | | | | | | 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 <marek.behun@nic.cz> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* lmb: move CONFIG_LMB in KconfigPatrick Delaunay2021-04-221-2/+0
| | | | | | Migrate CONFIG_LMB in Kconfig. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* common: Drop asm/global_data.h from common headerSimon Glass2021-02-021-0/+1
| | | | | | | | | | | | 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 <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* arc: m68k: nds32: nios2: sh: xtensa: Add empty spl.h headerSimon Glass2021-01-051-0/+0
| | | | | | | | 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 <sjg@chromium.org>
* xtensa: Remove arch_setup_bdinfo()Stefan Roese2020-08-262-23/+1
| | | | | | | | | 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 <sr@denx.de> Reviewed-by: Ovidiu Panait <ovidiu.panait@windriver.com>
* global: Move from bi_memstart/memsize -> gd->ram_base/ram_sizeStefan Roese2020-08-261-3/+2
| | | | | | | | | 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 <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* board_f: Factor out bdinfo bi_mem{start, size} to setup_bdinfoOvidiu Panait2020-08-062-1/+23
| | | | | | | | | | | | | | | | | | 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 <ovidiu.panait@windriver.com> Acked-by: Alexey Brodkin <abrokdin@synopsys.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Remove CROSS_COMPILE default from arch/*/config.mkTom Rini2020-07-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | 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 <alison.wang@nxp.com> Cc: Angelo Dureghello <angelo@sysam.it> Cc: Michal Simek <monstr@monstr.eu> Cc: Rick Chen <rick@andestech.com> Cc: Thomas Chou <thomas@wytron.com.tw> Cc: Wolfgang Denk <wd@denx.de> Cc: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Michal Simek <michal.simek@xilinx.com>
* common: Drop linux/delay.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop asm/ptrace.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop init.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop bootstage.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this fairly uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* dma-mapping: add <asm/dma-mapping.h> for all architecturesMasahiro Yamada2020-02-201-0/+1
| | | | | | | To avoid "asm/dma-mapping.h: No such file or directory" error, we need something. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* common: Move relocate_code() to init.hSimon Glass2020-01-171-1/+1
| | | | | | | | | This is an init function so move it out of the common header. Avoid using the typedef so that we don't have to include the global_data header file. Also tidy up the function style in comments while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move interrupt functions into a new headerSimon Glass2019-12-021-0/+1
| | | | | | | | | | | | These functions do not use driver model but are fairly widely used in U-Boot. But it is not clear that they will use driver model anytime soon, so we don't want to label them as 'legacy'. Move them to a new irq_func.h header file. Avoid the name 'irq.h' since it is widely used in U-Boot already. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>