Re: [PATCH 1/3] bootstd: Fix memleak on errors in bootmeth_setup_iter_order()

2025-02-07 Thread Sam Protsenko
On Tue, Jan 14, 2025 at 7:14 AM Simon Glass wrote: > > On Sat, 11 Jan 2025 at 20:42, Sam Protsenko > wrote: > > > > Free memory allocated for 'order' (array of bootmeths) on error paths in > > bootmeth_setup_iter_order() function. > > > > Fixes:

Re: [PATCH 1/3] bootstd: Fix memleak on errors in bootmeth_setup_iter_order()

2025-02-07 Thread Sam Protsenko
On Mon, Jan 13, 2025 at 1:37 AM Heinrich Schuchardt wrote: > > On 1/12/25 04:42, Sam Protsenko wrote: > > Free memory allocated for 'order' (array of bootmeths) on error paths in > > bootmeth_setup_iter_order() function. > > > > Fixes: c627cfc14c08 ("

[PATCH 6/7] board: samsung: e850-96: Report LDFW loading failures

2025-01-16 Thread Sam Protsenko
() in this case, as LDFW firmware is not mandatory for board operation and is only required for some features like TRNG. Signed-off-by: Sam Protsenko --- board/samsung/e850-96/e850-96.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/board/samsung/e850-96/e850-96.c b/

[PATCH 7/7] board: samsung: e850-96: Provide bootstd default env

2025-01-16 Thread Sam Protsenko
fault -f -a => env save => gpt write mmc 0 $partitions => reset [1] doc/develop/bootstd/overview.rst Signed-off-by: Sam Protsenko --- board/samsung/e850-96/e850-96.env | 37 +-- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/boa

[PATCH 3/7] configs: e850-96: Enable more EFI features

2025-01-16 Thread Sam Protsenko
[2] https://developer.arm.com/documentation/DUI1101/1-1/Test-SystemReady-IR Signed-off-by: Sam Protsenko --- configs/e850-96_defconfig | 8 1 file changed, 8 insertions(+) diff --git a/configs/e850-96_defconfig b/configs/e850-96_defconfig index d287018ec632..1cae252175be 100644 --- a/c

[PATCH 2/7] configs: e850-96: Enable U-Boot environment on eMMC

2025-01-16 Thread Sam Protsenko
Resetting to default environment => env save Saving Environment to MMC... Writing to redundant MMC(0)... OK Signed-off-by: Sam Protsenko --- configs/e850-96_defconfig | 9 + 1 file changed, 9 insertions(+) diff --git a/configs/e850-96_defconfig b/configs/e850-96_defconfig in

[PATCH 5/7] board: samsung: e850-96: Load LDFW from EFI partition

2025-01-16 Thread Sam Protsenko
ESP first, and if either the partition or the file doesn't exist -- fallback to reading it from 'ldfw' partition. This way backward compatibility can be kept, and Android partition tables without ESP partition can be handled too. Signed-off-by: Sam Protsenko --- board/samsung/e8

[PATCH 4/7] configs: e850-96: Enable Standard Boot

2025-01-16 Thread Sam Protsenko
ow scan -lb' -> efi_mgr -> GRUB -> Debian [1] doc/develop/bootstd/overview.rst Signed-off-by: Sam Protsenko --- configs/e850-96_defconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configs/e850-96_defconfig b/configs/e850-96_defconfig index 1cae252175be..

[PATCH 0/7] board: samsung: e850-96: Enable Standard Boot

2025-01-16 Thread Sam Protsenko
() even earlier" patch is needed to make EFI functional on E850-96, but this series does not depend on it and can be applied independently. [1] https://lists.denx.de/pipermail/u-boot/2025-January/577194.html Sam Protsenko (7): configs: e850-96: Enable options for updated env configs: e8

[PATCH 1/7] configs: e850-96: Enable options for updated env

2025-01-16 Thread Sam Protsenko
The E850-96 default environment is going to be updated soon, requiring next config options to be enabled: - CONFIG_DEFAULT_FDT_FILE: $fdtfile will use this value - CONFIG_PARTITION_TYPE_GUID: $partitions will rely on "type" feature Signed-off-by: Sam Protsenko --- configs/e850-96

[RFC PATCH 1/1] efi_loader: Call efi_init_early() even earlier

2025-01-12 Thread Sam Protsenko
rlier in "Pull-request efi-2025-01-rc4" [1]. There was also a related discussion in the "efi_loader: more tightly integrate UEFI disks to driver model" patch series [2]. [1] https://lore.kernel.org/u-boot/8910d434-2d77-425f-aa81-8eb803078...@gmx.de/ [2] https://lists.denx.de/

[PATCH 1/3] bootstd: Fix memleak on errors in bootmeth_setup_iter_order()

2025-01-11 Thread Sam Protsenko
Free memory allocated for 'order' (array of bootmeths) on error paths in bootmeth_setup_iter_order() function. Fixes: c627cfc14c08 ("bootstd: Allow scanning for global bootmeths separately") Fixes: 10d16faa436c ("bootstd: Detect empty bootmeth") Signed-off-by: Sam

[PATCH 3/3] bootstd: Fix incorrect struct name in bootmeth_setup_iter_order()

2025-01-11 Thread Sam Protsenko
td: Add the bootmeth uclass and helpers") Signed-off-by: Sam Protsenko --- boot/bootmeth-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/bootmeth-uclass.c b/boot/bootmeth-uclass.c index 049389403191..2496e8c1d8a8 100644 --- a/boot/bootmeth-uclass.c +++ b/boot/bo

[PATCH 2/3] bootstd: Probe bootmeth devices for bootmeths env var

2025-01-11 Thread Sam Protsenko
| bootmeth_setup_iter_order() bootflow_scan_first() do_bootflow_scan() Add an explicit device_probe() call in "we have an ordering" case to fix the issue. Fixes: c627cfc14c08 ("bootstd: Allow scanning for global bootmeths separately") Signed-

[PATCH 0/3] bootstd: Fix efi_mgr usage in bootmeths env var

2025-01-11 Thread Sam Protsenko
Defining the 'bootmeths' environment variable with efi_mgr causes NULL pointer dereference when running 'bootflow scan' on the E850-96 board. This patch series fixes that, and cleans up the surrounding code a little while at it. Sam Protsenko (3): bootstd: Fix

Re: [PATCH v1 0/8] Cleanup the LMB subsystem

2024-12-12 Thread Sam Protsenko
ard.c| 20 +++-- > boot/image-fdt.c | 15 ++-- > cmd/booti.c | 2 +- > cmd/bootz.c | 2 +- > cmd/load.c| 2 +- > fs/fs.c | 2 +- > include/lmb.h | 58 ++- >

Re: [PATCH v1 7/8] lmb: Remove lmb_alloc_base_flags()

2024-12-12 Thread Sam Protsenko
t; a bit easier to follow. > > Signed-off-by: Ilias Apalodimas > --- Reviewed-by: Sam Protsenko > boot/image-board.c | 18 +++--- > boot/image-fdt.c| 5 +++-- > include/lmb.h | 7 +++ > lib/efi_loader/efi_memory.c

Re: [PATCH v1 8/8] lmb: Rename _lmb_alloc_addr() to lmb_alloc_addr_flags()

2024-12-12 Thread Sam Protsenko
On Wed, Dec 11, 2024 at 4:55 AM Ilias Apalodimas wrote: > > lmb_alloc_addr_flags() is a wrapper for _lmb_alloc_addr() and it's the > only function using it. Rename _lmb_alloc_addr() to lmb_alloc_addr_flags() > and remove the wrapper. > > Signed-off-by: Ilias Apalodimas

Re: [PATCH v1 6/8] lmb: Remove lmb_alloc_addr_flags()

2024-12-12 Thread Sam Protsenko
phys_size_t size, > - uint flags); > +phys_addr_t lmb_alloc_addr(phys_addr_t base, phys_size_t size, uint flags); Can we keep u32 for flags everywhere, for consistency? With above nitpicks addressed, feel free to add: Reviewed-by: Sam Protsenko [snip]

