[PATCH] serial/lpuart: Do not enable UART FIFO

2018-04-12 Thread Andrey Smirnov
Using FIFO in LPUART results in subtle serial input draining issues which are quite difficult to reproduce and troubleshoot. Since the change offered only moderate performance gain revert the code to operate in no-FIFO mode to avoid FIFO-related problems alltogether. Signed-off-by: Andrey Smirnov

[PATCH] gitignore: Add *.pblx files

2018-04-12 Thread Andrey Smirnov
Looks like *.pblx was accidentally dropped from ignored files list and now my "git status" is clobbered by every *.pblx image that is being built (that's quite a lot for imx_v7_defconfig). Re-add original rule to prevent that. Fixes eed8a41c5 ("gitignore: ignore pblx.simximg files") Cc: Steffen T

[PATCH v2 4/5] serial: Drop .remove functions from all drivers

2018-04-12 Thread Andrey Smirnov
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 transp

[PATCH v2 3/5] serdev: Add trivial blocking read function

2018-04-12 Thread Andrey Smirnov
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 --- common/serdev.c | 95 +++

[PATCH v2 5/5] serdev: Allow polling interval to be adjusted at runtime

2018-04-12 Thread Andrey Smirnov
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

[PATCH v2 2/5] console: Add simplified 'serdev' framework from Linux kernel

2018-04-12 Thread Andrey Smirnov
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 --- common/Makefile| 1 + common/console.c | 24 -- common/serdev.c| 89

[PATCH v2 1/5] console: Introduce console_drain()

2018-04-12 Thread Andrey Smirnov
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 i

[PATCH v2 0/5] Linux's serdev framwork port

2018-04-12 Thread Andrey Smirnov
Hi everyone: In an effort to bring this kernel driver https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/mfd/rave-sp.c?h=v4.16-rc7 to Barebox, I ended up creating a miniature and extremely simplified version of 'serdev' subsystem which is presented in this patchset. C

Re: [PATCH 2/3] console: Add simplified 'serdev' framework from Linux kernel

2018-04-12 Thread Andrey Smirnov
On Wed, Apr 11, 2018 at 1:39 AM, Sascha Hauer wrote: > On Mon, Apr 09, 2018 at 09:40:46AM -0700, Andrey Smirnov wrote: >> On Mon, Apr 2, 2018 at 11:54 PM, Sascha Hauer wrote: >> > Hi Andrey, >> > >> > Some comments inside. >> > >> > >> > On Mon, Mar 26, 2018 at 06:09:14AM -0700, Andrey Smirnov wr

Re: [PATCH 3/3] serial: Check result of console_unregister()

2018-04-12 Thread Andrey Smirnov
On Wed, Apr 11, 2018 at 1:34 AM, Sascha Hauer wrote: > Hi Andrey, > > On Mon, Apr 09, 2018 at 09:00:52AM -0700, Andrey Smirnov wrote: >> On Tue, Apr 3, 2018 at 12:04 AM, Sascha Hauer wrote: >> > On Mon, Mar 26, 2018 at 06:09:15AM -0700, Andrey Smirnov wrote: >> >> In order to allow 'serdev' devic

[PATCH v2 1/2] common: state: Add property to protect existing data

2018-04-12 Thread Daniel Schultz
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 --- C

[PATCH v2 2/2] ARM: dts: AM335x: Add keep-previous-content property

2018-04-12 Thread Daniel Schultz
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 --- arch/arm/dts/am335x-phytec-state.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/dts/am3

Re: [PATCH] net: on ifup -a only detect devices when necessary

2018-04-12 Thread Michael Tretter
On Fri, 06 Apr 2018 15:16:39 +0200, Sascha Hauer wrote: > 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 or

Re: [PATCH 0/4] ARM: socfpga: misc fixes

2018-04-12 Thread Sascha Hauer
On Thu, Apr 12, 2018 at 08:35:55AM +0300, Antony Pavlov wrote: > Antony Pavlov (4): > net: make SoCFPGA-specific designware driver work again > ARM: socfpga: boards: pll_config.h: remove duplicate macros > ARM: socfpga: mach/pll_config.h: add guard macro > ARM: socfpga_defconfig: enable Alt

[PATCH] net: phy: micrel: fix too late link up

2018-04-12 Thread Sascha Hauer
From: Christian Hemp Since commit a4cee7207a1 ("net: phy: micrel: Add workaround for bad autoneg") by Philipp Zabel : Based on kernel commit d2fd719bcb0e ("net/phy: micrel: Add workaround for bad autoneg") by Nathan Sullivan : Very rarely, the KSZ9031 will appear to complete aut

[PATCH 11/16] ARM: i.MX: phytec-som-imx6: add phyCORE-i.MX6 Solo with 1GiB RAM

2018-04-12 Thread Sascha Hauer
From: Stefan Christ Add Phytec phyCORE-i.MX6 Solo: - imx6dl-phytec-phycore-som-nand: - 1GiB RAM on 1 Bank with 32Bit - 100Mbit Ethernet - NAND - SD - UART Signed-off-by: Stefan Christ Signed-off-by: Christian Hemp --- .../flash-header-phytec-pcm058dl-1gib-32bit.imxcfg

[PATCH 14/16] ARM: dts: imx6: phyboard-mira: Remove unecessary iomuxc subnode

2018-04-12 Thread Sascha Hauer
From: Stefan Riedmueller Signed-off-by: Stefan Riedmueller Signed-off-by: Christian Hemp --- arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi | 210 +-- 1 file changed, 103 insertions(+), 107 deletions(-) diff --git a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi b/arch/ar

[PATCH 06/16] ARM: i.MX: phytec-som-imx6: add boot device emmc

2018-04-12 Thread Sascha Hauer
From: Stefan Christ Add boot file 'emmc' for phyCORE-i.MX6. Signed-off-by: Stefan Christ Signed-off-by: Stefan Riedmueller Signed-off-by: Christian Hemp --- .../boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/boot/emmc | 5 + 1 file changed, 5 insertions(+) create mode 100644 ar

[PATCH 15/16] ARM: dts: phycore-imx6: Use generic jedec spi nor compatible

2018-04-12 Thread Sascha Hauer
From: Stefan Riedmueller Use the generic jedec-spi-nor compatible for the SPI NOR node to make it generic. Signed-off-by: Stefan Riedmueller Signed-off-by: Christian Hemp --- arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a

[PATCH 05/16] ARM: dts: imx6qdl: phycore: Sync muxing with kernel

2018-04-12 Thread Sascha Hauer
From: Christian Hemp Sync the USDCH drive strength muxing with kernel. With this drive strength we saw no sd card errors. Signed-off-by: Christian Hemp Acked-by: Stefan Lengfeld Signed-off-by: Stefan Riedmueller Signed-off-by: Christian Hemp --- arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi

[PATCH 16/16] ARM: i.MX: phytec-som-imx6: Change kernel boot image to zImage

2018-04-12 Thread Sascha Hauer
From: Stefan Riedmueller Use zImage instead of linuximage as kernel boot image name for mmc and emmc. Signed-off-by: Stefan Riedmueller Signed-off-by: Christian Hemp --- arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/emmc | 2 +- arch/arm/boards/phytec-som-imx6/defaultenv-physom-

[PATCH 10/16] ARM: i.MX: phytec-som-imx6: add phyCORE-i.MX6 QuadPlus with 1GiB RAM

2018-04-12 Thread Sascha Hauer
From: Christian Hemp Add Phytec phyCORE-i.MX6 QuadPlus: - imx6qp-phytec-phycore-som-nand: - 1GiB RAM on 2 Banks with 64Bit - 1000Mbit Ethernet - NAND - SD - UART Signed-off-by: Christian Hemp Signed-off-by: Stefan Riedmueller Signed-off-by: Christian Hemp --- arch/arm/boards/

[PATCH 07/16] ARM: i.MX: phytec-som-imx6: phycore: Set BUCK mode to SYNC

2018-04-12 Thread Sascha Hauer
From: Christian Hemp Set the BUCK mode for all BUCKS (1-4) from BUCK_MODE_AUTO to BUCK_MODE_SYNC. If the BUCKs are in BUCK_MODE_AUTO in very rare cases it is possible that the BUCK goes in power down mode. Signed-off-by: Christian Hemp Signed-off-by: Wadim Egorov Signed-off-by: Stefan Riedmue

[PATCH 08/16] ARM: i.MX: phyFLEX: Change Ram Timing for i.MX6 DualLite\Solo (400 MHz)

2018-04-12 Thread Sascha Hauer
From: michael grassmann The actual RAM timings in the phyFLEX BSP are generated for 528 MHz RAM clock frequency, but the i.MX 6Solo/DualLite has only a 400 MHz RAM clock. These new timings are accompanied by a speed increase of approx 10%. Signed-off-by: michael grassmann Signed-off-by: Christi

[PATCH 09/16] ARM: dts: phyCORE-imx6: Add SPINOR env node

2018-04-12 Thread Sascha Hauer
From: Stefan Riedmueller Add the SPI NOR barebox-environment node to the devicetree to make it possible to use the barebox-environment from SPI NOR when booting barebox from SPI NOR. Signed-off-by: Stefan Riedmueller Signed-off-by: Christian Hemp --- arch/arm/dts/imx6qdl-phytec-phycore-som.dt

[PATCH 12/16] ARM: dts: imx6: phyboard-mira: Add usb support

2018-04-12 Thread Sascha Hauer
From: Stefan Riedmueller This patch adds USB support for the phyBOARD-Mira for the host port and the OTG port. Signed-off-by: Stefan Riedmueller Signed-off-by: Christian Hemp --- arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi | 54 1 file changed, 54 insertions(+)

[PATCH 00/16] ARM: i.MX: phyCORE/phyFLEX i.MX6 updates

2018-04-12 Thread Sascha Hauer
Some more patches from the Phytec barebox git repository only lacking the final hit to the send button. Sascha Christian Hemp (4): ARM: i.MX: phytec-som-imx: Remove kernel and oftree partiton in NAND ARM: dts: imx6qdl: phycore: Sync muxing with kernel ARM: i.MX: phytec-som-imx6: phycore: Se

[PATCH 03/16] ARM: i.MX: phytec-som-imx: env: add boot script for emmc

2018-04-12 Thread Sascha Hauer
From: Matthias Rabe add bootscript for emmc boot Signed-off-by: Matthias Rabe Signed-off-by: Christian Hemp --- arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/emmc | 5 + 1 file changed, 5 insertions(+) create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-im

[PATCH 13/16] ARM: dts: imx6: phyboard-mira: Enable usb host and usb otg port

2018-04-12 Thread Sascha Hauer
From: Stefan Riedmueller Enable both USB ports (HOST and OTG) on the phyBOARD-Mira with i.MX 6Quad/Dual, i.MX 6Solo/DualLight and i.MX 6QuadPlus. Signed-off-by: Stefan Riedmueller Signed-off-by: Christian Hemp --- arch/arm/dts/imx6dl-phytec-phycore-som-emmc.dts | 8 arch/arm/dts/imx6

[PATCH 01/16] ARM: i.MX: phytec-som-imx: Remove kernel and oftree partiton in NAND

2018-04-12 Thread Sascha Hauer
From: Christian Hemp We store kernel and oftree in static UBI volumes now. No need for separate partitions any more. Signed-off-by: Christian Hemp Acked-by: Stefan Lengfeld --- .../boards/phytec-som-imx6/defaultenv-physom-imx6/boot/nand | 6 -- arch/arm/dts/imx6q-phytec-pcaaxl3.dtsi

[PATCH 04/16] ARM: i.MX: phytec-som-imx: env: add android boot options

2018-04-12 Thread Sascha Hauer
From: Matthias Rabe Set needed bootargs for android in mmc, emmc and nand boot. Signed-off-by: Matthias Rabe Signed-off-by: Christian Hemp --- arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/emmc | 5 + arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/mmc | 5 +

[PATCH 02/16] ARM: i.MX: phytec-som-imx: env: automount emmc if available

2018-04-12 Thread Sascha Hauer
From: Matthias Rabe added automount configuration for emmc, if available. needed f.e. by the android boot. Signed-off-by: Matthias Rabe Tested-by: Wadim Egorov Signed-off-by: Christian Hemp --- .../arm/boards/phytec-som-imx6/defaultenv-physom-imx6/init/automount | 5 + 1 file changed, 5

[PATCH 7/9] mfd: da9063: update Kconfig for DA9062

2018-04-12 Thread Sascha Hauer
From: Stefan Christ Signed-off-by: Stefan Christ Signed-off-by: Christian Hemp --- drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 417c9ce96c..521cf042ae 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/K

[PATCH 9/9] ARM: i.MX: pfla02: set priority of da9063 watchdog

2018-04-12 Thread Sascha Hauer
From: Enrico Scholz 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 Tested-by: Stefan Christ Signed-off-by: Christian Hemp --- arch/ar

[PATCH 5/9] mfd: da9063: added of_device_id information

2018-04-12 Thread Sascha Hauer
From: Enrico Scholz Signed-off-by: Enrico Scholz Tested-by: Stefan Christ Signed-off-by: Christian Hemp --- drivers/mfd/da9063.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/drivers/mfd/da9063.c b/drivers/mfd/da9063.c index a1c748610a..0

[PATCH 1/9] mfd: da9063: reset watchdog timer

2018-04-12 Thread Sascha Hauer
From: Enrico Scholz 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 th

[PATCH 2/9] mfd: da9063: added generic reg_update() function

2018-04-12 Thread Sascha Hauer
From: Enrico Scholz 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 Tested-by: Stefan Christ Signed-off-by: Chri

[PATCH 3/9] mfd: da9063: use da906x_reg_update()

2018-04-12 Thread Sascha Hauer
From: Enrico Scholz Use the previously added da906x_reg_update() function. NOTE: patch depends on another patchset ("da9063: reset watchdog timer"), Signed-off-by: Enrico Scholz Tested-by: Stefan Christ Signed-off-by: Christian Hemp --- drivers/mfd/da9063.c | 11 ++- 1 file changed,

[PATCH 8/9] ARM: i.MX: phycore-som: added and enabled DA9062 PMIC

2018-04-12 Thread Sascha Hauer
From: Enrico Scholz Signed-off-by: Enrico Scholz Tested-by: Stefan Christ Signed-off-by: Christian Hemp --- arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/dts/imx6qdl-phytec-phycore-som.dtsi b/arch/arm/dts/imx6qdl-phytec-

[PATCH 0/9] Dialog da9063 updates

2018-04-12 Thread Sascha Hauer
Here are some patches found in the Phytec git repository. Sascha Enrico Scholz (8): mfd: da9063: reset watchdog timer mfd: da9063: added generic reg_update() function mfd: da9063: use da906x_reg_update() mfd: da9063: add device specific init function mfd: da9063: added of_device_id info

[PATCH 6/9] mfd: da9063: read out and report device id

2018-04-12 Thread Sascha Hauer
From: Enrico Scholz just some kind of debugging atm... Signed-off-by: Enrico Scholz Tested-by: Stefan Christ Signed-off-by: Christian Hemp --- drivers/mfd/da9063.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/mfd/da9063.c b/drivers/mfd/da9063.c index 00a61279f3.

[PATCH 4/9] mfd: da9063: add device specific init function

2018-04-12 Thread Sascha Hauer
From: Enrico Scholz 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 Tested-by: Stefan Christ Signed-off-by: Christian Hemp --- drivers/mfd/da9063.c | 17 - 1 fil

[PATCH] mfd: da9063: Fix compilation

2018-04-12 Thread Sascha Hauer
Fixes: 1ef7cd07a3 watchdog: rename dev to hwdev Signed-off-by: Sascha Hauer --- drivers/mfd/da9063.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/da9063.c b/drivers/mfd/da9063.c index 4a335c9983..ac303611c0 100644 --- a/drivers/mfd/da9063.c +++ b/drivers/mfd/da