summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/misc' into nextnextSascha Hauer18 hours20-74/+114
|\
| * ARM: vexpress: enable virt and vexpress boardsRouven Czerwinski18 hours1-0/+2
| | | | | | | | | | | | | | | | | | The recent cleanup of the vexpress arch moved to a multi board configuration, however did not adjust the defconfig to build the virt and vexpress boards. Build both in the defconfig. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: boot: include blspec path name in entry titleAhmad Fatoum18 hours1-1/+2
| | | | | | | | | | | | | | | | | | | | barebox linux-appendroot option having the same bootspec file in different partitions. boot -m will display the same title though, which doesn't help readability. Append the name of the config file to make the menu more useful in that case. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: boot: display each list entry in a separate lineAhmad Fatoum18 hours1-3/+2
| | | | | | | | | | | | | | | | | | The boot entry lines could get quite long for bootspec entries and then follow-up commit will make them even longer, thus split the lines into two lines and indent the second. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: boot: fix error code/clean up behavior when not bootingAhmad Fatoum18 hours1-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The boot command won't boot if: - There are no boot entries: we should still clean up before returning an error - A menu or list of found entries should be displayed: we should exit with success - We were doing a dry run: we should propagate the boot entry boot method's exit code Do the necessary. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * boot: drop uneeded header #includesAhmad Fatoum18 hours1-5/+2
| | | | | | | | | | | | | | | | | | | | Boot entry providers register themselves, so there is no need for the common boot code to know about bootchooser or blspec or include their headers. Remove them as well as other headers that aren't strictly necessary and, if needed, include headers they include directly. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * bootm: adapt help text and naming for bootm.provide_machine_idAhmad Fatoum34 hours3-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | The Kconfig help text as well the function name machine_id_set_bootarg() suggest that enabling the Kconfig option is sufficient to have barebox pass the machine id to the kernel. This is not the case, so change the naming/documentation to make this clearer. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Reviewed-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fb: sync enable device parameter with internal stateAhmad Fatoum34 hours1-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | So far fb.enable only reflected whether the fb was enabled/disabled via device parameter. Enabling/disabling the fb via ioctl left the parameter untouched. Remedy this. While at it, have setting of fb.enable if the underlying fb_enable/fb_disable fails as well. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * setenv: align with POSIX in handling of setenv(var, "")Ahmad Fatoum35 hours2-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | setenv(var, "") to delete var is a barebox idiosyncrasy. Previous commit added unsetenv and changed all users of setenv(var, ""), so lets set the behavior of setenv to what's expected: set var to the empty string. Previously, "" was turned into NULL, which meant it wasn't possible to set variables to the empty string from the shell. This is now possible. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: introduce unsetenv() to prepare for changing setenv(var, "") behaviorAhmad Fatoum35 hours5-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we treat setenv(var, "") and setenv(var, NULL) the same and delete var, which is surprising and leads to subtle quirks: - setenv(var, "") is specified by POSIX to set var to an empty string, but barebox uses it to delete variables - nv.user= calls nv_set with NULL parameter, but nv user="" doesn't Make the API more POSIX-like by providing unsetenv with the expected semantics. Most user code can then use unsetenv without worrying about whether "" or NULL is the magic deletion value. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: fastboot: Fix error pathSascha Hauer8 days1-13/+35
| | | | | | | | | | | | | | fastboot_bind() can fail in multiple ways. Roll back things already done in the error path. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Documentation: state: clarify how to access state device parametersAhmad Fatoum12 days1-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Users may be inclined to use hyphens in state variable names as this is customary for device tree nodes. Such variables can't be read with $state.example-variable or written with state.example-variable=, because it's incompatible with Hush. Adjust the documentation to nudge users into the correct direction (${state.example-variabe} and setenv) Suggested-by: Matthias Fend <Matthias.Fend@wolfvision.net> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * doc: add note about characters like hyphens in variable namesAhmad Fatoum12 days1-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The mismatch between the allowed characters in shell variables and device parameters is a common pitfall, especially because device tree node names often have hyphens in them, which is disallowed by hush. While such variables can be read by the ${variable-example}, setting them is only possible with the setenv command. Reflect this in the documentation. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common/Makefile: Fix dependencySascha Hauer12 days1-1/+1
| | | | | | | | | | | | | | | | | | pbl object files have been renamed from pbl-*.o to *.pbl.o. Fix another place which hasn't been renamed. Fixes: ff047395b9 ("kbuild: rename pbl object pbl-*.o to *.pbl.o") Reported-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: nand-imx: fix passing pointer of wrong type on NAND_CMD_READOOBAhmad Fatoum12 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | copy_spare used to take a mtd_info, but since 5f605dc6168c ("mtd: nand: Pass struct nand_chip around") it now takes a nand_chip. 3588d40c5385 ("mtd: nand-imx: repair reading the oob area") was drafted in parallel and still passes a mtd_info. Their merge did not adjust this, triggering a compiler warning and undefined behavior. Fix this. Fixes: 7b1d8b4b3561 ("Merge branch 'for-next/mtd-nand'") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * nv: fix use-after-free when clearing from shellAhmad Fatoum12 days1-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we use hush to set the same nv.var twice to the empty string: $ nv.user= $ nv.user= nv_set is called twice with a NULL val argument leading to a double free and accompanied memory corruption. Reorder the code, so p->value is freed just once. Fixes: fa4c41ba60af ("nvvar: when setting a nvvar to NULL just free the content") Cc: Holger Assmann <has@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: i.MX: esdctl: Add missing compatibleSascha Hauer12 days1-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 Hauer12 days1-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>
* | Merge branch 'for-next/mips' into nextSascha Hauer18 hours0-0/+0
|\ \
| * | clk: ls1b200: add clk driver for loongson 1bDu Huanpeng12 days7-4/+197
| | | | | | | | | | | | | | | | | | | | | add "pll" and "oscillator" node to devicetree. Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx' into nextSascha Hauer18 hours7-64/+80
|\ \ \
| * | | usb: imx: get power pin polarity from DTLucas Stach18 hours1-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a documented DT property to set the power pin polarity, parse it. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | usb: imx: add support for setting power pin polarity on i.MX6/7Lucas Stach18 hours1-0/+5
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clk: imx6: demote warning about ldb_di_clk reparentingAhmad Fatoum18 hours1-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux logging this is justified, because it alerts to problems in the boot firmware. barebox warning about it serves no real purpose other than indicating that barebox was chainloaded. Make it a debug log to not clutter the log. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i.MX: HABv4: Improve HAB event printingSascha Hauer18 hours1-24/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using a fixed sized buffer for the report_event function, let's call it two times, once with a NULL pointer to get the size of the event and a second time with a buffer of that size. Also, instead of separating the events into warning and error type, iterate over all events in one single loop. This helps to get the events in the order they occured which probably helps the reader to make more sense of them. This also gets rid of the "ERROR: Recompile with larger event data buffer" message which recently appeared everytime a warning or error was reported. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: dts: imx6qdl: pfla02: Fix NAND offsets for partitionsAlexander Shiyan12 days1-2/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: dts: imx6qdl: pfla02: Use upstream som_flash nodeAlexander Shiyan12 days1-27/+25
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: i.MX: esdctl: Add missing compatibleSascha Hauer12 days1-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 Hauer12 days1-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>
* | | Merge branch 'for-next/mips' into nextSascha Hauer13 days7-4/+197
|\ \ \
| * | | MIPS: ls1b200: use clk driverDu Huanpeng13 days2-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | switch the clock source of serials to clk provider. Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clk: ls1b200: add clk driver for loongson 1bDu Huanpeng13 days6-0/+190
| | |/ | |/| | | | | | | | | | | | | | | | add "pll" and "oscillator" node to devicetree. Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/arm-qemu' into nextSascha Hauer13 days11-61/+98
|\ \ \ | |_|/ |/| |
| * | ARM: qemu: add support for qemu virt platformRouven Czerwinski13 days5-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Necessary support to boot barebox on ARM qemu virt platforms. No internal device tree, since it is passed by qemu. Therefore it employs the generic 2nd stage image as the low level code and only adds a virt specific board driver. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: vexpress: move Options to ARCH_VEXPRESSRouven Czerwinski13 days2-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for the qemu virt image, move the KConfig options from MACH_VEXPRESS to ARCH_VEXPRESS. Also remove the choice, since we allow multiple boards to be selected with HAVE_PBL_MULTI_IMAGES. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: vexpress: convert to board driverRouven Czerwinski13 days1-29/+40
| | | | | | | | | | | | | | | Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: vexpress: remove unused KConfig fileRouven Czerwinski13 days1-8/+0
| | | | | | | | | | | | | | | Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | amba: add *_amba_driver helper macrosRouven Czerwinski13 days4-14/+10
| |/ | | | | | | | | | | | | | | | | Reuse the flexible register_driver_macro() to add {device,coredevice,console}_amba_driver to get rid of the init boilerplate code used within the amba drivers. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | nvmem: ocotp: fix fusing on fsl,imx6q-ocotp compatible boardsRobin van der Gracht13 days1-0/+2
|/ | | | | | | | | | The imx6q_ocotp_data struct is incomplete resulting in a crash when trying to read/blow fuses. Fixes: 17cba91885d9 ("nvmem: ocotp: read/write i.MX7 support") Signed-off-by: Robin van der Gracht <robin@protonic.nl> Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: layerscape: ppa: Fix use after freeSascha Hauer14 days1-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>
* mtd: nand: Fix dependeny on CONFIG_NAND_BBTSascha Hauer14 days2-2/+1
| | | | | | | CONFIG_NAND_BBT no longer exists, so remove the remaining occurences. Fixes: b6bcd96de5 ("mtd: nand: Update to Linux-5.9") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/sandbox'Sascha Hauer2020-11-102-20/+3
|\
| * Revert "common: ubsan: ignore shifting one into sign bit"Ahmad Fatoum2020-10-191-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | With the previous commit, we now explicitly tell GCC not to optimize constructs like (1 << 31) under assumption that they are undefined anyway. GCC >= 8.0 -fsanitize=undefined should now not warn any longer about (1 << 31) instances, so remove our work around. This reverts commit 55397b9ebe3a21a3aeb6a98131c0991bff0f7123. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * kbuild: force compiler to assume two's complementAhmad Fatoum2020-10-191-0/+3
| | | | | | | | | | | | | | | | | | The kernel is compiled with this option and kernel code we port assumes that integer types are two's complement, so play it safe and disable optimizations that are possibly buggy in respect to barebox. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd-nand'Sascha Hauer2020-11-1086-6094/+14454
|\ \
| * | nand command: Allow offsets with [kM] suffixesSascha Hauer2020-11-101-1/+1
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nand command: Print OOB informationSascha Hauer2020-11-103-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | NAND mtd devices carry information how the OOB area is used. So far there is no way to visualize it, so print it along with other NAND informations. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: nand: atmel: Fix pmecc ecc settingsSascha Hauer2020-11-101-42/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pmecc has hardcoded steps of 1 and ecc size of the nand chips page size. This is wrong, the ECC engine does 512 or 1024 bytes per step. Adjust ecc size and step size accordingly. Also, fix ecc strength which was hardcoded to 1. With this the correct number of bitflips is reported, which should be the number of bitflips per ecc step, not the one for the whole page. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: nand: atmel: drop dead codeSascha Hauer2020-11-101-22/+0
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: nand: atmel: Return number of bitflipsSascha Hauer2020-11-101-5/+5
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>