summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* 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/spdx'Sascha Hauer2020-06-11228-3258/+587
|\
| * arch/arm/boards: Replace license and copyright boilerplate by SPDX identfiersUwe Kleine-König2020-05-25228-3258/+587
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adapts all files that were identifed by licensecheck (https://salsa.debian.org/build-common-team/licensecheck.git) as licensed under the GPL. The advantage is that these specifiers are machine-parseable which helps license conformance, e.g. for packaging barebox in Debian. 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: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/sandbox-compile-test'Sascha Hauer2020-06-1110-176/+100
|\ \
| * | sandbox: os: add_image: fix memory leakAhmad Fatoum2020-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | devname is strdup'd few lines later, so remove the earlier strdup. The pointer isn't stored anywhere persistent in between. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: asm: implement <asm/atomic.h>Ahmad Fatoum2020-06-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | For easier code-sharing, the UBIFS code still uses the Kernel's atomic accessors. Provide a sandbox <asm/atomic.h> header, so we can compile-test UBI under sandbox. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: atomic.h: move generic implementation to asm-genericAhmad Fatoum2020-06-031-105/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | For easier code-sharing, the UBIFS code still uses the Linux atomic accessors. Make porting it to sandbox easier, by providing these functions for all platforms. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: select HAS_DMAAhmad Fatoum2020-06-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | With the DMA stubs in place, we can indicate HAS_DMA in good conscience. Do so. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: asm: implement stub DMA functionsAhmad Fatoum2020-06-031-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | For compile-testing drivers that use DMA operations under sandbox, we want stub implementations of these. Provide them. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: implement stub physical virtual translationAhmad Fatoum2020-06-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | For compile-testing drivers that use DMA operations under sandbox, we want stub implementations of these. Provide them. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: <asm/io.h>: include bitio accessorsAhmad Fatoum2020-06-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | ARM <asm/io.h> defines the U-Boot style setbits/clrbits helpers. Have sandbox follow suit to allow more drivers to be compile tested there. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: asm/io.h: fall back to <asm-generic/bitio.h> out_be32 and friendsAhmad Fatoum2020-06-031-57/+1
| | | | | | | | | | | | | | | | | | | | | | | | With the generic implementations in place in <asm-generic/bitio.h>, we can drop the now-duplicate ARM definitions. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: support forcing 32-bit x86Ahmad Fatoum2020-06-033-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If gcc supports multiple architectures, barebox uses only the default when compiling for ARCH=sandbox, this is e.g. the case with compilers that generate both 32- and 64-bit x86 executables. There can be good reasons to force 32-bit though, e.g. to reduce memory consumption while fuzzing or to temporarily avoid 32-to-64-bit warnings, while running the static analyzer. Add an option for this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: asm: bitsperlong.h: detect bitness according to 64BIT symbolAhmad Fatoum2020-06-031-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have an accurate CONFIG_64BIT describing sandbox bitness, we don't need to assume everything except __x86_64__ as 32-bit. This assumes that sizeof(long) == sizeof(void *), which is assumed anyway throughout the code base. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | sandbox: define CONFIG_64BIT as appropriateAhmad Fatoum2020-06-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All 64-bit architectures are supposed to define CONFIG_64BIT to support the relevant 64-bit MMIO accessors. The sandbox architecture is a bit of a special case, because barebox uses the toolchain default and doesn't force a bitness. Add 64BIT as promptless symbol, which reflects the pointer size of the target platform. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2020-06-1114-344/+38
|\ \ \
| * | | MIPS: correctly work with disabled CONFIG_MMUAntony Pavlov2020-06-082-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some issues with CONFIG_MMU=n in MIPS configuration (e.g. qemu-malta_defconfig): * "Cannot request SDRAM region for stack" error message on start; * empty kseg1_ram0 region in the iomem command output. The patch fixes the problems by forcing KSEG1 memory region usage for CONFIG_MMU=n MIPS configurations. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | treewide: replace commas with semicolons where appropriateAhmad Fatoum2020-05-203-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by searching drivers/ arch/ common/ and lib/ for /^\s+[^."/\*\[\s\{\(A-Z][^\[\{\(]*=[^\{\(]+,$/ Because the comma has the lowest precedence in C, this shouldn't result in any functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: dts: imx6: phycard: remove baseboard compatibleRobert Karszniewicz2020-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This devicetree isn't baseboard-specific, so keep it compatible at SOM-level. Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | arch: include <asm-generic/int-ll64.h> from <asm/types.h>Masahiro Yamada2020-05-188-326/+11
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many architectures duplicate the same fixed type definitions as in <asm-generic/int-ll64.h>. Include <asm-generic/int-ll64.h> from <asm/types.h>, and remove the duplicated code. Note: Linux commit 0c79a8e29b5f ("asm/types.h: Remove include/asm-generic/int-l64.h") unified the kernel space definition into int-ll64.h. Barebox also adopts int-ll64. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/kvx'Sascha Hauer2020-06-113-4/+0
|\ \ \
| * | | kvx: do not include empty <config.h>Masahiro Yamada2020-05-183-4/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <config.h> is per-board config file, which is only allowed for old boards. For new boards, the top Makefile creates an empty include/config.h kvx does not have config.h, so #include <config.h> is useless. Also, remove meaningless board-$(CONFIG_GENERIC). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-By: Clement Leger <cleger@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/kbuild'Sascha Hauer2020-06-1135-237/+229
|\ \ \ | | |/ | |/|
| * | powerpc: move ddr-8xxx/ to the relevant MakefileMasahiro Yamada2020-05-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Directory descending upward is ugly. Move it to the correct Makefile. No functional change is intended because FSL_DDR{2,3} depend on ARCH_MPC85XX. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Revert "ARM: socfpga: generate smaller images when multiple boards are selected"Masahiro Yamada2020-05-2518-96/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a83c97f2a4065ef7209f123b837fa5103f984c6a. The dead code elimination with thin archive can cope with the same symbol names. Revert the workaround. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | kbuild: switch over to thin archiveMasahiro Yamada2020-05-255-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting v4.13, Linux always uses thin archive instead of relocatable ELF to combine builtin objects. The thin archive is basically a text file that only contains paths to object files. As Linux commit 98ced886dd79 mentioned, this has a lot of benefits: - save disk space for builds - speed-up building a little - fix some issues when liking a giant executable (for example, allyesconfig on ARM Linux) - work better with dead code elimination The last one is important for barebox because pbl highly relies on the dead code elimination (-f{function,data}-sections and --gc-sections) dropping symbols that are unreachable from the linker's entry point. The dead code elimination does not work if the same symbol names are used in the pevious incremental link mechanism because the same name symbols all go into the same section. Commit a83c97f2a406 ("ARM: socfpga: generate smaller images when multiple boards are selected") worked around it by giving a dedicate section to each of the same name symbols. This workaround can go away. built-in.o was renamed to built-in.a since it is now an archive. built-in-pbl.o was renamed to built-in.pbl.a for consistency. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | kbuild: remove obj-dtb-y, pbl-dtb-y, lwl-dtb-y syntaxMasahiro Yamada2020-05-204-122/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The embedded DTBs are compiled by the chain of pattern rules as follows: %.dts -> %.dtb -> %.dtb.S -> %.dtb.o for barebox proper %.dts -> %.dtb -> %.dtb.S -> %.dtb.pbl.o for pbl Barebox introduced {obj,pbl,lwl}-dtb-y syntax to put the intermediate files into extra-y. The purposes of doing so were: [1] prevent GNU Make from deleting the intermediate files [2] include .*.cmd files In contrast, Linux does not use a special syntax for embedding DTBs into the kernel. For example, as you see in arch/sh/boot/dts/Makefile of Linux 5.6, obj-y += <basename>.dtb.o ... just works. This is because scripts/Kbuild.include specifies .SECONDARY to cater to [1], and scripts/Makefile.build adds the intermediates to 'targets' to deal with [2]. Barebox had already imported the same code from Linux, so you can use obj-y instead of obj-dtb-y, like Linux. pbl-dtb-y and lwl-dtb-y are barebox-specific cases, so I added the %.dtb.pbl.o pattern to intermediate_targets. Going forward, please use obj-y, pbl-y, or lwl-y. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | kbuild: rename pbl object pbl-*.o to *.pbl.oMasahiro Yamada2020-05-206-11/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, pbl objects are output to: <directory-path>/pbl-<basename>.o This commit changes as follows: <directory-path>/<basename>.pbl.o The motivation is not only to get rid of the ugly code introduced by commit 257abdaa36c8 ("Do not rm the path from pbl-y target"), but also to make it easier to remove obj-dtb-y, pbl-dtb-y, lwl-dtb-y syntax in the next commit. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2020-06-112-2/+2
|\ \
| * | ARM: i.MX: enable Master Identifier UnlockRouven Czerwinski2020-06-022-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | By default the HAB locks the Master Identifier (MID) to preconfigured values. This is not a problem if Linux is running in the secure world, however when running a secure world operating system such as OP-TEE, the MID configuration should be done by the secure world operating system. This causes no regressions for systems using no secure world operating systems, since no MID value indicates that all normal/secure world entities can access the peripherals supporting the MID. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / poller: Give pollers a nameSascha Hauer2020-05-202-2/+2
|/ | | | | | It helps debugging when pollers have a name, so give them one. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/stm32'Sascha Hauer2020-05-143-11/+136
|\
| * stm32mp: init: fix up st, package into stm32mp pinctrl nodesAhmad Fatoum2020-05-121-15/+48
| | | | | | | | | | | | | | | | | | | | | | Since Linux v5.1, the pinctrl driver can use the st,package property if provided to validate whether the ball to be configured exists on the package. The upstream device trees provide this property, but if we'll want barebox to supply it instead, so we can use the same barebox binary for different SoC variants. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * nvmem: bsec: remove wrongly named bsec_field typeAhmad Fatoum2020-05-081-3/+3
| | | | | | | | | | | | | | | | | | BSEC_SMC_READ_SHADOW and BSEC_SMC_WRITE_SHADOW aren't fields, but operations to apply on fields. Rename it accordingly and fix up instances where it was used wrongly. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: stm32mp: init: fix up CPU device tree nodesAhmad Fatoum2020-05-081-0/+45
| | | | | | | | | | | | | | | | To facilitate using the same barebox binary for multiple variants of the STM32MP15x, have it fix up the CPU device tree nodes. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: stm32mp: init: detect Revision Z and 800 MHz profilesAhmad Fatoum2020-05-082-6/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revision A was 0x1000 and B was 0x2000, so I assumed the next would be revision C valued 0x3000. Alas, it's revision Z with 0x2001... Change the code accordingly and add detection for the new 800Mhz profiles. Code taken from U-Boot commit cf0818b477 ("stm32mp1: support of STM32MP15x Rev.Z") and Patch[1] "stm32mp1: add 800 MHz profile support". [1]: https://st-md-mailman.stormreply.com/pipermail/uboot-stm32/2020-February/002170.html Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: stm32mp: init: don't cast signed error to unsignedAhmad Fatoum2020-05-081-2/+2
| | | | | | | | | | | | | | | | | | bsec_read_field returns a negative value on error, pass it along signed. This doesn't matter now, because we ignore the error code, but it's the correct thing to do. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/powerpc'Sascha Hauer2020-05-1413-5/+761
|\ \
| * \ Merge branch 'for-next/mxs' into nextSascha Hauer2020-04-301-0/+8
| |\ \
| | * | clk: mxs: Use device tree provided clock lookupsSascha Hauer2020-04-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When probing from the device tree use the device tree provided clock lookups. So far we only used the clock lookups based on the physical base address of the device, but these should go sooner or later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | arm: mxs: Add Kconfig option for device tree boardsSascha Hauer2020-04-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Boards supporting device tree have to make sure OFTREE and OFDEVICE are selected. Add a convenience option pulling in the right options and select it from the boards. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Merge branch 'for-next/misc' into nextSascha Hauer2020-04-301-7/+0
| |\ \ \
| * \ \ \ Merge branch 'for-next/kconfig' into nextSascha Hauer2020-04-308-44/+3
| |\ \ \ \
| * \ \ \ \ Merge branch 'for-next/stm32' into nextSascha Hauer2020-04-2810-5/+750
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |