Re: [PATCH 12/20] ARM: boards: kontron-samx6i: Add include file to provide prototype

2018-10-18 Thread Sam Ravnborg
On Thu, Oct 18, 2018 at 08:58:19AM +0200, Sascha Hauer wrote: > samx6i_get_size() is declared and used in two different C files. > Provide a header file for the prototype instead. > > Signed-off-by: Sascha Hauer > --- > index ab9969e32c..3b9fbd464a 100644 > ---

Re: [PATCH] i2c: introduce device_i2c_driver() macro

2018-10-18 Thread Sam Ravnborg
Hi Marco > diff --git a/drivers/video/mtl017.c b/drivers/video/mtl017.c > index 1a1f686223..085ea110ba 100644 > --- a/drivers/video/mtl017.c > +++ b/drivers/video/mtl017.c > @@ -16,7 +16,6 @@ > * > */ > #include > -#include > #include > #include > #include > @@ -270,11 +269,4 @@

Re: [PATCH] i2c: introduce device_i2c_driver() macro

2018-10-18 Thread Marco Felsch
Hi Sam, On 18-10-18 17:42, Sam Ravnborg wrote: > Hi Marco > > > diff --git a/drivers/video/mtl017.c b/drivers/video/mtl017.c > > index 1a1f686223..085ea110ba 100644 > > --- a/drivers/video/mtl017.c > > +++ b/drivers/video/mtl017.c > > @@ -16,7 +16,6 @@ > > * > > */ > > #include > >

Issues compiling barebox on raspberry pi

2018-10-18 Thread Kai Che
Hello, I'm trying to compile barebox on the raspberry pi 3 model B and after booting the pi with the barebox-raspberry-pi-3.img I get the following error: barebox 2018.04.0-g9b6b12471 #2 Thu Oct 18 14:33:09 CEST 2018 Board: RaspberryPi 3 Model B bcm2835_mci 3f30.sdhci: registered as

Re: [PATCH 19/20] ARM: i.MX: Add missing include

2018-10-18 Thread Sam Ravnborg
Hi Sasha. While I am in nitpick mode... On Thu, Oct 18, 2018 at 08:58:26AM +0200, Sascha Hauer wrote: > mach/generic.h provides protypes for functions that mach-imx/cpu_init.c protype => prototypes Sam ___ barebox mailing list

[PATCH] state: fix indentation

2018-10-18 Thread Ulrich Ölmann
--- common/state/state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/state/state.c b/common/state/state.c index bef20210d6e9..54c57232e626 100644 --- a/common/state/state.c +++ b/common/state/state.c @@ -311,7 +311,7 @@ static int state_convert_node_variable(struct

[PATCH] of: base: fix typo

2018-10-18 Thread Ulrich Ölmann
Signed-off-by: Ulrich Ölmann --- drivers/of/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index f9b1c3c4cbf5..b082f0c656a4 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1235,7 +1235,7 @@ int

[PATCH 00/20] Fixes for -Wmissing-prototypes warnings

2018-10-18 Thread Sascha Hauer
This fixes several warnings that occur with -Wmissing-prototypes enabled. There are many warnings left to fix, so feel free to continue the work ;) Sascha Sascha Hauer (20): ARM: Fix missing prototype warning mtd: nand: mxs: make locally used functions static video: imx-ipu-v3: Make

[PATCH 15/20] drivers: clk: imx5: Make locally used functions static

2018-10-18 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/clk/imx/clk-imx5.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/imx/clk-imx5.c b/drivers/clk/imx/clk-imx5.c index edebd25a38..ae94e07f23 100644 --- a/drivers/clk/imx/clk-imx5.c +++ b/drivers/clk/imx/clk-imx5.c @@

[PATCH 14/20] ARM: legacy Linux support: Make locally used functions static

2018-10-18 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- arch/arm/lib32/armlinux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/lib32/armlinux.c b/arch/arm/lib32/armlinux.c index 2520fe210c..c970f029c5 100644 --- a/arch/arm/lib32/armlinux.c +++ b/arch/arm/lib32/armlinux.c @@ -57,7

[PATCH 03/20] video: imx-ipu-v3: Make locally used function static

2018-10-18 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/video/imx-ipu-v3/ipufb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/imx-ipu-v3/ipufb.c b/drivers/video/imx-ipu-v3/ipufb.c index 9597eda0d0..683f298e76 100644 --- a/drivers/video/imx-ipu-v3/ipufb.c +++

[PATCH 11/20] ARM: boards: kindle mx50: Make locally used function static

2018-10-18 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- arch/arm/boards/kindle-mx50/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boards/kindle-mx50/board.c b/arch/arm/boards/kindle-mx50/board.c index 089dd8ebb7..fb1d4c9375 100644 --- a/arch/arm/boards/kindle-mx50/board.c +++

[PATCH 07/20] fs: Make locally used functions static

2018-10-18 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- fs/fs.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/fs/fs.c b/fs/fs.c index d76d829140..899b9d7bc3 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -93,7 +93,7 @@ static struct fs_device_d

