summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* ARM: am335x: Use xz compression for MLOSascha Hauer2020-12-111-5/+1
| | | | | | | the binary built with am335x_mlo_defconfig has grown too big over time. Use xz compression to fit the image into initial SRAM. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: retire CONFIG_LINUX symbol in favor of CONFIG_SANDBOXAhmad Fatoum2020-11-271-5/+1
| | | | | | | | | | | | | 5211e428cbab ("image: Convert the IH_... values to enums") removed the IH_ARCH_LINUX enumeration value leading to breakage of sandbox configurations that enable bootm. Instead of reinstating IH_ARCH_LINUX, just use IH_ARCH_SANDBOX and remove mention of CONFIG_LINUX altogether, it's always true anyway when CONFIG_SANDBOX is true. Fixes: 5211e428cbab ("image: Convert the IH_... values to enums") Cc: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: esdctl: Add missing compatibleSascha Hauer2020-11-131-0/+3
| | | | | | | The i.MX8mm has "fsl,imx8mm-ddrc" as compatible, add it to the list of matching nodes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: nxp i.MX8MP evk: make locally used data staticSascha Hauer2020-11-131-9/+9
| | | | | | | Make locally used data static so that it doesn't conflict with other data with the same name. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: layerscape: ppa: Fix use after freeSascha Hauer2020-11-111-0/+1
| | | | | | | | | | | | In of_psci_do_fixup() we want to delete the one job-ring device node which is used by the PPA secure firmware. When we have deleted the node we may not continue the for_each_compatible_node_from() loop, because that would derefence the just deleted node. We only want to delete a single node, so we do not need to continue the loop once we've found the node, so we can fix the issue by breaking out of the loop. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mtd-nand'Sascha Hauer2020-11-1022-1/+22
|\
| * mtd: nand: Update to Linux-5.9Sascha Hauer2020-11-1022-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the barebox NAND layer and parts of the mtd layer to Linux-5.9. This patch is huge, but the barebox NAND layer is so far away from the Linux NAND layer that a step by step update would have taken ages. Unlike Linux barebox has functions to mark a block as good. This feature has been preserved. Also barebox used to make NAND write support optional, this feature is lost during the update for the sake of better compatibility to the Linux NAND layer. This patch has been tested: - GPMI aka nand_mxs on i.MX6 - nand_imx on i.MX25 - nand_omap_gpmc on AM335x - atmel_nand on Atmel sama5d3 - nand_denali on SoCFPGA Currently untested: - nand_orion - nand_mrvl_nfc - nand_s3c24xx The nand_denali driver is tested with the update of that driver to Linux-5.9 following in the next patch. I could only test the drivers with the NAND chips found on my boards, so there's still enough room for regressions, especially given that the NAND drivers themselves are mostly not updated. With the NAND layer being up-to-date with Linux it should hopefully be easy to update drivers to their Linux counterpart as well if necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2020-11-1024-286/+84
|\ \
| * | sandbox: remove MXS tools from hosttools_defconfigRoland Hieber2020-11-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_MXS_HOSTTOOLS currently only builds the tools mxsimage and mxsboot, which are both only needed to create bootable images for the MXS platform, and are not really useful as stand-alone host tools. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm: imx: Convert mach headers to SPDXUwe Kleine-König2020-11-0219-272/+51
| | | | | | | | | | | | | | | | | | | | | | | | Replace license and copyright boilerplate by SPDX identfiers for files identified as GPL-2.0-only or GPL-2.0-or-later by licensecheck. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | imx: Fix copyright claimUwe Kleine-König2020-11-021-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file was created by me in commit c0fcf4dde3c9 ("ARM: i.MX7: provide DDR register definitions") and obviously I failed to adapt our copyright template. While at it, convert to SPDX. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: mmu64: allow to disable null pointer trap on zero pageMichael Tretter2020-10-222-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Barebox uses the zero page to trap NULL pointer dereferences. However, if the SDRAM starts at address 0x0, this makes the first page of the SDRAM inaccessible and makes it impossible to load images to offset 0x0 in the SDRAM. Trapping NULL pointer dereferences on such systems is still desirable. Therefore, add a function to disable the traps if accessing the zero page is necessary and to re-enable the traps after the access is done. The zero_page_memcpy function simplifies copying to the SDRAM, because this is the most common required functionality, but memtest also accesses the zero page and does not use memcpy. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | x86: configs: efi: enable some more useful optionsAhmad Fatoum2020-10-211-0/+18
| | | | | | | | | | | | | | | | | | | | | Enable some more options to make the defconfig more widely applicable. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mips'Sascha Hauer2020-11-104-1/+222
|\ \ \
| * | | MIPS: dtb: remove unused variable ``root''Du Huanpeng2020-10-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the ``root'' is not used and cause a warning. Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | MIPS: ls1b: enable pbl support for ls1bdev boardDu Huanpeng2020-10-213-0/+222
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/imx'Sascha Hauer2020-11-103-12/+22
|\ \ \ \
| * | | | ddr: imx8m: clean up entry pointsLucas Stach2020-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DDRC address in the memory map and the TF-A parameter store address is the same for all i.MX8M* SoCs. The only difference (for now) is in the power up sequence. Add a enum for the DDRC type, so we can take different code paths in imx8m_ddr_init() depending on the SoC. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: dts: imx6qdl: pfla02: Remove eeprom nodeAlexander Shiyan2020-11-021-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The upstream dtsi now has a eeprom node, so no need to duplicate anymore. Let's keep the "page_size" property for a while. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: dts: imx6qdl: pfla02: document motivation for dropping supplyUwe Kleine-König2020-11-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 84cf5cfa9a0e ("ARM: dts: imx6qdl: pfla02: Remove fec phy-supply") the phy-supply was removed. The motivation however was only given in the commit log. Add a comment accompanying the actual statement to remove the property to make this better findable. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: CCMX51: Add new module ID variantAlexander Shiyan2020-10-281-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for Digi ConnectCore module variant 0x15 Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/imd-checksum'Sascha Hauer2020-11-104-6/+27
|\ \ \ \ \
| * | | | | ARM: socfpga: xload: evaluate integrity of second stage barebox imagesUlrich Ölmann2020-11-051-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not hand over control to a second stage barebox if its embedded CRC checksum is invalid. Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
| * | | | | bootstrap_read_disk(): optionally inform the caller of the buffer sizeUlrich Ölmann2020-06-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The size of the buffer allocated in the function is needed if it shall be inspected more closely later. Therefore optionally return it via a new pointer argument. Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
| * | | | | bootstrap_read_devfs(): optionally inform the caller of the buffer sizeUlrich Ölmann2020-06-224-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The size of the buffer allocated in the function is needed if it shall be inspected more closely later. Therefore optionally return it via a new pointer argument. Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
* | | | | | Merge branch 'for-next/dts'Sascha Hauer2020-11-102-2/+2
|\ \ \ \ \ \
| * | | | | | dts: update to v5.10-rc1Sascha Hauer2020-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | | | Merge branch 'for-next/at91'Sascha Hauer2020-11-106-252/+209
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | |
| * | | | | | ARM: at91: remove at91sam9x5ek_defconfigSascha Hauer2020-10-191-91/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The at91sam9x5ek is now covered by the at91_multi_defconfig. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: at91: remove at91sam9263ek_defconfigSascha Hauer2020-10-191-88/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The at91sam9263ek is now covered by the at91_multi_defconfig. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: at91: define new at91_multi_defconfigAhmad Fatoum2020-10-192-72/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now have 5 boards supporting multi-image, so add a defconfig that covers these five boards: - Microchip KSZ-9477 EVB - Microchip SAMA5D27-SOM1-EK - Groboards Giantboard - Atmel AT91SAM9263-EK - Atmel AT91SAM9x5 Series Evaluation Kit Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: at91sam9x5ek: Update NAND partitioningSascha Hauer2020-10-191-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current NAND partitioning is derived from the kernel dts. A current barebox built with at91sam9x5ek_defconfig no longer fits into the barebox partition. Also a Kernel built with sama5_defconfig no longer fits into the kernel partition. This makes the board quite unusable for modern setups, so take the step and do an incompatible update of the partitioning. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: at91sam9263ek: Update NAND partitioningSascha Hauer2020-10-191-1/+33
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current NAND partitioning is derived from the kernel dts. A current barebox built with at91sam9263ek_defconfig no longer fits into the barebox partition. Also a Kernel built with sama5_defconfig no longer fits into the kernel partition. This makes the board quite unusable for modern setups, so take the step and do an incompatible update of the partitioning. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | | ARM: dts: am335x: Fix pinctrl valuesSascha Hauer2020-11-037-396/+396
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux 27c90e5e48d0 ("ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2") changes #pinctrl-cells from 1 to 2. With this we need three values per pin. the upstream dts files use the AM33XX_PADCONF() macro which handles this change, but the barebox dts files do not use this, so we have to add an additional value. This patch is a purely mechanical version, a more fine grained version would drop the nodes/dts files we duplicated from upstream. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | ARM: bootm: Add lower bound check of kernel in SDRAMAlexander Shiyan2020-10-281-2/+3
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | In get_kernel_addresses(), we add the lower bound check of kernel position. Kernel address cannot be lower than SDRAM start. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | sandbox: fix link error when UBSAN is selected without ASANAhmad Fatoum2020-10-191-6/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc7f1fce6747 ("sandbox: fix SANDBOX_UNWIND dependency to be KASAN only") already restricted ARCH_HAS_STACK_DUMP to be dependent only on AddressSanitizer being available. This change got lost by an erroneous merge conflict resolution in 39bdcdfb814a ("Merge branch 'for-next/misc' into master"). Fix it up. Fixes: 39bdcdfb814a ("Merge branch 'for-next/misc' into master") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/sandbox' into masterSascha Hauer2020-10-1422-229/+518
|\ \ \
| * | | sandbox: defconfig: enable new generic featuresAhmad Fatoum2020-10-131-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent commits have modified sandbox for easier support of many common features: - block devices - watchdogs - reset source - reboot mode - barebox state Enable those in defconfig along with some other useful options. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: dts: include state node by defaultAhmad Fatoum2020-10-133-50/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For testing barebox-state, it would be nice to have a state pre-configured out-of-the-box. Add one to sandbox.dts. Because the barebox message on an non-configured state can looks quite scary, add an init script that tells the user that all is well. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: add watchdog driverAhmad Fatoum2020-10-135-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add SIGALRM based watchdog driver. This can reset barebox if stuck and plays nicely with $global.system.reset. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: dts: implement reboot modeAhmad Fatoum2020-10-131-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having a default reboot mode in the device tree allows testing the functionality out of sandbox without prior setup. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: power: implement reset source supportAhmad Fatoum2020-10-132-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can differentiate between POR and RST by explicitly storing RST as reset reason when we invoke the reset handler. Do so. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: poweroff: migrate to driver probed from device treeAhmad Fatoum2020-10-134-43/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up will extend the poweroff driver to support system reset source. Set the stage by renaming the driver to power (as it does reset as well) and make it probe from device tree, so it can point at the system reset source syscon via phandle. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: dts: define default environment nodeAhmad Fatoum2020-10-131-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we can define a hostfile that's persistent over barebox resets, but does not rely on a hard coded filename, we can have an always-on environment node. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: hostfile: maintain created temp files over resetAhmad Fatoum2020-10-133-9/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, hostfils without a barebox,filename are assigned a new temporary file on every start. For use of a hostfile syscon for reboot mode or reset source, we will need to persist the changes over a regular reset. This can easily be done by passing through all automatically created temporary file with an explicit --image option on subsequent runs. Do so. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: hostfile: support anonymous hostfiles in device treeAhmad Fatoum2020-10-133-5/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far use of hostfile in the device tree required us to hard code a file name. If we instead create a temporary file on demand, we can support: - environment - barebox-state - syscon for reset source and reboot mode out of the box with no dependency on external files. Do the necessary, so a hostfile device tree node without a barebox,filename gets a temporary file generated with the appropriate size. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: hostfile: unify --image and direct device tree probeAhmad Fatoum2020-10-134-40/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 801b7cff0210 ("sandbox: hostfile: allow probing from device tree") added initial support for probing hostfiles out of a non-fixed up device tree. This was achieved by having the driver probe call linux_open if the device tree node doesn't contain a valid barebox,fd property. A mmap did not happen in that case and as such the node couldn't be used as a syscon. Fix this by unifying the binding for hostfiles added by --image and ones already in the device tree. Both will result in a device node with just a barebox,filename property. On pure init level, both kinds of hostfiles will be iterated through and filenames will be opened and mmaped. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: dts: retire skeleton.dtsiAhmad Fatoum2020-10-122-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up commits will flesh out the sandbox.dts and make most of what's in the skeleton.dtsi redundant. Merge the .dtsi with the .dts to have all the code at one place. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: fix behavior with images >= 4G on 32-bitAhmad Fatoum2020-10-121-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hf->base may remain uninitialized if an image is > 4G, but sandbox barebox is compiled for 32-bit. Fix this. Reported-by: clang-analyzer-10 Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: compile in a fallback device treeAhmad Fatoum2020-10-124-26/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sandbox architecture is device tree only and so far when no --dtb was passed, it created a basic one itself and used that. Instead of creating the default device tree in C, just build the dtb into barebox like we do on other platforms. When --dtb is specified, that device tree will be used instead. This results in functional change: Model and hostname are now more accurate. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>