summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-06riscv: semihosting: replace inline assembly with assembly fileAndre Przywara
So far we used inline assembly to inject the actual instruction that triggers the semihosting service. While this sounds elegant, as it's really only about a few instructions, it has some serious downsides: - We need some barriers in place to force the compiler to issue writes to a data structure before issuing the trap instruction. - We need to convince the compiler to actually fill the structures that we use pointers to. - We need a memory clobber to avoid the compiler caching the data in those structures, when semihosting writes data back. - We need register arguments to make sure the function ID and the pointer land in the right registers. This is all doable, but fragile and somewhat cumbersome. Since we now have a separate function in an extra file anyway, we can do away with all the magic and just write that in an actual assembler. This is much more readable and robust. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2023-03-06arm: semihosting: replace inline assembly with assembly fileAndre Przywara
So far we used inline assembly to inject the actual instruction that triggers the semihosting service. While this sounds elegant, as it's really only about one instruction, it has some serious downsides: - We need some barriers in place to force the compiler to issue writes to a data structure before issuing the trap instruction. - We need to convince the compiler to actually fill the structures that we use pointers to. - We need a memory clobber to avoid the compiler caching the data in those structures, when semihosting writes data back. - We need register arguments to make sure the function ID and the pointer land in the right registers. This is all doable, but fragile and somewhat cumbersome. Since we now have a separate function in an extra file anyway, we can do away with all the magic and just write that in an actual assembly file. This is much more readable and robust. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2023-03-06am62a7: dts: Enable full 4GB LPDDR4Devarsh Thakkar
AM62A7-SK board has 4GB LPDDR4 Micron MT53E2G32D4DE-046 AUT:B part but only 2GB was enabled early. Enable full 4GB memory by updating the latter 2GB memory region which gets mapped to 0x0880000000 i.e. DDR16SS0_SDRAM as referred in Table 2-1. AM62A Common SoC Memory of AM62Ax TRM [1]. [1] : https://www.ti.com/lit/zip/spruj16 Logs: https://gist.github.com/devarsht/e85b6af89c01ddadb3a62f3e5f196af8 Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2023-03-06ARM: dts: uniphier: Sync DT with Linux v6.2Kunihiko Hayashi
Synchronize devicetree sources with Linux v6.2. - Use GIC interrupt definitions - Add reg properties in USB-glue and SoC-glue node - Fix node names to follow the generic names list in DT specification - Add L2 cache and AHCI nodes - Update nand and pcie nodes - And some trivial fixes Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Acked-by: Marek Vasut <marex@denx.de>
2023-03-06ARM: dts: uniphier: Switch USB node to the originalKunihiko Hayashi
UniPhier DT applies its own USB node for U-Boot due to the USB driver constrains. After solving this issue, u-boot allows the original USB node. After switching USB node, synchronization of USB node with Linux becomes possible. Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Acked-by: Marek Vasut <marex@denx.de>
2023-03-06powerpc, mpc83xx: Remove CONFIG_ELBC_BRx_ORxChristophe Leroy
Commit fe7d654d04 ("mpc83xx: Migrate CONFIG_SYS_{BR, OR}*_PRELIM to Kconfig") converted CONFIG_SYS_{BRx/ORx}_PRELIM to Kconfig by implementing a fine-grained selection of every bit in Kconfig. But commit c7fad78ec0 ("Convert CONFIG_SYS_BR0_PRELIM et al to Kconfig") reworked it so that you now just have to provide the raw value of each register in Kconfig. However, all fine-grained Kconfig items remained allthough they are not used anymore. Remove them all. Fixes: c7fad78ec0 ("Convert CONFIG_SYS_BR0_PRELIM et al to Kconfig") Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-03-06configs: j7200: Merge HS and non-HS defconfigsManorit Chawdhry
K3 devices have runtime type board detection. Make the default defconfig include the secure configuration. Then remove the HS specific config. Non-HS devices will continue to boot due to runtime device type detection. If TI_SECURE_DEV_PKG is not set the build will emit warnings, for non-HS devices these can be ignored. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Acked-by: Andrew Davis <afd@ti.com>
2023-03-06configs: j721s2: merge HS and non-HS defconfigsManorit Chawdhry
K3 devices have runtime type board detection. Make the default defconfig include the secure configuration. Then remove the HS specific config. Non-HS devices will continue to boot due to runtime device type detection. If TI_SECURE_DEV_PKG is not set the build will emit warnings, for non-HS devices these can be ignored. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Acked-by: Andrew Davis <afd@ti.com>
2023-03-06mmc: remove SDHCI SPEARPatrick Delaunay
As the file spear_sdhci.c file is already removed, delete the associated configuration CONFIG_MMC_SDHCI_SPEAR. Fixes: c942fc925e7dab ("mmc: spear: remove the entire spear_sdhci.c file") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-03-06ARM: remove SPEAR entry in makefilePatrick Delaunay
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>
2023-03-06clk: ast2600: Keep PLL power onDylan Hung
According to the PLL vendor, we should keep the PLL power on, so we shouldn't toggle the power-down bit during PLL initialization. Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com> Reviewed-by: Joel Stanley <joel@jms.id.au>
2023-03-06ram: ast2600: Keep MPLL power onDylan Hung
According to the PLL vendor, we should keep the PLL power on, so we shouldn't toggle the power-down bit during PLL initialization. Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com> Reviewed-by: Joel Stanley <joel@jms.id.au>
2023-03-06arm64: Reduce PT size estimation complexityMarc Zyngier
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
2023-03-06arm64: Reduce add_map() complexityMarc Zyngier
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
2023-03-06timer: fttmr010: return a previously deleted driver now ported to DMSergei Antonov
The fttmr010 timer driver was deleted by commit 29fc6f24926e ("ARM: remove a320evb board support") The original source file was: arch/arm/cpu/arm920t/a320/timer.c Return the driver to the codebase in a DM compatible form. A platform using fttmr010 will be submitted later. This hardware is described in the datasheet [1], starting from page 348. According to the datasheet, there is a Revision Register at offset 0x3C, which is not present in 'struct fttmr010'. Add it and debug() print revision in probe function. [1] https://bitbucket.org/Kasreyn/mkrom-uc7112lx/src/master/documents/FIC8120_DS_v1.2.pdf Signed-off-by: Sergei Antonov <saproj@gmail.com>
2023-03-06configs: evb-ast2600: Enable configs to store env in SPIRyan Chen
Enable defconfigs relevant for storing env on SPI flash. Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com> Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
2023-03-06arm64: Initialize TLB memory if CMO_BY_VA_ONLYPierre-Clément Tosi
Memory used to hold the page tables is allocated from the top of RAM with no prior initialization and could therefore hold invalid data. As invalidate_dcache_all() will be called before the MMU has been initialized and as that function relies indirectly on the page tables when using CMO_BY_VA_ONLY, these must be in a valid state from their allocation. Signed-off-by: Pierre-Clément Tosi <ptosi@google.com> [ Paul: pick from the Android tree. Fix checkpatch warnings, and rebased 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/+/e3ceef4230b772186c6853cace4a676a407e6ab7
2023-03-06arm: cpu: Add optional CMOs by VAMarc Zyngier
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
2023-03-03Merge branch '2023-03-02-kconfig-and-CONFIG-cleanups' into nextTom Rini
- Partial merge of a series of mine to select some framework options that shouldn't be prompted for (and remove some unused code related to that), and a partial merge of a series from Simon to remove some dead code and address various CONFIG_IS_ENABLED/IS_ENABLED issues in code.
2023-03-03Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-usb ↵Tom Rini
into next - MediaTek updates, correct logic on PHY selection for amlogic
2023-03-03command: Don't allow commands in SPLSimon Glass
At present we compile commands into U-Boot SPL even though they cannot be used. This wastes space. Adjust the condition to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-03venice: Simplify conditions for network initSimon Glass
The conditions in this code do not align when doing an SPL build with split config. Use __maybe_unused to avoid needing to be so explicit. Of course a better solution would be to refactor all of this to avoid using #ifdef. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-03power: wandboard: Add a missing CONFIGSimon Glass
We should enable pmic in SPL since it is used. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-03x86: coral: Add missing TPL optionsSimon Glass
Some options should be enabled which are missing. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-03dm: Add a TPL symbol for simple-busSimon Glass
This is used in some x86 code, so add a symbol for it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-03net: Add an SPL config for atherosSimon Glass
Add a new SPL_PHY_ATHEROS to avoid a build error on am335x_evm with split config. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-03-03imx: Use SATA instead of CMD_SATASimon Glass
This causes a build failure on mx6cuboxi with split config, since CMD_SATA shows up as enabled in SPl (because there is no SPL_CMD_SATA). The condition is wrong anyway, so change it to use SATA instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-03freescale: Drop old pre-DM_ETH codeSimon Glass
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>
2023-03-03Add VPL options for BLOBLISTSimon Glass
We can use this feature in VPL, so add some options for it. Also fix a typo in the SPL help while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02test: Tidy up sandbox handling in test-mainSimon Glass
This is pretty messy at present since it relies on a SPL_SANDBOX option that does not exist. Use the normal options instead, so that it will work with split config. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02lib: Add an SPL config for LIB_UUIDSimon Glass
This is selected by PARTITION_UUIDS which has a separate option for SPL. Add an SPL option for LIB_UUID also, so that we can keep them consistent. Also add one for PARTITION_TYPE_GUID to avoid a build error in part_efi.c which wants to call a uuid function in SPL. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02sandbox: Tidy up I2C optionsSimon Glass
At present we enable the sandbox I2C driver for all builds. Add a separate Kconfig option to control this, so that it can be disabled in TPL, where it is not needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-03-02sandbox: Use the generic VPL option to enable VPLSimon Glass
Avoid using CONFIG_SANDBOX_VPL since we have a generic option which works just as well. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02sandbox: Tidy up RTC optionsSimon Glass
At present we enable the sandbox RTC driver for all builds. Add a separate Kconfig option to control this, so that it can be disabled in TPL, where it is not needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02lib: Fix build condition for tiny-printfSimon Glass
This should be checking for any SPL build. Drop the use of SPL_TPL_ since it is not necessary and will not work with split config. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02lib: Add VPL options for SHA1 and SHA256Simon Glass
Add these options so these algorithms can be used in VPL. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02env: Allow VPL environment to be nowhereSimon Glass
Add an option to put the VPL environment nowhere (not in storage). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02bootstd: Correct 'VPL' typoSimon Glass
Correct a 'VPL' typo in the Kconfig. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02event: Add Kconfig options for SPLSimon Glass
Add options to enable events in SPL. This is mostly so the code can be excluded from SPL builds. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02sandbox: Expand size for VPL imageSimon Glass
Allow this to get larger to accommodate more test code with LTO disabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02lib: Add a Kconfig for SPL_BZIP2Simon Glass
This is implicitly used in the source and seems useful, so add it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02Correct SPL use of DM_RNGSimon Glass
This converts 1 usage of this option to the non-SPL form, since there is no SPL_DM_RNG defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02boot: Add Kconfigs for BOOTMETH_VBE_REQUESTSimon Glass
Allow this to be enabled separately in U-Boot proper and in SPL, since it is not needed in SPL. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02Correct SPL uses of PHY_FIXEDSimon Glass
This converts 3 usages of this option to the non-SPL form, since there is no SPL_PHY_FIXED defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02Correct SPL use of PG_WCOM_UBOOT_UPDATE_SUPPORTEDSimon Glass
This converts 1 usage of this option to the non-SPL form, since there is no SPL_PG_WCOM_UBOOT_UPDATE_SUPPORTED defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org> Aleksandar Gerasimovski <aleksandar.gerasimovski@hitachienergy.com>
2023-03-02Correct SPL uses of MULTIPLEXERSimon Glass
This converts 3 usages of this option to the non-SPL form, since there is no SPL_MULTIPLEXER defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-03-02Correct SPL uses of DISPLAY_AER_FULLSimon Glass
This converts 2 usages of this option to the non-SPL form, since there is no SPL_DISPLAY_AER_FULL defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02bootstd: Disable QFW bootmeth in SPLSimon Glass
Move this Makefile line into the non-SPL area so we don't have to repy on the SPL_TPL_ macro. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02sh4: Drop unused twl6030 driverSimon Glass
This is not used. Drop the driver and Kconfig option. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-02mtd: Drop unused CONFIG_ONENAND_U_BOOTSimon Glass
This option does not exist, so the Makefile rule does nothing. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>