[PATCH v2 2/4] watchdog: implement generic support for .running device parameter

2019-11-04 Thread Ahmad Fatoum
Linux watchdog have an optional WDOG_HW_RUNNING bit that is used in conjunction with CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED to automatically ping running watchdogs until userspace takes over. So far, when we ported Linux drivers, we dropped this detection, but it would be useful to have this

[PATCH v2 4/4] watchdog: f71808e: support .running device parameter

2019-11-04 Thread Ahmad Fatoum
The American Megatrends BIOS I am using can be configured to start the Fintek watchdog prior to the UEFI payloads. To avoid BIOS updates that reset this functionality going unnoticed, implement support for WDOG_HW_RUNNING. Signed-off-by: Ahmad Fatoum --- v1 -> v2: Use new

[PATCH v2 1/4] watchdog: always populate watchdog priority from device tree if possible

2019-11-04 Thread Ahmad Fatoum
So far, only the da9063 and da9053 have made use of the optional barebox watchdog-priority binding. Move it into the core, so other device drivers automatically have their watchdog-priority property parsed as well. This patch doesn't introduce any functional changes for upstream boards.

[PATCH v2 3/4] watchdog: imxwd: support .running device parameter on i.MX2+

2019-11-04 Thread Ahmad Fatoum
The i.MX can be fused to start the watchdog on power-on reset. To give users an easy way to determine whether the watchdog is running, implement support for WDOG_HW_RUNNING. Signed-off-by: Ahmad Fatoum --- v1 -> v2: Use new WDOG_HW_RUNNING_SUPPORTED --- drivers/watchdog/imxwd.c | 13

[PATCH 3/4] watchdog: imxwd: support .running device parameter on i.MX2+

2019-11-04 Thread Ahmad Fatoum
The i.MX can be fused to start the watchdog on power-on reset. To give users an easy way to determine whether the watchdog is running, implement support for WDOG_HW_RUNNING. Signed-off-by: Ahmad Fatoum --- drivers/watchdog/imxwd.c | 13 + 1 file changed, 13 insertions(+) diff --git

[PATCH 2/4] watchdog: implement generic support for .running device parameter

2019-11-04 Thread Ahmad Fatoum
Linux watchdog have an optional WDOG_HW_RUNNING bit that is used in conjunction with CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED to automatically ping running watchdogs until userspace takes over. So far, when we ported Linux drivers, we dropped this detection, but it would be useful to have this

[PATCH 4/4] watchdog: f71808e: support .running device parameter

2019-11-04 Thread Ahmad Fatoum
The American Megatrends BIOS I am using can be configured to start the Fintek watchdog prior to the UEFI payloads. To avoid BIOS updates that reset this functionality going unnoticed, implement support for WDOG_HW_RUNNING. Signed-off-by: Ahmad Fatoum --- drivers/watchdog/f71808e_wdt.c | 6

[PATCH 1/4] watchdog: always populate watchdog priority from device tree if possible

2019-11-04 Thread Ahmad Fatoum
So far, only the da9063 and da9053 have made use of the optional barebox watchdog-priority binding. Move it into the core, so other device drivers automatically have their watchdog-priority property parsed as well. This patch doesn't introduce any functional changes for upstream boards.

[PATCH] param: drop unused parameters in helpers

2019-11-04 Thread Ahmad Fatoum
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 --- include/param.h | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/param.h b/include/param.h index

Re: [PATCH] usb: storage: Increase retries for usb_stor_transport()

2019-11-04 Thread Robert Karszniewicz
On 11/4/19 4:21 PM, Marco Felsch wrote: Hi Robert, On 19-11-04 15:59, Robert Karszniewicz wrote: On 11/4/19 3:54 PM, Marco Felsch wrote: Hi Sascha, On 19-11-04 10:42, Sascha Hauer wrote: On Fri, Oct 25, 2019 at 05:56:08PM +0200, Robert Karszniewicz wrote: This should make writing and

Re: [PATCH] usb: storage: Increase retries for usb_stor_transport()

2019-11-04 Thread Marco Felsch
Hi Robert, On 19-11-04 15:59, Robert Karszniewicz wrote: > On 11/4/19 3:54 PM, Marco Felsch wrote: > > Hi Sascha, > > > > On 19-11-04 10:42, Sascha Hauer wrote: > > > On Fri, Oct 25, 2019 at 05:56:08PM +0200, Robert Karszniewicz wrote: > > > > This should make writing and reading more reliable.

[PATCH v2] usb: storage: Increase retries for usb_stor_transport()

2019-11-04 Thread Robert Karszniewicz
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: Robert Karszniewicz --- drivers/usb/storage/usb.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-)

Re: [PATCH] usb: storage: Increase retries for usb_stor_transport()

2019-11-04 Thread Robert Karszniewicz
On 11/4/19 3:54 PM, Marco Felsch wrote: Hi Sascha, On 19-11-04 10:42, Sascha Hauer wrote: On Fri, Oct 25, 2019 at 05:56:08PM +0200, Robert Karszniewicz wrote: This should make writing and reading more reliable. Also: - change loop condition to make "retries" semantically correct - add a