Re: [PATCH] of: fix reproducible node name for legacy vs. new partition binding

2018-10-18 Thread Schenk, Gavin
Hi Sascha, > > 1. [x] of_partition_binding=new in barebox and barebox-state in Linux is > > working. > > 2. [ ] set of_partition_binding=legacy in barebox and barebox-state in > > Linux fails. > > 3. [x] apply the patch and rebuild and install barebox > > 4. [x] set of_partition_binding=legacy

[PATCH 20/20] nvmem: i.MX ocotp: Make locally used functions static

2018-10-18 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/nvmem/ocotp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c index c2d2982ee1..ba35bef99a 100644 --- a/drivers/nvmem/ocotp.c +++ b/drivers/nvmem/ocotp.c @@ -184,7 +184,7 @@ static int

[PATCH 04/20] ARM: mmu: rename dma_alloc

2018-10-18 Thread Sascha Hauer
a function named dma_alloc is already declared in include/dma.h, so when we want to include that file we must rename the function. Signed-off-by: Sascha Hauer --- arch/arm/cpu/mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c

[PATCH 16/20] usb: ulpi: Make locally used functions static

2018-10-18 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/usb/otg/ulpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/otg/ulpi.c b/drivers/usb/otg/ulpi.c index 6fef5f2522..9bc432fa86 100644 --- a/drivers/usb/otg/ulpi.c +++ b/drivers/usb/otg/ulpi.c @@ -164,7 +164,7 @@ static

[PATCH 08/20] ARM: cache: include mmu.h

2018-10-18 Thread Sascha Hauer
mmu.h provides the prototypes for __mmu_cache_* functions, so include it from the file that implements these functions. Signed-off-by: Sascha Hauer --- arch/arm/cpu/cache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/cpu/cache.c b/arch/arm/cpu/cache.c index

[PATCH 12/20] ARM: boards: kontron-samx6i: Add include file to provide prototype

2018-10-18 Thread Sascha Hauer
samx6i_get_size() is declared and used in two different C files. Provide a header file for the prototype instead. Signed-off-by: Sascha Hauer --- arch/arm/boards/kontron-samx6i/board.c| 2 +- arch/arm/boards/kontron-samx6i/lowlevel.c | 2 +- arch/arm/boards/kontron-samx6i/mem.c | 2 ++

[PATCH 13/20] ARM: boards: phytec-som-imx6: Make locally used function static

2018-10-18 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- arch/arm/boards/phytec-som-imx6/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c index 34a0fe4183..4079bc9de1 100644 ---

[PATCH 01/20] ARM: Fix missing prototype warning

2018-10-18 Thread Sascha Hauer
Fixes Warnings in usage of ENTRY_FUNCTION whith -Wmissing-prototypes enabled: arch/arm/boards/phytec-som-imx6/lowlevel.c:118:14: warning: no previous prototype for 'start_phytec_phycore_imx6ul_som_512mb' [-Wmissing-prototypes] Signed-off-by: Sascha Hauer ---

[PATCH 02/20] mtd: nand: mxs: make locally used functions static

2018-10-18 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/mtd/nand/nand_mxs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c index 0e0f5e68b2..28a07d4cba 100644 --- a/drivers/mtd/nand/nand_mxs.c +++ b/drivers/mtd/nand/nand_mxs.c @@

[PATCH 17/20] ARM: unwind: Provide prototypes for exported functions

2018-10-18 Thread Sascha Hauer
__aeabi_unwind_cpp_prx are provided to make the linker happy. To fix warnings about missing prototypes just provide a prototype in the same file. Signed-off-by: Sascha Hauer --- arch/arm/lib32/unwind.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/lib32/unwind.c

[PATCH 05/20] dma: Add missing re-inclusion protector

2018-10-18 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- include/dma-dir.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/dma-dir.h b/include/dma-dir.h index ba107f10ce..6e186d8148 100644 --- a/include/dma-dir.h +++ b/include/dma-dir.h @@ -1,6 +1,11 @@ +#ifndef __DMA_DIR_H +#define __DMA_DIR_H + enum

[PATCH 06/20] ARM: mmu: include dma.h

2018-10-18 Thread Sascha Hauer
dma.h provides the prototypes for the different dma_alloc_* functions, so we should include it to make sure the prototypes are consistent. Signed-off-by: Sascha Hauer --- arch/arm/cpu/mmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index

[PATCH 10/20] ARM: boards: karo-tx6x: Make locally used function static

2018-10-18 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- arch/arm/boards/karo-tx6x/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boards/karo-tx6x/board.c b/arch/arm/boards/karo-tx6x/board.c index 31c1c3a9ff..54b1e248f4 100644 --- a/arch/arm/boards/karo-tx6x/board.c +++

[PATCH 09/20] ARM: boards: GuF Vincell: Make locally used function static

2018-10-18 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- arch/arm/boards/guf-vincell/lowlevel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boards/guf-vincell/lowlevel.c b/arch/arm/boards/guf-vincell/lowlevel.c index de706b68b2..0d2216f265 100644 ---

