Re: [PATCH master v2 0/3] Fixes for WolfVision board code library and PF5 mainboard code

2024-05-15 Thread Sascha Hauer
On Wed, 15 May 2024 12:35:54 +0200, Michael Riesch wrote: > Habidere, > > This series is a follow-up to > https://lore.barebox.org/barebox/20240412-feature-wolfvision-pf5-v2-0-7e277cc88...@wolfvision.net/ > and fixes a few things. I tried to reply to said thread and announce a > v3, but I just f

Re: [PATCH] ddr: imx: rename ddr_get_firmware_ddr to ddr_get_firmware_ddr4

2024-05-15 Thread Sascha Hauer
On Wed, 15 May 2024 13:00:37 +0200, Ahmad Fatoum wrote: > The omission of the 4 was likely a typo. Adding it makes it clearer what > the function does and serves symmetry with ddr_get_firmware_lpddr4(). > > Applied, thanks! [1/1] ddr: imx: rename ddr_get_firmware_ddr to ddr_get_firmware_ddr4

Re: [PATCH] watchdog: imxwd: Do not suspend in lpm on i.MX27

2024-05-15 Thread Sascha Hauer
On Wed, 15 May 2024 13:01:56 +0200, Sascha Hauer wrote: > The i.MX watchdog has two different configurable behaviours for low > power modes. The watchdog can either be suspended during low power > modes or kept running. > The useful behaviour is normally to disable it during low power modes to >

Re: [PATCH] Documentation: pstore: add some information about interfacing with Linux

2024-05-15 Thread Sascha Hauer
On Wed, 15 May 2024 13:19:02 +0200, Ahmad Fatoum wrote: > The help text erroneously states that CONFIG_FS_PSTORE_RAMOOPS_RO > disables writing completely, but this is not correct: It merely stops > barebox from zapping log content previously written by Linux. > > The Kconfig help text is correct

Re: [PATCH 1/2] ARM: i.MX8MP: skov: fix variant detection on boards without state

2024-05-15 Thread Sascha Hauer
On Wed, 15 May 2024 13:20:32 +0200, Ahmad Fatoum wrote: > If barebox booted a board without state partition on the eMMC it did not set a > refined compatible at all resulting in a failure to boot into Linux userspace. > > Instead just default to the LVDS flavor of the board variant which at leas

Re: [PATCH] of: move ramoops device creation into common code

2024-05-15 Thread Sascha Hauer
On Wed, 15 May 2024 13:22:54 +0200, Ahmad Fatoum wrote: > We already have a generic place where we check for reserved memory > matches, so add ramoops there as well. > > Applied, thanks! [1/1] of: move ramoops device creation into common code https://git.pengutronix.de/cgit/barebox/comm

Re: [PATCH] include/linux/kernel.h: fix mult_frac() multiple argument evaluation bug

2024-05-15 Thread Sascha Hauer
On Wed, 15 May 2024 13:27:03 +0200, Ahmad Fatoum wrote: > This is a port of Linux commit 048a9883267f9b8f8e05dca9e9e8e6f991eea61e: > > | Author: Alexey Dobriyan > | AuthorDate: Sat May 20 21:25:19 2023 +0300 > | > | include/linux/math.h: fix mult_frac() multiple argument evaluation bug > |

Re: [PATCH] ARM: dts: GoMe e143_01: fix default state priorities

2024-05-15 Thread Sascha Hauer
On Wed, 15 May 2024 15:16:08 +0200, Roland Hieber wrote: > During the initial installation we can forgo writing an initial state > variable set to the eMMC if it is zeroed, and if the default values > priorities are set correctly. Since only the first rootfs partition is > populated during the in

Re: [PATCH] fs: ramfs: allocate once instead of twice per ramfs chunk

2024-05-15 Thread Sascha Hauer
On Wed, 15 May 2024 17:24:10 +0200, Ahmad Fatoum wrote: > There's no reason to maintain two allocations per chunk, so just collect > them both into the same calloc call. > > No functional change. > > Applied, thanks! [1/1] fs: ramfs: allocate once instead of twice per ramfs chunk https

[PATCH] fs: ramfs: allocate once instead of twice per ramfs chunk

2024-05-15 Thread Ahmad Fatoum
There's no reason to maintain two allocations per chunk, so just collect them both into the same calloc call. No functional change. Signed-off-by: Ahmad Fatoum --- I didn't test thoroughly what performance improvement this might bring, but it looks like a sensible thing to do. --- fs/ramfs.c |

[PATCH] ARM: dts: GoMe e143_01: fix default state priorities

2024-05-15 Thread Roland Hieber
During the initial installation we can forgo writing an initial state variable set to the eMMC if it is zeroed, and if the default values priorities are set correctly. Since only the first rootfs partition is populated during the install process, it should be preferred over the second rootfs. Sign

Re: [PATCH v2] ARM64: reloc: fix relocation error for big fat bareboxes

