Re: [PATCH] usb: usb251xb: remove duplicate status line on probe success

2022-05-23 Thread Marco Felsch
Hi Ahmad, On 22-05-23, Ahmad Fatoum wrote: > A successful probe results in two lines logged: > > usb251xb usb2514b0: Hub configuration was successful. The configuration (and this line) can be skipped if you specify "skip-config". > usb251xb usb2514b0: Hub probed successfully > > There is

[PATCH] state: backend_raw: fix ignoring unpack failures

2021-08-25 Thread Marco Felsch
. Signed-off-by: Marco Felsch --- I keeped the continue instead of break out early so the user gets informed which variables do not fit. Regards, Marco common/state/backend_format_raw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/state/backend_format_raw.c b

[PATCH] mtd: spi-nor: remove use-large-blocks left over

2021-08-25 Thread Marco Felsch
left over 'use_large_blocks' and 'use-large-blocks' references to cleanup the code base and to avoid confusion. No functional changes are made. Signed-off-by: Marco Felsch --- Documentation/devicetree/bindings/mtd/m25p80.rst | 10 -- drivers/mtd/devices/m25p80.c | 6 +- drivers/m

[PATCH v2] usb: imx-us-phy: add vbus_valid ro parameter

2021-08-24 Thread Marco Felsch
The parameter can be used by init scripts to detect a plugged usb cable. Upon a plugged usb cable the barebox behaviour can be changed which can be useful e.g. during production to apply a special production environment. Signed-off-by: Marco Felsch --- v2: - move vbus_valid into 'struct

Re: [PATCH] usb: imx-us-phy: add vbus_valid ro parameter

2021-08-24 Thread Marco Felsch
Hi Ahmad, On 21-08-24 13:01, Ahmad Fatoum wrote: > Hello Marco, > > On 24.08.21 12:46, Marco Felsch wrote: > > The parameter can be used by init scripts to detect a plugged usb cable. > > Upon a plugged usb cable the barebox behaviour can be changed which can > > be us

[PATCH] usb: imx-us-phy: add vbus_valid ro parameter

2021-08-24 Thread Marco Felsch
The parameter can be used by init scripts to detect a plugged usb cable. Upon a plugged usb cable the barebox behaviour can be changed which can be useful e.g. during production to apply a special production environment. Signed-off-by: Marco Felsch --- drivers/usb/imx/imx-usb-phy.c | 34

[PATCH] fastboot net: add setter for global.fastboot.net.autostart

2021-08-13 Thread Marco Felsch
scripts to start the autostart mechanism as well. Signed-off-by: Marco Felsch --- net/fastboot.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/net/fastboot.c b/net/fastboot.c index df388adc89..aa483f57a7 100644 --- a/net/fastboot.c +++ b/net/fastboot.c

[PATCH v2] ARM: i.MX6: boot: detect USB serial downloader more reliable

2021-08-12 Thread Marco Felsch
() else we reset the otg-controller to early. [1] https://source.denx.de/u-boot/u-boot/-/commit/e203dcf23e9eabc2e4f3d0b079457cd1516f2081 Signed-off-by: Marco Felsch Reviewed-by: Ahmad Fatoum --- arch/arm/mach-imx/boot.c | 27 +++ arch/arm/mach-imx/imx6.c | 9

Re: [PATCH] ARM: i.MX6: boot: detect USB serial downloader more reliable

2021-08-12 Thread Marco Felsch
On 21-08-11 20:30, Ahmad Fatoum wrote: > On 11.08.21 19:36, Marco Felsch wrote: > > The problem with the BootROM is that the SCR registers are not set > > s/SCR/SRC/ ? of course :) > > accordingly in case of a failed primary boot. E.g. if the device is > > conf

Re: [PATCH] fastboot net: add global.fastboot.net.autostart early

2021-08-12 Thread Marco Felsch
Hi Ahmad, On 21-08-11 20:22, Ahmad Fatoum wrote: > On 11.08.21 19:25, Marco Felsch wrote: > > Split adding the fastboot.net.autostart to the global device and make > > use of it. With this change it is possible to set it e.g. during > > environment_initcall() and

[PATCH] ARM: i.MX6: boot: detect USB serial downloader more reliable

2021-08-11 Thread Marco Felsch
() else we reset the otg-controller to early. [1] https://source.denx.de/u-boot/u-boot/-/commit/e203dcf23e9eabc2e4f3d0b079457cd1516f2081 Signed-off-by: Marco Felsch --- arch/arm/mach-imx/boot.c | 27 +++ arch/arm/mach-imx/imx6.c | 4 ++-- include/soc/fsl/fsl_udc.h | 11

[PATCH] fastboot net: add global.fastboot.net.autostart early

2021-08-11 Thread Marco Felsch
Split adding the fastboot.net.autostart to the global device and make use of it. With this change it is possible to set it e.g. during environment_initcall() and the later on followed fastboot_on_boot() can use it to start fastboot it automatically during boot. Signed-off-by: Marco Felsch

[PATCH] scripts: bareboxenv: add erase hint if build as host-tool

