summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release v2018.06.0v2018.06.0Sascha Hauer2018-06-081-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* wdt: da9053: fix missed dev->hwdev conversionLucas Stach2018-06-081-1/+1
| | | | | | Fixes: 1ef7cd07a304 (watchdog: rename dev to hwdev) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: imx6sx: use correct clocks for GPTLucas Stach2018-06-071-0/+4
| | | | | | | | | | | | | | | This is a stop gap solution until the upstream DT is fixed. In Linux this isn't an issue as the driver prefers the "osc_per" clock, falling back to "per" and then doing different things based on the SoC type and if the input clock rate matches 3MHz. As this isn't really how the hardware works, but a fragile mix of the clock driver exposing a clock with a faked frequency and system knowledge in the GPT driver I prefer not to replicate this horrors in the Barebox driver, but instead just use the system clock source. Fixes: 2ebda864f837 (ARM: imx: clocksource: Use per clock for determining parent freq) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: core: Fix printing partitions in hexTeresa Remmet2018-06-071-1/+1
| | | | | | | | When printing the partition size with "0x" prefix the value has to be displayed in hex. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: gadget: fastboot: fix barebox update without using bufferMichael Grzeschik2018-05-171-1/+1
| | | | | | | | | | | | Commit e5098495 "usb: gadget: fastboot: Add option to download to a buffer" breaks the use of temporary files for fastboot barebox_update. In the patch the ".imagefile = FASTBOOT_TMPFILE" allocation gets removed, but data.imagefile is still used. This leads to an NULL pointer dereference. We fix it by using sourcefile instead. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/state'Sascha Hauer2018-05-096-4/+31
|\
| * ARM: dts: AM335x: Add keep-previous-content propertyDaniel Schultz2018-04-161-0/+1
| | | | | | | | | | | | | | | | | | Some of our customers may have data in the EEPROM region, which we newly have assigned as state partition. This property should prevent them of data loses. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * common: state: Add property to protect existing dataDaniel Schultz2018-04-165-4/+30
| | | | | | | | | | | | | | | | | | | | | | After an update to a newer barebox version with an enabled state framework, existing data in storage memories could be overwritten. Add a new property to check in front of every write task, if the meta magic field only contains the magic number, zeros or ones. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/socfpga'Sascha Hauer2018-05-095-12/+8
|\ \
| * | ARM: socfpga_defconfig: enable Altera firmware stuffAntony Pavlov2018-04-121-0/+2
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: socfpga: mach/pll_config.h: add guard macroAntony Pavlov2018-04-121-0/+4
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: socfpga: boards: pll_config.h: remove duplicate macrosAntony Pavlov2018-04-122-12/+0
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: make SoCFPGA-specific designware driver work againAntony Pavlov2018-04-122-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If MFD_SYSCON is disabled in .config then socfpga_designware_eth probe fails with this message: socfpga_designware_eth ff702000.ethernet: Could not get sysmgr-syscon node Thanks to Steffen for hint! Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/serdev'Sascha Hauer2018-05-0915-110/+396
|\ \ \
| * | | serdev: Allow polling interval to be adjusted at runtimeAndrey Smirnov2018-04-171-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to blocking, synchronous, polling driven nature of Barebox's serial communication handling trying to use two or more serial ports at high (1Mbaud+) baudrates results in data loss and noticeable perofmance degradation. This happens as soon as individual message being sent around start exceeding HW Rx FIFO in size. A good example of such a usecase would be using a system that has a serdev driver (operating @ 1Mbaud+) and trying to do a X/YMODEM transfer via serial console at comparable baudrates. To at least partially ameliorate the problem, add code that will expose "polling_interval" as a parameter, so that the user would have an option of temporarily disabling (or significatly decreasing the rate) of a given serdev's polling. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | serial: Drop .remove functions from all driversAndrey Smirnov2018-04-178-82/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on specifics, some 'serdev' devices might need prevent parent console device from being removed and corresponding memory deallocated to properly function until the very end of Barebox's execution. An example of such a use-case would be a reset handler relying on a serdev device for transport. To avoid having to develop complicatione reference counting/ownership scheme drop all of the code that calls console_unregister() and frees the memory effectively making the problem above impossible to arise. All of the de-initialization that serial drivers were doing in their .remove functions was somewhat superflous anyway, so this change should be pretty harmless. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | serdev: Add trivial blocking read functionAndrey Smirnov2018-04-172-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add example implementation of a trivial blocking read function as a part of Barebox's serdev API. NOTE: This code has not been tested against real devices, so use it at your own risk. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | console: Add simplified 'serdev' framework from Linux kernelAndrey Smirnov2018-04-176-3/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port 'serdev' UART-slave deivce framework found in recent Linux kernels (post 4.13) in order to be able to port 'serdev' slave drivers from Linux. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | console: Introduce console_drain()Andrey Smirnov2018-04-172-25/+89
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generalize high baud rate UART polling code found in lib/xmodem.c and expose it as a generic function in console API. The usecase for this -- besides X/Y-mode data transfers where the code originated -- is command/reply type of serial exchages at high baud rates (~1Mbaud) with payloads exceeding inernal UART FIFOs in size. Such interactions are not uncommon in serdev device and this patch is done in preparation for serdev support code that will follow. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/net'Sascha Hauer2018-05-093-1/+25
|\ \ \
| * | | net: phy: micrel: fix too late link upChristian Hemp2018-04-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit a4cee7207a1 ("net: phy: micrel: Add workaround for bad autoneg") by Philipp Zabel <p.zabel@pengutronix.de>: Based on kernel commit d2fd719bcb0e ("net/phy: micrel: Add workaround for bad autoneg") by Nathan Sullivan <nathan.sullivan@ni.com>: Very rarely, the KSZ9031 will appear to complete autonegotiation, but will drop all traffic afterwards. When this happens, the idle error count will read 0xFF after autonegotiation completes. Reset the PHY when in that state. is it possible that we get the link to late and barebox reports "Network is down". The problem is that ksz9031_config_init is called again in an error case. In this case autoneg will restart but waiting for finish is missing. Signed-off-by: Christian Hemp <c.hemp@phytec.de> Tested-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
| * | | net: on ifup -a only detect devices when necessarySascha Hauer2018-04-092-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For network boot we once used to hardcode eth0, but in latest changes this was changed to work with different network devices and the 'ifup eth0' was replaced with 'ifup -a' which lead to the result that we now detect all devices in order to eventually also bring up USB network adapters. In most of the cases this is not desired. When a board has internal network support this is likely to be used. With this patch we only detect all devices when we do not have a network device already. For the unusual case in which a USB network adapter shall be used even when an internal network interface is present we introduce the global variable "global.net.ifup_force_detect" which can be used to force detection of devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/misc'Sascha Hauer2018-05-0912-6/+1317
|\ \ \ \
| * | | | blspec: add checking of optional key machine-idAndreas Schmidt2018-05-082-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For filtering of Bootloader Spec entries, Bootloader Spec specify an optional key machine-id. By set the global.boot.machine-id variable the checking of machine-id key in Bootloader Spec entries will be activate. If the variable and key match, appropriate boot entry will be booting. If it not match boot entry will be ignore and barebox check the next boot entry. Signed-off-by: Andreas Schmidt <mail@schmidt-andreas.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | watchdog: Port RAVE SP watchdog driver from Linux kernelAndrey Smirnov2018-05-043-0/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port RAVE SP watchdog driver from Linux kernel Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | mfd: Port RAVE SP driver from Linux kernelAndrey Smirnov2018-05-044-0/+845
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port MFD driver for RAVE SP from Linux kernel. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | usbnet: increase bulk message timeoutNikita Yushchenko2018-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Timeout of 1ms is too low for case when device operates in Full Speed mode. This causes most incoming frames to be lost. Since timeout is only used to get out of polling loop in case of no response from hardware, increasing it should be safe for all platforms. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Tested-By: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | video: tc358767: don't link AUX i2c adapter to parent OF nodeLucas Stach2018-04-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise the i2c core will try to populate the TC358767 child nodes as i2c devices, which is wrong. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | pinctrl-vf610: Make use of BIT macroAndrey Smirnov2018-04-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/mfd-dialog'Sascha Hauer2018-05-094-12/+165
|\ \ \ \ \
| * | | | | ARM: i.MX: pfla02: set priority of da9063 watchdogEnrico Scholz2018-04-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To win against the internal imx6 or other external watchdogs, increase priority (default: 100) of the da9063 watchdog. Ditto for the restart handler and reset source priority. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Tested-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
| * | | | | ARM: i.MX: phycore-som: added and enabled DA9062 PMICEnrico Scholz2018-04-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Tested-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
| * | | | | mfd: da9063: update Kconfig for DA9062Stefan Christ2018-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
| * | | | | mfd: da9063: read out and report device idEnrico Scholz2018-04-121-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | just some kind of debugging atm... Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Tested-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
| * | | | | mfd: da9063: added of_device_id informationEnrico Scholz2018-04-121-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Tested-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
| * | | | | mfd: da9063: add device specific init functionEnrico Scholz2018-04-121-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide some more information about the used PMIC type; later patches will add support for DA9062 which needs a custom init function. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Tested-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
| * | | | | mfd: da9063: use da906x_reg_update()Enrico Scholz2018-04-121-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the previously added da906x_reg_update() function. NOTE: patch depends on another patchset ("da9063: reset watchdog timer"), Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Tested-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
| * | | | | mfd: da9063: added generic reg_update() functionEnrico Scholz2018-04-121-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Used to set or clear bits of a register. The calculation of 'client' might look odd and unnecessary complicated. But style prepares access to other register banks which is added in following patches. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Tested-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
| * | | | | mfd: da9063: reset watchdog timerEnrico Scholz2018-04-121-2/+34
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting the new timeout does not suffice for restarting the watchdog; the self-clearing bit in CONTROL_F must be set too. barebox does not provide a ping function in its watchdog api to restart the watchdog timer. Detect ping vs. set_timeout() by comparing the actual with the previous timeout value. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Tested-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
* | | | | Merge branch 'for-next/imx-reset-reason'Sascha Hauer2018-05-0913-15/+276
|\ \ \ \ \
| * | | | | ARM: i.MX51: Record reset reason as a part of startupAndrey Smirnov2018-05-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: i.MX53: Record reset reason as a part of startupAndrey Smirnov2018-05-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: i.MX: Introduce IMX_SRC_SRSRAndrey Smirnov2018-05-083-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Offset for SRSR register in SRC IP block for i.MX51, i.MX53, i.MX6 and VFxxx is exactly the same so define a single constant for that and replace all of the SoC specific definitions. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: i.MX: Make imx6_reset_reasons globalAndrey Smirnov2018-05-083-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both i.MX51 and i.MX53 have exactly the same reset source mapping, so rename imx6_reset_reasons to imx_reset_reasons and make it a globally visible constant so it could be shared. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: i.MX: Fix incorrect IMX_SRC_SRSR_CSU_RESETAndrey Smirnov2018-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IMX_SRC_SRSR_CSU_RESET is bit 2, not 1. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: i.MX51: Replace expicit casts with IOMEMAndrey Smirnov2018-05-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: i.MX7: Remove unnecessary local variableAndrey Smirnov2018-05-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It looks this code was based on analogous code for i.MX6, but there that variable was being used as a part of following switch statement. Since this is not the case for i.MX7, just replace the variable with direct function call. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: VFxxx: Record reset reason as a part of startupAndrey Smirnov2018-05-082-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: VFxxx: Detect cpu variant on startAndrey Smirnov2018-05-084-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: VFxxx: Add code to detect cpu variantAndrey Smirnov2018-05-082-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>