[PATCH v2 3/6] filetype: support fastboot barebox_update with layerscape image

2019-09-17 Thread Ahmad Fatoum
We do not yet support USB on the Layerscape platforms, but when we do, it's imaginable that we would want to export barebox_update targets over Fastboot. Prepare for this by adding the layerscape images to those that filetype_is_barebox_image returns true for. Signed-off-by: Ahmad Fatoum ---

[PATCH v2 4/6] scripts: pblimage: explicitly set architecture to ARM

2019-09-17 Thread Ahmad Fatoum
architecture is statically initialized to zero, which happens to be ARCH_ARM as it's the first enum constant. Make this a bit clearer by explicitly assigning ARCH_ARM to architecture. Signed-off-by: Ahmad Fatoum --- scripts/pblimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v2 2/6] ARM: Layerscape: don't generate second-stage 2nd.image

2019-09-17 Thread Ahmad Fatoum
For layerscape images, barebox currently generates a second stage barebox that lacks the RCW and PBI and as such can be bootm'd as any other barebox ARM image. A previous commit implemented bootm handlers for the RCW and PBI prefixed images and thus the 2nd.image no longer serves a real purpose.

[PATCH v2 6/6] Documentation: boards: document layerscape support

2019-09-17 Thread Ahmad Fatoum
Some peripherals are still missing, but the main functionality to boot an OS is already in place. Document how to use it. Signed-off-by: Ahmad Fatoum --- Documentation/boards/layerscape.rst | 61 +++ .../boards/layerscape/ls1046ardb.rst | 36 +++

[PATCH v2 1/6] ARM: Layerscape: add bootm handler for images

2019-09-17 Thread Ahmad Fatoum
The layerscape images are preceeded by a RCW and PBI, which are interpreted by the Layerscape Hardware Pre-Bootloader and aren't executable as ARM code. To maintain the ability to network boot them, add a bootm handler that skips the fixed-size header. Signed-off-by: Ahmad Fatoum ---

[PATCH v2 0/6] ARM: layerscape: streamline and document boot

2019-09-17 Thread Ahmad Fatoum
v1 -> v2: - Not calling back into bootm code. We now read barebox and invoke it directly in the bootm handler (Sascha) - Dropped copy_file_2 implementation, because it's no longer needed - Fixed a commit message typo (Roland) Ahmad Fatoum (6): ARM: Layerscape: add bootm handler for

[PATCH v2 5/6] ARM: layerscape: tqmls1046a: disable all SGMII PHYs

2019-09-17 Thread Ahmad Fatoum
We already disable PHYs 4-7, which are currently unusable as they hang off SGMII, which barebox' FMan driver does not yet support. Follow suit for the SGMII eth0 and eth1 as well, so they don't unnecessarily clutter the barebox output with Unable to find a PHY (unknown ID?) messages.

Re: [PATCH 1/2] Convert latin1 files to utf-8

2019-09-17 Thread Sascha Hauer
On Tue, Sep 17, 2019 at 10:02:41AM +0200, Uwe Kleine-König wrote: > The source files are parsed by $(make docs). Currently this is done > using python2 (actually 'python' which is still python2 on most > machines). When using python3 however (which has a stricter encoding > handling) it is easier

[PATCH] trivial: fix typo lenght -> length

2019-09-17 Thread Uwe Kleine-König
Generated by perl -p -i -e 's/lenghte?/length/' arch/arm/boards/chumby_falconwing/falconwing.c arch/arm/mach-samsung/mem-s3c64xx.c fs/ext4/ext_common.h lib/gui/lodepng.c include/jtag.h There is another instance in dts/Bindings/usb/s3c2410-usb.txt, this is fixed in Linux v5.3-rc1 so

Re: [PATCH] Doc: i.MX: Document image structure for i.MX

2019-09-17 Thread Sascha Hauer
On Tue, Sep 17, 2019 at 12:02:15PM +0200, Rouven Czerwinski wrote: > On Tue, 2019-09-17 at 11:13 +0200, Lucas Stach wrote: > > On Di, 2019-09-17 at 10:48 +0200, Rouven Czerwinski wrote: > > > Document the image and load structure for i.MX6 and i.MX8MQ. > > > > > > Signed-off-by: Rouven Czerwinski

Re: [PATCH] Doc: i.MX: Document image structure for i.MX

2019-09-17 Thread Rouven Czerwinski
On Tue, 2019-09-17 at 11:13 +0200, Lucas Stach wrote: > On Di, 2019-09-17 at 10:48 +0200, Rouven Czerwinski wrote: > > Document the image and load structure for i.MX6 and i.MX8MQ. > > > > Signed-off-by: Rouven Czerwinski > > --- > > Documentation/boards/imx.rst | 69 > >

Re: [PATCH 1/2] gpio: add driver for MPC8xxx ip core

2019-09-17 Thread Sascha Hauer
On Tue, Sep 17, 2019 at 09:57:01AM +0200, Steffen Trumtrar wrote: > Import GPIO-driver for MPC512x/8349/8572/8610/QorIQ and compatible from Linux > v5.2. > > Signed-off-by: Steffen Trumtrar > --- > drivers/gpio/Kconfig| 8 +++ > drivers/gpio/Makefile | 1 + >

Re: [PATCH 1/6] barebox-wrapper: add IRQ_WAKE_THREAD

