summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* sandbox: fix link error when UBSAN is selected without ASANHEADmasterAhmad Fatoum4 days1-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 Hauer9 days25-232/+629
|\
| * sandbox: defconfig: enable new generic featuresAhmad Fatoum10 days1-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 Fatoum10 days3-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 Fatoum10 days5-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 Fatoum10 days1-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 Fatoum10 days2-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 Fatoum10 days4-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 Fatoum10 days1-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 Fatoum10 days3-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 Fatoum10 days3-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 Fatoum10 days4-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>
| * of: implement of_property_read_u64_arrayAhmad Fatoum10 days2-0/+78
| | | | | | | | | | | | | | | | | | For reading reg with #address-cells and #size-cells of 2, an of_property_read_u64_array can be quite convenient. Add one. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * sandbox: dts: retire skeleton.dtsiAhmad Fatoum10 days2-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 Fatoum10 days1-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 Fatoum10 days4-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>
| * gen-dtb-s: support x86 and other platforms with 16-bit .wordAhmad Fatoum10 days1-3/+3
| | | | | | | | | | | | | | | | | | | | | | On ARM, .word is 32-bit as expected in the script, but on x86 it's 16-bit, which leads to truncation. .int on the other hand is 32-bit both on ARM and x86 and very likely all other platforms we support, so change the .word to .int. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: Add common device tree register functionSascha Hauer10 days8-49/+36
| | | | | | | | | | | | | | | | The different architectures duplicate some code around unflattening and registering the device tree. Add common functions to reduce this duplication. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/remoteproc' into masterSascha Hauer9 days5-54/+220
|\ \
| * | ARM: dts: i.MX8MP: Add Cortex-M7 Coprocessor nodeSascha Hauer2020-10-072-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i.MX8MQ has a Cortex-M7 Coprocessor. Add a node for controlling it. To make use of it the board has to provide the reserved memory nodes, for example: reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; m7_reserved_sysmem1: rproc@40000000 { reg = <0 0x40000000 0 0x800000>; no-map; }; m7_reserved_sysmem2: rproc@40800000 { reg = <0 0x40800000 0 0x800000>; no-map; }; m7_reserved_sysmem3: rproc@80000000 { reg = <0 0x80000000 0 0x800000>; no-map; }; }; &remoteproc_cm7 { memory-region = <&m7_reserved_sysmem1>, <&m7_reserved_sysmem2>, <&m7_reserved_sysmem3>; }; Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: dts: i.MX8MQ: Add Cortex-M4 Coprocessor nodeSascha Hauer2020-10-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i.MX8MQ has a Cortex-M4 Coprocessor. Add a node for controlling it. To make use of it the board has to provide the reserved memory nodes, for example: reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; m4_reserved: m7@0x40000000 { no-map; reg = <0 0x40000000 0 0x1000000>; }; m4_reserved_sysmem3: rproc@80000000 { reg = <0 0x80000000 0 0x800000>; no-map; }; }; &remoteproc_cm4 { memory-region = <&m4_reserved>, <&m4_reserved_sysmem3>; }; Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: i.MX8MQ: Add Cortex-M4 clkSascha Hauer2020-10-071-0/+5
| | | | | | | | | | | | | | | | | | Needed for the remoteproc driver on this SoC. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | remoteproc: imx: Add i.MX8M supportSascha Hauer2020-10-071-0/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the different i.MX8M SoCs to the i.MX rproc driver. i.MX8MM and i.MX8MQ can be handled like the i.MX7D with a different address space map. i.MX8MN and i.MX8MP are different though. Unlike the other SoCs which have a Cortex-M4 Coprocessor these have a Cortex-M7 Coprocessor. On these SoCs the TCM is only accessible when the Coprocessor is already started. A bit in the IOMUX GPR register space is needed to hold the CPU in wait mode until we uploaded the code to the TCM. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | remoteproc: imx: use function hooks in SoC dataSascha Hauer2020-10-071-31/+48
| | | | | | | | | | | | | | | | | | | | | | | | Replace the register offset/masks/values in driver data with function hooks to prepare the driver for adding SoCs that do not fit into this one-register-write scheme. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | remoteproc: imx: Change SoC order in codeSascha Hauer2020-10-071-29/+29
| | | | | | | | | | | | | | | | | | | | | Sort the SoC specific functions alphabetically to have a more natural order before adding more SoCs to the driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | remoteproc: imx: Fix off-by-one errorSascha Hauer2020-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | size is actually end - start + 1, fix size passed to request_sdram_region(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/reboot-mode' into masterSascha Hauer9 days24-33/+606
|\ \ \
| * \ \ Merge branch 'for-next/magicvar-unique-id' into for-next/reboot-modeSascha Hauer2020-10-0725-125/+98
| |\ \ \
| * | | | ARM: dts: i.MX6qdl: define BootROM reboot-mode on top of SRC_GPR{9, 10}Ahmad Fatoum2020-09-291-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SRC general purpose registers of the i.MX6 keep their values after a warm reset and are used for communication between the BootROM and upper level software. SRC_GPR9 allows software override of SRC_SBMR1, e.g. to boot via serial download protocol. Define a suitable syscon-reboot-mode node to use it. To have SRC_GPR9 take effect, bit 28 in SRC_GPR10 has to be set as well. To support this, we use the backward-compatible barebox-specific binding for having multiple 32-bit values for a single mode. This node will _not_ be fixed up into the kernel device tree due to the barebox-specific compatible, but as with all reboot mode storage, the referenced locations will be cleared to the normal (here all-zero) mode. User software that expects exclusive access to GPR9 while GPR10 bit 28 is zero will be broken. Rebooting into serial download is now possible via: barebox@board:/ gpr.reboot_mode.next=serial reset -r imxwd Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | power: reset: syscon-reboot-mode: support multi-word reboot modesAhmad Fatoum2020-09-291-26/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SoCs like the i.MX6 have their BootROM consult two distinct 32-bit registers to determine the reboot mode. Extend the driver to support this. While backwards compatible, this is not so far supported by the upstream binding, which is why a new barebox,syscon-reboot-mode is introduced. This new compatible be inhibit used to inhibit fixup into a kernel device tree. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | power: reset: reboot-mode: support multi-word magicAhmad Fatoum2020-09-293-22/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The upstream binding and driver implementation only supports reboot modes of 32-bit length. This is insufficient for cases where multiple registers need to be written for the reboot mode to become active. The i.MX6 is an example for this, the BootROM expects a second 32-bit register to indicate whether the reboot mode in the first is valid. In preparation for adding support for this to the syscon-reboot-mode driver. Migrate the reboot-mode core to support this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: stm32mp: remove custom reboot mode logic from arch codeAhmad Fatoum2020-09-292-26/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was ported from U-Boot to support st32mp_get_forced_boot_mode(), which allows board code to customize boot according to values the kernel places in the reboot mode region on the TAMP syscon. We no have a syscon-reboot-mode driver, a device node in the stm32mp151.dtsi, a ${global.system.reboot_mode} variable and a common reboot_mode_get(), which together achieve the same, but in a generic manner. Drop the now duplicate code. There has been no in-tree users so far, so we don't need to touch anything else. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: dts: stm32mp: setup syscon-reboot-mode on TAMP general purpose registerAhmad Fatoum2020-09-291-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the reboot mode infrastructure in place, lets add the first in-tree user. The STM32MP1 SoCs have general purpose registers in the TAMP peripheral. Register 20 there is used by the vendor's U-Boot for storing a forced boot mode. We will use the same location for our reboot mode. Consistency between barebox and OS is maintained by having barebox fixup the device tree with the same reboot mode information it used itself, so we are free to choose our own mode identifiers. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | defaultenv: provide defaults for generic reboot modesAhmad Fatoum2020-09-298-4/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While reboot mode magic identifiers can be very board specific, we can settle on common names to allow some generic reboot mode handling: - loader -> drop to bootloader shell on next boot - bootloader -> enable fastboot on next boot - recovery -> display barebox boot menu Boot modes loader and bootloader are admittedly a bit ambiguous, but this nomenclature was chosen, because it's already in use on Android and Rockchip systems. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | power: reset: reboot-mode: fix up node into boot device treeAhmad Fatoum2020-09-292-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of relying that the kernel and barebox device trees are in sync, just enforce it by having barebox fix up the device tree node it probed into the kernel device tree. We usually want that, but some reboot mode drivers might want to inhibit the fixup, e.g. because they implement a non-upstream binding or because they communicate with the BootROM, while the kernel shouldn't. For those the fixup is made optional via a struct reboot_mode_driver::no_fixup member. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | power: reset: reboot-mode: port syscon-reboot-mode supportAhmad Fatoum2020-09-294-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reboot modes are one-shot information that should be valid for only a single reset. Syscons that survive a warm reset are one way to implement this. This is used by many BootROMs to allow falling into a recovery mode on the next boot. This ports the Linux syscon-reboot-mode support. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | drivers: add reboot-mode infrastructureAhmad Fatoum2020-09-2910-0/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reboot modes provide a well-defined way to exchange information between different stage of the boot process. When configured, users can type `reboot bootloader` in the OS and barebox can read it out a device parameter. Likewise barebox can write a reboot mode for the BootROM to evaluate and then reset to fall into a serial recovery mode for example. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | usbgadget: autostart: support delayed usbgadget.autostart=1Ahmad Fatoum2020-09-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, global.usbgadget.autostart=1 from the shell was without effect, because the variable is only evaluated once at postenvironment_initcall. Use the new globalvar_add_bool() to allow acting on the variable being true at any time. This is necessary for scripts that want to enable the usbgadget autostart functionality selectively without themselves hardcoding the particularities of what is exported. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/percent_pe' into masterSascha Hauer9 days20-69/+72
|\ \ \ \ \
| * | | | | treewide: replace strerror(-PTR_ERR(errno)) with %pe format specifierAhmad Fatoum2020-09-298-22/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using %pe instead of PTR_ERR has the benefit of being less verbose and less error-prone (no negation necessary) while potentially reducing code size. Make use of it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | vsprintf: retire strerrorp in favor of %peAhmad Fatoum2020-09-2912-26/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strerrorp() is only used along with printf. We now have a format specifier for printing error pointers directly, so use that and remove strerrorp. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | vsprintf: add %pe format specifier for printing symbolic error namesAhmad Fatoum2020-09-291-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with v5.5, Linux has a format specifier for printing error pointers. We have had strerror in barebox before that, but lets wire it into vsprintf with the same format specifier that Linux now uses. This yields less verbose call sites and makes Linux drivers more portable to barebox in future. This also has the potential to reduce code size as the previously "inlined" strerror at callsites can now be replaced by a single vsprintf. Cc: Uwe Kleine-K├Ânig <u.kleine-koenig@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | vsprintf: constify pointers where appropriateAhmad Fatoum2020-09-291-10/+15
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No functional change, but makes code bit more future proof when it is extended. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/misc' into masterSascha Hauer9 days59-163/+699
|\ \ \ \ \
| * | | | | usb: dwc2: Uninitialize host and device on removeJules Maselbas14 days4-14/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device gadget must be properly uninitialized on poweroff however host system might not detect barebox's usb gadget has beeing disconnected. Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | kbuild: add dtbs target for building all dtbs of an ARCHAhmad Fatoum2020-10-071-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in the documentation, upstream device trees extended by barebox should take care to cause compile errors, not runtime errors, when the paths they extend disappear. This way, breakage can be easily detected when synchronizing the dts/ directory and fixed right then. Make this process easier by providing a dtbs target that builds all device trees available in arch/$(SRCARCH)/dts/. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: stm32mp: defconfig: enable more useful optionsAhmad Fatoum2020-10-071-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve coverage by enabling more common code. Users will tweak the defconfig and cut it down anyway. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: stm32mp: dk2: rename to dkx to make dk1 support clearerAhmad Fatoum2020-10-0712-15/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we now support both the stm32mp157a-dk1 and stm32mp157c-dk2 with the same barebox image, we should call the board stm32mp15xx-dkx instead. That's also how the upstream DTSI is named. Suggested-by: Holger Assmann <has@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: stm32mp: migrate board initcalls to board driversAhmad Fatoum2020-10-073-14/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Board drivers are now the way to go. Migrate the STM32 boards to use it, to encourage future copy-pasting in following suit. As the board now supports both DK2 and DK1, rename the prefix to dkx_. dk1 specifics follow in a separate commit. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | bootm: propagate register_image_handler return valueAhmad Fatoum2020-10-072-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While register_image_handler can't currently fail, it still returns an error code. Propagate that error code along instead of having a blanket return 0. This makes the code a little more compact. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>