Re: [PATCH v1 5/8] lmb: Remove lmb_add_region()

2024-12-12 Thread Sam Protsenko
ich Schuchardt > Signed-off-by: Ilias Apalodimas > --- Reviewed-by: Sam Protsenko > lib/lmb.c | 8 +--- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/lib/lmb.c b/lib/lmb.c > index da960e422ada..659581f13f20 100644 > --- a/lib/lmb.c > +++ b/

Re: [PATCH v1 4/8] lmb: Rename free_mem to available_mem

2024-12-12 Thread Sam Protsenko
me this field to better match its usage. > > Signed-off-by: Ilias Apalodimas > --- Reviewed-by: Sam Protsenko [snip]

Re: [PATCH v1 3/8] lmb: Remove lmb_reserve_flags()

2024-12-12 Thread Sam Protsenko
de a bit easier to follow. > > Signed-off-by: Ilias Apalodimas > Reviewed-by: Tom Rini > --- Reviewed-by: Sam Protsenko [snip]

Re: [PATCH v1 2/8] lmb: Move enum lmb_flags to a u32

2024-12-12 Thread Sam Protsenko
* %LMB_NONE: No special request * %LMB_NOMAP: Don't add to MMU configuration * %LMB_NOOVERWRITE: The memory region cannot be overwritten/re-reserved * %LMB_NONOTIFY: Do not notify other modules of changes to this memory region */ That's helpful if you want to keep Sphinx generated doc [

Re: [PATCH v1 0/8] Cleanup the LMB subsystem

2024-12-12 Thread Sam Protsenko
On Thu, Dec 12, 2024 at 3:30 PM Sam Protsenko wrote: > Hi Ilias, > > This series doesn't apply as is on current master (tried MBOX file > from lore). I'll still try to review it by merging conflicts locally, > but please double check it on your side, and re-submit in c

Re: [PATCH v1 0/8] Cleanup the LMB subsystem

2024-12-12 Thread Sam Protsenko
On Wed, Dec 11, 2024 at 4:55 AM Ilias Apalodimas wrote: > > Hi all, > > This is v1 of the rfc [0] > > The LMB subsystem was used opportunistically for a number of years. > A while back Sughosh merged it with the EFI subsystem in order to have a > common allocator and avoid subsystems overwriting m

Re: [PATCH v1 1/8] lmb: Remove lmb_align_down()

2024-12-12 Thread Sam Protsenko
On Wed, Dec 11, 2024 at 4:55 AM Ilias Apalodimas wrote: > > We already have a macro for this. Use it instead of adding yet another > variant for alignment. > > Signed-off-by: Ilias Apalodimas > --- Reviewed-by: Sam Protsenko > lib/lmb.c | 15 +-- > 1 fi

[PATCH v2 0/4] lmb: Improve style

2024-12-10 Thread Sam Protsenko
s split by actual functional change patches [1] and cleanup patches (this series) - Collected review tags [1] https://lists.denx.de/pipermail/u-boot/2024-December/574606.html Sam Protsenko (4): lmb: Fix flags data type in lmb_add_region_flags() lmb: Make const flag_str[] in lmb_print_re

[PATCH v2 3/4] lmb: Improve coding style

2024-12-10 Thread Sam Protsenko
Fix checkpatch warnings. No functional change. Signed-off-by: Sam Protsenko Acked-by: Ilias Apalodimas --- Changes in v2: - Added Acked-by tag from Ilias lib/lmb.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/lib/lmb.c b/lib/lmb.c index

[PATCH v2 4/4] lmb: Improve kernel-doc comments

2024-12-10 Thread Sam Protsenko
/codingstyle.rst Signed-off-by: Sam Protsenko Acked-by: Ilias Apalodimas --- Changes in v2: - Added Acked-by tag from Ilias - Provided the excerpt from U-Boot doc about comments for public API include/lmb.h | 125 ++ lib/lmb.c | 55

[PATCH v2 2/4] lmb: Make const flag_str[] in lmb_print_region_flags() more const

2024-12-10 Thread Sam Protsenko
flag_str[] is a pointer to const. Make it also a const pointer. Improve a style a bit while a it, to make this line fit 80 characters limit. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Ilias Apalodimas --- Changes in v2: - Added R-b tag from Ilias lib/lmb.c | 3 ++- 1

[PATCH v2 1/4] lmb: Fix flags data type in lmb_add_region_flags()

2024-12-10 Thread Sam Protsenko
it ed17a33fed29 ("lmb: make LMB memory map persistent and global"). Fix it by using the correct type to match struct lmb_region field. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Ilias Apalodimas Acked-by: Sughosh Ganu --- Changes in v2: - Added R-b tag from Ili

[PATCH v2 2/2] boot: fdt: Handle already reserved memory in boot_fdt_reserve_region()

2024-12-10 Thread Sam Protsenko
EXIST in lmb_add_region_flags() if region already added Handle -EEXIST error code as a normal (successful) case in lmb_reserve_flags() and don't print any messages. Fixes: 1d9aa4a283da ("lmb: Fix the allocation of overlapping memory areas with !LMB_NONE") Signed-off-by: Sam Protsenko

[PATCH v2 0/2] lmb: Fix reserving the same region multiple times

2024-12-10 Thread Sam Protsenko
ail/u-boot/2024-December/574123.html Sam Protsenko (2): lmb: Return -EEXIST in lmb_add_region_flags() if region already added boot: fdt: Handle already reserved memory in boot_fdt_reserve_region() boot/image-fdt.c | 2 +- lib/lmb.c| 26 +- test/lib/lmb.c |

[PATCH v2 1/2] lmb: Return -EEXIST in lmb_add_region_flags() if region already added

2024-12-10 Thread Sam Protsenko
ccount for the changed return value. No functional change is intended (by this patch itself). Fixes: 1d9aa4a283da ("lmb: Fix the allocation of overlapping memory areas with !LMB_NONE") Signed-off-by: Sam Protsenko --- Changes in v2: - Removed the check for exactly the same region,

Re: [REGRESSION] lmb: add and reserve memory above ram_top

2024-12-10 Thread Sam Protsenko
On Mon, Dec 9, 2024 at 5:43 AM Sughosh Ganu wrote: > > On Mon, 9 Dec 2024 at 12:12, Sughosh Ganu wrote: > > > > On Sun, 8 Dec 2024 at 06:49, Sam Protsenko > > wrote: > > > > > > On Thu, Dec 5, 2024 at 11:23 PM Sughosh Ganu > > > wrote: &

Re: [PATCH 2/6] lmb: Return -EEXIST in lmb_add_region_flags() if region already added

2024-12-10 Thread Sam Protsenko
On Mon, Dec 9, 2024 at 1:08 AM Sughosh Ganu wrote: > > On Sun, 8 Dec 2024 at 12:20, Ilias Apalodimas > wrote: > > > > Hi Sam, > > > > On Sun, 8 Dec 2024 at 02:21, Sam Protsenko > > wrote: > > > > > > An attempt to add the already ad

Re: [PATCH 2/6] lmb: Return -EEXIST in lmb_add_region_flags() if region already added

2024-12-10 Thread Sam Protsenko
On Sun, Dec 8, 2024 at 12:50 AM Ilias Apalodimas wrote: > > Hi Sam, > > On Sun, 8 Dec 2024 at 02:21, Sam Protsenko wrote: > > > > An attempt to add the already added LMB region (with exactly the same > > start address, size and flags) using lmb_add_region_flags() en

Re: [PATCH 5/6] lmb: Improve kernel-doc comments

2024-12-10 Thread Sam Protsenko
n and make it more clear. > But I don't really mind as long as we have a common policy > Agreed, that's the most important thing. It's easy to move things around when everything is clean and tidy in the first place. > On Sun, 8 Dec 2024 at 02:21, Sam Protsenko wrote: > >

Re: [REGRESSION] lmb: add and reserve memory above ram_top

2024-12-07 Thread Sam Protsenko
On Thu, Dec 5, 2024 at 11:23 PM Sughosh Ganu wrote: > [snip] > > ERROR: reserving fdt memory region failed (addr=bab0 > > size=550 flags=2) > > ERROR: reserving fdt memory region failed (addr=f000 > > size=20 flags=4) > > > > It looks like all mentioned error messages are

[PATCH 6/6] boot: fdt: Handle already reserved memory in boot_fdt_reserve_region()

2024-12-07 Thread Sam Protsenko
is: lmb: Return -EEXIST in lmb_add_region_flags() if region already added Handle -EEXIST error code as a normal (successful) case in lmb_reserve_flags() and don't print any messages. Fixes: 1d9aa4a283da ("lmb: Fix the allocation of overlapping memory areas with !LMB_NONE")

[PATCH 5/6] lmb: Improve kernel-doc comments

2024-12-07 Thread Sam Protsenko
cosmetic cleanups as well. No functional change. Signed-off-by: Sam Protsenko --- include/lmb.h | 125 ++ lib/lmb.c | 55 -- 2 files changed, 74 insertions(+), 106 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index

[PATCH 4/6] lmb: Improve coding style

2024-12-07 Thread Sam Protsenko
Fix checkpatch warnings. No functional change. Signed-off-by: Sam Protsenko --- lib/lmb.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/lmb.c b/lib/lmb.c index 1642ce48bbbd..8c1c9b0f67c8 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -57,7

[PATCH 3/6] lmb: Make const flag_str[] in lmb_print_region_flags() more const

2024-12-07 Thread Sam Protsenko
flag_str[] is a pointer to const. Make it also a const pointer. Improve a style a bit while a it, to make this line fit 80 characters limit. No functional change. Signed-off-by: Sam Protsenko --- lib/lmb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/lmb.c b/lib

[PATCH 2/6] lmb: Return -EEXIST in lmb_add_region_flags() if region already added

2024-12-07 Thread Sam Protsenko
emory areas with !LMB_NONE") Signed-off-by: Sam Protsenko --- lib/lmb.c | 18 ++ test/lib/lmb.c | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lib/lmb.c b/lib/lmb.c index 713f072f75ee..ce0dc49345fb 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -18

[PATCH 1/6] lmb: Fix flags data type in lmb_add_region_flags()

2024-12-07 Thread Sam Protsenko
gs for no-map properties") Signed-off-by: Sam Protsenko --- lib/lmb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lmb.c b/lib/lmb.c index b03237bc06cb..713f072f75ee 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -200,7 +200,7 @@ static long lmb_add_region_flags

[PATCH 0/6] lmb: Fix reserving the same region multiple times

2024-12-07 Thread Sam Protsenko
, while at it. Only [PATCH 6/6] introduces an actual functional change. Sam Protsenko (6): lmb: Fix flags data type in lmb_add_region_flags() lmb: Return -EEXIST in lmb_add_region_flags() if region already added lmb: Make const flag_str[] in lmb_print_region_flags() more const lmb: Improve coding s

[REGRESSION] lmb: add and reserve memory above ram_top

2024-12-05 Thread Sam Protsenko
Hi Sughosh, Commit eb052cbb896f ("lmb: add and reserve memory above ram_top") causes a regression on the E850-96 board. It looks like it could be not E850-96 specific though. During U-Boot boot (the most recent master branch, with this commit present), before U-Boot shell appears, I observe the ne

[PATCH] configs: e850-96: Disable PSCI reset

2024-11-18 Thread Sam Protsenko
PSCI reset is not implemented in Exynos850 EL3 firmware. Disable it to fix the reset in cases where it can be used, e.g. when running EFI selftest. Signed-off-by: Sam Protsenko --- configs/e850-96_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/e850-96_defconfig b

Re: [PATCH v2 1/2] armv8: Fix get_sctlr() return type

2024-11-12 Thread Sam Protsenko
On Mon, Nov 11, 2024 at 8:48 AM Ilias Apalodimas wrote: > > On Thu, 7 Nov 2024 at 04:58, Sam Protsenko wrote: > > > > SCTLR_EL2 is a 64-bit register [1]. Return its value as long (64 bit) > > instead of int (32 bit) in get_sctlr() to make sure it's not tr

Re: [PATCH v5 6/6] common: android_ab: fix slot suffix for abc block

2024-11-06 Thread Sam Protsenko
On Wed, Nov 6, 2024 at 4:02 AM Mattijs Korpershoek wrote: > > Hi Sam, > > On mar., nov. 05, 2024 at 18:58, Sam Protsenko > wrote: > > > On Tue, Nov 5, 2024 at 9:06 AM Mattijs Korpershoek > > wrote: > >> > >> Hi Sam, > >> > > >

[PATCH v2 2/2] armv8: cpu: Implement allow_unaligned()

2024-11-06 Thread Sam Protsenko
27;t implemented for ARMv8 CPUs, so data abort happened. Signed-off-by: Sam Protsenko --- Changes in v2: - None arch/arm/cpu/armv8/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/cpu/armv8/cpu.c b/arch/arm/cpu/armv8/cpu.c index d568efa427ab..82ecf02f4b03 100644 --- a/

[PATCH v2 1/2] armv8: Fix get_sctlr() return type

2024-11-06 Thread Sam Protsenko
quot;arm64: core support") Suggested-by: Heinrich Schuchardt Signed-off-by: Sam Protsenko --- Changes in v2: - None (this patch was introduced in v2) arch/arm/cpu/armv8/cache_v8.c | 2 +- arch/arm/include/asm/system.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] armv8: cpu: Implement allow_unaligned()

2024-11-05 Thread Sam Protsenko
On Fri, Nov 1, 2024 at 6:46 AM Heinrich Schuchardt wrote: > [snip] > > +void allow_unaligned(void) > > +{ > > + set_sctlr(get_sctlr() & ~CR_A); > > Looking at the ARM documentation SCTLR_EL2 is a 64bit register. > > https://developer.arm.com/documentation/ddi0595/2021-06/AArch64-Registers/SC

Re: [PATCH v5 6/6] common: android_ab: fix slot suffix for abc block

2024-11-05 Thread Sam Protsenko
On Tue, Nov 5, 2024 at 9:06 AM Mattijs Korpershoek wrote: > > Hi Sam, > Hey Mattijs, [snip] > >> @@ -328,7 +328,8 @@ int ab_select_slot(struct blk_desc *dev_desc, struct > >> disk_partition *part_info, > >> * or the device tree. > >> */ > >> me

Re: [PATCH v5 6/6] common: android_ab: fix slot suffix for abc block

2024-11-04 Thread Sam Protsenko
On Thu, Oct 17, 2024 at 9:12 AM Dmitry Rokosov wrote: > > To align with the official Android BCB (Bootloader Control Block) > specifications, it's important to note that the slot_suffix should start > with an underscore symbol. > > For a comprehensive understanding of the expected slot_suffix form

Re: [PATCH] clk: Propagate clk_set_rate() if CLK_SET_PARENT_RATE present

2024-11-04 Thread Sam Protsenko
Hi Tom, Sean, Can we please apply this patch? I don't really understand why it's been consistently ignored for so long, with no explanation even. eMMC on E850-96 still doesn't work properly, this patch is really needed. Thanks! On Tue, Aug 13, 2024 at 8:17 PM Sam Protsenko wro

[PATCH] armv8: cpu: Implement allow_unaligned()

2024-10-31 Thread Sam Protsenko
27;t implemented for ARMv8 CPUs, so data abort happened. Signed-off-by: Sam Protsenko --- arch/arm/cpu/armv8/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/cpu/armv8/cpu.c b/arch/arm/cpu/armv8/cpu.c index d568efa427ab..82ecf02f4b03 100644 --- a/arch/arm/cpu/a

[PATCH] arm: dts: e850-96: Remove TRNG node from appended dts

2024-10-30 Thread Sam Protsenko
27;rng' command in U-Boot shell. Signed-off-by: Sam Protsenko --- arch/arm/dts/exynos850-e850-96-u-boot.dtsi | 11 --- 1 file changed, 11 deletions(-) diff --git a/arch/arm/dts/exynos850-e850-96-u-boot.dtsi b/arch/arm/dts/exynos850-e850-96-u-boot.dtsi index 3aa5d8bb10d0..6d7148f7

Re: [PATCH] android_ab: Fix backup offset calculation

2024-08-27 Thread Sam Protsenko
On Wed, Aug 7, 2024 at 9:14 AM Joshua Watt wrote: > > The backup offset is in bytes, but was incorrectly be interpreted as > blocks, leading to it being written to the wrong location. Fix the > calculation and clarify that ANDROID_AB_BACKUP_OFFSET is in bytes and > must be a multiple of the block

Re: [PATCH v5 00/38] mmc: dw_mmc: Enable eMMC on E850-96 board

2024-08-20 Thread Sam Protsenko
On Tue, Aug 20, 2024 at 3:16 PM Tom Rini wrote: > > On Tue, Aug 20, 2024 at 02:48:59PM -0500, Sam Protsenko wrote: > > On Mon, Aug 19, 2024 at 8:45 PM Minkyu Kang wrote: > > > > > > Hi, > > > > > > 2024년 8월 14일 (수) 10:15, Sam Protsenko 님이 작성: &g

Re: [PATCH v5 00/38] mmc: dw_mmc: Enable eMMC on E850-96 board

2024-08-20 Thread Sam Protsenko
On Mon, Aug 19, 2024 at 8:45 PM Minkyu Kang wrote: > > Hi, > > 2024년 8월 14일 (수) 10:15, Sam Protsenko 님이 작성: >> >> Hi Minkyu, >> >> What do you think about this series? It's been pending for a while >> now, so may I ask you to take care of it? >

Re: [PATCH] clk: Propagate clk_set_rate() if CLK_SET_PARENT_RATE present

2024-08-13 Thread Sam Protsenko
Hi Sean, This series has been pending for 5 months now. If there are no objections, can you please apply it? Thanks! On Wed, Jul 31, 2024 at 3:05 PM Sam Protsenko wrote: > > On Thu, Jul 25, 2024 at 3:57 PM Sam Protsenko > wrote: > > > > [snip] > > > > >&g

Re: [PATCH v5 00/38] mmc: dw_mmc: Enable eMMC on E850-96 board

2024-08-13 Thread Sam Protsenko
Hi Minkyu, What do you think about this series? It's been pending for a while now, so may I ask you to take care of it? Thanks! On Wed, Aug 7, 2024 at 10:14 PM Sam Protsenko wrote: > > Bring 64-bit support to dw_mmc core and Exynos dw_mmc drivers, and > enable it on E850-96 board

[PATCH v5 38/38] doc: samsung: Mention enabled eMMC in E850-96 board doc

2024-08-07 Thread Sam Protsenko
eMMC is enabled on E850-96 board now. Mention that in the board documentation. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none) doc/board/samsung/e850-96.rst | 5 +++-- 1 file changed, 3 insertions(+), 2

[PATCH v5 35/38] mmc: exynos_dw_mmc: Improve coding style

2024-08-07 Thread Sam Protsenko
Fix most of checkpatch warnings and other obvious style issues. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none) arch/arm/mach-exynos/include/mach/dwmmc.h | 36

[PATCH v5 37/38] configs: e850-96: Enable MMC

2024-08-07 Thread Sam Protsenko
Enable MMC subsystem and DW MMC driver support to make eMMC functional. Also enable a couple of related commands so the user can make use of eMMC from U-Boot shell. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - Rebased on top of the most recent master Changes in

[PATCH v5 32/38] mmc: exynos_dw_mmc: Pull all init code into probe function

2024-08-07 Thread Sam Protsenko
There is no logical sense to split the initialization code between multiple functions. Pull both do_dwmci_init() and exynos_dwmci_core_init() into exynos_dwmmc_probe() to make the code more simple and obvious. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none

[PATCH v5 34/38] mmc: exynos_dw_mmc: Use dev->name as driver's displayed name

2024-08-07 Thread Sam Protsenko
Reduce U-Boot footprint by reusing dev->name as a driver's displayed name. This changes boot device name (and "mmc info" output) from "EXYNOS DWMMC" to something like "mmc@1210". Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4

[PATCH v5 36/38] arm: dts: exynos: Remove outdated DW MMC properties in all Exynos dts

2024-08-07 Thread Sam Protsenko
* div: the fixed CIU clock divider value was moved to the chip data in exynos_dw_mmc.c driver No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - Rebased on top of changed patch 14/38 Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none) ar

