Re: [PATCH 17/18] [RFC] nvmem: Add nvmem-ro-of-blob driver

2016-02-17 Thread Andrey Smirnov
On Wed, Feb 17, 2016 at 12:52 AM, Sascha Hauer wrote: > On Tue, Feb 16, 2016 at 05:29:18PM -0800, Andrey Smirnov wrote: >> Add a driver that implements provisions to allow creationg of fake nvmem >> devices and cells whose data comes from device tree blob. > > This seems quite flexible. Care to c

Re: [PATCH 03/18] [RFC] at91: Make IS_ERR work for I/O pointers

2016-02-17 Thread Andrey Smirnov
On Wed, Feb 17, 2016 at 12:34 AM, Sascha Hauer wrote: > On Tue, Feb 16, 2016 at 05:29:04PM -0800, Andrey Smirnov wrote: >> Having this functionality partially "broken" opens the door for subtle >> bugs in peripheral drivers for AT91 platform since it not straight out >> obvious that IS_ERR might r

[PATCH] bbu: Fix imx-bbu-nand-fcb handler to use complete device path

2016-02-17 Thread Markus Pargmann
Most barebox update handlers use the field "devicefile" with an absolute path. imx-bbu-nand-fcb just misuses this property for the raw device name that is used. This patch replaces the device name with a full absolute path. Two helper functions where introduced to be able to map the absolute path

[PATCH] bootm: Free allocated fdt buffer in error path

2016-02-17 Thread Harald Welte
It seems like there is a memory leak in an error path of bootm_open_oftree_uimage() where the memory allocated for the fdt is not released again. Signed-off-by: Harald Welte --- common/bootm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/bootm.c b/common/bootm.c index 052cffa..7d00

[PATCH] Print error message if of_state_fixup() fails

2016-02-17 Thread Harald Welte
If of_state_fixup() fails for some reason, boot/bootm will fail, too However, it is completely unclear where the error has happened, and to the user it rather seems like the kernel device tree loaded from some file was broken/corrupt, not that in fact some fixup routine was failing. Adding a mean

of_state_fixup / different path in barebox and kernel

2016-02-17 Thread Harald Welte
Dear List, I have a custom board with an AM335x on it. We used to have an I2C EEPROM for keeping the boot state, but moved that to SPI in a subsequent version. The SPI EEPROM uses gpio-based chip select, which is supported by linux kernel spi-omap2-mcspi.c. However, it is not supported by bareb

[PATCH] eeprom/at25: parse partitions from device tree

2016-02-17 Thread Harald Welte
Unlike at24 (I2C), the at25 (spi) EEPROM driver doesn't check if the device tree node contains partition definitions. This means that one for example cannot have bootstate partitions on an at25 EEPROM, while it works on an at24 EEPROM. This patch adds device tree based partition support to the at

[PATCH v2 1/4] bbu: Add barebox_update search by device

2016-02-17 Thread Markus Pargmann
bbu_data includes a devicefile information. Add the possibility to make an update based on the given devicefile. This is in addition to the normal search for a barebox update handler by its name. Signed-off-by: Markus Pargmann --- common/bbu.c | 20 +++- 1 file changed, 19 insert

[PATCH v2 4/4] fastboot: Add a ARM Barebox filetype handler

2016-02-17 Thread Markus Pargmann
This will automatically call barebox_update for the transfered file if it is an ARM Barebox image and the destination file is defined by some update handler. Signed-off-by: Markus Pargmann --- common/filetype.c | 13 + drivers/usb/gadget/f_fastboot.c | 29 ++

[PATCH v2 3/4] fastboot: Fix usage of ubiformat for UBI image transfers

2016-02-17 Thread Markus Pargmann
Currently all fastboot flash commands with UBI images are handled by a final call to 'ubiformat'. This only makes sense for flash commands where the target file is a mtd device. If we just want to transfer a UBI image we would expect a simple copy to the correct location. This patch checks if the

[PATCH v2 2/4] bbu: Add function to check if an update handler exists

2016-02-17 Thread Markus Pargmann
This adds a function to check for the existence of an update handler based on the supplied bbu_data. Signed-off-by: Markus Pargmann --- common/bbu.c | 14 ++ include/bbu.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/common/bbu.c b/common/bbu.c index bf3790d13fff..a7f6b4

Re: [PATCH 4/4] fastboot: Add a ARM Barebox filetype handler

2016-02-17 Thread Markus Pargmann
On Wednesday, February 17, 2016 08:37:49 AM Sascha Hauer wrote: > On Tue, Feb 16, 2016 at 07:54:48PM +0100, Markus Pargmann wrote: > > This will automatically call barebox_update for the transfered file if > > it is an ARM Barebox image and the destination file is defined by some > > update handler

Re: [PATCH 3/4] fastboot: Fix usage of ubiformat for UBI image transfers

2016-02-17 Thread Markus Pargmann
Hi, On Wednesday, February 17, 2016 08:29:14 AM Sascha Hauer wrote: > On Tue, Feb 16, 2016 at 07:54:47PM +0100, Markus Pargmann wrote: > > Currently all fastboot flash commands with UBI images are handled by a > > final call to 'ubiformat'. This only makes sense for flash commands > > where the ta

Re: [PATCH 17/18] [RFC] nvmem: Add nvmem-ro-of-blob driver

2016-02-17 Thread Sascha Hauer
On Tue, Feb 16, 2016 at 05:29:18PM -0800, Andrey Smirnov wrote: > Add a driver that implements provisions to allow creationg of fake nvmem > devices and cells whose data comes from device tree blob. This seems quite flexible. Care to create and post this for the kernel? It would be much better if

Re: [PATCH 12/18] fec_imx: Impelemnt reset timeout

2016-02-17 Thread Sascha Hauer
On Tue, Feb 16, 2016 at 05:29:13PM -0800, Andrey Smirnov wrote: > Don't wait for more than one second for IP block to finish resetting. If > the block is dead it makes more sence to continue execution in hopes > that the rest of the processor is fine, rather than spin indefinetly > inside of the fe

Re: [PATCH 03/18] [RFC] at91: Make IS_ERR work for I/O pointers

2016-02-17 Thread Sascha Hauer
On Tue, Feb 16, 2016 at 05:29:04PM -0800, Andrey Smirnov wrote: > Having this functionality partially "broken" opens the door for subtle > bugs in peripheral drivers for AT91 platform since it not straight out > obvious that IS_ERR might return a false positive. > > It also makes it much harder to

Re: [PATCH] Documentation: usb: fix otg mode parameter description

2016-02-17 Thread Sascha Hauer
On Tue, Feb 16, 2016 at 11:00:02PM +0100, Philipp Zabel wrote: > Replace ``device`` otg.mode option with the correct ``peripheral``. > > Signed-off-by: Philipp Zabel > --- > Documentation/user/usb.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to master, thanks Sascha --

Re: [PATCH] fs: ext4: make locally used ext4fs_get_indir_block() static

2016-02-17 Thread Sascha Hauer
On Wed, Feb 17, 2016 at 12:13:59AM +0300, Antony Pavlov wrote: > The patch fixes this compiler's warning: > > CC fs/ext4/ext4_common.o > fs/ext4/ext4_common.c:130:5: warning: no previous prototype for > 'ext4fs_get_indir_block' [-Wmissing-prototypes] > int ext4fs_get_indir_