Re: [PATCH 1/2] ARM: dts: drop skeleton.dtsi

2019-09-12 Thread Sascha Hauer
On Tue, Sep 10, 2019 at 12:06:10PM +0200, Uwe Kleine-König wrote: > In the Linux dts files skeleton.dtsi was dropped (in commit abe60a3a7afb > ("ARM: dts: Kill off skeleton{64}.dtsi") for v5.1-rc1). At least one > reason for this also applies for barebox: memory nodes are supposed to have > a unit

Re: [PATCH] video: imxfb: make pcr and bpp per-display settings

2019-09-12 Thread Sascha Hauer
On Mon, Sep 09, 2019 at 09:40:13PM +0200, Uwe Kleine-König wrote: > These settings used to be specified per-mode. But the device tree > bindings have these two values attached to the display and not to each > mode. Also for the supported boards it doesn't matter as they all only > have a single

Re: [PATCH v4 2/2] mci: implement command to switch a mmc device to enhanced mode

2019-09-12 Thread Uwe Kleine-König
Hello, On Thu, Sep 12, 2019 at 08:16:17AM +0200, Sascha Hauer wrote: > On Mon, Sep 09, 2019 at 10:34:51PM +0200, Uwe Kleine-König wrote: > > + ret = mci_send_ext_csd(mci, ext_csd); > > + if (ret) { > > + printf("Failure to read EXT_CSD register\n"); > > + free(ext_csd); >

Re: [PATCH] mci: core: make mci_register -EPROBE_DEFER sensitive

2019-09-12 Thread Sascha Hauer
On Wed, Sep 11, 2019 at 05:03:03PM +0200, Marco Felsch wrote: > If the current regulator can't be requested because of -EPROBE_DEFER we > shouldn't print a error and ignore it. > > Signed-off-by: Marco Felsch > --- > drivers/mci/mci-core.c | 4 > 1 file changed, 4 insertions(+) Applied,

Re: [PATCH 1/2] mfd: da9063: add support to populate subdevs

2019-09-12 Thread Sascha Hauer
On Wed, Sep 11, 2019 at 05:00:18PM +0200, Marco Felsch wrote: > The upstream dt-bindings abstracts the DA9063/2 PMIC MFD by multiple > of-subnodes and the linux-mfd core creates platform-devices for each > node. Due to the lack of a mfd fw we need to add the platform-devices by > our own to reuse

Re: [PATCH] mci: imx-esdhc: fix error handling during probe

2019-09-12 Thread Sascha Hauer
On Wed, Sep 11, 2019 at 05:07:06PM +0200, Marco Felsch wrote: > Currently the the driver don't handle any error and return immediately. > Handling the errors correctly is a must to support defered probing. > > Signed-off-by: Marco Felsch > --- > drivers/mci/imx-esdhc.c | 30

Re: [PATCH v2 0/2] ARM: imx6: add new MarsBoard support

2019-09-12 Thread Sascha Hauer
On Thu, Sep 12, 2019 at 08:54:10AM +0200, Ahmad Fatoum wrote: > I've picked up v1 of the patch from here: > https://barebox.infradead.narkive.com/mn9ZpGu6/patch-2-3-marsboard-add-new-board > > and worked in the review feedback from back then. > > v1 -> v2: > - rebased on current upstream/next >

Re: [PATCH 1/2] state: drop unused code and declarations for non-existing functions

2019-09-12 Thread Sascha Hauer
On Wed, Sep 11, 2019 at 09:27:37PM +0200, Uwe Kleine-König wrote: > state_get_name() is not used and so can be removed. > state_backend_dtb_file() and state_backend_raw_file() were dropped in > c999b507da98 ("state: Refactor state framework"). > > Signed-off-by: Uwe Kleine-König > --- >

Re: [PATCH v2 0/7] Device Tree Overlay Support

2019-09-12 Thread Sascha Hauer
On Mon, Sep 09, 2019 at 10:57:53AM +0200, Sascha Hauer wrote: > On Fri, Sep 06, 2019 at 03:20:01PM +0200, Michael Tretter wrote: > > Hello, > > > > This is the v2 for adding device tree overlay support to barebox. > > > > The biggest change is the new function of_overlay_apply_tree() which > >

Re: [PATCH v4 2/2] mci: implement command to switch a mmc device to enhanced mode

2019-09-12 Thread Sascha Hauer
On Thu, Sep 12, 2019 at 08:42:40AM +0200, Uwe Kleine-König wrote: > Hello, > > -m was an intermediate step. You suggested to use -m instead of > "setmax", but while implementing I noticed that with options there is no > need for a keyword or option. > > Can you please squash this into my patch?:

Re: [PATCH v4 2/2] mci: implement command to switch a mmc device to enhanced mode

2019-09-12 Thread Sascha Hauer
On Mon, Sep 09, 2019 at 10:34:51PM +0200, Uwe Kleine-König wrote: > + ret = mci_send_ext_csd(mci, ext_csd); > + if (ret) { > + printf("Failure to read EXT_CSD register\n"); > + free(ext_csd); > + return ERR_PTR(-EIO); > + } > + > + return

[PATCH v2 2/2] ARM: imx_v7_defconfig: enable Embdest MarS board

2019-09-12 Thread Ahmad Fatoum
From: Ahmad Fatoum Have it compile as part of the defconfig, to improve coverage. Signed-off-by: Ahmad Fatoum --- arch/arm/configs/imx_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig index

[PATCH v2 1/2] ARM: imx6: add Embest MarSBoard support

2019-09-12 Thread Ahmad Fatoum
This board is produced by Embest/Element 14 and is based on i.MX6 Dual. For more informations on this board : http://www.embest-tech.com/shop/star/marsboard.html Signed-off-by: Eric Bénard Signed-off-by: Ahmad Fatoum --- Documentation/boards/imx/embest-marsboard.rst | 82 +++

[PATCH] gcc-9: silence 'address-of-packed-member' warning

2019-09-12 Thread Sascha Hauer
As done in the Linux Kernel. Most of the packed structures we have are optimized to not generate any unaligned accesses, so this warning produces a lot of false positives which are hard to fix in the code. Signed-off-by: Sascha Hauer --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH v2 0/2] ARM: imx6: add new MarsBoard support

