[PATCH v4] ARM: rpi: parse useful data from vc fdt

2022-06-17 Thread Daniel Brát
Videocore first-stage loader on rpi passes us many useful information inside the vc fdt, including the real value of PM_RSTS register, not easily available by other means and which we can use to determine the reset cause. Also make the relevant funtions just print error/warning and continue in

Re: [PATCH 2/2] treewide: Simplify setenv() calls

2022-06-17 Thread Daniel Brát
Since this patch, I am getting a bunch of 'warning: format not a string literal and no format arguments [-Wformat-security]' warnings when compiling for aarch64 rpi. I am using 'aarch64-linux-gnu-gcc 7.5.0' on Ubuntu 18.04. Full compmpile log: https://pastebin.com/iCsBJbXU

Re: [PATCH v3] ARM: rpi: parse useful data from vc fdt

2022-06-17 Thread Sascha Hauer
On Fri, Jun 17, 2022 at 10:55:25AM +0200, Ahmad Fatoum wrote: > Hi, > > On 17.06.22 09:08, Ahmad Fatoum wrote: > >> + pnum = xmalloc(sizeof(u32)); > >> + *pnum = num; > >> + globalvar_add_simple_int("vc.boot_partition", pnum, "%u"); > > You could use setenv() with a

Re: [PATCH v3] ARM: rpi: parse useful data from vc fdt

2022-06-17 Thread Ahmad Fatoum
Hi, On 17.06.22 09:08, Ahmad Fatoum wrote: >> +pnum = xmalloc(sizeof(u32)); >> +*pnum = num; >> +globalvar_add_simple_int("vc.boot_partition", pnum, "%u"); You could use setenv() with a format string instead, see Sascha's change to the mailing list, this would

Re: [PATCH 1/9] ARM: boards: protonic-imx6: prtvt7 hardkey inputs are active low

2022-06-17 Thread Marco Felsch
On 22-06-17, Sascha Hauer wrote: > On Thu, Jun 16, 2022 at 06:38:45PM +0200, Oleksij Rempel wrote: > > Am 16.06.22 um 18:28 schrieb Oleksij Rempel: > > > Hi Robin, > > > > > > On Thu, Jun 16, 2022 at 03:11:06PM +0200, Robin van der Gracht wrote: > > > > The usb check needs to be skipped unless

Re: [PATCH] scripts: imx-usb-loader: simplify code flow for file size calculations

2022-06-17 Thread Sascha Hauer
On Fri, Jun 17, 2022 at 10:24:14AM +0200, Uwe Kleine-König wrote: > This change contains several changes that make the code flow easier to > understand (in my eyes at least): > > - Rename max_length to firststage_len >In some cases the image is loaded in two stages: First the PBL which >

[PATCH] scripts: imx-usb-loader: simplify code flow for file size calculations

2022-06-17 Thread Uwe Kleine-König
This change contains several changes that make the code flow easier to understand (in my eyes at least): - Rename max_length to firststage_len In some cases the image is loaded in two stages: First the PBL which is started after the PBL is loaded completely and then the whole image. So

Re: [PATCH] scripts: imx-usb-loader: simplify code flow for file size calculations

2022-06-17 Thread Sascha Hauer
On Wed, Jun 15, 2022 at 02:38:37PM +0200, Uwe Kleine-König wrote: > This change contains several changes that make the code flow easier to > understand (in my eyes at least): > > - Rename max_length to fststage_length >In some cases the image is loaded in two stages: First the PBL which >

[PATCH 1/2] env: let setenv() take printf arguments

2022-06-17 Thread Sascha Hauer
It's a common pattern to (ba)sprintf to a string and then call setenv() with this string. Let setenv() take printf arguments to make that easier. Signed-off-by: Sascha Hauer --- common/env.c | 10 +- include/environment.h | 5 +++-- 2 files changed, 12 insertions(+), 3

[PATCH 2/2] treewide: Simplify setenv() calls

2022-06-17 Thread Sascha Hauer
setenv() now takes printf arguments, use this where possible to simplify the code a bit. Signed-off-by: Sascha Hauer --- commands/clk.c | 10 +++--- commands/crc.c | 14 -- commands/hwclock.c | 4 +--- commands/loadb.c| 4 +--- commands/loads.c| 4 +---

Re: [PATCH] net: designware: rockchip: future-proof driver for more SoCs

2022-06-17 Thread Sascha Hauer
On Wed, Jun 15, 2022 at 10:03:05AM +0200, Ahmad Fatoum wrote: > Linux driver has a struct rk_gmac_ops::regs_valid member to mark > whether regs is populated or not. Population happens via a GCC > extension that allows static initialization of flexible array > members. Replace that with a pointer

Re: [PATCH 1/2] regulator: fixed: use local device_node reference

2022-06-17 Thread Sascha Hauer
On Thu, Jun 16, 2022 at 04:07:36PM +0200, Marco Felsch wrote: > Just a cosmetic commit, no functional changes. Use a local variable for > the device_node instead of dereference the pointer multiple times. > > Signed-off-by: Marco Felsch > --- > drivers/regulator/fixed.c | 9 + > 1 file

