aboutsummaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)AuthorFilesLines
2023-04-30Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxiWIP/30Apr2023Tom Rini2-2/+5
Please pull the second part of the sunxi pull request for this cycle. Another bunch of patches that replace old-school U-Boot hacks with proper DM based code, this time for the raw NAND flash driver, and the USB PHY VBUS detection code. Plus two smaller patches that were sitting in my inbox for a while. Gitlab CI passed. In lack of some supported board with NAND flash I couldn't really test this part, but apparently this was tested by the reviewer. I briefly ran the branch on some boards with USB-OTG, and this still worked.
2023-04-29Merge branch 'for-2023.07' of ↵WIP/29Apr2023Tom Rini15-29/+246
https://source.denx.de/u-boot/custodians/u-boot-mpc8xx This pull request adds support for the last CPU board from CS GROUP France (previously CSSI). That CPU board called CMPCPRO has a mpc8321E CPU (Family PQII PRO hence its name) and can be plugged in place of the CMPC885 board. In order to support that new board, the following changes are included in this series: - Make the mpc8xx watchdog driver more generic for reusing it with mpc83xx - Fix various small problems on mpc83xx platform - Add a GPIO Driver for QE GPIOs - Add support for mpc832x into mpc83xx SPI driver - Refactor existing board code that will be shared with new board - Add the new board
2023-04-28sandbox: disable tracing before unmapping RAMPavel Skripkin1-0/+5
Currently doing 'reset' command in sandbox with tracing enabled causes SIGSEV ``` Hit any key to stop autoboot: 0 => => => reset resetting ... Segmentation fault (core dumped) ``` Tracing callback uses RAM buffer for storing tracing reports, but state_uninit() function unmaps whole RAM, which causes SIGSEV on umapped memory inside tracing subsystem. Fix it by disabling tracing before unmapping memory Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Add missing check for CONFIG_TRACE: Signed-off-by: Simon Glass <sjg@chromium.org>
2023-04-28sandbox: correct posix_types.h defineHeinrich Schuchardt1-3/+4
arch/arm/include/asm/posix_types.h and arch/sandbox/include/asm/posix_types.h should use different defines. Add SPDX header. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28sandbox: fix return type of os_filesize()Heinrich Schuchardt1-2/+6
Given a file ../img of size 4294967296 with GPT partition table and partitions: => host bind 0 ../img => part list host 0 Disk host-0.blk not ready The cause is os_filesize() returning int. File sizes must use off_t. Correct all uses of os_filesize() too. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28sandbox: mark sandbox_exit() as no return.Heinrich Schuchardt2-2/+2
Fix a -Wimplicit-fallthrough warning in sandbox_sysreset_request(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-28board: cssi: Add CPU board CMPCPROChristophe Leroy3-0/+195
CSSI has another CPU board, similar to the CMPC885 board that get plugged on the two base boards MCR3000_2G and MIAE. That CPU board is called CMPCPRO because it has a MPC8321E CPU, also known as Power QUICC II PRO. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-04-28gpio: axp/sunxi: Remove virtual VBUS detection GPIOSamuel Holland1-1/+0
Now that this functionality is modeled using the device tree and regulator uclass, the named GPIO is not referenced anywhere. Remove it. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-04-28sunxi: binman: Fix U-Boot offset when SPL is not 32 KiBSamuel Holland1-1/+5
On sunxi boards, SPL looks for U-Boot at a 32 KiB offset, unless SPL is larger than 32 KiB, in which case U-Boot immediately follows SPL. See the logic in spl_mmc_get_uboot_raw_sector() and spl_spi_load_image(). In two cases, the existing binman description mismatches the SPL code. For 64-bit boards, binman would place U-Boot immediately following SPL, even if SPL is smaller than 32 KiB. This can happen when SPL MMC support is disabled (i.e. when booting from SPI flash). In contrast, for 32-bit boards, binman would place U-Boot at 32 KiB, even if SPL is larger than that. This happens because the 'offset' property does not consider the size of previous entries. Fix both issues by setting a minimum size for the SPL entry, which exactly matches the logic in the SPL code. Unfortunately, this size must be provided as a magic number, since none of the relevant config symbols (SPL_PAD_TO, SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR, and SYS_SPI_U_BOOT_OFFS) are guaranteed to be defined in all cases. Fixes: cfa3db602caf ("sunxi: Convert 64-bit boards to use binman") Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-04-27corstone1000: add NVM XIP QSPI device tree nodeAbdellatif El Khlifi1-1/+8
add QSPI flash device node for block storage access Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2023-04-27sandbox64: add support for NVMXIP QSPIAbdellatif El Khlifi2-0/+27
enable NVMXIP QSPI for sandbox 64-bit Adding two NVM XIP QSPI storage devices. Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-27sandbox64: fix: return unsigned long in readq()Abdellatif El Khlifi2-2/+2
make readq return unsigned long readq should return 64-bit data Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-26rockchip: Move to standard bootSimon Glass1-2/+1
Drop the distro-boot scripts and use standard boot instead. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Jonas Karlman <jonas@kwiboo.se>
2023-04-25arm: omap3: Directly use SMC #1 in lowlevel_init.SPali Rohár1-3/+3
Since commit de39dc71625d ("arm: armv7-a: Compile and tune for armv7-a instead of armv5") is used -march=armv7-a option for Omap3 platforms. With directive ".arch_extension sec" it is possible for -march=armv7-a to directly use ARM SMC instruction. So enable ".arch_extension sec" in Omap3 lowlevel_init.S and replace hand assembled ".word 0xe1600071" by "SMC #1". Since commit 51d063865064 ("arm: omap-common: add secure smc entry") same pattern is already used in arch/arm/cpu/armv7/omap-common/lowlevel_init.S. Signed-off-by: Pali Rohár <pali@kernel.org>
2023-04-25mpc8379erdb: Convert to using DM_SERIALSinan Akman1-0/+27
Convert to DM_SERIAL for mpc8379erdb. Signed-off-by: Sinan Akman <sinan@writeme.com>
2023-04-25xen: Fix Kconfig dependenciesMichal Simek1-1/+0
XEN config can be enabled by other platforms (even it doesn't need to make sense) that's why fix dependencies. XEN (xenbus.c) requires sscanf (also pvblock needs it). And PVBLOCK is inside drivers/xen folder which requires XEN to be enabled. Signed-off-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-04-25armv7: Use isb/dsb directly in start.STom Rini1-4/+4
Toolchains which do not directly support using "isb" and "dsb" directly are no longer functionally supported in U-Boot. Furthermore, clang has for a long time warned about using the alternate form that we were. Update the code. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25arm: Centralize fixed register logicTom Rini2-3/+8
When building for ARM64, we need to pass -ffixed-x18 and otherwise pass -ffixed-r9. Rather than having this logic in two places, we can do this once in arch/arm/config.mk. Further, while gcc will ignore being passed both -ffixed-r9 and -ffixed-x18 and simply use -ffixed-x18, clang will note that -ffixed-r9 is not used. Remove this duplication to also remove the warning. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25arm: Only support ARM64_CRC32 when using GCCTom Rini1-1/+1
Today, only gcc has __builtin_aarch64_crc32b (clang-16 does not, for example). Make this option depend on CC_IS_GCC. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-25arm64: interrupts: print FAR_ELx on sync exceptionsPavel Skripkin1-1/+37
Default synchronous exceptions handler prints only esr and register dump. Sometimes it requiers to see an address which caused exceptions to understand what's going on ARM ARM in section D13.2.41 states that FAR_EL2 will contain meanfull value in case of ESR.EC holds 0x20, 0x21, 0x24, 0x25, 0x22, 0x34 or 0x35. Same applies for EL1. This patch adds function whivh determine current EL, gets correct FAR register and prints it on panic. Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
2023-04-25arch: mach-k3: j721s2_init: Disable the firewallsJayesh Choudhary1-0/+53
Some firewalls enabled by ROM are still left on. So some address space is inaccessible to the bootloader. For example, in OSPI boot mode we get an exception and the system hangs. Therefore, disable all the firewalls left on by the ROM. Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-25armv8: enable HAFDBS for other ELx when FEAT_HAFDBS is presentmeitao2-3/+13
u-boot could be run at EL1/EL2/EL3. so we set it as same as EL1 does. otherwise it will hang when enable mmu, that is what we encounter in our SOC. Signed-off-by: meitao <meitaogao@asrmicro.com> [ Paul: pick from the Android tree. 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/+/3bf38943aeab4700c2319bff2a1477d99c6afd2f
2023-04-25arm64: Use level-2 for largest block mappings when FEAT_HAFDBS is presentMarc Zyngier2-4/+11
In order to make invalidation by VA more efficient, set the largest block mapping to 2MB, mapping it onto level-2. This has no material impact on u-boot's runtime performance, and allows a huge speedup when cleaning the cache. Signed-off-by: Marc Zyngier <maz@kernel.org> [ Paul: pick from the Android tree. 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/+/417a73581a72ff6d6ee4b0938117b8a23e32f7e8
2023-04-25arm64: Use FEAT_HAFDBS to track dirty pages when availableMarc Zyngier3-5/+26
Some recent arm64 cores have a facility that allows the page table walker to track the dirty state of a page. This makes it really efficient to perform CMOs by VA as we only need to look at dirty pages. Signed-off-by: Marc Zyngier <maz@kernel.org> [ Paul: pick from the Android tree. 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/+/3c433724e6f830a6b2edd5ec3d4a504794887263
2023-04-24arm: mach-k3: am642: move do_dt_magic() after sysfw loadingWIP/2023-04-24-TI-platform-updatesChristian Gmeiner1-2/+2
Makes it possible to use e.g mcu_spi0 for custom board detection. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Bryan Brattlof <bb@ti.com>
2023-04-24arm: mach-k3: common: re-locate authentication for atf/opteeManorit Chawdhry1-2/+33
For setting up the master firewalls present in the K3 SoCs, the arm64 clusters need to be powered on. Re-locates the code for atf/optee authentication. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-am625-r5-sk: add a53 cluster powerManorit Chawdhry1-1/+2
adds a53 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-am62a7-r5-sk: add a53 cluster power domain nodeManorit Chawdhry1-1/+2
adds a53 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-am642-r5: add a53 cluster power domain nodeManorit Chawdhry1-1/+2
adds a53 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-am642-r5-sk: add a53 cluster power domain nodeManorit Chawdhry1-1/+2
adds a53 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-j7200-r5: add a72 cluster power domain nodeManorit Chawdhry1-1/+2
adds a72 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-j721e-r5: add a72 cluster power domain nodeManorit Chawdhry1-1/+2
adds a72 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-j721e-r5-sk: add a72 cluster power domain nodeManorit Chawdhry1-1/+2
adds a72 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: dts: k3-j721s2-r5: add a72 cluster power domain nodeManorit Chawdhry1-1/+2
adds a72 cluster to control from the rproc driver Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-04-24arm: mach-k3: Remove empty sys_proto.h includeAndrew Davis8-18/+0
This header file is now empty, remove it. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2023-04-24arm: mach-k3: Move J721s2 SPL init functions to mach-k3Andrew Davis2-3/+64
This matches AM64 and J721e and removes the need to forward declare k3_spl_init(), k3_mem_init(), and check_rom_loaded_sysfw() in sys_proto.h. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2023-04-24arm: mach-k3: Move sdelay() and wait_on_value() declarationAndrew Davis1-4/+0
These probably should be in some system wide header given their use. Until then move them out of K3 sys_proto.h so we can finish cleaning that header out. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2023-04-24arm: mach-k3: Remove unused fdt_disable_node()Andrew Davis2-20/+0
This function is not used currently; remove it. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2023-04-24arm: mach-k3: Add weak do_board_detect() to common fileAndrew Davis7-15/+20
This matches how it was done for pre-K3 TI platforms and it allows us to move the forward declaration out of sys_proto.h. It also removes the need for K3_BOARD_DETECT as one is free to simply override the weak function in their board files as needed. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2023-04-24arm: mach-k3: Move sysfw-loader.h out of mach includesAndrew Davis7-6/+6
This header is only used locally by K3 init files, no need to have it up with the global mach includes. Move into local includes. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2023-04-24arm: mach-k3: Make release_resources_for_core_shutdown() commonAndrew Davis12-214/+127
This function is the same for each device when it needs to shutdown the R5 core. Move this to the common section and move the remaining device specific ID list to the device hardware include. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2023-04-24arm: mach-k3: Move J721e SoC detection out of common sectionAndrew Davis4-26/+25
This belongs in the J721e specific file as it is the only place this is used. Any board level users should use the SOC driver. While here, move the J721e and J7200 SoC IDs out of sys_proto.h and into hardware.h. Use a macro borrowed from Rockchip and add the rest of the SoC IDs for completeness and later use. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2023-04-24arm: mach-k3: Move MSMC fixup to SoC levelAndrew Davis2-1/+16
The MSMC fixup is something we do based on SoC, not based on the board. So this fixup does not belong in the board files. Move this to the mach-k3 common file so that it does not have to be done in each board that uses these SoCs. We use ft_system_setup() here instead of ft_board_setup() since it is no longer board level. Enable OF_SYSTEM_SETUP in the configurations that use this to keep functionality the same. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2023-04-24Revert "arm: dts: dra7*/am57xx-idk-evm-u-boot: Add ipu early boot DT changes"Andrew Davis5-5/+0
This reverts commit 5717294230bc3578959960003be8984bbbb33642. This does not exist in upstream kernel.org and breaks boot on DRA7-EVMs. Drop the same. Signed-off-by: Andrew Davis <afd@ti.com>
2023-04-24arm: dts: keystone: Non-functional changes sync with v6.3-rc6Andrew Davis17-156/+159
This is a collection of all the whitespace, renames, comment, and other changes that should not change the DT functionality from Linux v6.3-rc6. Signed-off-by: Andrew Davis <afd@ti.com>
2023-04-24arm: dts: omap: Non-functional changes sync with v6.3-rc6Andrew Davis20-65/+75
This is a collection of all the whitespace, renames, comment, and other changes that should not change the DT functionality from Linux v6.3-rc6. Signed-off-by: Andrew Davis <afd@ti.com>
2023-04-24arm: dts: dm8x: Non-functional changes sync with v6.3-rc6Andrew Davis5-30/+37
This is a collection of all the whitespace, renames, comment, and other changes that should not change the DT functionality from Linux v6.3-rc6. Signed-off-by: Andrew Davis <afd@ti.com>
2023-04-24arm: dts: dra7x: Non-functional changes sync with v6.3-rc6Andrew Davis14-220/+226
This is a collection of all the whitespace, renames, comment, and other changes that should not change the DT functionality from Linux v6.3-rc6. Signed-off-by: Andrew Davis <afd@ti.com>
2023-04-24arm: dts: am3x: Non-functional changes sync with v6.3-rc6Andrew Davis26-291/+298
This is a collection of all the whitespace, renames, comment, and other changes that should not change the DT functionality from Linux v6.3-rc6. Signed-off-by: Andrew Davis <afd@ti.com>
2023-04-24arm: dts: am437x: Update to IOPAD to sync with v6.3-rc6Andrew Davis2-303/+302
Several DTS files have been updated in the Linux kernel with a new IOPAD macro. Sync for the same here. Signed-off-by: Andrew Davis <afd@ti.com>