[PATCH v5 33/38] mmc: exynos_dw_mmc: Don't call dwmci_setup_cfg() after add_dwmci()

2024-08-07 Thread Sam Protsenko
37ee879e04 ("mmc: exynos_dw_mmc: support the Driver mode for Exynos") Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - Replaced CONFIG_IS_ENABLED() with #ifdef drivers/mmc/exynos_dw_mmc.c | 16 +--

[PATCH v5 31/38] mmc: exynos_dw_mmc: Add support for ARM64 Exynos chips

2024-08-07 Thread Sam Protsenko
(implemented in dw_mmc core driver) In terms of the driver implementation, the CIU clock is obtained via CCF framework (as opposed to ad-hoc clock driver implementation for ARM32 chips). Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none

[PATCH v5 29/38] mmc: exynos_dw_mmc: Read and use DDR timing when available

2024-08-07 Thread Sam Protsenko
DDR timing values should be defined in "samsung,dw-mshc-ddr-timing" dts property, and used when DDR MMC mode is selected. Read that value from dts and use it. If it's not available, use SDR timing values instead. This change is following upstream Linux kernel implementation. Sig

[PATCH v5 30/38] mmc: exynos_dw_mmc: Set requested freq in get_mmc_clk() callback

2024-08-07 Thread Sam Protsenko
ementation follows what's done in Linux kernel dw_mmc-exynos driver in .set_ios() callback for MMC_TIMING_MMC_DDR52 case. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none) drivers/mmc/exynos_dw_mmc