2024-05-15 Thread Ahmad Fatoum
Hi, On 15.05.24 07:55, Sascha Hauer wrote: > > On Mon, 13 May 2024 16:01:21 +0200, Ahmad Fatoum wrote: >> A multi_v8 barebox with KASAN enabled is 2051804 bytes even after >> compression and this breaks linking for me: >> >> arch/arm/cpu/common.o: in function `global_variable_offset': >> arch

[PATCH] include/linux/kernel.h: fix mult_frac() multiple argument evaluation bug

2024-05-15 Thread Ahmad Fatoum
This is a port of Linux commit 048a9883267f9b8f8e05dca9e9e8e6f991eea61e: | Author: Alexey Dobriyan | AuthorDate: Sat May 20 21:25:19 2023 +0300 | | include/linux/math.h: fix mult_frac() multiple argument evaluation bug | | mult_frac() evaluates _all_ arguments multiple times in the body. | |

[PATCH] of: move ramoops device creation into common code

2024-05-15 Thread Ahmad Fatoum
We already have a generic place where we check for reserved memory matches, so add ramoops there as well. Signed-off-by: Ahmad Fatoum --- drivers/of/base.c | 1 + fs/pstore/ram.c | 15 --- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/of/base.c b/drivers/o

[PATCH 2/2] ARM: i.MX8MP: skov: update timing parameters for Samsung RAM

2024-05-15 Thread Ahmad Fatoum
From: Soren Andersen The RAM is to be operated at a slightly higher data rate of 3200 MT/s, hence the timings have to be adjusted. Signed-off-by: Soren Andersen Signed-off-by: Ulrich Ölmann Signed-off-by: Ahmad Fatoum --- arch/arm/boards/skov-imx8mp/lpddr4-timing.c | 46 ++---

[PATCH 1/2] ARM: i.MX8MP: skov: fix variant detection on boards without state

2024-05-15 Thread Ahmad Fatoum
From: Soren Andersen If barebox booted a board without state partition on the eMMC it did not set a refined compatible at all resulting in a failure to boot into Linux userspace. Instead just default to the LVDS flavor of the board variant which at least leads to a working Linux userspace. Sign

[PATCH] Documentation: pstore: add some information about interfacing with Linux

2024-05-15 Thread Ahmad Fatoum
The help text erroneously states that CONFIG_FS_PSTORE_RAMOOPS_RO disables writing completely, but this is not correct: It merely stops barebox from zapping log content previously written by Linux. The Kconfig help text is correct, so adjust the documentation to reflect that and while at it, add s

[PATCH] watchdog: imxwd: Do not suspend in lpm on i.MX27

2024-05-15 Thread Sascha Hauer
The i.MX watchdog has two different configurable behaviours for low power modes. The watchdog can either be suspended during low power modes or kept running. The useful behaviour is normally to disable it during low power modes to be able to suspend the system without having the watchdog resetting

[PATCH] ddr: imx: rename ddr_get_firmware_ddr to ddr_get_firmware_ddr4

2024-05-15 Thread Ahmad Fatoum
The omission of the 4 was likely a typo. Adding it makes it clearer what the function does and serves symmetry with ddr_get_firmware_lpddr4(). Signed-off-by: Ahmad Fatoum --- drivers/ddr/imx/ddrphy_train.c | 2 +- include/soc/imx/ddr.h | 4 ++-- 2 files changed, 3 insertions(+), 3 delet

[PATCH master v2 0/3] Fixes for WolfVision board code library and PF5 mainboard code

2024-05-15 Thread Michael Riesch
are the fixes. Do you think they can be applied directly to master? Looking forward to your comments! Signed-off-by: Michael Riesch --- Changes in v2: - replace basprintf() with xstrdup() to avoid compiler warning - Link to v1: https://lore.kernel.org/r/20240515-b4-pf5-fixup-v1-0-a58c8ec94

[PATCH master v2 2/3] common: boards: move dependencies to wolfvision board code library

2024-05-15 Thread Michael Riesch
Since hardware ID detection has been moved to the WolfVision board code library, move the Kconfig dependencies as well. Signed-off-by: Michael Riesch --- arch/arm/mach-rockchip/Kconfig | 2 -- common/boards/Kconfig | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/a

[PATCH master v2 1/3] arm: boards: add pr_fmt() prefix to wolfvision pf5 board code

2024-05-15 Thread Michael Riesch
Add pr_fmt() message prefix to WolfVision PF5 board code. Signed-off-by: Michael Riesch --- arch/arm/boards/wolfvision-pf5/board.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/boards/wolfvision-pf5/board.c b/arch/arm/boards/wolfvision-pf5/board.c index 797f51bc2e..5a2f4201ba

[PATCH master v2 3/3] common: boards: wolfvision: fix handling of overlays parameter

2024-05-15 Thread Michael Riesch
If the char **overlays parameter to wolfvision_rk3568_detect_hw is NULL, the overlay file names are not collected. If overlays points to a NULL pointer, it is initialized properly with an empty string. This is convenient as the call to globalvar_set("of.overlay.filepattern", my_resulting_strin

Re: [PATCH master 3/3] common: boards: wolfvision: fix handling of overlays parameter

2024-05-15 Thread Michael Riesch
Hi Ahmad, On 5/15/24 11:14, Ahmad Fatoum wrote: > On 15.05.24 10:32, Michael Riesch wrote: >> Hi all, >> >> On 5/15/24 10:00, Michael Riesch wrote: >>> If the char **overlays parameter to wolfvision_rk3568_detect_hw is NULL, >>> the overlay file names are not collected. >>> >>> If overlays points

[PATCH] fixup! partition: reparse tables only if CONFIG_PARTITION_MANIPULATION=y

2024-05-15 Thread Ahmad Fatoum
partitions: add prompt and help text for CONFIG_PARTITION_MANIPULATION So far, CONFIG_PARTITION_MANIPULATION was only selected by CONFIG_CMD_PARTED and influenced repartitioning support. Now that it's used to guard the feature of reparsing partition tables, it makes sense to give it a help text a

Re: [PATCH master 3/3] common: boards: wolfvision: fix handling of overlays parameter

2024-05-15 Thread Ahmad Fatoum
On 15.05.24 10:32, Michael Riesch wrote: > Hi all, > > On 5/15/24 10:00, Michael Riesch wrote: >> If the char **overlays parameter to wolfvision_rk3568_detect_hw is NULL, >> the overlay file names are not collected. >> >> If overlays points to a NULL pointer, it is initialized properly with >> an

Re: [PATCH master 3/3] common: boards: wolfvision: fix handling of overlays parameter

2024-05-15 Thread Michael Riesch
Hi all, On 5/15/24 10:00, Michael Riesch wrote: > If the char **overlays parameter to wolfvision_rk3568_detect_hw is NULL, > the overlay file names are not collected. > > If overlays points to a NULL pointer, it is initialized properly with > an empty string. This is convenient as the call to >

[PATCH master 3/3] partition: reparse tables only if CONFIG_PARTITION_MANIPULATION=y

2024-05-15 Thread Ahmad Fatoum
reparse_partition_table() will delete a device's existing partition cdevs and allocate new ones according to the new partition table. Holding a reference to a cdev prevents it from bring removed to avoid dangling pointers and use-after-frees. Unfortunately, not all users call cdev_open on the cde

[PATCH master 1/3] cdev: return error code from cdev_close

2024-05-15 Thread Ahmad Fatoum
cdev_operations::close can fail and thus cdev_close should pass along the error code to the users instead of discarding it. Do that, so users like devfs close() can start propagating this error. Signed-off-by: Ahmad Fatoum --- fs/devfs-core.c | 11 --- include/driver.h | 2 +- 2 files

[PATCH master 2/3] fs: devfs: restore cdev reference count maintenance

2024-05-15 Thread Ahmad Fatoum
barebox v2024.03.0 moves the reference count maintenance into cdev_open/cdev_close, but missed to switch devfs_open and devfs_close to actually use cdev_open/cdev_close. The result was that the cdev could be deleted, e.g. due to partition reparsing, and further use of the file descriptor would resu

[PATCH master 3/3] common: boards: wolfvision: fix handling of overlays parameter

2024-05-15 Thread Michael Riesch
If the char **overlays parameter to wolfvision_rk3568_detect_hw is NULL, the overlay file names are not collected. If overlays points to a NULL pointer, it is initialized properly with an empty string. This is convenient as the call to globalvar_set("of.overlay.filepattern", my_resulting_strin

[PATCH master 2/3] common: boards: move dependencies to wolfvision board code library

2024-05-15 Thread Michael Riesch
Since hardware ID detection has been moved to the WolfVision board code library, move the Kconfig dependencies as well. Signed-off-by: Michael Riesch --- arch/arm/mach-rockchip/Kconfig | 2 -- common/boards/Kconfig | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/a

[PATCH master 1/3] arm: boards: add pr_fmt() prefix to wolfvision pf5 board code

2024-05-15 Thread Michael Riesch
Add pr_fmt() message prefix to WolfVision PF5 board code. Signed-off-by: Michael Riesch --- arch/arm/boards/wolfvision-pf5/board.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/boards/wolfvision-pf5/board.c b/arch/arm/boards/wolfvision-pf5/board.c index 797f51bc2e..5a2f4201ba

[PATCH master 0/3] Fixes for WolfVision board code library and PF5 mainboard code

2024-05-15 Thread Michael Riesch
deletions(-) --- base-commit: 593248cde35ddedcb27c0791c621e6a4403d7068 change-id: 20240515-b4-pf5-fixup-1c0f8b592313 Best regards, -- Michael Riesch