2019-09-12 Thread Ahmad Fatoum
I've picked up v1 of the patch from here: https://barebox.infradead.narkive.com/mn9ZpGu6/patch-2-3-marsboard-add-new-board and worked in the review feedback from back then. v1 -> v2: - rebased on current upstream/next - removed seperate defconfig and added board to imx_v7_defconfig (Lucas) -

Re: [PATCH 3/4] mtd: ubi: Compile fastmap.c with -Wno-address-of-packed-member

2019-09-12 Thread Sascha Hauer
On Mon, Sep 09, 2019 at 09:28:17PM -0700, Andrey Smirnov wrote: > On Mon, Sep 9, 2019 at 3:23 AM Sascha Hauer wrote: > > > > On Sat, Sep 07, 2019 at 04:54:55PM -0700, Andrey Smirnov wrote: > > > GCC9 for ARM produces the following warnings: > > > > > > fastmap.c: In function 'ubi_attach_fastmap':

[PATCH] bootm: release tee_res

2019-09-12 Thread Sascha Hauer
When a tee_res has been acquired it must be released when bootm returns (for dryrun) Signed-off-by: Sascha Hauer --- common/bootm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/bootm.c b/common/bootm.c index d7232f6afa..b50b76ed6f 100644 --- a/common/bootm.c +++ b/common/bootm.c

Re: [PATCH] bootm: release tee_res

2019-09-12 Thread Rouven Czerwinski
On Thu, 2019-09-12 at 09:13 +0200, Sascha Hauer wrote: > When a tee_res has been acquired it must be released when bootm > returns > (for dryrun) > > Signed-off-by: Sascha Hauer > --- > common/bootm.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/common/bootm.c b/common/bootm.c >

[PATCH 3/3] add of_diff command