2021-08-06 Thread Marco Felsch
The bareboxenv behviour is different if used as host-tool. As host-tool the erase is skipped which can confuse the user. Add a help note as hot fix. In the long term we should add the host-tool erase support as well. Signed-off-by: Marco Felsch --- scripts/bareboxenv.c | 6 ++ 1 file

Re: [PATCH 1/4] commands: mount: replace printf by pr_info

2021-05-25 Thread Marco Felsch
On 21-05-25 07:15, Sascha Hauer wrote: > On Fri, May 21, 2021 at 06:34:32PM +0200, Marco Felsch wrote: > > This allows us to control the output behaviour e.g. booting silently > > to improve boot time. > > > > Signed-off-by: Marco Felsch > > --- > > comm

Re: [PATCH 0/4] Change printf behaviour

2021-05-21 Thread Marco Felsch
On 21-05-21 18:34, Marco Felsch wrote: > Hi all, > > my current project needs barebox as quite as possible since it has ^ ... quiet > strict boot time requirements. Unfortunately barebox was still a bit to >

[PATCH 3/4] common: bootm: replace printf by pr_err/info

2021-05-21 Thread Marco Felsch
This allows us to control the output behaviour e.g. booting silently to improve boot time. Furthermore it adds a 'ERROR:' prefixed output in case of pr_err which is colored as well (depending on your terminal). This helps us to identify unwanted behaviour. Signed-off-by: Marco Felsch --- common

[PATCH 2/4] common: boot: replace printf by pr_info/warn variants

2021-05-21 Thread Marco Felsch
This allows us to control the output behaviour e.g. booting silently to improve boot time. Furthermore it adds a 'WARNING:' prefixed output in case of pr_warn which is colored as well (depending on your terminal). This helps us to identify unwanted behaviour. Signed-off-by: Marco Felsch

[PATCH 4/4] common: oftree: replace printf by pr_info

2021-05-21 Thread Marco Felsch
This allows us to control the output behaviour e.g. booting silently to improve boot time. Signed-off-by: Marco Felsch --- common/oftree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/oftree.c b/common/oftree.c index 60d4327155..d92a3ca904 100644 --- a/common

[PATCH 1/4] commands: mount: replace printf by pr_info

2021-05-21 Thread Marco Felsch
This allows us to control the output behaviour e.g. booting silently to improve boot time. Signed-off-by: Marco Felsch --- commands/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/mount.c b/commands/mount.c index ff1d8bc5e5..bb2d1d60f4 100644 --- a/commands

[PATCH 0/4] Change printf behaviour

2021-05-21 Thread Marco Felsch
, Marco Marco Felsch (4): commands: mount: replace printf by pr_info common: boot: replace printf by pr_info/warn variants common: bootm: replace printf by pr_err/info common: oftree: replace printf by pr_info commands/mount.c | 2 +- common/boot.c| 4 +-- common/bootm.c | 88

Re: [PATCH v2 3/3] fs: add linux_rootarg 'root=mmcblkXpN' support

2021-05-10 Thread Marco Felsch
On 21-05-09 15:32, Roland Hieber wrote: > On Thu, May 06, 2021 at 06:26:16PM +0200, Marco Felsch wrote: > > Since commit fa2d0aa96941 ("mmc: core: Allow setting slot index via > > device tree alias") the linux kernel supports stable mmc device names. > > Barebox has

[PATCH v3 1/3] driver: add flag to check if cdev is an mci device

2021-05-10 Thread Marco Felsch
We need this during mount() to check if the cdev is an mmc/mci main|user hardware partition device. Later on we add the feature to pass "root=/dev/mmcblkXpN" as kernel command line. Signed-off-by: Marco Felsch --- v3: - no changes v2: - dropped the !! - renamed the flag due to v

[PATCH v3 2/3] mci: mci-core: set the DEVFS_IS_MCI_MAIN_PART_DEV flag

2021-05-10 Thread Marco Felsch
Set the new introduced flag to be able to check if the cdev is an mmc/mci device. Signed-off-by: Marco Felsch --- v3: - no changes v2: - only set the flag for MMC_BLK_DATA_AREA_MAIN drivers/mci/mci-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mci/mci

[PATCH v3 3/3] fs: add linux_rootarg 'root=mmcblkXpN' support

2021-05-10 Thread Marco Felsch
the system integrator needs to check if the used kernel contains the above commit. Signed-off-by: Marco Felsch --- v3: - fix Kconfig spelling - check if cdev has an master (cdev->master) before accessing it. v2: - improved Kconfig deps - improved Kconfig help message - minimal get_li

[PATCH v2 3/3] fs: add linux_rootarg 'root=mmcblkXpN' support

2021-05-06 Thread Marco Felsch
the system integrator needs to check if the used kernel contains the above commit. Signed-off-by: Marco Felsch --- v2: - improved Kconfig deps - improved Kconfig help message - minimal get_linux_mmcblkdev() simplifications common/Kconfig | 21 + fs/fs.c

