[PATCH 2/4] mtd: ubi: introduce barebox specific ioctl to get ubi_num

2016-09-22 Thread Sascha Hauer
Code wishing to manipulate ubi devices from outside the ubi layer needs the ubi_num as reference. Add an ioctl to get the ubi_num from a filedescriptor. Signed-off-by: Sascha Hauer --- drivers/mtd/ubi/barebox.c | 3 +++ include/mtd/ubi-user.h| 2 ++ 2 files changed, 5 insertions(+) diff --g

Add and use function API for UBI

2016-09-22 Thread Sascha Hauer
We currently use a ioctl API to manipulate UBI devices. This is suboptimal since we have to carry code for all ioctls with us, even when some of it may be unused. This series expands the UBI API with calls to add/remove volumes and uses it inside the UBI commands. The next step would be to move the

[PATCH 4/4] mtd: ubi: remove now unused ioctls

2016-09-22 Thread Sascha Hauer
The only ioctl needed is the one to get the ubi_num from a file descriptor. The remaining ioctls are now implemented as regular function calls. Signed-off-by: Sascha Hauer --- drivers/mtd/ubi/barebox.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drive

[PATCH 1/4] mtd: ubi: Add API calls to create/remove volumes

2016-09-22 Thread Sascha Hauer
Currently we use a ioctl API to create/remove ubi volumes. This means we always have to carry all function code for ubi volume manipulation when the ioctl is compiled in. This adds a function API to create/remove volumes so that the linker can throw the unused code away later. Signed-off-by: Sasch

[PATCH 3/4] mtd: ubi: commands: use function API to access ubi volumes

2016-09-22 Thread Sascha Hauer
We have a function API to manipulate ubi volumes, use it. Signed-off-by: Sascha Hauer --- commands/ubi.c | 40 +++- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/commands/ubi.c b/commands/ubi.c index 26b521f..7c55195 100644 --- a/commands/ubi.

Re: [PATCH 2/2] commands: ubi: added the new command 'ubirename' to rename ubi volumes.

2016-09-22 Thread Sascha Hauer
On Wed, Sep 21, 2016 at 10:04:43AM +0200, Giorgio Dal Molin wrote: > From: Giorgio Dal Molin > > The syntax was taken from the corresponding command of the 'mts-utils' > userland package: > > # ubirename UBIDEV OLD_NAME NEW_NAME [OLD_NAME NEW_NAME ...] > > Signed-off-by: Giorgio Dal Molin > --

Re: [PATCH] environment: "wrong magic" give the impression of an error

2016-09-22 Thread Sascha Hauer
Hi Sam, On Thu, Sep 22, 2016 at 07:00:41AM +0200, Sam Ravnborg wrote: > From 144e3252f9604e44c48f90735489611f636e3e36 Mon Sep 17 00:00:00 2001 > From: Sam Ravnborg > Date: Thu, 22 Sep 2016 06:54:42 +0200 > Subject: [PATCH 1/1] environment: "wrong magic" give the impression of an > error > > Int

[PATCH] nv: Fix variable removal in nvvar_save()

2016-09-22 Thread Sascha Hauer
When nv variables are removed during runtime then they are present again when saved with nvvar_save(). This is because nvvar_save() does not delete variables that exist on the saved environment. Delete /nv on the saved environment before saving the new variables. Signed-off-by: Sascha Hauer ---

[PATCH 2/4] global: Make 'global' command behaviour consistent to 'nv'

2016-09-22 Thread Sascha Hauer
The 'nv' command can add/remove multiple variables. Implement that for the 'global' command aswell. Also with the 'nv' command the -r option is for removal of variables, not for "set match". Looking at the users of "global -r" the only user uses the command for removal of variables and not for "Set

[PATCH 3/4] nv: simplify nvvar_add

2016-09-22 Thread Sascha Hauer
We do not need to have an extra code path when the variable already exists, instead setting an existing variable can be done in the variable creation code path aswell. Signed-off-by: Sascha Hauer --- common/globalvar.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions

[PATCH 4/4] globalvar: Also create globalvars from for nonvolatile device vars

2016-09-22 Thread Sascha Hauer
nv variables beginning with "nv.dev.." are directly mirrored to . and there is no globalvar for it. To make it a bit more consistent and to increase the visibility of the nonvolatile device variables create globalvars for them aswell. With this the propagation flow has changed from: nv.dev.. ->

[PATCH 1/4] globalvar: Allow to remove multiple globalvars using wildcards

