summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/stm32' into masterSascha Hauer2020-08-1910-0/+453
|\
| * ARM: stm32mp: add support for Seeed Odyssey boardAhmad Fatoum2020-08-0310-0/+453
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Board consists of SoM with stm32mp157c with 4G eMMC and 512M DDR3 RAM. Carrier board features USB and ETH interfaces and SD card connector. USB and ETH interfaces not yet operational. Boot from eMMC requires boot ack bit set. Device Tree taken from v5 of kernel device tree off mailing list[1]. [1]: https://lore.kernel.org/linux-arm-kernel/20200724145107.35772-3-marcin.sloniewski@gmail.com/ Tested-by: Jookia <contact@jookia.org> Tested-by: Xogium <contact@xogium.me> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc' into masterSascha Hauer2020-08-188-167/+63
|\ \
| * | ARM: vexpress: enable KALLSYMS in defconfigLucas Stach2020-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Vexpress is mostly a vehicle to test things in a virtual enviroment, so it makes sense to enable this option which helps a lot when trying to debug where things go wrong. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: vexpress: set stdout pathLucas Stach2020-08-172-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | This ensures that the correct console gets activated independent of the device probe order. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: Layerscape: TQMLS1046a: remove ddr calc codeRouven Czerwinski2020-08-121-145/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Layerscape DDR code has two entry points, one which calculates the DDRC register values from the DDR timings and one which directly sets precomputed values. The TQMLS1046a has soldered RAM and does not require the dynamic calculation code which currently isn't used. Remove it. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm: baltos: export DIP switch valueYegor Yefremov2020-08-111-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some device in the OnRISC device family provide four DIP switches. Read them and provide their value as a hex in the global variable "board.dip". Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm: baltos: add environment nodeYegor Yefremov2020-08-101-3/+8
| | | | | | | | | | | | | | | | | | | | | Use the fourth SPL partition in NAND for environment storage. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | riscv: Makefile: make it possible to use riscv64 compilerAntony Pavlov2020-08-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment riscv64 toolchain can't be used to build barebox for riscv32, e.g. barebox$ make erizo_generic_defconfig ... barebox$ make ... riscv64-zephyr-elf-ld: common/memory.o: ABI is incompatible with that of the selected emulation: target emulation `elf32-littleriscv' does not match `elf64-littleriscv' The patch fixes the problem by explicit riscv32 target options selection. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: socfpga: achilles: remove unused barebox,bootstate nodeAhmad Fatoum2020-08-031-18/+0
| |/ | | | | | | | | | | | | | | | | | | We use barebox,state as compatible for the state node. The barebox,bootstate node serves no purpose with current code base and is just confusing. Drop it. Reported-by: Xogium <contact@xogium.me> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/kvx' into masterSascha Hauer2020-08-181-2/+41
|\ \
| * | kvx: exclude dtb from malloc zoneClement Leger2020-08-111-2/+41
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | When dtb is provided by the FSBL (first stage bootloader), it might end up in the malloc zone initialized by barebox. While the dtb is discarded after being unflatten, if the dtb is provided right after barebox elf, then the malloc can overwrite it while unflattening it when allocating nodes. To avoid that, exclude the dtb from the malloc zone by checking if it overlaps it. If so, determine the largest zone for the allocation and modify the memory area to use that. Signed-off-by: Clement Leger <cleger@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx' into masterSascha Hauer2020-08-1818-26/+425
|\ \
| * | ARM: nxp-imx8mm-evk: always set up UARTLucas Stach2020-08-171-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the TF-A is configured to have some output on the UART it does not set up the UART on its own, but just expects a pre-existing configuration. If Barebox did not set up the UART in the !DEBUG_LL case, TF-A will just hang without any user accessible debug output, which is a very non-obvious failure, so better be safe and always set up the UART in case TF-A wants to use it. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: imx8m: make debug UART selection available on i.MX8MM/MPLucas Stach2020-08-174-18/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | i.MX8MM/MN/MP has UARTs in the same place in the MMIO address space as the i.MX8MQ, so make the lowlevel debug a bit more generic across the i.MX8M family. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: imx8mm: select FIRMWARE_IMX_LPDDR4_PMU_TRAIN from IMX8MM_EVKLucas Stach2020-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Without this select the necessary DDR PHY firmware files will be missing when only building for the i.MX8MM-EVK board. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: dts: imx6: vicut1: fix network supportOleksij Rempel2020-08-111-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | Create the PHY node with properly configured phy-mode and reset lines. In this case we will not need board specific PHY fixups. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: dts: imx6q-prti6q: fix PHY registerOleksij Rempel2020-08-111-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: boards: phytec-som-imx6: Add mmc and emmc-boot bbu update handlerStefan Riedmueller2020-08-101-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add mmc and emmc-boot bbu update handler to update barebox on SD card and eMMC boot partitions easily. Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: i.MX: Add atlascopco sxb boardAnees Rehman2020-08-109-0/+380
| | | | | | | | | | | | | | | Signed-off-by: Anees Rehman <anees.r3hman@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mci: imx-esdhc-pbl: Add support for IMX7Anees Rehman2020-08-101-0/+1
| |/ | | | | | | | | Signed-off-by: Anees Rehman <anees.r3hman@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/dts' into masterSascha Hauer2020-08-182-3/+3
|\ \
| * | dts: update to v5.9-rc1Sascha Hauer2020-08-172-3/+3
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / ARM: at91: pass along bootsource to netbooted bareboxAhmad Fatoum2020-08-038-14/+63
|/ | | | | | | | | | | | ROM-Code passes boot source information in r4. First stage does likewise when invoking second stage. When net booting second stage, r4 has no definite value. Fix this and pass the original boot source along. This gives us a valid $bootsource value in net booted barebox, which is important, so the same environment is loaded. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/module'Sascha Hauer2020-07-279-7/+299
|\
| * arm: module: Allow modules outside of bl rangeDavid Dgien2020-07-018-6/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike the Linux kernel, barebox does not have a dedicated heap for storing modules. Therefore, if the system memory configuration places the general heap further away than can be reached by a 'bl' instruction (24 bits of address, or 16 MiB), then the module relocations will fail due to being out of range. Allocate PLTs when loading modules so that jumps and calls whose targets are too far away for their relative offsets to be encoded in the instructions themselves can be bounced via veneers in the module's PLT. The modules will use slightly more memory, but after rounding up to page size, the actual memory footprint is usually the same. Adoption of Linux commits: 66e94ba3c8ea ARM: kernel: avoid brute force search on PLT generation 1031a7e674d1 ARM: kernel: sort relocation sections before allocating PLTs 05123fef0982 ARM: kernel: allocate PLT entries only for external symbols 35fa91eed817 ARM: kernel: merge core and init PLTs 7d485f647c1f ARM: 8220/1: allow modules outside of bl range Signed-off-by: David Dgien <dgienda125@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * arm: elf: Add THM relocation typesDavid Dgien2020-07-011-0/+3
| | | | | | | | | | Signed-off-by: David Dgien <dgienda125@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * arm: makefile: Fix compiler flag variableDavid Dgien2020-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | In order for ARM modules to compile with the correct relocation types, they must be built without -fPIE. Move -fPIE from KBUILD_CPPFLAGS to KBUILD_CFLAGS_KERNEL so that the flag is only included when compiling files being built into the barebox image. Signed-off-by: David Dgien <dgienda125@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2020-07-2771-1366/+216
|\ \
| * | arch/arm/lib64: Convert to SPDX-License and -Copyright specifiersUwe Kleine-König2020-07-145-56/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Converts the files that licensecheck can determine the license for. Also convert to obvious right Copyright statements. Additionally some minor code reformatting is done. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | treewide: Convert files covered by ARM copyright to SPDXUwe Kleine-König2020-07-146-69/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Marc Zyngier, former employee at ARM, the company owns the copyright for code created by its employees. Convert accordingly to SPDX with the usual rearrangements. Also dropped Marc's email address which doesn't work any more. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arch/arm/include: Convert to SPDX-License and -Copyright specifiersUwe Kleine-König2020-07-1417-182/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | Converts the files that licensecheck can determine the license for. Also convert to obvious right Copyright statements. Additionally some minor code reformatting is done. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: reinstate cooked terminal mode on sanitizer-induced deathAhmad Fatoum2020-07-142-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we exit due to AddressSanitizer error, we remain in raw mode, which is not best user experience. Currently every exit is an AddressSanitizer death due to leaks. We want to encourage users to always have ASan enabled, to catch more errors, thus call cookmode() on exit. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: add libc memory allocatorAhmad Fatoum2020-07-143-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we typically want to reuse as much barebox functionality as possible in sandbox, using system malloc(3) instead can be very useful when using external memory integrity tools. This is even useful for AddressSanitizer, because the reports resulting from the memory poisoning API are less detailed than the built-in support for the libc malloc(3). Note that a barebox "heap" is still allocated upfront. It's only used for request_sdram_region now though. Whatever is allocated by means of malloc and memalign will be ina disjunct heap. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: os: common: fix compiler warning in add_image()Ahmad Fatoum2020-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC reports: ./arch/sandbox/os/common.c: In function ‘add_image’: ./arch/sandbox/os/common.c:271:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] This is because hf->base is an unsigned long long, with the upper 32 bit all-zeroes on 32-bit systems. The compiler doesn't see that though. Change the cast, so we no longer warn. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: include: <asm/types.h>: don't define INTERNAL_SIZE_TAhmad Fatoum2020-07-141-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The INTERNAL_SIZE_T default is size_t, which already is 64-bit on 64-bit platforms and 32-bit on 32-bit ones. We can thus drop the #define and go back to the minimal <asm/types.h>. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ppc: mpc5xxx: delete dead codeAhmad Fatoum2020-07-144-670/+0
| | | | | | | | | | | | | | | | | | | | | | | | These files had never been built since being added. At least the C file doesn't compile due to missing headers. Remove them. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: layerscape: ppa: fix error propagation in ppa_init()Ahmad Fatoum2020-07-141-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | On fit_open_image, we returned PTR_ERR(fit) instead of the correct ret. We also didn't call fit_close as we should. Fix this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: specify sizeof(dma_addr_t) == sizeof(phys_addr_t) == 8 on 64BITAhmad Fatoum2020-07-143-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sizeof(dma_addr_t) == 8 shouldn't introduce any functional change, because we can't have DMA on sandbox. For now it suppresses benign warnings about mismatched pointer and integer sizes when some headers are included. sizeof(phys_addr_t) == 8 was already the case on systems with __x86_64__. As CONFIG_64BIT now is set according to the bitness of the compiler, we can migrate this fully to Kconfig. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | x86: Kconfig: specify sizeof(dma_addr_t) == 8 for 64BITAhmad Fatoum2020-07-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This shouldn't introduce any functional change, because we don't yet do any DMA on EFI. For now it suppresses warnings about mismatched pointer and integer sizes when compile testing. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm/cpu: Replace license and copyright boilerplate by SPDX identfiersUwe Kleine-König2020-07-1414-186/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adapts all files that were identifed by licensecheck (https://salsa.debian.org/build-common-team/licensecheck.git) as licensed under the GPL. While touching these files also do some minor comment reformatting to get some uniform layout. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm/boards: Replace license boilerplate by SPDX identfiersUwe Kleine-König2020-07-1415-172/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adapts all files that were identifed by licensecheck (https://salsa.debian.org/build-common-team/licensecheck.git) as licensed under the GPL. The copyright situation isn't trivially clear for these files, so I didn't replace the copyright statement here with machine-parseable tags. While touching these files also do some minor comment reformatting to get some uniform layout. Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | treewide: make use of PTR_ERR_OR_ZEROUwe Kleine-König2020-06-262-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PTR_ERR_OR_ZERO is designed to replace boiler plate like: if (IS_ERR(x)) return PTR_ERR(x); return 0; Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | kbuild: remove AS variableMasahiro Yamada2020-06-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assembler files in the barebox are *.S instead of *.s, so they must be preprocessed. Since 'as' of GNU binutils is not able to preprocess, we always use $(CC) as an assembler driver. Remove AS variable. Linux also removed AS. See Linux commits: aa824e0c962b ("kbuild: remove AS variable") 1ca0c2f61211 ("kbuild: remove unused AS assignment") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mips'Sascha Hauer2020-07-278-0/+196
|\ \ \
| * | | MIPS: AR9331: OKUD Max9331Du Huanpeng2020-06-188-0/+196
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Oleksij and Kevin's Useless Devices. O&KUD Max9331 AR9331 400MHz MIPS 64M DRAM 16M SPI Flash 4G USB Nand Flash 3 User LEDs 3 Ports(1Wan/2Lan) 1 TTL Debug Uart Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/kvx'Sascha Hauer2020-07-278-11/+173
|\ \ \
| * | | kvx: remove duplicated dtb symbolsClement Leger2020-07-011-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dtb symbols (__dtb_start, __dtb_end) are already defined using RO_DATA_SECTION. This duplicated dtb section is a leftover used by Kalray internal tools to patch the dtb when loading the elf on a target. Remove it to keep only one symbol definition. Signed-off-by: Clement Leger <cleger@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | kvx: add support for elf loading using bootmClement Leger2020-07-016-2/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to boot elfs files, add bootm command support for kvx. This support can boot elf files using bootm elf support. initrd and device-tree handling is also included and loads them after the elf file load address. Signed-off-by: Clement Leger <cleger@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | kvx: add I-cache and D-cache synchronisationClement Leger2020-07-011-0/+18
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before booting, we must make sure the I-cache is synchronized with the D-cache to execute loaded instructions. In order to do that, add a function which execute a fence to ensure every memory accesses have been committed out of processor pipeline to memory and then invalidate I-cache to reload from memory. Signed-off-by: Clement Leger <cleger@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>