[PATCH v2 1/3] driver: add flag to check if cdev is an mci device

2021-05-06 Thread Marco Felsch
We need this during mount() to check if the cdev is an mmc/mci main|user hardware partition device. Later on we add the feature to pass "root=/dev/mmcblkXpN" as kernel command line. Signed-off-by: Marco Felsch --- v2: - dropped the !! - renamed the flag due to v1 comments - renamed th

[PATCH v2 2/3] mci: mci-core: set the DEVFS_IS_MCI_MAIN_PART_DEV flag

2021-05-06 Thread Marco Felsch
Set the new introduced flag to be able to check if the cdev is an mmc/mci device. Signed-off-by: Marco Felsch --- v2: - only set the flag for MMC_BLK_DATA_AREA_MAIN drivers/mci/mci-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mci/mci-core.c b/drivers

Re: [PATCH 3/3] fs: add linux_rootarg 'root=mmcblkXpN' support

2021-05-06 Thread Marco Felsch
Hi Ahmad, On 21-05-06 14:19, Ahmad Fatoum wrote: > Hello Marco, > > On 06.05.21 13:22, Marco Felsch wrote: > > Since commit fa2d0aa96941 ("mmc: core: Allow setting slot index via > > device tree alias") the kernel supports stable mmc device names. Since > >

Re: [PATCH 1/3] driver: add flag to check if cdev is an mci device

2021-05-06 Thread Marco Felsch
On 21-05-06 13:59, Ahmad Fatoum wrote: > > > On 06.05.21 13:22, Marco Felsch wrote: > > We need this during mount() to check if the cdev is an mmc/mci device. > > Later on we add the feature to pass "root=/dev/mmcblk*" as kernel > > command line.

Re: [PATCH 2/3] mci: mci-core: set the DEVFS_IS_MCI_DEV flag

2021-05-06 Thread Marco Felsch
On 21-05-06 14:06, Ahmad Fatoum wrote: > Hello, > > On 06.05.21 13:22, Marco Felsch wrote: > > Set the new introduced flag to be able to check if the cdev is an > > mmc/mci device. > > > > Signed-off-by: Marco Felsch > > --- > > drivers/mci/mci-

[PATCH 3/3] fs: add linux_rootarg 'root=mmcblkXpN' support

2021-05-06 Thread Marco Felsch
oot medium. This patch adds the support to store the above commandline as linux_rootarg if enabled. Use the partuuid as fallback since it is not as unique as the mmcblkXpN scheme. Add a own build option since the system integrator needs to check if the used kernel contains the above commit. Signed-off

[PATCH 2/3] mci: mci-core: set the DEVFS_IS_MCI_DEV flag

2021-05-06 Thread Marco Felsch
Set the new introduced flag to be able to check if the cdev is an mmc/mci device. Signed-off-by: Marco Felsch --- drivers/mci/mci-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index 017f25d35f..c0fbcb385f 100644 --- a/drivers/mci/mci

[PATCH 1/3] driver: add flag to check if cdev is an mci device

2021-05-06 Thread Marco Felsch
We need this during mount() to check if the cdev is an mmc/mci device. Later on we add the feature to pass "root=/dev/mmcblk*" as kernel command line. Signed-off-by: Marco Felsch --- include/driver.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/driver.h b/includ

[PATCH 1/3] fixup! common: add initial barebox deep-probe support

2021-04-28 Thread Marco Felsch
--- Hi, this is the reworked version with Ahmad's review feedback. Regards, Marco common/deep-probe.c | 38 +-- include/asm-generic/barebox.lds.h | 10 +--- include/deep-probe.h | 31 + 3 files changed, 53

Re: [PATCH 1/3] fixup! common: add initial barebox deep-probe support

2021-04-28 Thread Marco Felsch
On 21-04-28 12:42, Ahmad Fatoum wrote: > Hello Marco, > > On 28.04.21 12:28, Marco Felsch wrote: > > --- > > Hi, > > > > this is just a proposal to change the current linker array approach to > > an initcall approach. Why? Because now we can simply reg

[PATCH 1/3] fixup! common: add initial barebox deep-probe support

2021-04-28 Thread Marco Felsch
--- Hi, this is just a proposal to change the current linker array approach to an initcall approach. Why? Because now we can simply register a board-driver without having to list each compatible. I used the pure_initcall without adding a new one, since the documentation says that pure_initcalls

[PATCH 2/3] fixup! ARM: boards: mx6-sabrelite: add deep-probe support

2021-04-28 Thread Marco Felsch
--- arch/arm/boards/freescale-mx6-sabrelite/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boards/freescale-mx6-sabrelite/board.c b/arch/arm/boards/freescale-mx6-sabrelite/board.c index 0a2df391e9..69a154d081 100644 ---

[PATCH 3/3] fixup! ARM: i.MX Phytec physom: Add deep-probe support

2021-04-28 Thread Marco Felsch
--- arch/arm/boards/phytec-som-imx6/board.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c index a108726468..9727062238 100644 --- a/arch/arm/boards/phytec-som-imx6/board.c +++

