aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu
Commit message (Collapse)AuthorAgeFilesLines
* ARM: remove SPEAR entry in makefilePatrick Delaunay2023-03-061-1/+0
| | | | | | | | As the lastest spear directories are removed, delete the associated entry in Makefile. Fixes: 570c3dcfc153 ("arm: Remove spear600 boards and the rest of SPEAr support") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* arm64: Reduce PT size estimation complexityMarc Zyngier2023-03-061-75/+34
| | | | | | | | | | | | | | | | | | | | count_required_pts()'s complexity is high if mappings are not using the largest possible block size (due to some other requirement such as tracking dirty pages, for example). Let's switch to a method that follows the pattern established with the add_map() helper, and make it almost instantaneous instead of taking a large amount of time if 2MB mappings are in use instead of 1GB. Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Pierre-Clément Tosi <ptosi@google.com> [ Paul: pick from the Android tree. Fixup Pierre's commit. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Tom Rini <trini@konsulko.com> Link: https://android.googlesource.com/platform/external/u-boot/+/5d756d147e31a1cdaaa261a50e526404ca5968f5 Link: https://android.googlesource.com/platform/external/u-boot/+/6be9330601d81545c7c941e3609f35bf68a09059
* arm64: Reduce add_map() complexityMarc Zyngier2023-03-061-48/+46
| | | | | | | | | | | | | | | | | | | | | | In the add_map() function, for each level it populates, it iterates from the root of the PT tree, making it ineficient if a mapping needs to occur past level 1. Instead, replace it with a recursive (and much simpler) algorithm that keeps the complexity as low as possible. With this, mapping 512GB at level 2 goes from several seconds down to not measurable on an A55 machine. We keep the block mappings at level 1 for now though. Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Pierre-Clément Tosi <ptosi@google.com> [ Paul: pick from the Android tree. Fixup Pierre's commit. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Tom Rini <trini@konsulko.com> Link: https://android.googlesource.com/platform/external/u-boot/+/96ad729cf4cab53bdff8222bb3eb256f38b5c3a6 Link: https://android.googlesource.com/platform/external/u-boot/+/6be9330601d81545c7c941e3609f35bf68a09059
* arm: cpu: Add optional CMOs by VAMarc Zyngier2023-03-064-26/+155
| | | | | | | | | | | | | | | | | | | | | | | | Exposing set/way cache maintenance to a virtual machine is unsafe, not least because the instructions are not permission-checked but also because they are not broadcast between CPUs. Consequently, KVM traps and emulates such maintenance in the host kernel using by-VA operations and looping over the stage-2 page-tables. However, when running under protected KVM, these instructions are not able to be emulated and will instead result in an exception being delivered to the guest. Introduce CONFIG_CMO_BY_VA_ONLY so that virtual platforms can select this option and perform by-VA cache maintenance instead of using the set/way instructions. Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Will Deacon <willdeacon@google.com> Signed-off-by: Pierre-Clément Tosi <ptosi@google.com> [ Paul: pick from the Android tree. Fixup Pierre's commit. And fix some checkpatch warnings. Rebased to upstream. ] Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Tom Rini <trini@konsulko.com> Link: https://android.googlesource.com/platform/external/u-boot/+/db5507f47f4f57f766d52f753ff2cc761afc213b Link: https://android.googlesource.com/platform/external/u-boot/+/2baf54e743380a1e4a6bc2dbdde020a2e783ff67
* freescale: Drop old pre-DM_ETH codeSimon Glass2023-03-031-12/+0
| | | | | | | This is used by ls1021atwr_sdcard_ifc_SECURE_BOOT with split config, but is not needed anymore, since Ethernet migration is complete. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* s5p: Remove empty arch_misc_initTom Rini2023-03-021-7/+0
| | | | | | | | | | We don't need to provide an empty arch_misc_init function here, we can just not enable the hook. Cc: Stefan Bosch <stefan_b@posteo.net> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
* Correct SPL use of SYS_FSL_ERRATUM_A010539Simon Glass2023-02-101-1/+1
| | | | | | | This converts 1 usage of this option to the non-SPL form, since there is no SPL_SYS_FSL_ERRATUM_A010539 defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
* mtd: Drop unused CONFIG_S32V234Simon Glass2023-02-071-1/+0
| | | | | | This option does not exist, so the Makefile rule does nothing. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* rmobile: Drop CONFIG_RMOBILESimon Glass2023-02-071-1/+0
| | | | | | | This has been renamed to CONFIG_ARCH_RMOBILE but this one was left behind. It doesn't point to a directory that exists, so just drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* arm: Drop old kona codeSimon Glass2023-02-076-87/+0
| | | | | | | | | | The KONA and KONA_GPIO options don't exist anymore, since this commit: 0f6807e77b0 arm: Remove bcm28155_ap board Drop the dead code. Signed-off-by: Simon Glass <sjg@chromium.org>
* imx: Drop unused CONFIG_IMXSimon Glass2023-02-071-2/+0
| | | | | | This option does not exist, so the Makefile rule does nothing. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge tag 'fsl-qoriq-2023-2-1' of ↵Tom Rini2023-02-012-1/+10
|\ | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq make QSPI clock selection optional during SoC init for ls102xa Fix regulator name for ls2_sfp Update NXP RCW github repo
| * armv7: ls102xa: make QSPI clock selection optional during SoC initMario Kicherer2023-02-012-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | To improve startup times when booting from QSPI flash, the QSPI frequency can be configured very early in the boot process [1] to reduce loading times of U-Boot itself. This patch adds an option to disable setting the frequency to a default value during SoC initialization. [1] https://www.nxp.com/docs/en/application-note/AN12279.pdf Signed-off-by: Mario Kicherer <dev@kicherer.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>
* | arm: psci: Fix RESET2 hookMarek Vasut2023-01-312-1/+3
|/ | | | | | | The RESET2 hook is a PSCI v1.1 functionality, rename the macro accordinly. Add missing handler for the RESET2 hook, so it can be implemented by U-Boot. Signed-off-by: Marek Vasut <marex@denx.de>
* sunxi: fel: drop redundant "control register" save/restoreAndre Przywara2023-01-211-4/+0
| | | | | | | | | | | | | For some reasons shrouded in mystery, the code saving the FEL state was saving the SCTLR register twice, with the second copy trying to justify itself by using its ancient "control register" alias name. Drop the redundant second copy, both from the fel_stash data structure, and also the code saving and restoring it. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Samuel Holland <samuel@sholland.org> Tested-by: Samuel Holland <samuel@sholland.org>
* sunxi: armv8: fel: load only 32-bit valuesAndre Przywara2023-01-211-4/+4
| | | | | | | | | | | | Both the values and the MMIO addresses that we need during the 64-bit FEL restore are smaller than 2^32, so we don't need to do any 64-bit loads. Change the loads to only load 32 bits worth of data, that saves us some bytes for storing the values. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Samuel Holland <samuel@sholland.org> Tested-by: Samuel Holland <samuel@sholland.org>
* global: Finish CONFIG -> CFG migrationTom Rini2023-01-201-83/+83
| | | | | | | | | | | | | At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* nxp: Finish migration of SYS_FSL_SRDS_[12] to KconfigTom Rini2023-01-202-18/+0
| | | | | | | | As this is used on both ARM and PowerPC platforms, this needs to be listed in arch/Kconfig.nxp and match how they're currently used by select'ing them under the required PowerPC ARCH_xxx options. Signed-off-by: Tom Rini <trini@konsulko.com>
* nxp: Finish migration of SYS_FSL_IFC_BANK_COUNT to KconfigTom Rini2023-01-202-11/+0
| | | | | | | | | As this is used on both ARM and PowerPC platforms, this needs to be asked in arch/Kconfig.nxp. Set the PowerPC defaults based on arch/powerpc/include/asm/config_mpc85xx.h and remove the default set in drivers/mtd/nand/raw/fsl_ifc_nand.c Signed-off-by: Tom Rini <trini@konsulko.com>
* fsl-layerscape: Rework usage of CONFIG_CLUSTER_CLK_FREQTom Rini2023-01-201-3/+4
| | | | | | | In the case where CONFIG_CLUSTER_CLK_FREQ is not defined, simply set cluster_clk to get_board_sys_clk(). Signed-off-by: Tom Rini <trini@konsulko.com>
* arm: Rework usage of CONFIG_ARMV[78]_SECURE_BASE in linker scriptsTom Rini2023-01-202-4/+8
| | | | | | | | | In order to avoid defining CONFIG_ARMV[78_]SECURE_BASE as empty in the linker scripts, if not already defined, add and use __ARMV[78_]SECURE_BASE for when the base is not defined and we want the linker scripts to continue. Signed-off-by: Tom Rini <trini@konsulko.com>
* global: Remove unused CONFIG definesTom Rini2023-01-201-5/+1
| | | | | | | Remove some CONFIG symbols and related comments, etc, that are unused within the code itself at this point. Signed-off-by: Tom Rini <trini@konsulko.com>
* arm: Support trace on armv8Simon Glass2023-01-181-3/+3
| | | | | | | Use the notrace attribute so that timer functions can be used when tracing. This is required to avoid infinite loops when recording a trace. Signed-off-by: Simon Glass <sjg@chromium.org>
* trace: Use notrace for shortSimon Glass2023-01-181-1/+1
| | | | | | | The attribute syntax is quite verbose. Use the macro provided for this purpose. Signed-off-by: Simon Glass <sjg@chromium.org>
* arm: s5p4418: dm_serial: remove old code / add DEBUG_UARTWIP/2023-01-02-platform-updatesStefan Bosch2023-01-021-29/+0
| | | | | | | Remove init of UART-clock and UART-reset in arch_cpu_init(). Add DEBUG_UART to s5p4418_nanopi2_defconfig. Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
* configs: Remove unused or redundant CONFIG symbolsTom Rini2022-12-231-0/+1
| | | | | | | | | A number of CONFIG symbols have crept in that are never referenced in code, so drop them here. Further, we have two symbols being enabled in headers while already enabled correctly in Kconfig, so these lines can also be removed. Signed-off-by: Tom Rini <trini@konsulko.com>
* global: Migrate CONFIG_SMP_PEN_ADDR to CFGTom Rini2022-12-231-2/+2
| | | | | | Perform a simple rename of CONFIG_SMP_PEN_ADDR to CFG_SMP_PEN_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>
* global: Migrate CONFIG_PL011_CLOCK to CFGTom Rini2022-12-231-1/+1
| | | | | | Perform a simple rename of CONFIG_PL011_CLOCK to CFG_PL011_CLOCK Signed-off-by: Tom Rini <trini@konsulko.com>
* global: Migrate CONFIG_MAX_MEM_MAPPED to CFGTom Rini2022-12-231-3/+3
| | | | | | Perform a simple rename of CONFIG_MAX_MEM_MAPPED to CFG_MAX_MEM_MAPPED Signed-off-by: Tom Rini <trini@konsulko.com>
* global: Migrate CONFIG_ARM_GIC_BASE_ADDRESS to CFGTom Rini2022-12-232-4/+4
| | | | | | Perform a simple rename of CONFIG_ARM_GIC_BASE_ADDRESS to CFG_ARM_GIC_BASE_ADDRESS Signed-off-by: Tom Rini <trini@konsulko.com>
* exynos: Rework legacy PWM usageTom Rini2022-12-232-13/+8
| | | | | | | | | | | | | | | | The way that the timer support is currently done for exynos/nexell platforms relies on the legacy PWM infrastructure, and that needs to be updated. However, we really cannot safely undef CONFIG_DM_PWM to build the timer.c file without warnings. For now, rename the relevant legacy functions to be prefixed with s5p_ and add prototypes to the arch pwm.h files. Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Dzmitry Sankouski <dsankouski@gmail.com> Cc: Stefan Bosch <stefan_b@posteo.net> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* net: Remove more legacy functionsTom Rini2022-12-222-12/+0
| | | | | | Remove some of the board and arch specific non-DM_ETH helper code. Signed-off-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_PEN_ADDR_BIG_ENDIAN to KconfigTom Rini2022-12-221-0/+3
| | | | | | | This converts the following to Kconfig: CONFIG_PEN_ADDR_BIG_ENDIAN Signed-off-by: Tom Rini <trini@konsulko.com>
* arm: Use the WEAK assembly entry point consistentlyTom Rini2022-12-064-65/+33
| | | | | | | | | | | It is a bad idea, and more modern toolchains will fail, if you declare an assembly function to be global and then weak, instead of declaring it weak to start with. Update assorted assembly files to use the WEAK macro directly. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Pali Rohár <pali@kernel.org>
* arm: Remove unused mx27 codeTom Rini2022-12-056-643/+0
| | | | | | | We no longer have any i.MX27 platforms, remove the remaining support code. Signed-off-by: Tom Rini <trini@konsulko.com>
* arm: ls102xa: Migrate LS102XA_STREAM_IDTom Rini2022-12-051-0/+4
| | | | | | This symbol appears to be globally used in the architecture, select it. Signed-off-by: Tom Rini <trini@konsulko.com>
* arm920t: Remove unused imx codeTom Rini2022-12-054-270/+0
| | | | | | This code is currently unused, remove it. Signed-off-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_FSL_DEVICE_DISABLE to KconfigTom Rini2022-12-051-0/+4
| | | | | | | This converts the following to Kconfig: CONFIG_FSL_DEVICE_DISABLE Signed-off-by: Tom Rini <trini@konsulko.com>
* global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini2022-12-0515-53/+53
| | | | | | | | | | 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-052-4/+4
| | | | | | | | | | 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>
* Convert CONFIG_SYS_PMAN et al to KconfigTom Rini2022-12-055-9/+7
| | | | | | | | | | | | | This converts the following to Kconfig: CONFIG_NOBQFMAN CONFIG_SYS_DPAA_DCE CONFIG_SYS_DPAA_FMAN CONFIG_SYS_DPAA_PME CONFIG_SYS_DPAA_RMAN CONFIG_SYS_PMAN Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* global: Move remaining CONFIG_SYS_PCI* to CFG_SYS_PCI*Tom Rini2022-12-052-31/+31
| | | | | | | | | | The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_PCI and CONFIG_SYS_PCIE 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_NS16550_* to CFG_SYS_NS16550_*Tom Rini2022-12-052-2/+2
| | | | | | | | | | The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NS16550 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: Migrate CONFIG_SYS_FSL* symbols to the CFG_SYS namespaceTom Rini2022-11-1019-117/+117
| | | | | | | Migrate all of COFIG_SYS_FSL* to the CFG_SYS namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass2022-10-315-8/+8
| | | | | | | | | The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE and this makes it imposible to use CONFIG_VAL(). Rename it to resolve this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
* arm: layerscape: Disable unused parts of ICID tablesSean Anderson2022-10-181-0/+2
| | | | | | | | | Several parts of the ICID table are only necessary for U-Boot proper. Disable them in SPL. This saves around 500 bytes. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
* arm: layerscape: Don't select FSL_IFC when booting from SD cardSean Anderson2022-10-181-2/+2
| | | | | | | | | FSL_IFC should only be selected when booting from NAND flash (or when NAND_FSL_IFC is enabled). The existing logic does this correctly when QSPI is also enabled, but not when just booting from SD. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
* arm64: layerscape: Support SYSRESETSean Anderson2022-10-171-0/+2
| | | | | | | | CONFIG_SYSRESET provides its own implementation of reset_cpu. Disable our version when it is enabled. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
* arm64: ls104x: Enable eDMA snoopingSean Anderson2022-10-171-1/+1
| | | | | | | | | | | | This enables eDMA snooping on the LS1043A and LS1046A. This will allow marking the I2C, LPUART, and SPI devices on these SoCs as DMA coherent. Oddly, this bit is only documented for the LS1043A, and is marked as "reserved" in the LS1046ARM. I have tested this patch on the LS1046A and found that marking i2c0 as dma-coherent works without issue. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Acked-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
* armv8: cache_v8: Fix pgtables setup when MMU is already enabledPali Rohár2022-10-061-0/+4
| | | | | | | | | | | | | | | | | | | | When MMU is already enabled then dcache_enable() does not call mmu_setup() and so setup_all_pgtables() is also never called. In this situation when some driver calls mmu_set_region_dcache_behaviour() function then U-Boot crashes with error message: Emergency page table not setup. Fix this issue by explicitly calling setup_all_pgtables() in dcache_enable() function near condition for mmu_setup(). This change fixes chainloading U-Boot from U-Boot on Turris Mox board which uses mvneta ethernet driver which calls mmu_set_region_dcache_behaviour(). Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>