2019-09-12 Thread Sascha Hauer
The of_diff command compares two device trees against each other and prints a diff-like result. This can be handy to find out the differences between the barebox live tree and the one we start the kernel with. Another usecase would be to examine the changes our of_fixup process introduces (of_diff

[PATCH 2/3] of: add of_diff()

2019-09-12 Thread Sascha Hauer
of_diff compares two device trees against each other and prints a diff-like result. Signed-off-by: Sascha Hauer --- drivers/of/base.c | 141 ++ include/of.h | 1 + 2 files changed, 132 insertions(+), 10 deletions(-) diff --git

[PATCH 1/3] of: Fix memory hole in of_find_node_by_reproducible_name()

2019-09-12 Thread Sascha Hauer
of_get_reproducible_name() returns an allocated string, so we must free it. Signed-off-by: Sascha Hauer --- drivers/of/base.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 838f530f85..22077fa397 100644 ---

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

2019-09-12 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 7/7] Documentation: boards: document layerscape support

2019-09-12 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 5/7] scripts: pblimage: explicitly set architecture to ARM

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

[PATCH 4/7] filetype: support fastboot barebox_update with layerscape image

2019-09-12 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 2/7] ARM: Layerscape: add bootm handler for images

2019-09-12 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 6/7] ARM: layerscape: tqmls1046a: disable all SGMII PHYs

2019-09-12 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.

[PATCH 1/7] libfile: introduce copy_file_2 for copying starting with offset

2019-09-12 Thread Ahmad Fatoum
barebox already has a copy_file for copying files. Extend the API by a copy_file_2 that takes a source offset into account. This is useful for handling SoC-specific image formats which have a fixed-size header, as copy_file_2 can now skip that header and create a file with the full barebox image

[PATCH] clk: i.MX6qp: Fix location of the enfc_sel mux

2019-09-12 Thread Sascha Hauer
On the i.MX6qp the enfc_sel mux is at bits 15-17, not on 16-17. Fix this. During clock tree initialization we reparented the enfc_sel to: clk_set_parent(clks[IMX6QDL_CLK_ENFC_SEL], clks[IMX6QDL_CLK_PLL2_PFD2_396M]); This resulted in a register setting 0b110 for the enfc_sel mux which is

[PATCH] mtd: nand: Fix retrieving nand_chip from mtd_info

2019-09-12 Thread Sascha Hauer
With 76b6f74c53 we begin embedding a struct mtd_info into struct nand_chip. With this mtd_to_nand() must be changed accordingly. Fixes: 76b6f74c53 ("mtd: nand: Embed struct mtd_info into struct nand_chip") Signed-off-by: Sascha Hauer --- include/linux/mtd/nand.h | 2 +- 1 file changed, 1

Re: [PATCH 1/7] libfile: introduce copy_file_2 for copying starting with offset

2019-09-12 Thread Uwe Kleine-König
Hello Ahmad, On Thu, Sep 12, 2019 at 12:28:59PM +0200, Ahmad Fatoum wrote: > barebox already has a copy_file for copying files. Extend the API by a > copy_file_2 that takes a source offset into account. Can you give that function a more descriptive name? Something like copy_file_from_offset()?

Re: [PATCH 1/7] libfile: introduce copy_file_2 for copying starting with offset

2019-09-12 Thread Ahmad Fatoum
Hello Uwe, On 9/12/19 3:06 PM, Uwe Kleine-König wrote: > Hello Ahmad, > > On Thu, Sep 12, 2019 at 12:28:59PM +0200, Ahmad Fatoum wrote: >> barebox already has a copy_file for copying files. Extend the API by a >> copy_file_2 that takes a source offset into account. > > Can you give that

Re: [PATCH 1/7] libfile: introduce copy_file_2 for copying starting with offset

2019-09-12 Thread Sascha Hauer
On Thu, Sep 12, 2019 at 03:37:49PM +0200, Ahmad Fatoum wrote: > Hello Uwe, > > On 9/12/19 3:06 PM, Uwe Kleine-König wrote: > > Hello Ahmad, > > > > On Thu, Sep 12, 2019 at 12:28:59PM +0200, Ahmad Fatoum wrote: > >> barebox already has a copy_file for copying files. Extend the API by a > >>