Re: [PATCH 17/17] ARM: i.MX Phytec physom: Add deep-probe support

2021-04-26 Thread Marco Felsch
On 21-04-26 11:36, Ahmad Fatoum wrote: > Hi, > > On 26.04.21 11:20, Marco Felsch wrote: > >> How about changing BAREBOX_DEEP_PROBE_ENABLE so > >> BAREBOX_DEEP_PROBE_ENABLE(physom_imx6_match); > >> works? Updated boards should be using board drivers anyw

Re: [PATCH 17/17] ARM: i.MX Phytec physom: Add deep-probe support

2021-04-26 Thread Marco Felsch
On 21-04-26 11:20, Marco Felsch wrote: > On 21-04-19 09:12, Ahmad Fatoum wrote: > > Hi, > > > > On 16.04.21 11:49, Sascha Hauer wrote: > > > +BAREBOX_DEEP_PROBE_ENABLE("phytec,imx6q-pfla02"); > > > +BAREBOX_DEEP_PROBE_ENABLE("phytec,imx6dl-pf

Re: [PATCH 17/17] ARM: i.MX Phytec physom: Add deep-probe support

2021-04-26 Thread Marco Felsch
On 21-04-19 09:12, Ahmad Fatoum wrote: > Hi, > > On 16.04.21 11:49, Sascha Hauer wrote: > > +BAREBOX_DEEP_PROBE_ENABLE("phytec,imx6q-pfla02"); > > +BAREBOX_DEEP_PROBE_ENABLE("phytec,imx6dl-pfla02"); > > +BAREBOX_DEEP_PROBE_ENABLE("phytec,imx6s-pfla02"); > >

Re: [PATCH 09/17] common: add initial barebox deep-probe support

2021-04-26 Thread Marco Felsch
On 21-04-19 09:16, Ahmad Fatoum wrote: > Hi, > > On 16.04.21 11:49, Sascha Hauer wrote: > > diff --git a/drivers/base/driver.c b/drivers/base/driver.c > > index f60533c59e..ea23884624 100644 > > --- a/drivers/base/driver.c > > +++ b/drivers/base/driver.c > > @@ -21,6 +21,7 @@ > > > > #include

Re: [PATCH] ARM: i.MX: demote reset reason print to debug level

2021-04-22 Thread Marco Felsch
a user might have. > > Demote the log to debug level to stop this confusion. > > Signed-off-by: Lucas Stach Reviewed-by: Marco Felsch ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

[PATCH] bbremote: fix the exit usage

2021-02-24 Thread Marco Felsch
Unlike the sys.exit() function the builtin exit() function don't take an argument. Fix it by using the exit function from the sys module which is already imported. Signed-off-by: Marco Felsch --- scripts/remote/main.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

Re: [PATCH 1/2] blspec: allow board files to overwrite config file settings

2021-01-20 Thread Marco Felsch
On 21-01-20 13:31, Michael Olbrich wrote: > On Wed, Jan 20, 2021 at 11:54:22AM +0100, Marco Felsch wrote: > > On 21-01-20 10:03, Sascha Hauer wrote: > > > On Tue, Jan 19, 2021 at 12:42:08PM +0100, Marco Felsch wrote: > > > > Hi Sascha, > > > > >

Re: [PATCH 1/2] blspec: allow board files to overwrite config file settings

2021-01-20 Thread Marco Felsch
Hi Sascha, On 21-01-20 10:03, Sascha Hauer wrote: > On Tue, Jan 19, 2021 at 12:42:08PM +0100, Marco Felsch wrote: > > Hi Sascha, > > > > On 21-01-19 12:01, Sascha Hauer wrote: > > > Hi Marco, > > > On Mon, Jan 18, 2021 at 09:48:49PM +0100, Marco Felsch wrot

Re: [PATCH 1/2] blspec: allow board files to overwrite config file settings

2021-01-19 Thread Marco Felsch
Hi Sascha, On 21-01-19 12:01, Sascha Hauer wrote: > Hi Marco, > On Mon, Jan 18, 2021 at 09:48:49PM +0100, Marco Felsch wrote: > > This commit adds the support to overwrite and/or adapt blspec config > > files by the following global variables: > > - global

[PATCH 3/4] nvmem: make nvmem_device_write/read public

2021-01-18 Thread Marco Felsch
Those functions already export their symbols so make it public available. Compared to the nvmem_device_cell_read/write() APIs these functions are a bit easier to use. Signed-off-by: Marco Felsch --- drivers/nvmem/core.c | 6 -- include/linux/nvmem-consumer.h | 19

[PATCH 4/4] nvmem: make id optional for of_nvmem_device_get()

2021-01-18 Thread Marco Felsch
8<-- Signed-off-by: Marco Felsch --- drivers/nvmem/core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index b9af31f4b5..9b55f47b4c 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -

[PATCH 1/4] nvmem: sync stub return values with linux code

2021-01-18 Thread Marco Felsch
8< Signed-off-by: Marco Felsch --- include/linux/nvmem-consumer.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h index 9e0fd4265e..2f79014c0f 100644 --- a/i

[PATCH 2/4] nvmem: add missing stubs

2021-01-18 Thread Marco Felsch
Add missing stubs for nvmem_device_cell_read/write(). Signed-off-by: Marco Felsch --- include/linux/nvmem-consumer.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h index 2f79014c0f..d86377bfda 100644

[PATCH 2/2] Documentation: blspec: Add blspec fixup documentation

2021-01-18 Thread Marco Felsch
Document the fixup mechanism. Signed-off-by: Marco Felsch --- Documentation/user/booting-linux.rst | 22 ++ 1 file changed, 22 insertions(+) diff --git a/Documentation/user/booting-linux.rst b/Documentation/user/booting-linux.rst index 60babb513c..fd7575bbe9 100644

[PATCH 1/2] blspec: allow board files to overwrite config file settings

2021-01-18 Thread Marco Felsch
be a dynamic devicetree-overlay handling. E.g. the board code dynamically checks which periphery boards are connected and adds the required overlays dynamically. A warning is printed if a already set option is overwritten to identify unintended wrong boot behaviour early. Signed-off-by: Marco Felsch

[PATCH 4/6] ARM: dts: imx6qdl-samx6i: switch to SPDX license identifier

2021-01-18 Thread Marco Felsch
Signed-off-by: Marco Felsch --- arch/arm/dts/imx6dl-samx6i.dts | 8 +- arch/arm/dts/imx6q-samx6i.dts | 8 +- arch/arm/dts/imx6qdl-smarc-samx6i.dtsi | 40 +- 3 files changed, 3 insertions(+), 53 deletions(-) diff --git a/arch/arm/dts/imx6dl

[PATCH 5/6] ARM: dts: imx6qdl-samx6i: use upstream device tree files

2021-01-18 Thread Marco Felsch
ve adapted all upstream boards which are using the the imx6qdl-smarc-samx6i.dtsi so the behaviour for those boards is unchanged. Signed-off-by: Marco Felsch --- arch/arm/dts/imx6dl-samx6i.dts | 28 +- arch/arm/dts/imx6q-samx6i.dts | 28 +- arch/arm/dts/imx6qdl-smarc-samx6i.

[PATCH 3/6] ARM: dts: imx6qdl-smarc-samx6i: remove iomuxc hog

2021-01-18 Thread Marco Felsch
Move the muxing into the gpioX nodes so we can get rid of the iomuxc hog. While on it set the correct mux config and don't rely on the reset value. Signed-off-by: Marco Felsch --- arch/arm/dts/imx6qdl-smarc-samx6i.dtsi | 37 +- 1 file changed, 25 insertions(+), 12

[PATCH 1/6] ARM: boards: kontron-samx6i: fix memory detection helper

2021-01-18 Thread Marco Felsch
modules are populated with at least 256M of RAM according [1]. I fixed also the alignment while on it. [1] https://github.com/kontron/u-boot-smarc-samx7/blob/master/board/kontron/amx6/amx6.c Signed-off-by: Marco Felsch --- arch/arm/boards/kontron-samx6i/mem.c | 24 ++-- 1 file

[PATCH 6/6] ARM: dts: imx6qdl-samx6i: cosmetic partition cleanup

2021-01-18 Thread Marco Felsch
The reg property is always the first property and the label is the following. No functional changes. Signed-off-by: Marco Felsch --- arch/arm/dts/imx6qdl-smarc-samx6i.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/dts/imx6qdl-smarc-samx6i.dtsi b/arch

[PATCH 2/6] ARM: boards: kontron-samx6i: simplify memory detection function

2021-01-18 Thread Marco Felsch
-smarc-samx7/blob/master/board/kontron/amx6/amx6.c Signed-off-by: Marco Felsch --- arch/arm/boards/kontron-samx6i/mem.c | 34 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/arch/arm/boards/kontron-samx6i/mem.c b/arch/arm/boards/kontron-samx6i/mem.c index

[PATCH] of: overlay: split debug messages for of_overlay_apply_symbols

2021-01-18 Thread Marco Felsch
Overlays don't need to have __symbols__ therefore it shouldn't be printed on info level. Move it to debug so interested users can print it still. I also fixed a minor alignment issue while on it. Signed-off-by: Marco Felsch --- drivers/of/overlay.c | 11 --- 1 file changed, 8

Barebox OF-Overlay Handling

2021-01-13 Thread Marco Felsch
Hi there, I have the following problem. My customer is using overlays for external devices like: display, camera, etc. The current overlay support is awesome and most of it works out of the box. There is only one nitpick: If Barebox isn't build with CONFIG_OF_OVERLAY_LIVE enabled many error's are

Re: [PATCH] usb: i.MX: improve regulator handling

2020-10-21 Thread Marco Felsch
On 20-10-21 16:29, Marco Felsch wrote: > On 20-10-21 07:49, Uwe Kleine-König wrote: > > On Tue, Oct 20, 2020 at 04:58:44PM +0200, Marco Felsch wrote: > > > On 20-10-20 16:28, Marco Felsch wrote: > > > > On 20-10-20 16:09, Sascha Hauer wrote: > > > >

Re: [PATCH] usb: i.MX: improve regulator handling

2020-10-21 Thread Marco Felsch
On 20-10-21 07:49, Uwe Kleine-König wrote: > On Tue, Oct 20, 2020 at 04:58:44PM +0200, Marco Felsch wrote: > > On 20-10-20 16:28, Marco Felsch wrote: > > > On 20-10-20 16:09, Sascha Hauer wrote: > > > > On Tue, Oct 20, 2020 at 03:33:17PM +0200, Marco

[PATCH v3 06/10] initcall: add of_populate_initcall

2020-10-21 Thread Marco Felsch
Add dedicated initcall for of_probe() which is required for the following device-on-demand/deep-probe mechanism. Signed-off-by: Marco Felsch --- Changelog: v2: - no changes v3: - align initcall id with level --- include/asm-generic/barebox.lds.h | 1 + include/init.h| 10

[PATCH v3 01/10] imx53: remove unused imx53_add_nand

2020-10-21 Thread Marco Felsch
The TX53 board was the last user of this function. This board was converted to device tree based boot by commit 971366078893 ("i.MX53/TX53: rework to dts based boot") so we can remove this legacy helper. Signed-off-by: Marco Felsch --- Changelog: v3: - new patch --- .../arm/mach-i

[PATCH v3 07/10] common: add initial barebox deep-probe support

2020-10-21 Thread Marco Felsch
ater after all boards are converted to the new mechanism. Signed-off-by: Marco Felsch --- Changelog: v2: - add deep-probe state to verify it once - use a linker list array instead of initcalls and runtime allocation - make of_device_create_on_demand an internal function - convert to of_device_ens

[PATCH v3 00/10] Barebox Deep-Probe

2020-10-21 Thread Marco Felsch
as example for others :) Comments and testers are welcome, as always :) Regards, Marco Lucas Stach (1): of: base: move memory init from DT to initcall Marco Felsch (9): imx53: remove unused imx53_add_nand of: platform: remove check of already added devices of: platform: Keep track

