summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/stm32'Sascha Hauer2019-11-0744-125/+4740
|\
| * ARM: dts: stm32mp: report psci v0.2 at leastAhmad Fatoum2019-11-072-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARM TF-A reports compatibility with PSCI v1.1 since v1.5. Upstream ARM TF-A support for STM32MP was introduced with v1.6. It's thus safe to assume that the STM32MP barebox will never have to interact with a secure monitor implementing PSCI v0.1. Overwrite the psci device tree compatible to specify v0.2. This is the first version that implements PSCI_VERSION, which allows the barebox psci client driver selected in this commit to query the actual PSCI version and fix it up into the device tree. This fixes an issue where resetting via PSCI fails in Linux because the upstream device tree compatible: reboot: Restarting system Reboot failed -- System halted Reported-by: Michael Olbrich <mol@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: stm32mp: select ARM_USE_COMPRESSED_DTB for the whole archAhmad Fatoum2019-11-072-1/+1
| | | | | | | | | | | | | | | | We'll probably be using compressed DTBs for all new boards as well, thus move the ARM_USE_COMPRESSED_DTB, so it's always selected for STM32MP. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: psci: implement PSCI client driverAhmad Fatoum2019-11-074-2/+221
| | | | | | | | | | | | | | | | | | | | | | | | System reset on the STM32MP may be done via PSCI when running TF-A as first-stage boot loader. Provide a PSCI driver to simplify using it: - A psci_invoke function is exported, so other code can use it - A fixup for the PSCI device tree node is registered - A reset and poweroff handler via PSCI is registered for PSCI >= v0.2 Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: psci: wire in smc command helpAhmad Fatoum2019-11-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The smc command has a help defined, but unused. Wire it in, so help smc and smc -invalidoption work as expected. While at it, remove the unimplemented -z option. It's unneeded, because -c turns off the CPU after starting it again already. Also it seems it's not implementable without interprocessor communication, which is probably overkill here. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: psci: use CONFIG_ARM_PSCI_DEBUG for smc commandAhmad Fatoum2019-11-071-1/+1
| | | | | | | | | | | | | | | | | | There's already an option to use when debugging PSCI. Instead of requiring users to #define DEBUG 1 as well, have the smc command be usable when CONFIG_ARM_PSCI_DEBUG, not DEBUG is defined. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: psci: translate PSCI error codes in smc commandAhmad Fatoum2019-11-071-1/+37
| | | | | | | | | | | | | | | | | | | | For more usability, translate CPU_ON error codes into the error descriptions found in the PSCI Platform Design Document[1]. [1]: http://infocenter.arm.com/help/topic/com.arm.doc.den0022d/Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: stm32mp: enable STPMIC1 MFD and cell driversAhmad Fatoum2019-11-061-0/+3
| | | | | | | | | | | | | | | | The STPMIC1 is the ST Microelectronics PMIC designed for use with STM32MP. Enable it and its cell drivers by default in the defconfig. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: dts: stm32mp157a-dk1: remove unnecessary sram nodeAhmad Fatoum2019-11-061-13/+0
| | | | | | | | | | | | | | | | This node has so far been unused and is a remnant from when the stm32mp device drivers weren't completely upstream yet. Drop the node. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * regulator: add driver for stpmic1-regulatorsAhmad Fatoum2019-11-064-1/+646
| | | | | | | | | | | | | | | | | | | | | | This commit imports the Linux v5.3 state of the driver. This allows us to regulate at least the v3v3 voltage rail used by the DK1 and DK2 Ethernet PHY and SD-Card. Eventually, this driver should be used by the USB host driver to supply the vbus voltage as well. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mfd: stpmic1: use dev_get_regmap instead of priv memberAhmad Fatoum2019-11-062-2/+4
| | | | | | | | | | | | | | | | | | When we call regmap_init, the regmap is associated with the device supplied and can be queried with dev_get_regmap. This is more natural than expecting cell drivers to cast dev->parent->priv. Do it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * regulator: import linear voltage range helpersAhmad Fatoum2019-11-062-0/+232
| | | | | | | | | | | | | | | | | | The incoming stpmic1 regulator driver makes use of these helpers internally. Thus port them out of Linux v5.3. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * regulator: port Linux of_regulator_matchAhmad Fatoum2019-11-064-0/+485
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux regulator drivers like the pfuze and the incoming stpmic make use of of_regulator_match to parse regulator init data from the device tree. Port the function over from Linux v5.3, so drivers depending on it can follow. As we have no use in barebox for power saving and suspend states, these parts are omitted. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * regulator: copy upstream struct regulator_desc documentationAhmad Fatoum2019-11-061-0/+28
| | | | | | | | | | | | | | | | This imports the regulator_desc documentation for the fields barebox uses out of Linux v5.4-rc1. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Documentation: boards: stm32mp: document boot mode strap pinsAhmad Fatoum2019-11-061-0/+19
| | | | | | | | | | | | | | | | The evaluation kits have 2P DIP-Switches for boot mode selection. Document them. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Documentation: boards: stm32mp: remove done TODOsAhmad Fatoum2019-11-061-11/+0
| | | | | | | | | | | | | | | | With SD/MMC controller and Ethernet MAC support merged, we now have usable STM32MP support. Remove the text that suggested otherwise. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: stm32mp: include new drivers in defconfigAhmad Fatoum2019-11-061-3/+17
| | | | | | | | | | | | | | | | We've had some new drivers added for the STM32MP since the defconfig was first added. Include the newcomers. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: eqos: extend Designware Ethernet QoS for Tegra 186 supportAhmad Fatoum2019-11-063-0/+354
| | | | | | | | | | | | | | | | | | | | | | | | The U-Boot dwc_eth_qos driver ported in the previous commit had support for both the Tegra 186/194 and STM32MP variants of the EQOS IP. The barebox Tegra supported doesn't include the 186, but as the driver was nevertheless ported along with the rest, lets include it in the source tree. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: add Designware Ethernet QoS for STM32MPAhmad Fatoum2019-11-065-1/+1227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have Designware NIC support in barebox, but for the DWMAC1000, the DWMAC4 (also called GMAC4), no support was mainline so far. The DWMAC4 is different enough that sharing code with the DWMAC1000 is not really that helpful, because even basics like MDIO registers have different layout. Instead of coding bit masks and shifts into the driver data, like Linux does, we'll keep both driver kinds separate. Nevertheless, we collect functions that are not SoC-specific into a separate 'library' file. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: stm32mp: dk2: add barebox SD-Card update handlerAhmad Fatoum2019-11-063-0/+31
| | | | | | | | | | | | | | | | Now with the SD/MMC controller supported, lets add a bbu handler, so we can use it to update the second stage boot loader partition. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mci: stm32_sdmmc2: parse generic MCI oftree propertiesAhmad Fatoum2019-11-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mci_of_parse takes care of the generic oftree bits, like removable flag, aliases and max-frequency. Insert it, so we can start to refer to the controller's block devices by a fixed name. Sticking in the mci_of_parse shows that the SD/MMC2 driver in barebox doesn't play nicely with the device tree specification of the SD/MMC2 for the dk2 board, however: Specifying the bus-width = <4> property in the device tree now made mmc usage fail when reading the environment: ERROR: error SDMMC_STA_DCRCFAIL (0x81042) for cmd 18 ERROR: stm32_sdmmc2_end_cmd: error SDMMC_STA_CTIMEOUT (0x4) for cmd 12 WARNING: stm32_sdmmc2_send_cmd: cmd 12 failed, retrying ... ERROR: stm32_sdmmc2_end_cmd: error SDMMC_STA_CTIMEOUT (0x4) for cmd 12 WARNING: stm32_sdmmc2_send_cmd: cmd 12 failed, retrying ... ERROR: stm32_sdmmc2_end_cmd: error SDMMC_STA_CTIMEOUT (0x4) for cmd 12 WARNING: stm32_sdmmc2_send_cmd: cmd 12 failed, retrying ... ERROR: stm32_sdmmc2_end_cmd: error SDMMC_STA_CTIMEOUT (0x4) for cmd 12 We'll want to fix this eventually, but for now force the bus width to 1. So we don't forget about this, print a notice to the console that we've done so. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: stm32mp: implement SoC and boot source identificationAhmad Fatoum2019-11-064-1/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The BSEC OTP holds information about SoC type and package. The Tamp registers hold information from the BootROM about boot source. Add support for both. Additionally, the tamp registers can also hold a request from the operating system about what mode to enter after boot, e.g. boot-into-recovery. A global function is exported for this, but unused so far. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * nvmem: add read support for STM32MP1 bsec OTPAhmad Fatoum2019-11-066-1/+306
| | | | | | | | | | | | | | | | | | The bsec on the STM32MP157C provides a 380 byte OTP. Add initial support for reading and writing the shadow copy of the fuses. Direct fuse access is not yet supported. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: stm32mp: select ARM_SMCCC alwaysAhmad Fatoum2019-11-061-0/+1
| | | | | | | | | | | | | | | | | | ARM_SMCCC compiles in the code for issuing ARM secure monitor calls. We need those on the STM32MP, because barebox runs in non-secure mode and does some operations like reading the BSEC OTP through SMCs. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: sm: document SMC/PSCI related optionsAhmad Fatoum2019-11-061-1/+5
| | | | | | | | | | | | | | | | At least to me, the difference between these options were confusing at first. Clear this up. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * pinctrl: stm32: parse pinctrl nodes without subnodes as wellAhmad Fatoum2019-11-061-81/+99
| | | | | | | | | | | | | | | | | | The bindings allow the pinmux node to occur directly in the node under the pin controller as well. Check for this and support both types of pinctrl specification. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * pinctrl: demote dev_info on successful probes to dev_dbgAhmad Fatoum2019-11-063-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The SoC's pin controller is virtually always built and probed, so there's is little information to gain from the fact it was successfully probed. Have the success message show up as debug message to reduce probe clutter like this: NOTICE: stm32-pinctrl soc:pin-controller@50002000.of: pinctrl/gpio driver registered NOTICE: stm32-pinctrl soc:pin-controller-z@54004000.of: pinctrl/gpio driver registered Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * pinctrl: stm32: fix debug print of uninitialized variableAhmad Fatoum2019-11-061-3/+3
| | | | | | | | | | | | | | | | mode and alt are printed with the dev_dbg before they are initialized. Remedy this by moving the dev_dbg after them. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mci: add support for stm32mp sd/mmc controllerOleksij Rempel2019-11-063-0/+675
| | | | | | | | | | | | | | | | | | | | This driver was ported from u-boot v2019.10. Instead of devicetree compatible it is using ARM AMBA id. So, there is no need to patch devicetree with different compatible as it was implemented in u-boot. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: stm32mp: enable ARM_AMBAOleksij Rempel2019-11-061-0/+1
| | | | | | | | | | | | | | It is needed for mci/sd/mmc driver. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: stm32mp: select ARCH_HAS_RESET_CONTROLLERAhmad Fatoum2019-11-061-0/+1
| | | | | | | | | | | | | | | | | | Many STM32 peripherals, including I2C, SPI, USB and SDMMC use the RCC reset controller for reset. Enable ARCH_HAS_RESET_CONTROLLER, so drivers depending on RESET_CONTROLLER become available for selection. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/socfpga'Sascha Hauer2019-11-077-27/+125
|\ \
| * | ARM: socfpga: defconfig: enable state_drvSteffen Trumtrar2019-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The Arria10 DTS uses the state framework. Enable the driver so it gets probed. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: socfpga: cyclone5-system-manager.h: remove definesSteffen Trumtrar2019-10-181-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | These defines are common for arria10 and cyclone5. Instead of having them here, they are moved to drivers/net/designware_socfpga.c. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: designware: socfpga: fix phy setup for Arria10Steffen Trumtrar2019-10-182-16/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Barebox-version of the Linux v5.2 patch: 40ae25505fe834648ce4aa70b073ee934942bfdb net: stmmac: socfpga: fix phy and ptp_ref setup for Arria10/Stratix10 On the Arria10, Agilex, and Stratix10 SoC, there are a few differences from the Cyclone5 and Arria5: - The emac PHY setup bits are in separate registers. - The PTP reference clock select mask is different. - The register to enable the emac signal from FPGA is different. Thus, this patch creates a separate function for setting the phy modes on Arria10/Agilex/Stratix10. The separation is based a new DTS binding: "altr,socfpga-stmmac-a10-s10". Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> The new DTS binding is already part of v2019.10.0 and the driver doesn't probe on Arria10 without the new binding introduced in this patch. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: socfpga: arria10-xload: fix Wmissing-prototypesSteffen Trumtrar2019-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the warning: arch/arm/mach-socfpga/arria10-xload.c:17:5: warning: no previous prototype for 'a10_update_bits' [-Wmissing-prototypes] 17 | int a10_update_bits(unsigned int reg, unsigned int mask, | ^~~~~~~~~~~~~~~ Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: socfpga: clock-manager: fix Wmissing-prototypesSteffen Trumtrar2019-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the warning arch/arm/mach-socfpga/arria10-clock-manager.c:113:14: warning: no previous prototype for 'arria10_cm_get_mmc_controller_clk_hz' [-Wmissing-prototypes] 113 | unsigned int arria10_cm_get_mmc_controller_clk_hz(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: socfpga: reset-manager: fix Wmissing-prototypesSteffen Trumtrar2019-10-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following warnings arch/arm/mach-socfpga/arria10-reset-manager.c:152:6: warning: no previous prototype for 'arria10_reset_deassert_shared_peripherals_q1' [-Wmissing-prototypes] 152 | void arria10_reset_deassert_shared_peripherals_q1(uint32_t *mask0, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/arm/mach-socfpga/arria10-reset-manager.c:226:6: warning: no previous prototype for 'arria10_reset_deassert_shared_peripherals_q2' [-Wmissing-prototypes] 226 | void arria10_reset_deassert_shared_peripherals_q2(uint32_t *mask0, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/arm/mach-socfpga/arria10-reset-manager.c:272:6: warning: no previous prototype for 'arria10_reset_deassert_shared_peripherals_q3' [-Wmissing-prototypes] 272 | void arria10_reset_deassert_shared_peripherals_q3(uint32_t *mask0, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/arm/mach-socfpga/arria10-reset-manager.c:329:6: warning: no previous prototype for 'arria10_reset_deassert_shared_peripherals_q4' [-Wmissing-prototypes] 329 | void arria10_reset_deassert_shared_peripherals_q4(uint32_t *mask0, uint32_t *mask1) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2019-11-0720-59/+212
|\ \ \
| * | | param: drop unused parameters in helpersAhmad Fatoum2019-11-051-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These parameters aren't currently used anywhere, but are still useful to have nonetheless. Keep them but drop the unused parameters. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | usb: storage: Increase retries for usb_stor_transport()Robert Karszniewicz2019-11-041-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should make writing and reading more reliable. Also: - change loop condition to make "retries" semantically correct - add a debug message in case of fatal failure Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of: of_path: fix return in case of EPROBE_DEFERMarco Felsch2019-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As said in commit 82eb3dff10 ("of_path: handle no driver for device") this case happens if the driver isn't probed yet. So we should return -EPROBE_DEFER to signal that. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | parameter: strip leading and trailing whitespacesMarco Felsch2019-11-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My initial bug was the following: I set the global.boot.default="boot1 boot2 " and executed the 'boot' command. If both targets are not bootable barebox starts to execute the boot scripts found under /env/boot. This is because of the command/boot.c implementation and the leading whitespace. Without the whitespace only the two desired boot targets are tried. IMHO leading and trailing whitespaces are error-prone in many cases. If someone wants to concatenate strings he/she should add spaces on purpose. So I fixed the bug above globally by always stripping leading and trailing whitespaces. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: ubootvarfs: use correct format specifier for pointer diffLucas Stach2019-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The difference between two pointers is represented as a ptrdiff_t, use the correct format specifier when printing to get rid of the following warning in a 64bit build: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long int' [-Wformat=] Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | OF: gpio: don't warn if ignored GPIO flag matches the behaviorLucas Stach2019-11-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port of the upstream accepted change to the Linux kernel. Some devicetrees specify the ACTIVE_LOW flag in the fixed regulator GPIO handle. While this has always been ignored, it's consistent with the behavior of the regulator binding in the absence of the "enable-active-high" DT property. It doesn't make much sense to print a user visible warning for a configuration which is consistent, so only print the warning if the GPIO flag contradicts the behavior dictated by by the enable-active-high property. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | sandbox: add_image: mmap block devicesRobert Karszniewicz2019-10-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to mount block devices from the host machine, which have been passed as arguments to --image Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mfd: superio: use strerrorp helper instead of open-codingAhmad Fatoum2019-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, we have a helper for strerror(-PTR_ERR(regmap)). Use it. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | libfile: copy_file: fix error handlingRobert Karszniewicz2019-10-231-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this, ret was falsely polluted, which caused a misleading error message if the function bailed out at a later point. Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | common: state: improve kconfig help textRoland Hieber2019-10-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Cc: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: devfs-core: do a case-insensitive compare of partuuidsAhmad Fatoum2019-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | partuuids are represented as hexadecimal strings, where case doesn't matter. barebox formats them as lower case internally, forcing the partuuid device tree property to be lower case too. Use strcasecmp to be case-insensitive. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>