[PATCH v5 28/38] mmc: exynos_dw_mmc: Move quirks from struct dwmci_host to chip data

2024-08-07 Thread Sam Protsenko
host->quirks field is only used internally in exynos_dw_mmc.c driver. To avoid cluttering the scope of struct dwmci_host, move quirks field into Exynos driver's chip data, where it can be statically defined. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5:

[PATCH v5 27/38] mmc: exynos_dw_mmc: Read common clock-frequency property

2024-08-07 Thread Sam Protsenko
Instead of using non-standard "bus_hz" dts property, read common "clock-frequency" property used in upstream Linux kernel. It's safe to do so, as "clock-frequency" property was already added to corresponding nodes in all affected Exynos device tree files. No fun

[PATCH v5 26/38] mmc: exynos_dw_mmc: Read common bus-width property

2024-08-07 Thread Sam Protsenko
Instead of using non-standard "samsung,bus-width" dts property, read common "bus-width" property used in upstream Linux kernel. It's safe to do so, as "bus-width" property was already added to corresponding nodes in all affected Exynos device tree files. No fun

[PATCH v5 25/38] mmc: exynos_dw_mmc: Refactor fixed CIU clock divider

2024-08-07 Thread Sam Protsenko
r this change were taken from dw_mmc-exynos.c driver in Linux kernel. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none) drivers/mmc/ca_dw_mmc.c | 2 +- drivers/mmc/exynos_