[PATCH v3 05/10] of: base: move clock init from of_probe() to barebox_register_of()

2020-10-21 Thread Marco Felsch
no impact because of_clk_init() depends only on an unflatten dtb. Signed-off-by: Marco Felsch --- Changelog: v2: - no changes v3: - fix commit message typo --- drivers/of/base.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index

[PATCH v3 04/10] of: base: move memory init from DT to initcall

2020-10-21 Thread Marco Felsch
properly. Signed-off-by: Lucas Stach Signed-off-by: Marco Felsch --- Changelog: v2: - no changes v3: - no changes --- drivers/of/base.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 5b45c2023f..2a3e34b071 100644

[PATCH v3 08/10] ARM: i.MX: esdctl: add deep-probe support

2020-10-21 Thread Marco Felsch
In case of deep-probe we have to ensure that the memory device is available after the mem_initcall(). Signed-off-by: Marco Felsch --- Changelog: v2 - convert to of_devices_ensure_probed_by_dev_id() - drop use-less deep-probe include v3: - no changes --- arch/arm/mach-imx/esdctl.c | 13

[PATCH v3 10/10] ARM: boards: mx6-sabrelite: add deep-probe support

2020-10-21 Thread Marco Felsch
Explicit request the required gpio resources instead of relying on their existence based on the initcall level. Signed-off-by: Marco Felsch --- Changelog: v2: - convert to new macro name - convert to new api v3: - convert to new BAREBOX_DEEP_PROBE_ENABLE macro --- .../boards/freescale-mx6