Re: [PATCH] of: fix reproducible node name for legacy vs. new partition binding

2018-10-18 Thread s.ha...@pengutronix.de
Hi Gavin, On Wed, Oct 17, 2018 at 11:07:45AM +, Schenk, Gavin wrote: > Hi, > > On Wed, 2018-10-17 at 10:47 +0200, Sascha Hauer wrote: > > the of_reproducible_name mechanism is used to find a partition node > > from the barebox devicetree in the Linux devicetree. Unfortunately > > we have two

Re: [PATCH v4 00/22] MV88E6xxx switch family support

2018-10-18 Thread Sascha Hauer
On Tue, Oct 16, 2018 at 12:15:30PM -0700, Andrey Smirnov wrote: > Everyone: > > Patches in this series are a result of my work on porting Linux code > for MV88E6xxx switches to Barebox. > > Tested on the following H/W: > > - ZII i.MX6Q RDU2, MV88E6352 switch > - ZII i.MX51 RDU1,

[PATCH] i2c: introduce device_i2c_driver() macro

2018-10-18 Thread Marco Felsch
Add macro and dependency to avoid boilerplate code. Since now simple i2c drivers only have to include the i2c.h header and call the device_i2c_driver() macro to register a i2c device driver. Signed-off-by: Marco Felsch --- drivers/aiodev/lm75.c | 10 +-

[PATCH 3/4] gpio: tree-wide don't probe devices during core_initcall

2018-10-18 Thread Marco Felsch
Since commit 37e6bee7e5 ("gpiolib: Add support for GPIO "hog" nodes") barebox can handle hog-gpios. To work correctly the pinctrl driver must be initialised first. Reorder all core_initcall's so the pinctrl driver can be called first. find drivers/gpio/ -type f -name gpio-*.c -exec sed -i \

[PATCH 2/4] gpiolib: fix of_hog_gpio gpio label assignment

2018-10-18 Thread Marco Felsch
Current the label is retrieved by the line-name property but this is a optional property. In case of a missing line-name property the label is NULL. As the binding documentation told, the gpio-label must be set to the device-node name in case of missing line-name property. Fixes: 37e6bee7e5

[PATCH 1/4] gpiolib: fix of_gpio_hog error handling

2018-10-18 Thread Marco Felsch
Currently the error handling of gpio_get_num() checks the return value of the previous of_property_read_u32_index() which has it's own error check. Fix it by using the correct return value variable. Fixes: 37e6bee7e5 ("gpiolib: Add support for GPIO "hog" nodes") Signed-off-by: Marco Felsch ---

[PATCH 4/4] pinctrl: tree-wide probe devices during core_initcall

2018-10-18 Thread Marco Felsch
Since commit 37e6bee7e5 ("gpiolib: Add support for GPIO "hog" nodes") barebox can handle hog-gpios. To work correctly the pinctrl driver must be initialised first. Reorder all pinctrl drivers so they will be called first. find drivers/pinctrl/ -type f -name *.c \ -exec sed -i

[PATCH 0/4] gpio-hog fixes

2018-10-18 Thread Marco Felsch
Hi, in 2017 Andrey ported the linux gpio-hog functionality to barebox. So we can set simple power-on/reset gpios from DT without specifying them in the board file. First this series do some fixes in the gpio-hog implementation. Then we have to reorder the initcall sequence to make use of the

[PATCH 2/2] bootchooser: Add reference counting

2018-10-18 Thread Sascha Hauer
This adds reference counting to the bootchooser. Instead of creating a new bootchooser instance with each bootchooser_get() we return a reference to the existing bootchooser. This makes the behaviour consistent when bootchooser_get() is called multiple times. Signed-off-by: Sascha Hauer ---

[PATCH 1/2] bootchooser: put bootchooser after creating a boot entry

2018-10-18 Thread Sascha Hauer
Between creating a boot entry for bootchooser and actually using it the underlying state may have been modified, so make sure to get a current bootchooser when booting it, thus do a bootchooser_put after having created the entry and a bootchooser_get again when booting it. Signed-off-by: Sascha

[PATCH] rtc: ds1307: Add ds3231 to driver's ID list

2018-10-18 Thread Marco Felsch
In contrast to the ds1337 the ds3231 has a built-in temperature compensated crystal oscillator. The register map seems the same as the one from the ds1337, so using it's driver_data is okay. Signed-off-by: Marco Felsch --- drivers/rtc/rtc-ds1307.c | 1 + 1 file changed, 1 insertion(+) diff

Re: [PATCH 05/20] dma: Add missing re-inclusion protector

2018-10-18 Thread Sam Ravnborg
On Thu, Oct 18, 2018 at 08:58:12AM +0200, Sascha Hauer wrote: > Signed-off-by: Sascha Hauer > --- > include/dma-dir.h | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/include/dma-dir.h b/include/dma-dir.h > index ba107f10ce..6e186d8148 100644 > --- a/include/dma-dir.h > +++