[PATCH 1/2] of: provice for_each_matching_node_from

2017-01-16 Thread Uwe Kleine-König
This is for_each_matching_node for a given root similar to the other ..._from functions. Signed-off-by: Uwe Kleine-König --- include/of.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/of.h b/include/of.h index ed6e87047350..e3bb452b86fa 100644 --- a/include/of

[PATCH 2/2] bus: mvebu-mbus: fixup correct device tree

2017-01-16 Thread Uwe Kleine-König
When booting with an external device tree this external tree must be adapted, not the internal tree again. Signed-off-by: Uwe Kleine-König --- drivers/bus/mvebu-mbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c index 73

[PATCH v2 1/2] of: provide for_each_matching_node_from

2017-01-16 Thread Uwe Kleine-König
This is for_each_matching_node for a given root similar to the other ..._from functions. Signed-off-by: Uwe Kleine-König --- Changes since v1: - fix typo in Subject include/of.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/of.h b/include/of.h index ed6e8704

Secure trusted boot mechanism

2017-01-16 Thread Dold, Wolfram
Hi all, I wanted to ask if barebox supports any kind of secure boot mechanism like FIT-Image or any other type of verified secure trusted boot? Thanks, Wolfram ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listi

Re: Secure trusted boot mechanism

2017-01-16 Thread Sascha Hauer
Hi Wolfram, On Mon, Jan 16, 2017 at 08:26:44AM +, Dold, Wolfram wrote: > Hi all, > I wanted to ask if barebox supports any kind of secure boot mechanism like > FIT-Image or > any other type of verified secure trusted boot? Yes, barebox does support FIT images. It also supports HAB on i.MX ma

[PATCH v2] lib: libfile: Fix copying files to a non existing destination

2017-01-16 Thread Teresa Remmet
If the destination file does not exist the stat call to check the file type fails. Extend the check of the stat return value. To allow to copy files to a new destination. Fixes commit 0ec6bd3e1be8 ("libfile: copy_file: Only open regular files with O_TRUNC") Signed-off-by: Teresa Remmet --- lib/

Re: Secure trusted boot mechanism

2017-01-16 Thread Dold, Wolfram
Hi Sascha, thanks for your fast reply. On 16.01.2017 09:33, Sascha Hauer wrote: > Hi Wolfram, > > On Mon, Jan 16, 2017 at 08:26:44AM +, Dold, Wolfram wrote: >> Hi all, >> I wanted to ask if barebox supports any kind of secure boot mechanism like >> FIT-Image or >> any other type of verified

Re: Secure trusted boot mechanism

2017-01-16 Thread Sascha Hauer
On Mon, Jan 16, 2017 at 09:22:57AM +, Dold, Wolfram wrote: > Hi Sascha, > thanks for your fast reply. > > On 16.01.2017 09:33, Sascha Hauer wrote: > > Hi Wolfram, > > > > On Mon, Jan 16, 2017 at 08:26:44AM +, Dold, Wolfram wrote: > >> Hi all, > >> I wanted to ask if barebox supports any k

[PATCH 2/3] usb: gadget: disable AT91 driver on SAMA5D4

2017-01-16 Thread Lucas Stach
This architecture is missing the right defines for the system peripherals, that are needed for this driver to build successfully. Disable it for now until someone with a clue about this architecture can fill in the gap. Signed-off-by: Lucas Stach --- drivers/usb/gadget/Kconfig | 1 + 1 file cha

[PATCH 1/3] defaultenv: select COMMAND_SUPPORT and GLOBALVAR

2017-01-16 Thread Lucas Stach
To satisfy the direct dependencies of the selected commands. Signed-off-by: Lucas Stach --- common/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/Kconfig b/common/Kconfig index 74e973999a3a..2383b772f8c5 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -856,6 +856,8 @@ c

[PATCH 3/3] barebox-imd: add dependency on generated/compile.h also for PBL version

2017-01-16 Thread Lucas Stach
Barebox-imd is also used in the PBL. As the object file names are different for the PBL, the explicit dependency on generated/compile.h wasn't there. This leads to random build failures in parallel builds, or worse the PBL picking up the old compile.h defines from an earlier build. Signed-off-by:

[PATCH 05/23] i2c: i.MX: Enable clock

2017-01-16 Thread Sascha Hauer
For architectures which do not enable all clocks during initialization. Signed-off-by: Sascha Hauer --- drivers/i2c/busses/i2c-imx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 74f046d00..5677443a1 100644 --- a/drivers/i2c

i.MX7 support

2017-01-16 Thread Sascha Hauer
The following series adds i.MX7 support to barebox. The port was done on the WaRP7 board. The board starts, eMMC, USB and serial work. This board does not have ethernet or NAND, so supporting this is left for a later exercise. It will be some additional fun to support the 2nd CPU for i.MX7d as we'

[PATCH 11/23] phy: usb-nop-xceiv: Add clock support

2017-01-16 Thread Sascha Hauer
As stated in the FIXME comment this is needed. Get and enable a "main_clk" just like the kernel does. Signed-off-by: Sascha Hauer --- drivers/phy/usb-nop-xceiv.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/phy/usb-nop-xceiv.c b/drivers/phy/usb-

[PATCH 06/23] mci: imx-esdhc: Enable clock

2017-01-16 Thread Sascha Hauer
For architectures which do not enable all clocks during initialization. Signed-off-by: Sascha Hauer --- drivers/mci/imx-esdhc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c index 951ac4501..c845187a5 100644 --- a/drivers/mci/imx-esdhc.c ++

[PATCH 14/23] mci: imx-esdhci: remove wrong write protection test

2017-01-16 Thread Sascha Hauer
Testing for the write protection bit to determine if a card is write protected or not is wrong. The bit may have the wrong value for permanently plugged cards (eMMC) or for boards using a GPIO for write protection detection. Since the core will test for write protection before actually calling into

[PATCH 04/23] ARM: Makefile: format fix

2017-01-16 Thread Sascha Hauer
From: Juergen Borleis Signed-off-by: Juergen Borleis --- arch/arm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 96ec588da..620a3ccb0 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -32,7 +32,7 @@ endif # testi

[PATCH 10/23] usb: imx: Add clock support

2017-01-16 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/usb/imx/chipidea-imx.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/usb/imx/chipidea-imx.c b/drivers/usb/imx/chipidea-imx.c index f4354876c..ccd534613 100644 --- a/drivers/usb/imx/chipidea-imx.c +++ b/drivers/usb/imx/chipidea-i

[PATCH 07/23] serial: i.MX: Enable clock

2017-01-16 Thread Sascha Hauer
For architectures which do not enable all clocks during initialization. Signed-off-by: Sascha Hauer --- drivers/serial/serial_imx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/serial/serial_imx.c b/drivers/serial/serial_imx.c index 2b1e5e07a..c15ab8630 100644 --- a/drivers/serial

[PATCH 03/23] imx-usb-loader: add i.MX7S support

2017-01-16 Thread Sascha Hauer
From: Juergen Borleis Signed-off-by: Juergen Borleis --- scripts/imx/imx-usb-loader.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c index ebffeddae..9de7bb3a8 100644 --- a/scripts/imx/imx-usb-loader.c +++ b/scripts/imx/imx

[PATCH 13/23] mci: Allow to partition eMMC boot partitions

2017-01-16 Thread Sascha Hauer
So far the eMMC boot partitions cannot be partitioned from the device tree. Since they are often 4MiB in size they are big enough to hold a barebox image and the environment. Add partition parsing to the boot partitions to allow this usecase. Signed-off-by: Sascha Hauer --- drivers/mci/mci-core.

[PATCH 02/23] imx-usb-loader: this table is used internally only, so keep it static

2017-01-16 Thread Sascha Hauer
From: Juergen Borleis --- scripts/imx/imx-usb-loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c index dfeef9e2c..ebffeddae 100644 --- a/scripts/imx/imx-usb-loader.c +++ b/scripts/imx/imx-usb-loader.c @@ -76,7

