Re: [PATCH 0/3] FIT: match best configuration when multiple are compatible

2023-12-12 Thread Sascha Hauer
On Tue, Dec 05, 2023 at 12:36:15PM +0100, Ahmad Fatoum wrote: > Currently, we match the first compatible configuration. There may be > multiple matching configurations however and we should continue looking > for a better match if a match didn't achieve maximal score. > > Do that by checking

[PATCH 1/3] scripts: pblimage: re-use crc32 implementation from crypto/crc32.c

2023-12-12 Thread Sascha Hauer
We already have crc32_be in the tree, so re-use that. Signed-off-by: Sascha Hauer --- scripts/pblimage.c | 49 +- 1 file changed, 5 insertions(+), 44 deletions(-) diff --git a/scripts/pblimage.c b/scripts/pblimage.c index 3c3625cdd5..df5d7aef69

[PATCH 3/3] scripts: socfpga_mkimage: re-use crc32 implementation from crypto/crc32.c

2023-12-12 Thread Sascha Hauer
We already have crc32_be in the tree, so re-use that. Signed-off-by: Sascha Hauer --- scripts/socfpga_mkimage.c | 59 ++- 1 file changed, 2 insertions(+), 57 deletions(-) diff --git a/scripts/socfpga_mkimage.c b/scripts/socfpga_mkimage.c index e88e75962f

[PATCH 0/3] scripts: Drop some crc32 implementations

2023-12-12 Thread Sascha Hauer
Ahmad once added crc32_be() to barebox which is unused up to now, but can be used by several image tools in scripts/. Let's do that. Sascha Hauer (3): scripts: pblimage: re-use crc32 implementation from crypto/crc32.c scripts: mxsimage: re-use crc32 implementation from crypto/crc32.c

[PATCH 2/3] scripts: mxsimage: re-use crc32 implementation from crypto/crc32.c

2023-12-12 Thread Sascha Hauer
We already have crc32_be in the tree, so re-use that. Signed-off-by: Sascha Hauer --- scripts/mxsimage.c | 49 +- 1 file changed, 5 insertions(+), 44 deletions(-) diff --git a/scripts/mxsimage.c b/scripts/mxsimage.c index d33c4c8a0a..cebbab25ad

[PATCH] crypto: crc32: create crc table only once

2023-12-11 Thread Sascha Hauer
cally") Signed-off-by: Sascha Hauer --- crypto/crc32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/crc32.c b/crypto/crc32.c index 287dfa3303..49d0b49c65 100644 --- a/crypto/crc32.c +++ b/crypto/crc32.c @@ -56,7 +56,7 @@ static void make_crc_table(void)

Re: Fail to register logical partition because it overlaps with the extended partition

2023-12-05 Thread Sascha Hauer
Hi Victor, On Mon, Dec 04, 2023 at 03:04:37PM +, Victor BERTIN wrote: > Hello All, > > We are using Barebox v2022.12.0 on a MSC SM2S-IMX8MP SoM. > > We witness an error happening when registering the first logical partition of > our extended partition : > ERROR: New partition mmc2.4

Re: RK3568 fail with 2023.11.0

2023-12-05 Thread Sascha Hauer
Hi Alexander, On Sun, Dec 03, 2023 at 08:41:23PM +0300, Alexander Shiyan wrote: > Hello Sascha. > > So this bug can probably affect CPUs other than RK3568, right? Yes. > After this series of patches, both problems described earlier went away. > Can you apply this to the master branch please?

Re: [PATCH 1/4] dma: factor out dma map generic implementations into file

2023-12-05 Thread Sascha Hauer
On Wed, Nov 29, 2023 at 07:17:55AM +0100, Ahmad Fatoum wrote: > In preparation for adding optional debugging code for the DMA mapping > API, move the definition out of the header file into a source file. > > Signed-off-by: Ahmad Fatoum > --- > drivers/dma/Makefile | 1 + > drivers/dma/map.c

Re: [PATCH master] ARM: mmu: align size of remapped region to page size

2023-12-05 Thread Sascha Hauer
On Tue, Dec 05, 2023 at 09:12:47AM +0100, Ahmad Fatoum wrote: > Currently, barebox ARM arch_remap_range() will hang in an infinite loop, > when called with a size that's not aligned to a page boundary. > Its Linux equivalent, ioremap(), will just rounds up to page size and > work correctly. Adopt

Re: [PATCH master] clk: rockchip: pll fix out of bounds read

2023-12-05 Thread Sascha Hauer
On Tue, Dec 05, 2023 at 09:10:52AM +0100, Ahmad Fatoum wrote: > parent_names[1] is only valid for PLLs that are not of the type pll_rk3328. > Yet, the code references it anyway unconditionally, triggering a KASan > error. Fix this by slightly reworking the code. > > This issue also seems to exist

Re: [PATCH master] clk: ti-sci: fix build failure without TI_SCI_PROTOCOL

2023-12-05 Thread Sascha Hauer
On Mon, Dec 04, 2023 at 05:52:38PM +0100, Ahmad Fatoum wrote: > The SCI clk driver has an unconditional reference to > ti_sci_get_handle(), but no dependency is specific in the Kconfig. > Add a dependency and change defaults, so it's enabled by default. > > Signed-off-by: Ahmad Fatoum > --- >

Re: [PATCH master] ARM: dts: i.MX8MP: imx8mp-skov: fix reserved-memory cells