Re: [PATCH] usb: storage: Increase retries for usb_stor_transport()

2019-11-04 Thread Marco Felsch
Hi Sascha, On 19-11-04 10:42, Sascha Hauer wrote: > On Fri, Oct 25, 2019 at 05:56:08PM +0200, Robert Karszniewicz wrote: > > This should make writing and reading more reliable. > > > > Also: > > - change loop condition to make "retries" semantically correct > > - add a debug message in case of

Re: [PATCH] usb: storage: Increase retries for usb_stor_transport()

2019-11-04 Thread Robert Karszniewicz
On 11/4/19 10:42 AM, Sascha Hauer wrote: On Fri, Oct 25, 2019 at 05:56:08PM +0200, Robert Karszniewicz wrote: 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 --- We've had

[PATCH v2 1/2] mfd: da9063: fix TWDSCALE debug message

2019-11-04 Thread Marco Felsch
The TWDSCALE is the found scale + 1 as described in the datasheets for the DA9062/3 devices. The driver logic is correct just the debug message is wrong. Signed-off-by: Marco Felsch --- drivers/mfd/da9063.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/da9063.c

[PATCH v2 2/2] mfd: da9063: fix watchdog ping execution

2019-11-04 Thread Marco Felsch
The watchdog resets the system if the watchdog gets pinged to fast. Between each watchdog ping must be a pause of at least 200ms. This commit fixes that by rejecting two fast requests. Signed-off-by: Marco Felsch --- Hi, after the a discussion we decided to change the busy wait behaviour. Now

Re: [PATCH 2/2] mfd: da9063: fix watchdog ping execution

2019-11-04 Thread Marco Felsch
Hi Ahmad, On 19-11-04 10:57, Ahmad Fatoum wrote: > Hello Marco, > > On 11/4/19 10:44 AM, Marco Felsch wrote: > >> This means that your boot time would increase by 200 ms. If this matter to > >> you, > >> you might want to change this, so watchdog_set_timeout is called only once. > > > >

Re: [PATCH 2/2] mfd: da9063: fix watchdog ping execution

2019-11-04 Thread Ahmad Fatoum
Hello Marco, On 11/4/19 10:44 AM, Marco Felsch wrote: >> This means that your boot time would increase by 200 ms. If this matter to >> you, >> you might want to change this, so watchdog_set_timeout is called only once. > > Increasing the delay isn't a big deal. But after we discussed it again I

Re: [PATCH 2/2] mfd: da9063: fix watchdog ping execution

2019-11-04 Thread Marco Felsch
Hi Ahmad, On 19-11-04 09:51, Ahmad Fatoum wrote: > Hello Marco, > > On 11/4/19 9:34 AM, Marco Felsch wrote: > > On 19-11-04 09:27, Sascha Hauer wrote: > >> On Wed, Oct 30, 2019 at 06:06:53PM +0100, Marco Felsch wrote: > >>> The watchdog resets the system if the watchdog gets pinged to fast. >

Re: [PATCH] usb: storage: Increase retries for usb_stor_transport()

2019-11-04 Thread Sascha Hauer
On Fri, Oct 25, 2019 at 05:56:08PM +0200, Robert Karszniewicz wrote: > 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 > --- > We've had problems writing (and even

Re: [PATCH] of: of_path: fix return in case of EPROBE_DEFER

2019-11-04 Thread Sascha Hauer
On Wed, Oct 30, 2019 at 06:04:55PM +0100, Marco Felsch wrote: > 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 > --- >

Re: [PATCH] parameter: strip leading and trailing whitespaces

2019-11-04 Thread Sascha Hauer
On Wed, Oct 30, 2019 at 06:03:39PM +0100, Marco Felsch wrote: > 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

Re: [PATCH] serial: cadence: fix serial_flush

2019-11-04 Thread Sascha Hauer
On Fri, Nov 01, 2019 at 08:54:29PM +0100, Lucas Stach wrote: > The TXEMPTY bit gets set as soon as the transmit FIFO gets empty, so > flushing must wait until the bit is set instead of being unset. > > Signed-off-by: Lucas Stach > --- > drivers/serial/serial_cadence.c | 2 +- > 1 file changed,

Re: [PATCH 1/2] ARM: pbl: keep __image_end section

2019-11-04 Thread Sascha Hauer
On Fri, Nov 01, 2019 at 08:53:37PM +0100, Lucas Stach wrote: > Not all architectures are referencing the image_end section from > code, in which case the linker is free to drop the section, which > then messes up the calculation of the _barebox_image_size linker > variable. > > Signed-off-by:

Re: [PATCH 2/2] ARM: force TEXT_BASE to zero only for relocatable build