[PATCH 22/23] serial: i.MX: add i.MX7 support

2017-01-16 Thread Sascha Hauer
From: Juergen Borleis Signed-off-by Juergen Borleis Signed-off-by: Sascha Hauer --- drivers/serial/serial_imx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/serial/serial_imx.c b/drivers/serial/serial_imx.c index c15ab8630..e8c3836a6 100644 --- a/drivers/serial/serial_imx.c +

[PATCH 16/23] clk: i.MX: pllv3: Add support for the i.MX7 enet pll

2017-01-16 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- drivers/clk/imx/clk-pllv3.c | 23 ++- drivers/clk/imx/clk.h | 1 + 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c index 29c0f1c70..2a08996a6 100644 --- a/drivers/c

[PATCH 19/23] clk: i.MX7: Add missing USB clocks

2017-01-16 Thread Sascha Hauer
The USB clocks are missing in the Kernel clock code. Add them here. Signed-off-by: Sascha Hauer --- drivers/clk/imx/clk-imx7.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/imx/clk-imx7.c b/drivers/clk/imx/clk-imx7.c index c8424fe07..45c5a4667 100644 --- a/drivers/clk/imx/cl

[PATCH 12/23] of: partitions: force "partitions" subnode

2017-01-16 Thread Sascha Hauer
The binding states that a subnode containing partition subnodes should have the name "partitions". Enforce this so that we do not parse nodes with other names which may have partition descriptions for other disks. Signed-off-by: Sascha Hauer --- drivers/of/partition.c | 12 ++-- 1 file c

[PATCH 08/23] usb: imx: Make usb-misc multi instance safe

2017-01-16 Thread Sascha Hauer
i.MX7 has two usbmisc devices, so we cannot use global instance variables anymore. Create a driver private data struct for it. Signed-off-by: Sascha Hauer --- drivers/usb/imx/chipidea-imx.c | 9 +++-- drivers/usb/imx/imx-usb-misc.c | 34 +- include/usb/chipid

[PATCH 15/23] ARM: i.MX: Add i.MX7 base architecture support

2017-01-16 Thread Sascha Hauer
From: Juergen Borleis Signed-off-by Juergen Borleis Signed-off-by: Sascha Hauer --- Documentation/boards/imx.rst | 1 + arch/arm/mach-imx/Kconfig | 4 ++ arch/arm/mach-imx/Makefile | 1 + arch/arm/mach-imx/boot.c

[PATCH 17/23] clk: imx: Add clk-cpu support

2017-01-16 Thread Sascha Hauer
Taken from the kernel as of 4.10-rc3. Needed for i.MX7 Signed-off-by: Sascha Hauer --- drivers/clk/imx/Makefile | 1 + drivers/clk/imx/clk-cpu.c | 110 ++ drivers/clk/imx/clk.h | 3 ++ 3 files changed, 114 insertions(+) create mode 100644 dri

[PATCH 20/23] ARM: i.MX: gpt: Add i.MX7 support

2017-01-16 Thread Sascha Hauer
From: Juergen Borleis Signed-off-by Juergen Borleis Signed-off-by: Sascha Hauer --- arch/arm/mach-imx/clocksource.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c index 8d00bbb3f..b1f59aae2 100644 ---

[PATCH 01/23] imx-usb-loader: let constant data be const

2017-01-16 Thread Sascha Hauer
From: Juergen Borleis Signed-off-by: Juergen Borleis --- scripts/imx/imx-usb-loader.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c index be0894fa6..dfeef9e2c 100644 --- a/scripts/imx/imx-usb-loader

[PATCH 21/23] pinmmux: i.MX: add pin mux support for i.MX7

2017-01-16 Thread Sascha Hauer
From: Juergen Borleis Signed-off-by Juergen Borleis Signed-off-by: Sascha Hauer --- drivers/pinctrl/imx-iomux-v3.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/imx-iomux-v3.c b/drivers/pinctrl/imx-iomux-v3.c index 4b3f03389..1dc46e81a 100644 --- a/dri

[PATCH 09/23] usb: imx: Add usbmisc support for i.MX7