2023-12-05 Thread Sascha Hauer
On Mon, Dec 04, 2023 at 05:49:38PM +0100, Ahmad Fatoum wrote: > Build complains about: > > imx8mp-skov.dts:69.3-10: Warning (ranges_format): /reserved-memory:ranges: > empty "ranges" property but its #size-cells (1) differs from / (2) > (48 results) [482/38498] > > Fix this by changing the

Re: [PATCH] scripts: imx-image: don't pad the final binary for i.MX8M devices

2023-12-05 Thread Sascha Hauer
On Tue, Nov 14, 2023 at 02:33:58PM +0100, Marco Felsch wrote: > If the padding was required the follwing error may appear: > > | found i.MX8MP USB device [1fc9:0146] > | No dcd table in this ivt > | dl_command err=-1, last_trans=-1 > | 4 in err=-4, last_trans=0 00 00 00 00 > > The error is

Re: [PATCH v4 0/3] net: macb: fix dma usage

2023-12-05 Thread Sascha Hauer
On Fri, Dec 01, 2023 at 02:51:26PM +0100, Steffen Trumtrar wrote: > The rx_buffer is only dma_alloc'ed but never properly flushed. > Fix that. > > While at it, also use proper volatile access instead of sw barriers. > > Also, redefine PKTSIZE to a sensible multiple of 64 bytes. > >

Re: [PATCH 1/2] kbuild: don't mix overlay and normal DTC and CPP flags

2023-12-05 Thread Sascha Hauer
On Thu, Nov 30, 2023 at 08:03:19AM +0100, Ahmad Fatoum wrote: > We currently conflate flags for *.dtb and *.dtbo targets: > > - -@ doesn't make sense for overlays, but is used there anyway when > CONFIG_OF_OVERLAY_LIVE > > - DTC_CPP_FLAGS_basetarget.dtbo and DTC_CPP_FLAGS_basetarget.dtb

Re: [PATCH] FIT: support kernel images with type = "kernel_noload"

2023-12-04 Thread Sascha Hauer
On Wed, Nov 29, 2023 at 09:31:06PM +0100, Ahmad Fatoum wrote: > U-Boot interprets "kernel_noload" to mean that the load and entry > addresses shall be ignored[1] and that the kernel image should be executed > in-place, unless compressed[2]. The entry and load addresses are still > mandatory and

Re: [PATCH] Documentation: user: barebox: make barebox chainloading clearer

2023-12-04 Thread Sascha Hauer
On Wed, Nov 29, 2023 at 12:52:55PM +0100, Ahmad Fatoum wrote: > barebox images are designed to be chainloadable and can be loaded as if > they were a kernel by other bootloaders. The documentation lists > examples for two ways to achieve this with U-Boot preinstalled on the > board. They are not

Re: [PATCH] mci: eMMC responds to CMD12 with R1 in case of read

2023-12-04 Thread Sascha Hauer
On Wed, Nov 29, 2023 at 10:41:49AM +0100, Yann Sionneau wrote: > eMMC specification JESD84-B51 states page 126 > table 49 — Basic commands (class 0 and class 1) that > CMD12 (STOP_TRANSMISSION) response is R1 for read cases > and R1b for write cases. > > Fix wrong reponse type in eMMC read cases.

Re: [PATCH] Documentation: i.MX: point out that barebox-*-u.img is i.MX6-specific

2023-12-04 Thread Sascha Hauer
On Wed, Nov 29, 2023 at 12:47:05PM +0100, Ahmad Fatoum wrote: > We don't use the DCD table for RAM setup on i.MX8M, so no special > barebox binary is needed for USB upload. > > CONFIG_HABV4_IMAGE_SIGNED_USB is already i.MX6-specific, but point this > out in the documentation explicitly as well. >

Re: [PATCH] mci: set RCA to 2 according to eMMC specification