[PATCH v3 03/10] of: platform: Keep track of populated platform devices

2020-10-21 Thread Marco Felsch
-off-by: Marco Felsch --- Changelog: v3: - new patch --- drivers/of/platform.c | 20 +++- include/of.h | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 51781798c6..01de6f98af 100644 --- a/drivers

[PATCH v3 09/10] ARM: stm32mp: ddrctrl: add deep-probe support

2020-10-21 Thread Marco Felsch
In case of deep-probe we have to ensure that the memory device is available after the mem_initcall(). Signed-off-by: Marco Felsch --- Changelog: v2: - convert to of_devices_ensure_probed_by_dev_id() - drop use-less deep-probe include v3: - no changes --- arch/arm/mach-stm32mp/ddrctrl.c | 13

[PATCH v3 02/10] of: platform: remove check of already added devices

2020-10-21 Thread Marco Felsch
using the device tree. Remove the check to cleanup the code and to remove looping over each device every time of_platform_device_create() is called instead of keeping it for legacy boards/machines. Those legacy boards/machines should be converted instead. Signed-off-by: Marco Felsch --- Changelog

Re: [PATCH v2 4/8] initcall: add of_populate_initcall

2020-10-20 Thread Marco Felsch
On 20-10-20 18:50, Ahmad Fatoum wrote: > Hi, > > On 10/20/20 6:18 PM, Marco Felsch wrote: > > Hi Ahmad, > > > > On 20-10-02 07:53, Ahmad Fatoum wrote: > >> > >> > >> On 9/30/20 10:47 AM, Marco Felsch wrote: > > > >