2017-01-16 Thread Sascha Hauer
Taken directly from Linux-4.10-rc3 Signed-off-by: Sascha Hauer --- drivers/usb/imx/imx-usb-misc.c | 53 ++ 1 file changed, 53 insertions(+) diff --git a/drivers/usb/imx/imx-usb-misc.c b/drivers/usb/imx/imx-usb-misc.c index 16fb38018..55dc0492b 100644 ---

[PATCH 23/23] ARM: i.MX: Add WaRP7 board support

2017-01-16 Thread Sascha Hauer
From: Juergen Borleis Signed-off-by Juergen Borleis Signed-off-by: Sascha Hauer --- Documentation/boards/imx/Element14-WaRP7.rst | 54 +++ arch/arm/boards/Makefile | 1 + arch/arm/boards/element14-warp7/Makefile | 2 + arch/arm/boards/ele

[PATCH 18/23] clk: i.MX: Add clock support for i.MX7

2017-01-16 Thread Sascha Hauer
From: Juergen Borleis Signed-off-by Juergen Borleis Signed-off-by: Sascha Hauer --- drivers/clk/imx/Makefile | 1 + drivers/clk/imx/clk-imx7.c | 878 + drivers/clk/imx/clk.h | 29 ++ 3 files changed, 908 insertions(+) create mode 100644 dr

Re: i.MX7 support

2017-01-16 Thread Fabio Estevam
Hi Sascha, On Mon, Jan 16, 2017 at 8:50 AM, Sascha Hauer wrote: > One issue remaining is that I am currently unable to reset the board > using the watchdog or the barebox reset command. Out of ideas, will > fix later. Nice work! Have you tried using MX7D_PAD_GPIO1_IO00__WDOD1_WDOG_B pin to res

Re: i.MX7 support

2017-01-16 Thread Belisko Marek
Hi Sascha, On Mon, Jan 16, 2017 at 11:50 AM, Sascha Hauer wrote: > The following series adds i.MX7 support to barebox. The port > was done on the WaRP7 board. The board starts, eMMC, USB and serial work. > This board does not have ethernet or NAND, so supporting this is > left for a later exercis

Re: [PATCH 02/23] imx-usb-loader: this table is used internally only, so keep it static

2017-01-16 Thread Juergen Borleis
On Monday 16 January 2017 11:50:47 Sascha Hauer wrote: > From: Juergen Borleis > > --- > scripts/imx/imx-usb-loader.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c You can add here my Signed-off as well. Chee

Re: [PATCH 20/23] ARM: i.MX: gpt: Add i.MX7 support

2017-01-16 Thread Juergen Borleis
On Monday 16 January 2017 11:51:05 Sascha Hauer wrote: > [...] > diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c > index 8d00bbb3f..b1f59aae2 100644 > --- a/arch/arm/mach-imx/clocksource.c > +++ b/arch/arm/mach-imx/clocksource.c > @@ -155,8 +155,10 @@ static __maybe_

Re: i.MX7 support

2017-01-16 Thread Robert Schwebel
On Mon, Jan 16, 2017 at 12:02:47PM +0100, Belisko Marek wrote: > > One issue remaining is that I am currently unable to reset the board > > using the watchdog or the barebox reset command. Out of ideas, will > > fix later. > > imx7 has know problem that cannot be reset by softreset only by > extern

Re: i.MX7 support

2017-01-16 Thread Belisko Marek
On Mon, Jan 16, 2017 at 12:38 PM, Robert Schwebel wrote: > On Mon, Jan 16, 2017 at 12:02:47PM +0100, Belisko Marek wrote: >> > One issue remaining is that I am currently unable to reset the board >> > using the watchdog or the barebox reset command. Out of ideas, will >> > fix later. >> >> imx7 ha

Re: i.MX7 support

2017-01-16 Thread Sascha Hauer
Hi Fabio, On Mon, Jan 16, 2017 at 08:58:01AM -0200, Fabio Estevam wrote: > Hi Sascha, > > On Mon, Jan 16, 2017 at 8:50 AM, Sascha Hauer wrote: > > > One issue remaining is that I am currently unable to reset the board > > using the watchdog or the barebox reset command. Out of ideas, will > > f