Re: [PATCH 1/2] clk: imx8mm: remove SYS PLL 1/2 clock gates

2022-06-17 Thread Sascha Hauer
On Thu, Jun 16, 2022 at 04:05:20PM +0200, Marco Felsch wrote: > This commit is based on commit dd977acd6 ("clk: imx8mp: remove SYS PLL > 1/2 clock gates") and adopts kernel commit: > > | commit d25cbd3e392730f459f1fbf5f959c16b460a59ca > | Author: Peng Fan > | AuthorDate: Fri Feb 25 16:17:31

Re: [PATCH 1/2] ARM: i.MX8MM: fix phy-reset gpio

2022-06-17 Thread Sascha Hauer
On Thu, Jun 16, 2022 at 04:02:45PM +0200, Marco Felsch wrote: > Drop the Barebox local property since the upstream/linux device-tree is > handling it now within the phy and we get an error: > >ERROR: gpiolib: _gpio_request: gpio-118 (ethernet-phy@0) status -16 >ERROR: miibus0: failed to

Re: (subset) [PATCH 0/9] ARM: boards: protonic-imx6: Updates

2022-06-17 Thread Sascha Hauer
On Thu, Jun 16, 2022 at 03:11:05PM +0200, Robin van der Gracht wrote: > Our USB FIT boot is now broken and we can no longer aquire the RFID I2C > eeprom chips we're using to store board serial and MAC address. > > With this patchstack I'm proposing fusing the serial in the ocotp GP1 > register as

Re: [PATCH v3] ARM: rpi: parse useful data from vc fdt

2022-06-17 Thread Ahmad Fatoum
Hello Daniel, On 15.06.22 20:41, Daniel Brát wrote: > Videocore first-stage loader on rpi passes us many useful information > inside the vc fdt, including the real value of PM_RSTS register, not > easily available by other means and which we can use to determine > the reset cause. > Also make the

Re: [PATCH 2/9] ARM: boards: protonic-imx6: Update comment to match a recent code update

2022-06-17 Thread Sascha Hauer
On Thu, Jun 16, 2022 at 03:11:07PM +0200, Robin van der Gracht wrote: > Fixes: 1e817b64bc45968320597344e6b05463edd9c5e5 We don't have this commit in mainline, could you reference the corresponding upstream commit instead? Please write as aabbccddeeff ("subject") Sascha > > Signed-off-by: Robin

Re: [PATCH 1/9] ARM: boards: protonic-imx6: prtvt7 hardkey inputs are active low

2022-06-17 Thread Sascha Hauer
On Thu, Jun 16, 2022 at 06:38:45PM +0200, Oleksij Rempel wrote: > Am 16.06.22 um 18:28 schrieb Oleksij Rempel: > > Hi Robin, > > > > On Thu, Jun 16, 2022 at 03:11:06PM +0200, Robin van der Gracht wrote: > > > The usb check needs to be skipped unless both keys are pressed > > > simultaneously. > >

Re: [PATCH master 1/2] dma: avoid clash between static inline and extern dma_alloc declarations

2022-06-17 Thread Ahmad Fatoum
Hello Sascha, On 17.06.22 08:43, Sascha Hauer wrote: > On Tue, Jun 14, 2022 at 11:15:55AM +0200, Ahmad Fatoum wrote: >> dma_alloc/dma_sync/dma_free can be either either static inline definitions >> usually supplied per arch or extern definitions that can be either >> generic or supplied per arch.

Re: [PATCH master 1/2] dma: avoid clash between static inline and extern dma_alloc declarations

2022-06-17 Thread Sascha Hauer
On Tue, Jun 14, 2022 at 11:15:55AM +0200, Ahmad Fatoum wrote: > dma_alloc/dma_sync/dma_free can be either either static inline definitions > usually supplied per arch or extern definitions that can be either > generic or supplied per arch. > > To avoid clashes, expect static inline definitions to

Re: [PATCH] net: rtl8169: make it work on big-endian system

2022-06-17 Thread Sascha Hauer
On Thu, Jun 16, 2022 at 12:03:51PM +0300, Antony Pavlov wrote: > Signed-off-by: Antony Pavlov > --- > drivers/net/rtl8169.c | 34 +- > 1 file changed, 17 insertions(+), 17 deletions(-) Applied, thanks Sascha > > diff --git a/drivers/net/rtl8169.c

Re: [PATCH v2] i2c: add bcm283x i2c host controller support

2022-06-17 Thread Sascha Hauer
On Wed, Jun 15, 2022 at 10:39:09PM +0200, Daniel Brát wrote: > Add a driver to support the i2c host controller (BSC) > found in Broadcom's bcm283x family of SoCs (used by rpi boards). > > Signed-off-by: Daniel Brát > --- > arch/arm/configs/rpi_defconfig | 3 +- >