Re: [PATCH v2 4/8] initcall: add of_populate_initcall

2020-10-20 Thread Marco Felsch
Hi Ahmad, On 20-10-02 07:53, Ahmad Fatoum wrote: > > > On 9/30/20 10:47 AM, Marco Felsch wrote: ... > > @@ -61,9 +64,10 @@ typedef void (*exitcall_t)(void); > > #define fs_initcall(fn)__define_initcall("9",fn,9)

Re: [PATCH] usb: i.MX: improve regulator handling

2020-10-20 Thread Marco Felsch
On 20-10-20 16:28, Marco Felsch wrote: > On 20-10-20 16:09, Sascha Hauer wrote: > > On Tue, Oct 20, 2020 at 03:33:17PM +0200, Marco Felsch wrote: > > > Hi Uwe, > > > > > > On 20-10-20 13:15, Uwe Kleine-König wrote: > > > > Instead of just ignori

Re: [PATCH] usb: i.MX: improve regulator handling

2020-10-20 Thread Marco Felsch
On 20-10-20 16:09, Sascha Hauer wrote: > On Tue, Oct 20, 2020 at 03:33:17PM +0200, Marco Felsch wrote: > > Hi Uwe, > > > > On 20-10-20 13:15, Uwe Kleine-König wrote: > > > Instead of just ignoring errors related to regulator getting error out. > > > In c

Re: [PATCH] usb: i.MX: improve regulator handling

2020-10-20 Thread Marco Felsch
Hi Uwe, On 20-10-20 13:15, Uwe Kleine-König wrote: > Instead of just ignoring errors related to regulator getting error out. > In case there is no regulator in the device tree, regulator_get() returns > the dummy regulator and not an error code, so the change is right for > this situation, too. >

[PATCH 3/3] ARCH: i.MX6: add support for OFDEVICE

2020-10-02 Thread Marco Felsch
. Selecting the option here seems to be the better place instead of adding it to the imx_v7_defconfig because there are possible no i.MX6 boards not using the device tree. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 2/3] ARM: i.MX6X: cleanup build dependency

2020-10-02 Thread Marco Felsch
Both dependencies are covered by ARCH_IMX6 so we no longer need to mention them here too. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/Kconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 1e4ba0bca4..a1127e3707 100644

Re: [PATCH v2 1/8] of: platform: Keep track of populated platform devices

2020-10-01 Thread Marco Felsch
On 20-10-02 07:15, Sascha Hauer wrote: > On Wed, Sep 30, 2020 at 10:47:09AM +0200, Marco Felsch wrote: > > After checking the linux history I found no state where it was explicite > > allowed to register a platform device twice. In the early days there was > > an bug and in

[PATCH] ARM: phytec-som-imx6: fix build dependency

2020-10-01 Thread Marco Felsch
Enable i2c support since the board code configures the i2c connected PMIC. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 2e8d2bd56c..a67e59fd4f 100644 --- a/arch/arm

Re: [PATCH v2 5/8] common: add initial barebox deep-probe support

2020-10-01 Thread Marco Felsch
Hi, On 20-09-30 10:47, Marco Felsch wrote: > +#define BAREBOX_DEEP_PROBE_ENABLE(_entry,_compatible) > \ > + const struct deep_probe_entry _DEEP_PROBE_ENTRY(_entry) \ > +__attribute__ ((unused,section (".barebox_deep_probe_"

[PATCH v2 5/8] common: add initial barebox deep-probe support

2020-09-30 Thread Marco Felsch
ater after all boards are converted to the new mechanism. Signed-off-by: Marco Felsch --- v2: - add deep-probe state to verify it once - use a linker list array instead of initcalls and runtime allocation - make of_device_create_on_demand an internal function - convert to of_device_ens

[PATCH v2 1/8] of: platform: Keep track of populated platform devices

2020-09-30 Thread Marco Felsch
are returning the already created device. 3) Avoid looping over each device all the time. 4) Fix the memory leak which can occure if of_platform_device_create() gets called for the same device without any resources. I added the missing check for amba devices too while on it. Signed-off-by:

[PATCH v2 7/8] ARM: stm32mp: ddrctrl: add deep-probe support

2020-09-30 Thread Marco Felsch
In case of deep-probe we have to ensure that the memory device is available after the mem_initcall(). Signed-off-by: Marco Felsch --- v2: - convert to of_devices_ensure_probed_by_dev_id() - drop use-less deep-probe include arch/arm/mach-stm32mp/ddrctrl.c | 13 - 1 file changed, 12

[PATCH v2 6/8] ARM: i.MX: esdctl: add deep-probe support

2020-09-30 Thread Marco Felsch
In case of deep-probe we have to ensure that the memory device is available after the mem_initcall(). Signed-off-by: Marco Felsch --- v2: - convert to of_devices_ensure_probed_by_dev_id() - drop use-less deep-probe include arch/arm/mach-imx/esdctl.c | 13 - 1 file changed, 12