2023-12-04 Thread Sascha Hauer
On Wed, Nov 29, 2023 at 09:29:56AM +0100, Yann Sionneau wrote: > According to eMMC Protocol Specification JESD84-B51 Section 7.5 > > ``` > The writable 16-bit relative Device address (RCA) register carries the Device > address assigned by the host during the Device identification. This address is

Re: [PATCH 0/4] dma: catch mistakes with CONFIG_DMA_API_DEBUG

2023-12-04 Thread Sascha Hauer
On Wed, Nov 29, 2023 at 07:17:54AM +0100, Ahmad Fatoum wrote: > Cache invalidation issues around DMA accesses can be difficult to debug. > Motivated by recent fixes to the macb driver[1], let's add some optional > sanity checking to the DMA API inspired by the Linux CONFIG_DMA_API_DEBUG > option.

Re: [PATCH] ARM: dma: define DMA_ALIGNMENT instead of defining dma_alloc

2023-12-04 Thread Sascha Hauer
On Wed, Nov 29, 2023 at 07:10:30AM +0100, Ahmad Fatoum wrote: > There's a suitable fallback dma_alloc implementation already in dma.h, > which we can use as soon as we define DMA_ALIGNMENT. > > Reviewed-by: Marco Felsch > Signed-off-by: Ahmad Fatoum > --- > arch/arm/include/asm/dma.h | 6

Re: [PATCH] commands: regulator: add option to list provider devices

2023-12-04 Thread Sascha Hauer
On Tue, Nov 28, 2023 at 04:30:20PM +0100, Ahmad Fatoum wrote: > Especially on SCMI boards, it isn't immediately clear if e.g. reg11 is > supplied by a directly accessed regulator or by the secure world. > > Give the regulator command a -D option to list devices that the > regulator is associated

Re: [PATCH 1/3] drivers: regulator: make pfuze available on i.MX7 too

2023-12-04 Thread Sascha Hauer
On Mon, Nov 27, 2023 at 10:48:16PM +0100, Roland Hieber wrote: > It can also not hurt to build it for compile-tests. > > Signed-off-by: Roland Hieber > --- > drivers/regulator/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks Sascha > > diff --git

Re: [PATCH 00/13] ARM: stm32mp: add full STM32MP13 support with OP-TEE

2023-12-04 Thread Sascha Hauer
On Mon, Nov 27, 2023 at 07:49:34AM +0100, Ahmad Fatoum wrote: > We only had rudimentary STM32MP13 support, because proper control of the > clocks and resets required communicating with OP-TEE as the RCC > peripheral was restricted to the secure world on that SoC. > > Back when STM32MP13 support

Re: [PATCH 0/6] firmware: arm_scmi: add OP-TEE transport support

2023-12-04 Thread Sascha Hauer
On Mon, Nov 27, 2023 at 07:40:28AM +0100, Ahmad Fatoum wrote: > STM32MP15 in trusted mode and STM32MP13 by default use OP-TEE as secure > monitor and some resets, clocks and voltage regulators are off-limits > to the normal world. > > This series syncs barebox SCMI support with v6.6 and adds

[PATCH 1/2] ARM: rockchip: rk3588: Use upstream dts files

2023-12-04 Thread Sascha Hauer
We have downstream rk3588 dtsi files containing the PCI controllers and also the SDMMC controller. Use the now existing upstream nodes instead. Signed-off-by: Sascha Hauer --- arch/arm/dts/rk3588.dtsi | 145 -- arch/arm/dts/rk3588s.dtsi

[PATCH 2/2] ARM: rockchip: rock-5a: Disable non working devices

2023-12-04 Thread Sascha Hauer
Some devices do not work in barebox because we lack phy drivers for them. Also we need to overwrite the ranges property in pcie2x1l2. The original upstream values do not work, likely because of some deficiency in the PCI driver. Signed-off-by: Sascha Hauer --- arch/arm/dts/rk3588-rock-5b.dts

[PATCH 0/2] Rockchip RK3588 fixes

2023-12-04 Thread Sascha Hauer
understand what the Linux PCI driver makes different to work with the Linux ranges properties. With this at least the PCI ethernet controller works again. We disable some other PCI and USB nodes which otherwise throw annoying warning messages due to missing phys. Sascha Hauer (2): ARM: rockchip

[PATCH] drivers: firmware: arm-scmi: Fix iterating over idr

2023-12-03 Thread Sascha Hauer
The iterator in idr_for_each_entry() is the pointer we store in the idr, not the idr element itself. Fixes: d28d3d9159 ("include: linux/idr.h: implement more Linux API") Signed-off-by: Sascha Hauer --- drivers/firmware/arm_scmi/driver.c | 5 ++--- 1 file changed, 2 insertions(+), 3

Re: RK3568 fail with 2023.11.0

2023-12-01 Thread Sascha Hauer
On Thu, Nov 30, 2023 at 05:28:44PM +0300, Alexander Shiyan wrote: > Hello All. > > The latest version of the barebox does not work on a RK3568 with 4G memory. > With a similar board with 2G memory, everything works fine. > ... > NOTICE: BL31: v2.3():v2.3-607-gbf602aff1:cl > NOTICE: BL31: Built

[PATCH 3/3] ARM: Rockchip: dmc: print memory sizes in hex

2023-12-01 Thread Sascha Hauer
Large decimal numbers are not readable and useful, print memory sizes in hexadecimal instead. Signed-off-by: Sascha Hauer --- arch/arm/mach-rockchip/dmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/dmc.c b/arch/arm/mach-rockchip/dmc.c index

[PATCH 1/3] ARM64: mmu: Fix alloc_pte() address calculation

2023-12-01 Thread Sascha Hauer
this by explicitly casting to void *. Signed-off-by: Sascha Hauer --- arch/arm/cpu/mmu_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/mmu_64.c b/arch/arm/cpu/mmu_64.c index 716e717c72..d62527809e 100644 --- a/arch/arm/cpu/mmu_64.c +++ b/arch/arm/cpu/mmu_64.c

[PATCH 2/3] ARM64: mmu: panic when out of PTEs

2023-12-01 Thread Sascha Hauer
When running out of PTEs panic with an appropriate message instead of continuing with NULL pointers. Signed-off-by: Sascha Hauer --- arch/arm/cpu/mmu_64.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/cpu/mmu_64.c b/arch/arm/cpu/mmu_64.c index d62527809e..12c4dc90b3 100644

Re: [PATCH 0/8] optee: add bidirectional communication support

2023-12-01 Thread Sascha Hauer
On Mon, Nov 27, 2023 at 07:35:51AM +0100, Ahmad Fatoum wrote: > So far, barebox interaction by OP-TEE was limited to loading it and > maybe passing along its device tree fixup. In some scenarios, there > is a lot more that could need to be done however: > > - Access to eMMC RPMB memory > -

Re: [PATCH v2 13/20] include: linux/idr.h: implement more Linux API

2023-11-30 Thread Sascha Hauer
On Wed, Nov 22, 2023 at 06:29:44PM +0100, Ahmad Fatoum wrote: > Upcoming sync of SCMI with the kernel will start using IDR API, which we > lack in barebox, so let's retrofit it. > > Signed-off-by: Ahmad Fatoum > --- > v1 -> v2: > - factor out longer IDR functions into separate source file >

Re: [PATCH 3/8] deep-probe: skip on-demand platform dev creation for nodes without compatible

2023-11-29 Thread Sascha Hauer
On Mon, Nov 27, 2023 at 07:35:54AM +0100, Ahmad Fatoum wrote: > of_device_create_on_demand won't create a new device if the device tree > node already has a device associated. What it will do however, is to > create devices for all parent nodes in the device tree if they don't > already exist.

v2023.11.0

2023-11-27 Thread Sascha Hauer
8MQ device lockdown i.MX: HABv4: extend support to i.MX8M SoCs i.MX: HABv4: retrieve HAB ROM version for i.MX8M ARM: i.MX: allow HAB for i.MX8M family ARM: i.MX: introduce build_imx8m_habv4img ARM: i.MX: convert i.MX8M to helper ARM: boards: i.MX8M: add HAB image suppo

[PATCH] ARM: layerscape: ppa: Enable MMU when in EL2

2023-11-26 Thread Sascha Hauer
We enter EL2 with MMU disabled even when it was enabled in EL3. Enable MMU in EL2 again. Signed-off-by: Sascha Hauer --- arch/arm/mach-layerscape/ppa.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-layerscape/ppa.c b/arch/arm/mach-layerscape/ppa.c index 43145a7ece

Re: [PATCH 0/2] virtio: ring: fix erroneous behavior on MIPS

2023-11-26 Thread Sascha Hauer
On Fri, Nov 24, 2023 at 09:01:28AM +0300, Antony Pavlov wrote: > Antony Pavlov (2): > virtio: ring: fix erroneous behavior on MIPS > MIPS: qemu-malta*_defconfig: enable virtio network driver Applied, thanks Sascha > > arch/mips/configs/qemu-malta64el_defconfig | 1 + >

Re: [PATCH 1/2] mci: core: check for both 3.3v and 1.8v DDR support

2023-11-23 Thread Sascha Hauer
On Thu, Nov 23, 2023 at 11:38:07AM +0100, Ahmad Fatoum wrote: > We don't yet support the higher speed modes that require voltage > switching, so regulator interaction in barebox was so far limited to > enabling the supply. barebox also doesn't keep track what voltage the > eMMC is running on, so

Re: [PATCH] drivers: pxa: don't define clk_enable/clk_disable with different prototype

2023-11-23 Thread Sascha Hauer
On Thu, Nov 23, 2023 at 09:14:27AM +0100, Ahmad Fatoum wrote: > Even on platforms without CCF support, clk_enable and clk_disable are > defined as stubs. Defining functions with the same name can thus clash > with these definitions, e.g. if is included from a new > header. Fix this by renaming

Re: [PATCH v2 00/20] prepare for porting OP-TEE communication support

2023-11-23 Thread Sascha Hauer
On Wed, Nov 22, 2023 at 06:29:31PM +0100, Ahmad Fatoum wrote: > So far, barebox support for OP-TEE was restricted to loading it either > early in PBL or via bootm and to not step over it when allocating > memory. This was guarded behind CONFIG_HAVE_OPTEE. > > To prepare porting the Linux driver

Re: [PATCH] clk: document struct clk_ops

2023-11-22 Thread Sascha Hauer
On Wed, Nov 22, 2023 at 07:15:35PM +0100, Ahmad Fatoum wrote: > We already import the API from Linux, so let's import the documentation > for reference as well and add a note about clk_unprepare/clk_prepare. > > Signed-off-by: Ahmad Fatoum > --- > include/linux/clk.h | 65

Re: [PATCH] ARM: stm32mp: stm32mp15x-ev1: enable deep probe

2023-11-22 Thread Sascha Hauer
On Wed, Nov 22, 2023 at 07:13:19PM +0100, Ahmad Fatoum wrote: > The board boots fine with deep probe enabled, so enable it to eliminate > probe deferrals. > > Signed-off-by: Ahmad Fatoum > --- > arch/arm/boards/stm32mp15x-ev1/board.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [PATCH 0/7] ARM: stm32mp: random STM32MP13 fixes

2023-11-22 Thread Sascha Hauer
On Wed, Nov 22, 2023 at 07:11:09PM +0100, Ahmad Fatoum wrote: > STM32MP135-DK board support has been broken by a device tree sync with > the kernel as the kernel now uses SCMI to communicate with OP-TEE for > controlling some clocks, resets, regulators and OTP. > > A series for that is incoming

Re: [PATCH] of: reserved-mem: add debug print for reservations

2023-11-22 Thread Sascha Hauer
On Wed, Nov 22, 2023 at 06:31:18PM +0100, Ahmad Fatoum wrote: > reserve_sdram_region can now involve cache maintenance, so add a debug > print beforehand to aid debugging. > > Signed-off-by: Ahmad Fatoum > --- > drivers/of/reserved-mem.c | 4 > 1 file changed, 4 insertions(+) Applied,

Re: [PATCH v2 1/2] console: provide best-effort clk_get_for_console helper

2023-11-22 Thread Sascha Hauer
On Wed, Nov 22, 2023 at 06:13:19PM +0100, Ahmad Fatoum wrote: > From: Ahmad Fatoum > > clk_get will return -EPROBE_DEFER if clock provider hasn't yet been > probed. In a system with deep probe enabled, dependencies are probed > on demand, so a -EPROBE_DEFER return is final and the console probe

Re: [PATCH 1/2] sandbox: libc_malloc: populate barebox errno on error

2023-11-22 Thread Sascha Hauer
On Wed, Nov 22, 2023 at 06:00:06PM +0100, Ahmad Fatoum wrote: > TLSF already populates errno on errors, so do likewise for the > allocators that don't. > > Signed-off-by: Ahmad Fatoum > --- > arch/sandbox/os/libc_malloc.c | 28 > 1 file changed, 24 insertions(+), 4

Re: [PATCH] fixup! test: self: add JSON Web Token tests

2023-11-22 Thread Sascha Hauer
On Wed, Nov 22, 2023 at 04:54:43PM +0100, Ahmad Fatoum wrote: > test: self: jwt: use barebox_set_loglevel > > For CONFIG_CONSOLE_SIMPLE or CONFIG_CONSOLE_FULL, this is equivalent, > but for CONFIG_CONSOLE_NONE, this fixes a linker error as > barebox_loglevel isn't defined in that case. > >

Re: [PATCH v2] Documentation: dt-bindings: leds: document 'default-on' trigger

2023-11-22 Thread Sascha Hauer
On Wed, Nov 22, 2023 at 10:51:14AM +0100, Roland Hieber wrote: > The default-on trigger has been supported in barebox since commit > 767c6b4a814a2a000f3b (2014-02-28, Sascha Hauer: "led: Add default-on > trigger"). > > Signed-off-by: Roland Hieber > --- > PATCH

Re: [PATCH v3 0/2] Allow generating MAC addresses from machine ID

2023-11-22 Thread Sascha Hauer
On Wed, Nov 22, 2023 at 10:47:48AM +0100, Uwe Kleine-König wrote: > Hello, > > On Tue, Nov 21, 2023 at 09:33:58AM +0100, Sascha Hauer wrote: > > This series neither applies to master nor to next, please resend > > here is the rebased series. Applies to current next. There a

Re: [PATCH] commands: i2c_read: default to reading one byte

2023-11-22 Thread Sascha Hauer
On Wed, Nov 22, 2023 at 12:06:41PM +0100, Roland Hieber wrote: > The help text for i2c_read specifies that -c is optional: > > Usage: i2c_read [-bacrwv] > > However, using i2c_read without -c falls through in do_i2c_read(): > > if ((addr < 0) || (count < 1) || (addr > 0x7F)) >

[PATCH 3/3] mci: imx-esdhc: Layerscape: add eMMC DDR52 support

2023-11-22 Thread Sascha Hauer
The Layerscape variant of the imx-esdhc also supports eMMC DDR52, add support for this mode. Signed-off-by: Sascha Hauer --- drivers/mci/imx-esdhc.c | 41 - drivers/mci/imx-esdhc.h | 2 ++ 2 files changed, 38 insertions(+), 5 deletions(-) diff --git

[PATCH 2/3] mci: imx-esdhc: Layerscape: fix clock setup

2023-11-22 Thread Sascha Hauer
Set the PCS bit in the ESDHCCTL register. With this Peripheral/2 clock is used which is the clock we are actually calculating the dividers for. As the input clock is only half of the expected clock we have to account for this in set_sysctl(). Signed-off-by: Sascha Hauer --- drivers/mci/imx

[PATCH 1/3] mci: imx-esdhc: add layerscape flag

2023-11-22 Thread Sascha Hauer
ape SoCs, we would have to revisit this once we support LS1012. Signed-off-by: Sascha Hauer --- drivers/mci/imx-esdhc.c | 4 ++-- drivers/mci/imx-esdhc.h | 9 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c index f30a791

Re: [PATCH v2 0/2] Allow generating MAC addresses from machine ID

2023-11-21 Thread Sascha Hauer
populate_ethaddr as it's not about of any > more (Sascha) This series neither applies to master nor to next, please resend Sascha > > On Tue, Sep 12, 2023 at 12:49:03PM +0200, Sascha Hauer wrote: > > On Mon, Sep 11, 2023 at 05:59:27PM +0200, Ahmad Fatoum wrote: > > > @@ -

Re: [PATCH v2] ARM: arria10: xload: retry FPGA configuration

2023-11-21 Thread Sascha Hauer
On Wed, Nov 15, 2023 at 02:11:22PM +0100, Steffen Trumtrar wrote: > From: Bruno Knittel > > The Intel documentation states that the FPGA configuration might fail. > This has been observed on the Enclustra AA1+ board where up to 4 retries > where required to configure the FPGA. > > Debugging

Re: [PATCH RFC 2/3] libfile: implement read_fd counterpart to read_file

2023-11-20 Thread Sascha Hauer
On Mon, Nov 20, 2023 at 09:37:49AM +0100, Ahmad Fatoum wrote: > Files opened with O_TMPFILE have no name, so read_file can't be used > with them. Therefore add a read_fd function, which slurps all a file's > contents into a buffer. > > Signed-off-by: Ahmad Fatoum > --- > include/libfile.h | 2

Re: [PATCH master 1/4] console: define stub for console_get_first_active

2023-11-20 Thread Sascha Hauer
On Mon, Nov 20, 2023 at 08:21:19AM +0100, Ahmad Fatoum wrote: > console_get_first_active() is unconditionally called in startup.c to > check if the boot countdown can be skipped. The function is not defined > for CONFIG_CONSOLE_NONE however. Provide a stub in that case, so the > code can be

Re: [PATCH 2/2] ARM: layerscape: ppa: Fix starting PPA

2023-11-20 Thread Sascha Hauer
On Mon, Nov 20, 2023 at 03:54:40PM +0100, Ahmad Fatoum wrote: > Hello Sascha, > > On 20.11.23 15:44, Sascha Hauer wrote: > > With dba1c26f70 we replaced request_sdram_region() for the PPA with > > reserve_sdram_region(). The effect is that the region is marked as > &

[PATCH 2/2] ARM: layerscape: ppa: Fix starting PPA

2023-11-20 Thread Sascha Hauer
/executable to start the PPA, then map it uncached/non executable once we are in EL2. Fixes: dba1c26f70 ("arm: layerscape: ppa: reserve SDRAM region for PPA") Signed-off-by: Sascha Hauer --- arch/arm/mach-layerscape/ppa.c | 18 +- 1 file changed, 9 insertions(+), 9 deletion

[PATCH 1/2] ARM: mmu64: setup ttb for EL2 as well

2023-11-20 Thread Sascha Hauer
setup when the PPA returns. Signed-off-by: Sascha Hauer --- arch/arm/cpu/mmu_64.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/cpu/mmu_64.c b/arch/arm/cpu/mmu_64.c index b718cb1efa..716e717c72 100644 --- a/arch/arm/cpu/mmu_64.c +++ b/arch/arm/cpu/mmu_64.c @@ -297,6 +297,8

[PATCH] debug_ll ns16550: Add base address argument to register functions

2023-11-20 Thread Sascha Hauer
Add base address argument to debug_ll_ns16550_init() and debug_ll_ns16550_putc(). With this we can use the ns16550 debug_ll functions not only for debug_ll, but also for general use with pbl_set_putc(). Signed-off-by: Sascha Hauer --- include/debug_ll/ns16550.h | 26

[PATCH] ARM: ls1046a: use compressed dtbs

2023-11-20 Thread Sascha Hauer
It's getting tight in the initial 64k SRAM space. Use compressed dtbs to get some more free space. Signed-off-by: Sascha Hauer --- arch/arm/Kconfig | 1 + arch/arm/boards/ls1046ardb/lowlevel.c | 4 ++-- arch/arm/boards/tqmls1046a/lowlevel.c | 4 ++-- 3 files changed, 5

Re: Device tree probe order

2023-11-15 Thread Sascha Hauer
Hi Renauld, On Wed, Nov 15, 2023 at 04:47:03PM +, Renaud Barbier wrote: > We have a board based on the LS1026A with a boot SPI NOR on the QSPI > controller and FRAM on the DSPI controller. Currently, the DSPI is > being probed first and got the device node /dev/m25p0. The boot SPI > get

Re: LS1046A PPA firmware

2023-11-15 Thread Sascha Hauer
Hi Renauld, On Wed, Nov 15, 2023 at 04:50:54PM +, Renaud Barbier wrote: > For your information, the ppa firmware loaded for the LS1046A by > Barebox does not work for the LS1026A. The build from SDK PPA > Firmware: Version LSDK-18.06 is needed to work with the dual core. Good to know,

Re: [PATCH] uncompress: simplify prototype of uncompress()

2023-11-15 Thread Sascha Hauer
On Mon, Nov 13, 2023 at 08:00:35PM +0100, Uwe Kleine-König wrote: > All callers apart from lib/uncompress.c itself only use memory-to-memory > decompression. Simplify the calls accordingly. > > Note that two of three callers passed error_fn=NULL. As the uncompress > function calls error_fn()

Re: [PATCH] ARM: i.MX8M: bootrom: fix load image size

2023-11-15 Thread Sascha Hauer
On Mon, Nov 13, 2023 at 10:04:38AM +0100, Marco Felsch wrote: > Without the proper aligned image size we may encounter host load errors > like: > > | found i.MX8MP USB device [1fc9:0146] > | No dcd table in this ivt > | dl_command err=-1, last_trans=-1 > | 4 in err=-4, last_trans=0 00 00 00 00 >

Re: [PATCH] uncompress: simplify prototype of uncompress()

2023-11-15 Thread Sascha Hauer
On Mon, Nov 13, 2023 at 08:00:35PM +0100, Uwe Kleine-König wrote: > All callers apart from lib/uncompress.c itself only use memory-to-memory > decompression. Simplify the calls accordingly. > > Note that two of three callers passed error_fn=NULL. As the uncompress > function calls error_fn()

Re: [PATCH 1/8] mci: correct ENH_ATTRIBUTE_EN_MASK bit mask

2023-11-15 Thread Sascha Hauer
On Tue, Nov 14, 2023 at 02:30:00PM +0100, Marco Felsch wrote: > From: LI Qingwu > > Extended CSD register PARTITIONING_SUPPORT ENH_ATTRIBUTE_EN is bit 1 > instead of 0 > > Signed-off-by: LI Qingwu > Signed-off-by: Marco Felsch > --- > include/mci.h | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH 1/2] console: provide best-effort clk_get_for_console helper

2023-11-14 Thread Sascha Hauer
On Tue, Nov 14, 2023 at 09:54:57AM +0100, Ahmad Fatoum wrote: > On 14.11.23 09:46, Sascha Hauer wrote: > > On Tue, Nov 14, 2023 at 09:33:47AM +0100, Ahmad Fatoum wrote: > >> On 14.11.23 09:23, Sascha Hauer wrote: > >>> On Mon, Nov 13, 2023 at 04:02:

Re: [PATCH] console: move ARCH_HAS_CTRLC into Kconfig

2023-11-14 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 01:43:26PM +0100, Ahmad Fatoum wrote: > We should do away altogether with , so prepare for doing > that in the future by moing the only content it has on sandbox into > Kconfig. > > Signed-off-by: Ahmad Fatoum > --- > Kconfig | 2 +- >

Re: [PATCH 1/2] console: provide best-effort clk_get_for_console helper

2023-11-14 Thread Sascha Hauer
On Tue, Nov 14, 2023 at 09:33:47AM +0100, Ahmad Fatoum wrote: > On 14.11.23 09:23, Sascha Hauer wrote: > > On Mon, Nov 13, 2023 at 04:02:56PM +0100, Ahmad Fatoum wrote: > >> On 13.11.23 14:03, Sascha Hauer wrote: > >>> On Thu, Nov 09, 2023 at 12:47:06PM +0100, A

Re: [PATCH 1/2] console: provide best-effort clk_get_for_console helper

2023-11-14 Thread Sascha Hauer
On Mon, Nov 13, 2023 at 04:02:56PM +0100, Ahmad Fatoum wrote: > On 13.11.23 14:03, Sascha Hauer wrote: > > On Thu, Nov 09, 2023 at 12:47:06PM +0100, Ahmad Fatoum wrote: > >> From: Ahmad Fatoum > >> > >> clk_get will return -EPROBE_DEFER if clock provider hasn

[PATCH] dlmalloc: hide out of bounds accesses from compiler

2023-11-14 Thread Sascha Hauer
to be necessary right now. Maybe it will in later gcc versions. Signed-off-by: Sascha Hauer --- common/dlmalloc.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 16ea3cafb6..d420e8bd9d 100644 --- a/common/dlmalloc.c +++ b/common

Re: [PATCH 1/2] console: provide best-effort clk_get_for_console helper

2023-11-13 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 12:47:06PM +0100, Ahmad Fatoum wrote: > From: Ahmad Fatoum > > clk_get will return -EPROBE_DEFER if clock provider hasn't yet been > probed. In a system with deep probe enabled, dependencies are probed > on demand, so a -EPROBE_DEFER return is final and the console probe

Re: [PATCH v2 1/3] glob: drop needless ifdeffery in {glob,fnmatch}.h

2023-11-13 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 01:25:49PM +0100, Ahmad Fatoum wrote: > The implementation of the glob and fnmatch functions is taken from glibc > and it shows in the amount of #ifdefs. We don't need that in barebox and > can even get the glob_t size down by dropping unused members, so let's > do that. >

Re: [PATCH 17/18] of: define of_devices_ensure_probed_by_compatible

2023-11-13 Thread Sascha Hauer
On Fri, Nov 10, 2023 at 10:44:20PM +0100, Ahmad Fatoum wrote: > We will need to ensure probe of OP-TEE from SCMI code in a follow-up > commit, so add a small helper to facilitate this. > > Signed-off-by: Ahmad Fatoum > --- > include/of.h | 10 ++ > 1 file changed, 10 insertions(+) > >

Re: [PATCH 05/18] asm-generic: split off typeconfused readl and friends

2023-11-13 Thread Sascha Hauer
On Fri, Nov 10, 2023 at 10:44:08PM +0100, Ahmad Fatoum wrote: > The MMIO accessors in barebox like readl have the error prone > peculiarity of accepting integer arguments to pointers automatically, > which makes it easy to confuse address and data. > > We will add an alternative less error-probe

Re: [PATCH 15/18] include: add blocking notifier aliases

2023-11-13 Thread Sascha Hauer
On Fri, Nov 10, 2023 at 10:44:18PM +0100, Ahmad Fatoum wrote: > All notifiers are blocking in barebox, but to avoid needless mechanical > fixups during porting, just provide the stubs in a new > header. While at it, also provide NOTIFY_DONE and > NOTIFY_DONE for use in the notifier callbacks.

Re: [PATCH 14/18] include: implement dev_warn_once and friends

2023-11-13 Thread Sascha Hauer
On Fri, Nov 10, 2023 at 10:44:17PM +0100, Ahmad Fatoum wrote: > We already have pr_once, so duplicate it for dev_warn and friends as > well. > > Signed-off-by: Ahmad Fatoum > --- > drivers/firmware/arm_scmi/driver.c | 4 ++-- > include/linux/printk.h | 29

Re: [PATCH 03/25] ARM: i.MX: Add i.MX93 trdc support

2023-11-13 Thread Sascha Hauer
On Mon, Nov 13, 2023 at 08:24:21AM +0100, Ahmad Fatoum wrote: > On 10.11.23 13:57, Sascha Hauer wrote: > > Signed-off-by: Sascha Hauer > > TRDC is presumably Tsomething Resource Domain Controller? > Would be nice to have a commit message spelling it out and describing > why

Re: [PATCH master] resource: align memory reservation to page boundaries

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 12:30:12PM +0100, Ahmad Fatoum wrote: > barebox remaps all reserved entries as uncached to avoid speculative > access into the described regions using remap_range. > > The ARM implementation requires buffers to be page aligned, which we > can't assume unconditionally. For

Re: [PATCH] x86: efi: add IMD data to the EFI binary

2023-11-10 Thread Sascha Hauer
On Fri, Nov 03, 2023 at 04:58:31PM +0100, Michael Olbrich wrote: > It it currently missing so the imd command and the bareboximd tool do > not work. > > Add the .barebox_imd section to the linker script and copy it to the EFI > binary. > > Signed-off-by: Michael Olbrich > --- >

Re: [PATCH] test: self: mmu: skip false positive test fail when no RAM at address 0

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 04:29:46PM +0100, Ahmad Fatoum wrote: > Testing zero_page_access only makes sense if we actually have RAM at > address 0 that we may read from. If it happens to I/O memory, the SoC > may hang or a data abort may be raised, which would make the test fail. > > Avoid this by

Re: [PATCH] test: self: malloc: hide allocation size from compiler

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 02:38:12PM +0100, Ahmad Fatoum wrote: > Once we start annotating malloc with __attribute((alloc_size)), GCC will > detect that we intentionally buffers that are too big. > > Avoid the warning by hiding the size using the RELOC_HIDE macro. > > Signed-off-by: Ahmad Fatoum

Re: [PATCH] ARM: stm32mp: fix typo in STM32MP135-DK prompt

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 02:02:53PM +0100, Ahmad Fatoum wrote: > The board is called STM32MP135 and there is currently no STM32MP137. > The typo was likely caused by copy-pasting from the STM32MP15x, which > has STM32MP157. > > Signed-off-by: Ahmad Fatoum > --- > arch/arm/mach-stm32mp/Kconfig |

Re: [PATCH] include: spinlock.h: mark DEFINE_SPINLOCK with __always_unused

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 01:29:45PM +0100, Ahmad Fatoum wrote: > The spinlock stubs don't actually do anything with the spinlock_t. > To avoid the compiler warning about it add an __always_unused annotation > to the spinlock. > > Signed-off-by: Ahmad Fatoum > --- > include/linux/spinlock.h | 2

Re: [PATCH master] scripts: setlocalversion: sync with Linux

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 12:38:35PM +0100, Ahmad Fatoum wrote: > We are using an older version of setlocalversion that sources the > config. This is wrong as there's no guarantee that it's ok to source the > config, e.g.: > > CONFIG_DEFAULT_ENVIRONMENT_PATH="$(objtree)/.ptxdist-defaultenv" > >

Re: [PATCH] include: pm_domain.h: make header self-contained

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 01:11:08PM +0100, Ahmad Fatoum wrote: > pm_domain.h so far included no headers and only worked, because it was > included in a "correct" order in other files. Fix this by including the > header it depends on. > > Signed-off-by: Ahmad Fatoum > --- > include/pm_domain.h |

Re: [PATCH master] phy: stm32-usbphyc: fix unbalanced phy exit

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 01:10:12PM +0100, Ahmad Fatoum wrote: > On the STM32MP1, shutting down barebox can result in a > > ERROR: phy1: phy exit failed --> -22 > > message printed to the console. This is because the regulator is disabled > more often than it was enabled, because

Re: [PATCH] barebox-wrapper: define stub for MODULE_VERSION

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 01:00:45PM +0100, Ahmad Fatoum wrote: > We already stub out a number of MODULE_* macros to save porters the > hassle of deleting them. Let's add MODULE_VERSION to the list as well. > > Signed-off-by: Ahmad Fatoum > --- > include/linux/barebox-wrapper.h | 1 + > 1 file

Re: [PATCH master] efi: acpi: fix printf format specifier mismatch

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 12:59:54PM +0100, Ahmad Fatoum wrote: > entry_count has type size_t and not long as the format string wrongly > suggested. > > Signed-off-by: Ahmad Fatoum > --- > drivers/bus/acpi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks Sascha > >

Re: [PATCH master] mfd: syscon: don't register clocked syscon if geting clock fails

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 12:55:22PM +0100, Ahmad Fatoum wrote: > When of_syscon_register is called with check_clk=true, it will attempt > to attach the clock. If that fails, the newly allocated syscon is freed, > but a dangling pointer remained in the syscon_list. > > Fix this by only registering

Re: [PATCH] usb: dwc2: use linux/spinlock.h for stubs

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 12:48:38PM +0100, Ahmad Fatoum wrote: > We already have dummy definitions for common spin lock operations, > so reuse them instead of defining them in the driver. > > Signed-off-by: Ahmad Fatoum > --- > drivers/usb/dwc2/gadget.c | 5 + > 1 file changed, 1

Re: [PATCH 1/2] KASan: test_kasan: hide buggy accesses from compiler

2023-11-10 Thread Sascha Hauer
On Thu, Nov 09, 2023 at 12:38:06PM +0100, Ahmad Fatoum wrote: > Once we add __alloc_size attributes to allocations, GCC will complain > about violation of memory safety in test_kasan.c. > > That memory violation is intended though as test_kasan is meant to > trigger kasan at runtime to verify

[PATCH 2/2] mfd: pca9450: Add init callback

2023-11-10 Thread Sascha Hauer
We currently do not have regulator support for the pca945x chips, so provide a init callback for board code to do the basic setup. Signed-off-by: Sascha Hauer --- drivers/mfd/pca9450.c | 21 + include/mfd/pca9450.h | 14 ++ 2 files changed, 35 insertions(+) diff

[PATCH 1/2] mfd: pca9450: Add support for pca9451a

2023-11-10 Thread Sascha Hauer
Add support for the pca9451a chip variant. This is not compatible with the other variants, but as we currently only provide a regmap this is fine. Signed-off-by: Sascha Hauer --- drivers/mfd/pca9450.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/pca9450.c b/drivers/mfd

<    5   6   7   8   9   10   11   12   13   14   >