[PATCH v5 24/38] mmc: exynos_dw_mmc: Abstract CLKSEL register

2024-08-07 Thread Sam Protsenko
CLKSEL register offset may vary between different Exynos chips, e.g. on ARM64 vs ARM32 chips. Provide a way to specify its offset value for each compatible instead of hard-coding its value in read/write calls. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none

[PATCH v5 23/38] mmc: exynos_dw_mmc: Read upstream SDR timing properties

2024-08-07 Thread Sam Protsenko
es instead of the old one. All affected dts files were already updated accordingly. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none) drivers/mmc/exynos_dw_mmc.c | 14 +++---

[PATCH v5 22/38] mmc: exynos_dw_mmc: Convert to use livetree API

2024-08-07 Thread Sam Protsenko
Update the driver to use livetree API instead of FDT one. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - Moved exynos_dwmmc_of_to_plat() under #ifdef CONFIG_DM_MMC stanza drivers/mmc

[PATCH v5 19/38] mmc: exynos_dw_mmc: Don't call pinmux functions on ARM64 chips

2024-08-07 Thread Sam Protsenko
ivers/mmc/exynos_dw_mmc.o: in function `do_dwmci_init': undefined reference to `exynos_pinmux_config' Fixes: a082a2dde061 ("EXYNOS5: DWMMC: Added FDT support for DWMMC") Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes i