2019-11-04 Thread Sascha Hauer
On Fri, Nov 01, 2019 at 08:53:38PM +0100, Lucas Stach wrote: > Commit 2a94e821ba2e (ARM: For relocatable image force TEXT_BASE 0x0) > intended to force the TEXT_BASE to zero for relocatable images, but > the change added the Kconfig symbol overriding the TEXT_BASE > unconditionally. This breaks

Re: [PATCH 2/2] mfd: da9063: fix watchdog ping execution

2019-11-04 Thread Ahmad Fatoum
Hello Marco, On 11/4/19 9:34 AM, Marco Felsch wrote: > On 19-11-04 09:27, Sascha Hauer wrote: >> On Wed, Oct 30, 2019 at 06:06:53PM +0100, Marco Felsch wrote: >>> The watchdog resets the system if the watchdog gets pinged to fast. >>> Between each watchdog ping must be a pause of at least 200ms.

Re: [BUG] Padding inserted by linker breaks magicvar linker array

2019-11-04 Thread Ahmad Fatoum
On 11/4/19 8:42 AM, Ahmad Fatoum wrote: > [1]: master at time of writing is 27ee6010 "console_simple: fix linking error > when > ARCH_HAS_CTRLC enabled". To reproduce the issue I've added a single > dummy initcall. > I can provide defconfig if requested. I missed mentioning that I am

Re: [PATCH 2/2] mfd: da9063: fix watchdog ping execution

2019-11-04 Thread Marco Felsch
On 19-11-04 09:27, Sascha Hauer wrote: > On Wed, Oct 30, 2019 at 06:06:53PM +0100, Marco Felsch wrote: > > The watchdog resets the system if the watchdog gets pinged to fast. > > Between each watchdog ping must be a pause of at least 200ms. > > > > Signed-off-by: Marco Felsch > > --- > >

Re: [PATCH 2/2] mfd: da9063: fix watchdog ping execution

2019-11-04 Thread Sascha Hauer
On Wed, Oct 30, 2019 at 06:06:53PM +0100, Marco Felsch wrote: > The watchdog resets the system if the watchdog gets pinged to fast. > Between each watchdog ping must be a pause of at least 200ms. > > Signed-off-by: Marco Felsch > --- > drivers/mfd/da9063.c | 11 +++ > 1 file changed, 11

Re: [PATCH] ARM: zii-commmon: Fix NULL pointer dereference in do_rdu1_switch_reset()

2019-11-04 Thread Sascha Hauer
On Wed, Oct 30, 2019 at 09:53:21AM -0700, Andrey Smirnov wrote: > We need to go to parent's private data to get a pointer to struct > rave_sp. Fix that. > > Fixes: 493e2ee38f ("ARM: zii-common: add support for switch reset on RDU1") > Signed-off-by: Andrey Smirnov > --- >

Re: [PATCH 2/2] ARM: zii-imx8mq-dev: disable GPU and VPU power domain in DT

2019-11-04 Thread Sascha Hauer
On Wed, Oct 30, 2019 at 12:16:40PM +0100, Lucas Stach wrote: > In Barebox we don't have a driver for the PMIC powering those domains, > so we get a "probe permanently deferred" warning for those domains. As > they are not actually used in Barebox, we can just disable them to get > rid of the

Re: [PATCH] fs: ubootvarfs: use correct format specifier for pointer diff

2019-11-04 Thread Sascha Hauer
On Wed, Oct 30, 2019 at 12:11:49PM +0100, Lucas Stach wrote: > 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

Re: [PATCH] OF: gpio: don't warn if ignored GPIO flag matches the behavior

2019-11-04 Thread Sascha Hauer
On Wed, Oct 30, 2019 at 10:48:34AM +0100, Lucas Stach wrote: > 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

Re: [PATCH] ARM: zii-common: setup Linux cmdline network config on RDU3

2019-11-04 Thread Sascha Hauer
On Wed, Oct 30, 2019 at 12:08:03PM +0100, Lucas Stach wrote: > Works the same way as with the older units. > > Signed-off-by: Lucas Stach > --- > arch/arm/boards/zii-common/board.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Applied, thanks Sascha -- Pengutronix e.K.

Re: [PATCH v2 0/6] ARM: stm32mp: finalize second stage support

2019-11-04 Thread Sascha Hauer
On Mon, Oct 28, 2019 at 10:39:37PM +0100, Ahmad Fatoum wrote: > Add barebox update handler and Ethernet driver. > > v1 -> v2: > - Split off patch to override unsupported device tree specified >bus-widths > - Delete fixing the frequency to 208MHz. I can no longer reproduce >120MHz to

Re: [PATCH] Documentation: boards: stm32mp: document boot mode strap pins

2019-11-04 Thread Sascha Hauer
On Wed, Oct 30, 2019 at 10:27:31AM +0100, Ahmad Fatoum wrote: > The evaluation kits have 2P DIP-Switches for boot mode selection. > Document them. > > Signed-off-by: Ahmad Fatoum > --- > Documentation/boards/stm32mp.rst | 19 +++ > 1 file changed, 19 insertions(+) Applied,