summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/misc'Sascha Hauer2018-11-0936-180/+59
|\
| * ARM: clk: rk3188: don't set same clk rate twiceperachet7@gmail.com2018-11-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | We found setting a clock rate which has already been set, rk3188 (radxa rock pro) bails out. This is a quick fix only. Underlying situation not (yet) investigated: why it is even trying to set it to the same rate again. It remains to state that some but not all rrpro boards exhibit this behaviour, no other rk3188 boards have been tested. Signed-off-by: P. Rachet <perachet7@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: mem: truncate mem device size to fit the loff_t file sizeLucas Stach2018-11-071-1/+2
| | | | | | | | | | | | | | | | | | | | On 64bit arches the file covering the whole address space is larger than what can be represented in the loff_t type (s64) used for the file size. Thus the size of this device is interpreted as negative in a lot of places. Fix this by truncating the size to fit the file size type. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * pinctrl: at91: Do not print registration messagesSascha Hauer2018-11-021-2/+2
| | | | | | | | | | | | Turn registration messages into dev_dbg. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: designware: look for a child device node for MDIO busIan Abbott2018-11-021-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Designware driver registers a local MDIO bus for each MAC device, but without setting a device node pointer for the MDIO bus device. In this case, mdiobus_register() will use the MDIO bus's parent device node (if any) as the MDIO device node. If the MAC device node has a child node compatible with "snps,dwmac-mdio", let us use that as the MDIO bus device node. Otherwise, leave the MDIO bus device node pointer set to NULL and carry on as before. The upshot is that PHY device nodes can now be placed in an intermediate node for the MDIO bus instead of having to place them directly in the Designware MAC device node. (Tested on a Terasic DE0-Nano-SoC with a suitably modified device tree.) Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Display barebox instead of kernel in build messageClément Leger2018-11-021-1/+1
| | | | | | | | | | | | | | | | Build script are coming from the kernel and as such, refers to the sources as "kernel". For the sake of correctness, display "barebox" instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * partitions: efi: Constify force_gptAndrey Smirnov2018-10-291-1/+1
| | | | | | | | | | | | | | No one is modifying 'force_gpt', so constify it to reflect that fact. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: dhcp: fix option 54Marcin Niestroj2018-10-262-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Option 54 (Server Identifier) is something different than SIADDR (Server IP address). Currently they are used interchangeably. This causes DHCPNAK with DHCP servers that have configured different values for each field. Create new 'dhcp_serverip' field in 'struct dhcp_result', so we treat option 54 separately. This fixes DHCP requests for servers that send two different values for SIADDR and option 54 in DHCPOFFER. Fixes: 528298b702a0 ("net: dhcp: rework") Fixes: e18cc5b7e9ce ("DHCP: fix option 54 passing") Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * rtc: ds1307: Add ds3231 to driver's ID listMarco Felsch2018-10-191-0/+1
| | | | | | | | | | | | | | | | | | In contrast to the ds1337 the ds3231 has a built-in temperature compensated crystal oscillator. The register map seems the same as the one from the ds1337, so using it's driver_data is okay. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * i2c: introduce device_i2c_driver() macroMarco Felsch2018-10-1921-164/+24
| | | | | | | | | | | | | | | | | | Add macro and dependency to avoid boilerplate code. Since now simple i2c drivers only have to include the i2c.h header and call the device_i2c_driver() macro to register a i2c device driver. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: fix indentationUlrich Ölmann2018-10-191-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: base: fix typoUlrich Ölmann2018-10-191-1/+1
| | | | | | | | | | Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * miitool: Fix inconsistent spacingAndrey Smirnov2018-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that there's a space between device name and it's status string regardless if if device is using "id" field or not. Before: barebox@ZII RDU2 Board:/ miitool mdio0-phy00: mdio:no link mdio1-phy15: 2188000.ethernet@2188000:10 Mbit, half duplex, no link mdio1-phy16: 2188000.ethernet@2188000:10 Mbit, half duplex, no link mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0:no link mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0:no link mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0:negotiated 100baseTx-FD, link ok mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0:no link mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0:no link mdio3-phy01: eth1: negotiated 1000baseT-FD flow-control, link ok After: barebox@ZII RDU2 Board:/ miitool mdio0-phy00: mdio: no link mdio1-phy15: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link mdio1-phy16: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0: no link mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0: no link mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0: no link mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0: no link mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0: no link mdio3-phy01: eth1: no link Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * rave-sp: backlight: Specify parent device correctlyAndrey Smirnov2018-10-161-0/+1
| | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phy: call adjust_link in attach if using fixed-linkClément Leger2018-10-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Normally, phy_update_status is in charge of reporting a change in link status when phy is updated. When using fixed-link, speed and duplex are initialized directly after registering the phy and there is no driver. Hence when phy_update_status is called, the check for new values fails and returns directly. Since update_link call is mandatory for some network devices to work, call it directly when using fixed link in phy_device_attach to force update of link. Signed-off-by: Clement Leger <clement.leger@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: fix documentation of state_new_from_node()Ulrich Ölmann2018-10-121-0/+1
| | | | | | | | | | | | | | | | Commit a66a8d79871c ("state: remove unused arguments from state_new_from_node()") removed a little bit too much. Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: state: use of_property_write_string() where appropriateUlrich Ölmann2018-10-121-4/+2
| | | | | | | | | | | | | | | | See commit b6089182316d ("treewide: Use of_property_write_string() where appropriate"). Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * blspec: do not depend on BLOCKLadislav Michl2018-10-121-1/+0
| | | | | | | | | | | | | | blspec can be read also from jffs2 or ubifs, so remove BLOCK dependency Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/malloc'Sascha Hauer2018-11-095-37/+47
|\ \
| * | libfile: Error out if out of memory in read_file_2()Andrey Smirnov2018-10-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All other error cases in read_file_2() are handled gracefully, so there shouldn't be any reason not do so for the case of trying to allocate too much memory. This error path can be easily triggered with: barebox_update file-bigger-than-availible-ram.img Currently this would result in a crash which is not really desirable from user experience. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | tlsf_malloc: Set errno to ENOMEM on failureAndrey Smirnov2018-10-161-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | Set errno to ENOMEM on failure so that correct error message can be displayed by users who rely on errno. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | dummy_malloc: Check if sbrk() failsAndrey Smirnov2018-10-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Add code to check if sbrk() fails as well as setting appropriate 'errno' for users that may rely on it for error reporting. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | dummy_malloc: Make use of PTR_ALIGNAndrey Smirnov2018-10-161-4/+2
| | | | | | | | | | | | | | | | | | | | | Drop explicit type cast and alignement code in favor of PTR_ALIGN Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | tlsf_malloc: dummy_malloc: Share code for calloc()Andrey Smirnov2018-10-164-31/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calloc() implementation for TLSF does not correctly check for malloc() failure which can result in a NULL pointer exception when trying to calloc() extra large buffers. Since both TLSF and dummy malloc implementations of calloc() are exactly the same, pick implementation for the latter (which does aforementioned check) and share it between the two. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2018-11-0928-30/+1348
|\ \ \
| * | | ARM: nxp-imx8mq-evk: add barebox and env partitionsLucas Stach2018-11-092-3/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So we can have a persistent env and a bit safer barebox update. Also switch the environment and update default depending on the bootsource, as this is really helpful on an eval board where one might want to have totally different systems on eMMC and SD card. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: nxp-imx8mq-evk: remove SDRAM reservation for ATFLucas Stach2018-11-091-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent versions of the i.MX8MQ ATF (like the one shipped with Barebox) reside in a part of OCRAM, so there is no need to reserve any part of SDRAM anymore. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: i.MX: Add liteboard supportMarcin Niestroj2018-11-0912-0/+391
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | liteboard is a development board which uses liteSOM as its base. liteSOM can't exist on its own, but is used as part of other boards - it only contains processor and memory. Hardware specification: * liteSOM: - i.MX6UL - 256M or 512M DDR3 RAM - eMMC (uSDHC2) * Ethernet PHY * USB host (usb_otg1) * MicroSD slot (uSDHC1) Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | scripts: imx-image: fix first instruction in i.MX8MQ headerLucas Stach2018-11-092-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The instruction being patched in was a branch to 0x24000, instead of the intended 0x9000. This doesn't matter when starting the image from a regular boot source, but breaks starting the image via bootm, as we rely on the jump in the first header instruction taking us to the actual code. As the code offset changes depending on the presence of the signed HDMI firmware, compute the offet dynamically while building the image. Fixes: 6d2132a9ded7 (scripts: imx-image: Add i.MX8MQ support) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rdu1: Implement RDU1 config loadingAndrey Smirnov2018-11-063-0/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RDU1 stores various configuration parameters, including FEC's MAC address, in a configuration blob that can be located in on of three places: SPI NOR, RAVE SP EEPROM or Microwire EEPROM. This patch add an initcall to load those configuration variables from a valid source (CRC8 checked) as well as expose then as "config_<var>" environment variables. This patch also adds appropriate code to register MAC address obtained from config blob. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rdu1: Add an alias for Microwire EEPROMAndrey Smirnov2018-11-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an alias for Microwire EEPROM to give it a better name in /dev. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nvmem: Port Linux driver for Microwire 93XX46 EEPROM chipsAndrey Smirnov2018-11-063-1/+458
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | lib: Port CRC8 implementation from Linux kernelAndrey Smirnov2018-11-064-0/+191
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rdu2: fix warnings in Barebox internal DTLucas Stach2018-11-021-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop partially wrong pcie nodes, so we pick up the correct ones from the kernel DT. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rdu2: program e1000 iNVMLucas Stach2018-11-021-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if the iNVM is already correctly written. If it isn't write the correct value in, so the device uses the correct PCI ID for the Linux driver. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rdu2: configure the USB port as OTGLucas Stach2018-11-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the USB port is host-only for the Linux system, it is useful to be able to switch it into device mode for debugging purposes in Barebox. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rdu2: config PMIC SW1AB and SW1C rails to 1.375Lucas Stach2018-11-021-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the default out-of-reset voltage, but if only the i.MX6 SoC got reset, the PMIC might still be stuck at the lower voltage for the slow operating point. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: imx7d-zii-rpu2: Add switch EEPROM aliasAndrey Smirnov2018-10-291-0/+9
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: vf610-zii-ssmb-spu3: Add switch EEPROM aliasAndrey Smirnov2018-10-291-0/+11
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: vf610-zii-cfu1: Add switch EEPROM aliasAndrey Smirnov2018-10-291-0/+10
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: vf610-zii-dev-rev-c: Add switch EEPROM aliasAndrey Smirnov2018-10-291-0/+12
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rdu1: Add switch EEPROM aliasAndrey Smirnov2018-10-291-0/+13
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: rdu2: Add switch EEPROM aliasAndrey Smirnov2018-10-291-0/+6
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/gpio'Sascha Hauer2018-11-0935-88/+666
|\ \ \ \
| * | | | ARM: rdu2: Replace board code with gpio-hog nodesAndrey Smirnov2018-11-062-38/+36
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | VF610: zii-vf610-dev: Drop switch reset GPIO configurationAndrey Smirnov2018-10-291-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This GPIO is controlled by MV88E6xxx driver, so there's no need to explicitly configure this GPIO. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | commands: gpio: Allow GPIOs to be specified by labelAndrey Smirnov2018-10-291-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | gpiolib: Introduce gpio_find_by_label()Andrey Smirnov2018-10-292-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce gpio_find_by_label() in order to allow manipulating GPIOs by the labels assigned to them via DT or board/driver code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | commands: gpio: Use kstrtoint() instead of simple_strtoul()Andrey Smirnov2018-10-291-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use kstrtoint() instead of simple_strtoul() in order to properly handle invalid arguments. Current code using simple_strtoul() results in following: barebox@ZII RDU2 Board:/ gpio_get_value foo barebox@ZII RDU2 Board:/ echo $? 0 whereas with this patch we get: barebox@ZII RDU2 Board:/ gpio_get_value foo gpio_get_value: Invalid argument Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | commands: gpio: Move argument parsing into a shared functionAndrey Smirnov2018-10-291-19/+29
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>