2019-09-17 Thread Sascha Hauer
On Mon, Sep 16, 2019 at 02:43:40PM +0200, Steffen Trumtrar wrote: > Add a new irqreturn_t IRQ_WAKE_THREAD. > > Signed-off-by: Steffen Trumtrar > --- > include/linux/barebox-wrapper.h | 1 + > 1 file changed, 1 insertion(+) Applied all except this one which is no longer needed in this patchset.

Re: [PATCH] imd: fix memory leak

2019-09-17 Thread Sascha Hauer
On Mon, Sep 16, 2019 at 10:27:01AM +0200, Ulrich Ölmann wrote: > Each invocation of 'imd' ate up to 1MB of RAM. > > Signed-off-by: Ulrich Ölmann > --- > common/imd.c | 20 ++-- > 1 file changed, 14 insertions(+), 6 deletions(-) Applied, thanks Sascha -- Pengutronix e.K.

Re: [PATCH] squash! ARM: imx6: add Embest MarSBoard support

2019-09-17 Thread Sascha Hauer
On Mon, Sep 16, 2019 at 09:48:58AM +0200, Ahmad Fatoum wrote: > Fix some typos that made it into the documentation. > > Tested-by: Stefan Lengfeld > > Can be added to the original commit's message as well. > --- > Documentation/boards/imx/embest-marsboard.rst | 10 +- > 1 file changed,

Re: [PATCH] gpio: add driver for SN74273 output expander

2019-09-17 Thread Ahmad Fatoum
On 9/9/19 9:23 AM, Sascha Hauer wrote: > On Fri, Sep 06, 2019 at 04:01:27PM +0200, Ahmad Fatoum wrote: >> The SN74273 is an octal D-Type Flip-Flop. When used as an output expander, >> N existing output signals can be turned into (N-8)*8 outputs using >> N-8 chips. Add driver to facilitate this. >

Re: [PATCH] Doc: i.MX: Document image structure for i.MX

2019-09-17 Thread Lucas Stach
On Di, 2019-09-17 at 10:48 +0200, Rouven Czerwinski wrote: > Document the image and load structure for i.MX6 and i.MX8MQ. > > Signed-off-by: Rouven Czerwinski > --- > Documentation/boards/imx.rst | 69 > 1 file changed, 69 insertions(+) > > diff --git

[PATCH] Doc: i.MX: Document image structure for i.MX

2019-09-17 Thread Rouven Czerwinski
Document the image and load structure for i.MX6 and i.MX8MQ. Signed-off-by: Rouven Czerwinski --- Documentation/boards/imx.rst | 69 1 file changed, 69 insertions(+) diff --git a/Documentation/boards/imx.rst b/Documentation/boards/imx.rst index

Re: [PATCH 2/2] Documentation: make gen_commands helper python3 compatible

2019-09-17 Thread Uwe Kleine-König
On Tue, Sep 17, 2019 at 10:09:56AM +0200, Uwe Kleine-König wrote: > On some machines the python command is provided by Python 3 while on > most (at least in my bubble) it is still Python 2. Modify the code to > make it usable by both Python versions. > > print_function is available in __future__

[PATCH 2/2] Documentation: make gen_commands helper python3 compatible

2019-09-17 Thread Uwe Kleine-König
On some machines the python command is provided by Python 3 while on most (at least in my bubble) it is still Python 2. Modify the code to make it usable by both Python versions. print_function is available in __future__ since Python 2.6.0a2, which shouldn't be a relevant restriction. The

[PATCH 1/2] Convert latin1 files to utf-8

2019-09-17 Thread Uwe Kleine-König
The source files are parsed by $(make docs). Currently this is done using python2 (actually 'python' which is still python2 on most machines). When using python3 however (which has a stricter encoding handling) it is easier if all input is in utf-8 encoding. So convert the few remaining latin1

Re: [PATCH] docs: add python version in shebang

2019-09-17 Thread Uwe Kleine-König
Hello Stefan, On Sun, Sep 15, 2019 at 09:31:14PM +0200, Stefan Lengfeld wrote: > On my machine 'make docs' fails with > > Traceback (most recent call last): > File "/home/stc/git/barebox/Documentation/gen_commands.py", line 156, > in > parse_c(source) > File

[PATCH 2/2] ARM: Layerscape: ls1046a: enable GPIOs

2019-09-17 Thread Steffen Trumtrar
Enable GPIOs on LS1046a. Signed-off-by: Steffen Trumtrar --- arch/arm/dts/fsl-ls1046a-rdb.dts | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/dts/fsl-ls1046a-rdb.dts b/arch/arm/dts/fsl-ls1046a-rdb.dts index e16948bc8a51..e3ae75e42dd5 100644 ---

[PATCH 1/2] gpio: add driver for MPC8xxx ip core

2019-09-17 Thread Steffen Trumtrar
Import GPIO-driver for MPC512x/8349/8572/8610/QorIQ and compatible from Linux v5.2. Signed-off-by: Steffen Trumtrar --- drivers/gpio/Kconfig| 8 +++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-mpc8xxx.c | 122 3 files changed, 131

Re: [PATCH] libfile: null-terminate buffer as expected

2019-09-17 Thread Sascha Hauer
On Mon, Sep 16, 2019 at 08:48:13PM +0200, Ahmad Fatoum wrote: > On 9/16/19 8:38 PM, Ahmad Fatoum wrote: > > strim calls strlen on buf internally which is undefined because buf > > is not null-terminated. Fix this. > > Please dismiss... read_file_2 has its buffer allocated with calloc, > thus