[PATCH v5 21/38] mmc: exynos_dw_mmc: Use .of_to_plat for device tree parsing

2024-08-07 Thread Sam Protsenko
exynos_dwmci_get_config() is called from the probe function and used to read data from device tree. Make use of .of_to_plat driver callback instead, and convert exynos_dwmci_get_config() to match its signature. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none

[PATCH v5 20/38] mmc: exynos_dw_mmc: Obtain and use CIU clock via CCF API

2024-08-07 Thread Sam Protsenko
eneric signatures to abstract getting/setting the sclk rate. Then add CCF clock support to those functions for ARM64 platforms. Fixes: a082a2dde061 ("EXYNOS5: DWMMC: Added FDT support for DWMMC") Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes

[PATCH v5 18/38] mmc: exynos_dw_mmc: Fix getting private data in exynos_dwmci_board_init()

2024-08-07 Thread Sam Protsenko
rom exynos_dwmci_clksel() and using it for getting the private data in exynos_dwmci_board_init() Fixes: 3537ee879e04 ("mmc: exynos_dw_mmc: support the Driver mode for Exynos") Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none

[PATCH v5 17/38] mmc: exynos_dw_mmc: Fix obtaining the base address of controller

2024-08-07 Thread Sam Protsenko
inter-cast] host->ioaddr = (void *)base; Use livetree API instead (dev_read_addr_ptr()), which handles this correctly. Fixes: a082a2dde061 ("EXYNOS5: DWMMC: Added FDT support for DWMMC") Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3:

[PATCH v5 16/38] arm: exynos: Add header guard for dwmmc.h

2024-08-07 Thread Sam Protsenko
Add missing header guard to prevent possible build errors. Fixes: 77b55e8cfcee ("ARM: exynos: move SoC sources to mach-exynos") Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none) arch/arm/m

[PATCH v5 15/38] dt-bindings: exynos: Update bindings doc for DW MMC controller

2024-08-07 Thread Sam Protsenko
Update the bindings doc for Exynos DW MMC block to follow the upstream example and reflect the latest changes made in corresponding Linux kernel bindings. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none

[PATCH v5 14/38] arm: dts: exynos: Add upstream DW MMC properties to all Exynos dts

2024-08-07 Thread Sam Protsenko
s from FIFOTH register description in TRM): fifo-depth = ((fifoth_val >> 16) + 1) * 2 * bus-width: generic replacement for samsung,bus-width * clock-frequency: generic replacement for bus_hz * non-removable: generic replacement for samsung,removable = <0> No functional

[PATCH v5 13/38] mmc: dw_mmc: Improve coding style

2024-08-07 Thread Sam Protsenko
Fix most of checkpatch warnings and other obvious style issues. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v5: - (none) Changes in v4: - Rebased on top of the most recent master Changes in v3: - (none) Changes in v2: - Added R-b tag