2016-09-22 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- common/globalvar.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/common/globalvar.c b/common/globalvar.c index 3fd8221..007e955 100644 --- a/common/globalvar.c +++ b/common/globalvar.c @@ -44,12 +44,14 @@ int globalvar_add(const cha

[PATCH 2/2] globalvar: Allow full variable name in globalvar_add

2016-09-22 Thread Sascha Hauer
As a convenience for users allow to pass the full name, including the leading "global.", to globalvar_add(). Signed-off-by: Sascha Hauer --- common/globalvar.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/globalvar.c b/common/globalvar.c index 6466d1d..d6a46de 100644 --- a/commo

[PATCH 1/2] nv: Allow full variable name in nvvar_add

2016-09-22 Thread Sascha Hauer
As a convenience for users allow to pass the full name, including the leading "nv.", to nvvar_add(). Signed-off-by: Sascha Hauer --- common/globalvar.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/globalvar.c b/common/globalvar.c index a2555cf..6466d1d 100644 --- a/common/global

[PATCH 1/2] param: introduce param_bitmask

2016-09-22 Thread Sascha Hauer
param_bitmask behaves similar to an enum, except that with a bitmask multiple values can be specified. On the command line the bits are represented as a space separated list of strings. In memory a unsigned long * is used as backend storage, this can be modified using the regular bitmap functions.

[PATCH 2/2] globalvar: introduce globalvar_add_simple_bitmask

2016-09-22 Thread Sascha Hauer
Using the just introduced param_bitmask this adds the corresponding globalvar convenience function. Signed-off-by: Sascha Hauer --- include/globalvar.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/globalvar.h b/include/globalvar.h index 1cd8d21..e503207 100644 ---

[PATCH] boot: add framework for redundant boot scenarios

2016-09-22 Thread Sascha Hauer
From: Marc Kleine-Budde There are several use cases where a redundant Linux system is needed. The barebox bootchooser framework provides the building blocks to model different use cases without the need to start from the scratch over and over again. The bootchooser works on abstract boot targets

[PATCH 2/3] watchdog: add designware driver

2016-09-22 Thread Steffen Trumtrar
Port the linux v4.8-rc1 Synopsys DesignWare watchdog driver to barebox. Signed-off-by: Steffen Trumtrar --- drivers/watchdog/Kconfig | 6 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/dw_wdt.c | 194 ++ 3 files changed, 201 insertions(+) c

[PATCH 3/3] ARM: socfpga: dtsi: add dw-wdt reset lines

2016-09-22 Thread Steffen Trumtrar
Signed-off-by: Steffen Trumtrar --- arch/arm/dts/socfpga.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/dts/socfpga.dtsi b/arch/arm/dts/socfpga.dtsi index d16758fdab46..66d7f21dc6a3 100644 --- a/arch/arm/dts/socfpga.dtsi +++ b/arch/arm/dts/socfpga.dtsi @@ -49,3 +49,

[PATCH 1/3] reset: import socfpga-reset driver from linux

2016-09-22 Thread Steffen Trumtrar
Port the linux v4.8-rc1 reset-socfpga driver to barebox. Signed-off-by: Steffen Trumtrar --- drivers/reset/Makefile| 1 + drivers/reset/reset-socfpga.c | 125 ++ 2 files changed, 126 insertions(+) create mode 100644 drivers/reset/reset-socfpga.c

[PATCH 2/3] nand: denali: use is_timeout in while loop

2016-09-22 Thread Steffen Trumtrar
Instead of using udelay and a countdown, use the is_timeout function. Also, move the code closer to the kernel version, i.e. check for the correct bank and clean the interrupt status. Signed-off-by: Steffen Trumtrar --- drivers/mtd/nand/nand_denali.c | 39 +++

[PATCH 3/3] nand: denali: get rid of compile-time debug information

2016-09-22 Thread Steffen Trumtrar
Remove dev_dbgs containing __FILE__ and __LINE__ and no other interesting debug informations. Signed-off-by: Steffen Trumtrar --- drivers/mtd/nand/nand_denali.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/mtd/nand/nand_denali.c b/drivers/mtd/nand/nand_denali.c index

[PATCH 1/3] nand: denali: use correct interrupts in read_page

2016-09-22 Thread Steffen Trumtrar
The interrupt mask is incorrect in case of HW error correction. The driver will time out waiting for the wrong interrupts. Signed-off-by: Steffen Trumtrar --- drivers/mtd/nand/nand_denali.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/nand_denali.c b/

[PATCH] Documentation: clarify that patches should target the master branch.

2016-09-22 Thread Robert Schwebel
I asked Sascha if he still prefers patches against 'next', and it turned out that this is not true any more and patches should be sent against master. Signed-off-by: Robert Schwebel --- Documentation/user/barebox.rst | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Doc

[PATCH v2] environment: "wrong magic" gives the impression of an error

2016-09-22 Thread Sam Ravnborg
>From 15e7ff689cfda27eab10aacda5c26a1ba47979ec Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Thu, 22 Sep 2016 06:54:42 +0200 Subject: [PATCH 1/1] environment: "wrong magic" give the impression of an error Introduce a more soft wording when the magic of the superblock does not match. Include

[PATCH] Documentation: clarify "ioe" for netconsole

2016-09-22 Thread Robert Schwebel
ioe means "input", "output", "error", which are bits that can be set individually. Signed-off-by: Robert Schwebel --- Documentation/user/networking.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/user/networking.rst b/Documentation/user/networking.rst index 8afb433..772a7d