[PATCH v2 2/8] of: base: move memory init from DT to initcall

2020-09-30 Thread Marco Felsch
properly. Signed-off-by: Lucas Stach Signed-off-by: Marco Felsch --- v2: - no changes drivers/of/base.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 4e88af7b22..83e4d0e9b5 100644 --- a/drivers/of/base.c +++ b/drivers

[PATCH v2 8/8] ARM: boards: mx6-sabrelite: add deep-probe support

2020-09-30 Thread Marco Felsch
Explicit request the required gpio resources instead of relying on their existence based on the initcall level. Signed-off-by: Marco Felsch --- v2: - convert to new macro name - convert to new api .../boards/freescale-mx6-sabrelite/board.c| 24 --- 1 file changed, 15

[PATCH v2 0/8] Barebox Deep-Probe

2020-09-30 Thread Marco Felsch
. This can be used as example for others :) Comments and testers are welcome, as always :) Regards, Marco Lucas Stach (1): of: base: move memory init from DT to initcall Marco Felsch (7): of: platform: Keep track of populated platform devices of: base: move clock init from of_probe

[PATCH v2 3/8] of: base: move clock init from of_probe() to barebox_register_of()

2020-09-30 Thread Marco Felsch
() should have no impact because of_clk_init() only depends on an unflatten dtb. Signed-off-by: Marco Felsch --- v2: - no changes drivers/of/base.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 83e4d0e9b5..8ba151dbde 100644

[PATCH v2 4/8] initcall: add of_populate_initcall

2020-09-30 Thread Marco Felsch
Add dedicated initcall for of_probe() which is required for the following device-on-demand/deep-probe mechanism. Signed-off-by: Marco Felsch --- v2: - no changes include/asm-generic/barebox.lds.h | 1 + include/init.h| 10 +++--- 2 files changed, 8 insertions(+), 3

Re: [PATCH 15/18] common: add initial barebox deep-probe support

2020-09-29 Thread Marco Felsch
Hi Ahmad, thanks for the review. On 20-09-28 18:53, Ahmad Fatoum wrote: > > --- /dev/null > > +++ b/common/deep-probe.c > > @@ -0,0 +1,39 @@ > > +// SPDX-License-Identifier: GPL-2.0-only > > + > > +#include > > +#include > > Shouldn't this rather be under drivers/of/ ? > maybe also name it

Re: [PATCH 5/7] mtd: nand-mxs: fix out-of-bounds write on 64-bit SoCs

2020-09-28 Thread Marco Felsch
On 20-09-28 18:03, Ahmad Fatoum wrote: > > > On 9/28/20 6:01 PM, Marco Felsch wrote: > > On 20-09-28 17:42, Ahmad Fatoum wrote: > >> Probing the nand_mxs device driver on 64 bit systems invokes > >> undefined behavior, because of an errant cast. Fix this. >

Re: [PATCH 5/7] mtd: nand-mxs: fix out-of-bounds write on 64-bit SoCs

2020-09-28 Thread Marco Felsch
On 20-09-28 17:42, Ahmad Fatoum wrote: > Probing the nand_mxs device driver on 64 bit systems invokes > undefined behavior, because of an errant cast. Fix this. > > No change of behavior for 32-bit SoCs intended. > > Signed-off-by: Ahmad Fatoum > --- > drivers/mtd/nand/nand_mxs.c | 4 +--- > 1

[PATCH 09/18] regulator: add device reference to regulator_dev

2020-09-28 Thread Marco Felsch
It is useful to know the physical device a regulator_dev belongs to. This is at least needed for the new deep-probe mechanism. It is also useful for a few regulator drivers to drop their own device_d reference. Signed-off-by: Marco Felsch --- drivers/regulator/anatop-regulator.c | 1 + drivers

[PATCH 08/18] regulator: stpmic1: fix registering missed regulators

2020-09-28 Thread Marco Felsch
The dts regulators subnode can be incomplete e.g. if the pre-programmed values are valid and shouldn't be changed. Missing regulator nodes are indicated by "of_regulator_match->of_node == NULL". Take missing regulators into account and register only existing ones. Signed-off-by:

[PATCH 10/18] regulator: treewide: drop local device_d reference

2020-09-28 Thread Marco Felsch
Drop the local reference for each driver since the regulator_dev can handle this now. Attention: The pfuze is out of scope since this driver is not really a regulator driver. While on it fix a few minor style issues on the bcm2835 driver too. Signed-off-by: Marco Felsch --- drivers/regulator

[PATCH 13/18] of: base: move clock init from of_probe() to barebox_register_of()

2020-09-28 Thread Marco Felsch
() should have no impact because of_clk_init() only depends on an unflatten dtb. Signed-off-by: Marco Felsch --- drivers/of/base.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 4f08c45e40..861871b221 100644 --- a/drivers/of/base.c

<    2   3   4   5   6   7   8   >