[PATCH v5 12/38] mmc: dw_mmc: Fix kernel-doc comments in dwmmc.h

2024-08-07 Thread Sam Protsenko
Rework kernel-doc comments in dwmmc.h header so it's actually possible to generate a proper documentation from it usin scripts/kernel-doc script, with no errors. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: -

[PATCH v5 11/38] mmc: dw_mmc: Replace fifoth_val property with fifo-depth

2024-08-07 Thread Sam Protsenko
, and pulls common FIFOTH register value calculation into core dw_mmc driver where it belongs. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none) drivers/mmc/dw_mmc.c | 21

[PATCH v5 10/38] mmc: dw_mmc: Add support for 64-bit IDMAC

2024-08-07 Thread Sam Protsenko
stack during send_cmd routine. The insights for this implementation were taken from Linux kernel DW MMC driver. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - Replaced CONFIG_IS_ENABLED() with #ifdef drive

[PATCH v5 09/38] mmc: dw_mmc: Improve 32-bit IDMAC descriptor namings

2024-08-07 Thread Sam Protsenko
Prepare for adding 64-bit IDMAC descriptors by renaming current 32-bit descriptor and its fields accordingly. While at it, make use of virt_to_phys() to make it more obvious in which places the physical addresses have to be used. No functional change. Signed-off-by: Sam Protsenko --- Changes in

[PATCH v5 07/38] mmc: dw_mmc: Extract DMA transfer handling code into a separate routine

2024-08-07 Thread Sam Protsenko
Make dwmci_send_cmd() easier to read by moving the DMA transfer handling code into a dedicated function. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - Added

[PATCH v5 08/38] mmc: dw_mmc: Extract setting the DMA descriptor into a separate routine

2024-08-07 Thread Sam Protsenko
Make dwmci_prepare_data() function easier to read by extracting the preparation of IDMAC descriptor into a dedicated function. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v5: - (none) Changes in v4: - Rebased on top of the most recent

[PATCH v5 06/38] mmc: dw_mmc: Extract FIFO data transfer into a separate routine

2024-08-07 Thread Sam Protsenko
FIFO data transfer is implemented as quite a massive chunk of code. Extract it into a dedicated function to make dwmci_data_transfer() easier to read and reduce the indentation level of the code. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4

[PATCH v5 04/38] mmc: dw_mmc: Extract FIFO init into a separate routine

2024-08-07 Thread Sam Protsenko
Move FIFO threshold initialization into a separate function to make dwmci_init() more readable. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - Added R-b tag

[PATCH v5 05/38] mmc: dw_mmc: Extract divider update to a separate function

2024-08-07 Thread Sam Protsenko
_setup_bus(). No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - Moved CLKSRC after disabling the clock as recommended in TRM, to avoid possible glitch - Extracted div update into

[PATCH v5 03/38] mmc: dw_mmc: Extract waiting for data busy into a separate routine

2024-08-07 Thread Sam Protsenko
igned-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - Added R-b tag from Quentin drivers/mmc/dw_mmc.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --

[PATCH v5 02/38] mmc: dw_mmc: Move struct idmac to dw_mmc.c

2024-08-07 Thread Sam Protsenko
struct idmac is only used in dw_mmc.c, so move it there from dwmmc.h to avoid cluttering the interface in the header. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in

  1   2   3   4   5   6   7   8   9   10   >