[PATCH] ARM i.MX31 clk: add pll_ref_clk and MCU PLL bypass select

2017-01-16 Thread Alexander Kurz
The three MX31 PLL may be clocked from either CKIH or a frequency-multiplied derivate of CKIL generated by the Frequency Pre Multiplier FPM. Add the pll_ref_clk selection infrastructure and support for MCU PLL bypass to support clock switching and boards not clocked CKIH. Signed-off-by: Alexander

[PATCH] ARM i.MX31 iomux: add and sort GPIO MUX options

2017-01-16 Thread Alexander Kurz
Sort the mx31 mux options for all pads with GPIO support by the GPIO number and add missing GPIO mux options. Signed-off-by: Alexander Kurz --- arch/arm/mach-imx/include/mach/iomux-mx31.h | 250 ++-- 1 file changed, 160 insertions(+), 90 deletions(-) diff --git a/arch/ar

Re: scripts/checkpatch.pl is deprecated

2017-01-16 Thread Vicente Bergas
On Mon, Jan 16, 2017 at 8:36 AM, Sascha Hauer wrote: > On Sun, Jan 15, 2017 at 08:42:42PM +0100, Vicente Bergas wrote: >> On Thu, Jan 12, 2017 at 11:27 AM, Ian Abbott wrote: >> > On 11/01/17 20:07, Uwe Kleine-König wrote: >> >> >> >> On Wed, Jan 11, 2017 at 08:35:11PM +0100, Vicente Bergas wrote:

Re: [PATCH v2 1/2] of: provide for_each_matching_node_from

2017-01-16 Thread Sascha Hauer
On Mon, Jan 16, 2017 at 09:04:57AM +0100, Uwe Kleine-König wrote: > This is for_each_matching_node for a given root similar to the other > ..._from functions. > > Signed-off-by: Uwe Kleine-König > --- > Changes since v1: > - fix typo in Subject > > include/of.h | 6 -- > 1 file changed, 4

Re: [PATCH 1/3] defaultenv: select COMMAND_SUPPORT and GLOBALVAR

2017-01-16 Thread Sascha Hauer
On Mon, Jan 16, 2017 at 11:45:44AM +0100, Lucas Stach wrote: > To satisfy the direct dependencies of the selected commands. > > Signed-off-by: Lucas Stach > --- > common/Kconfig | 2 ++ > 1 file changed, 2 insertions(+) Applied, thanks Sascha > > diff --git a/common/Kconfig b/common/Kconfig

Re: [PATCH v2] lib: libfile: Fix copying files to a non existing destination

2017-01-16 Thread Sascha Hauer
On Mon, Jan 16, 2017 at 10:07:39AM +0100, Teresa Remmet wrote: > If the destination file does not exist the stat call to check the file > type fails. Extend the check of the stat return value. > To allow to copy files to a new destination. > > Fixes commit 0ec6bd3e1be8 ("libfile: copy_file: Only o

Re: [PATCH] ARM i.MX31 iomux: add and sort GPIO MUX options

2017-01-16 Thread Sascha Hauer
On Mon, Jan 16, 2017 at 03:16:53PM +0100, Alexander Kurz wrote: > Sort the mx31 mux options for all pads with GPIO support by the GPIO number > and add missing GPIO mux options. The order we have now is the same as in the kernel. Is it really worth it changing it? Maybe it's better to be able to c

Re: [PATCH] ARM i.MX31 clk: add pll_ref_clk and MCU PLL bypass select

2017-01-16 Thread Sascha Hauer
Hi Alexander, On Mon, Jan 16, 2017 at 03:04:57PM +0100, Alexander Kurz wrote: > The three MX31 PLL may be clocked from either CKIH or a frequency-multiplied > derivate of CKIL generated by the Frequency Pre Multiplier FPM. > > Add the pll_ref_clk selection infrastructure and support for MCU PLL b