Re: [PATCH 02/20] sunxi: remove CONFIG_MACPWR

2023-07-25 Thread Sam Edwards
Hi Andre, Series looks good so far! I'm trying to move my testing build over to it now; I will report back when I've been running on it for a little bit. On 7/21/23 07:45, Andre Przywara wrote: diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 7ac50c4ae8c..2db4a2d73ca 100644 --- a/

[PATCH v4 0/4] Allwinner R528/T113s PSCI

2023-10-11 Thread Sam Edwards
ULL" conditional into sunxi_cpu_set_power(). - Removed unnecessary H6 special-case, since H6 is actually ARM64. - Renamed SUNXI_CPUX_BASE to SUNXI_CPUCFG_BASE, to mirror expected changes in Andre's v2 of the R528 series (we decided against using a new name for this block). - Removed sunxi_cpuc

[PATCH v4 1/4] sunxi: psci: clean away preprocessor macros

2023-10-11 Thread Sam Edwards
ere are no functional changes here. Signed-off-by: Sam Edwards Reviewed-by: Andre Przywara --- arch/arm/cpu/armv7/sunxi/psci.c | 103 +--- 1 file changed, 43 insertions(+), 60 deletions(-) diff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/ps

[PATCH v4 3/4] sunxi: psci: stop modeling register layout with C structs

2023-10-11 Thread Sam Edwards
its associated header file existed only to support PSCI code, so also delete them altogether. Signed-off-by: Sam Edwards --- arch/arm/cpu/armv7/sunxi/psci.c | 57 arch/arm/include/asm/arch-sunxi/cpucfg.h | 67 2 files changed, 23 insertions

[PATCH v4 2/4] sunxi: psci: refactor register access to separate functions

2023-10-11 Thread Sam Edwards
same logic. Signed-off-by: Sam Edwards Reviewed-by: Andre Przywara --- arch/arm/cpu/armv7/sunxi/psci.c | 66 +++-- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c index 69fa3f3c2e..27c

[PATCH v4 4/4] sunxi: psci: implement PSCI on R528

2023-10-11 Thread Sam Edwards
This patch adds the necessary code to make nonsec booting and PSCI secondary core management functional on the R528/T113. Signed-off-by: Sam Edwards Tested-by: Maksim Kiselev Tested-by: Kevin Amadiva --- arch/arm/cpu/armv7/Kconfig | 3 ++- arch/arm/cpu/armv7/sunxi/psci.c | 47

Re: [PATCH] sunxi: psci: remove redundant initialization from psci_arch_init

2023-08-25 Thread Sam Edwards
On 8/25/23 00:20, Chen-Yu Tsai wrote: Hi Chen-Yu, IIRC the GIC manual says that the secure bit is set or cleared to select which bank of registers is accessed. Which secure bit are we talking about here? Do we mean the *configured* secure bit (SCR.NS, what the code is attempting to clear) or

Re: [PATCH] sunxi: psci: remove redundant initialization from psci_arch_init

2023-08-28 Thread Sam Edwards
On 8/26/23 04:22, Marc Zyngier wrote: Hi Marc! The GIC definitely has the NS bit routed to it. Otherwise, the secure configuration would just be an utter joke. Just try it. Thank you for your response. I'd like to revisit my prior point about the distinction between the NS bit and AxPROT[1]

Re: [RFC PATCH 0/4] mtd: ubi: Enable accessing RO filesystems in UBI vols

2023-09-07 Thread Sam Edwards
Hi Heiko and Simon, Thought I'd follow-up to keep this discussion going. The main thing I would like to decide first (as it lets me start relying on it in boot scripts) would be the UBI access syntax: => ls ubi 0:rootfs /boot => ls ubi 0:2 /boot Do those look good? Should I be trying to mimi

Re: [PATCH v2 5/5] HACK: sunxi: psci: be compatible with v1 of R528 patchset

2023-09-27 Thread Sam Edwards
On 9/27/23 10:32, Andre Przywara wrote: On Wed, 16 Aug 2023 10:34:20 -0700 Sam Edwards wrote: Hi Sam, Hi Andre, Mmh, I didn't find a better solution than keeping this in. I'll keep it if your R528 v2 doesn't find some other way to address it. +#endif +#if defined(

Re: [PATCH v2 1/5] sunxi: psci: clean away preprocessor macros

2023-09-27 Thread Sam Edwards
On 9/27/23 10:34, Andre Przywara wrote: In the majority of cases, there are no changes to the text section introduced by this patch. In the R40 case, there's a small change where the compiler adds a NULL check onto the result of the `(void *)cpucfg + SUN8I_R40_PWR_CLAMP(cpu)` computation, which w

Re: [PATCH v2 4/5] sunxi: psci: implement PSCI on R528

2023-09-27 Thread Sam Edwards
On 9/27/23 10:31, Andre Przywara wrote: On Wed, 16 Aug 2023 10:34:19 -0700 Sam Edwards wrote: Hi Sam, Hi Andre, @@ -103,10 +116,13 @@ static void __secure clamp_set(u32 *clamp) static void __secure sunxi_cpu_set_entry(int __always_unused cpu, void *entry) { - /* secondary

[PATCH v3 0/4] Allwinner R528/T113s PSCI

2023-09-30 Thread Sam Edwards
6 is actually ARM64. - Renamed SUNXI_CPUX_BASE to SUNXI_CPUCFG_BASE, to mirror expected changes in Andre's v2 of the R528 series (we decided against using a new name for this block). - Removed sunxi_cpucfg_reg struct, and stopped using the PRCM struct in psci.c. Happy Saturday all, Sam

[PATCH v3 1/4] sunxi: psci: clean away preprocessor macros

2023-09-30 Thread Sam Edwards
ere are no functional changes here. Signed-off-by: Sam Edwards Reviewed-by: Andre Przywara --- arch/arm/cpu/armv7/sunxi/psci.c | 103 +--- 1 file changed, 43 insertions(+), 60 deletions(-) diff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/ps

[PATCH v3 2/4] sunxi: psci: refactor register access to separate functions

2023-09-30 Thread Sam Edwards
same logic. Signed-off-by: Sam Edwards Reviewed-by: Andre Przywara --- arch/arm/cpu/armv7/sunxi/psci.c | 66 +++-- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c index 69fa3f3c2e..27c

[PATCH v3 3/4] sunxi: psci: stop modeling register layout with C structs

2023-09-30 Thread Sam Edwards
its associated header file existed only to support PSCI code, so also delete them altogether. Signed-off-by: Sam Edwards --- arch/arm/cpu/armv7/sunxi/psci.c | 57 arch/arm/include/asm/arch-sunxi/cpucfg.h | 67 2 files changed, 23 insertions

[PATCH v3 4/4] sunxi: psci: implement PSCI on R528

2023-09-30 Thread Sam Edwards
This patch adds the necessary code to make nonsec booting and PSCI secondary core management functional on the R528/T113. Signed-off-by: Sam Edwards Tested-by: Maksim Kiselev Tested-by: Kevin Amadiva --- arch/arm/cpu/armv7/sunxi/psci.c | 47 - arch/arm/mach

[RFC PATCH v2 0/4] mtd: ubi: Enable accessing RO filesystems in UBI vols

2023-10-05 Thread Sam Edwards
arse UBI index/volume numbers with `dectoul` instead of `hextoul`, to match Linux's behavior of treating these numbers as decimal. - Do not treat a valid decimal number as a volume name, even if the volume ID doesn't exist, to match Linux's behavior of always treating decimal number

[RFC PATCH v2 2/4] mtd: ubi: bind block device driver for static volumes

2023-10-05 Thread Sam Edwards
This makes static UBI volumes readable as block devices, however no mechanism for selecting these volume devices yet exists. Signed-off-by: Sam Edwards --- drivers/mtd/ubi/ubi-uclass.c | 111 +++ 1 file changed, 111 insertions(+) diff --git a/drivers/mtd/ubi/ubi

[RFC PATCH v2 1/4] mtd: ubi: register UBI attachments as DM devices

2023-10-05 Thread Sam Edwards
nt for the BLK devices that represent the static volumes. Signed-off-by: Sam Edwards --- cmd/ubi.c| 11 ++ drivers/mtd/ubi/Makefile | 1 + drivers/mtd/ubi/ubi-uclass.c | 74 include/dm/uclass-id.h | 1 + include/ubi_uboot.h

[RFC PATCH v2 3/4] disk: part: fall-through if "ubi" requested but ubifs not mounted

2023-10-05 Thread Sam Edwards
s a plain "Bad device specification" and does not suggest using ubifsmount. Signed-off-by: Sam Edwards --- disk/part.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/disk/part.c b/disk/part.c index 72241b7b23..a4b6d265da 100644 --- a/

[RFC PATCH v2 4/4] HACK: enable access to `ubi 0:volname` block devices

2023-10-05 Thread Sam Edwards
--- disk/part.c | 55 + 1 file changed, 55 insertions(+) diff --git a/disk/part.c b/disk/part.c index a4b6d265da..7c995f583c 100644 --- a/disk/part.c +++ b/disk/part.c @@ -14,6 +14,9 @@ #include #include #include +#include +#include +#in

Re: [PATCH] ARM: psci: move GIC address override to Kconfig

2023-10-08 Thread Sam Edwards
e Przywara Reviewed-by: Sam Edwards Cheers, Sam

[PATCH] sunxi: Fix typo in include guard

2023-05-13 Thread Sam Edwards
Signed-off-by: Sam Edwards --- arch/arm/include/asm/arch-sunxi/pmic_bus.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-sunxi/pmic_bus.h b/arch/arm/include/asm/arch-sunxi/pmic_bus.h index 3ccfe138f3..5ab9b2809f 100644 --- a/arch/arm/include/asm

[PATCH] arm: set alignment properly for asm funcs

2023-05-13 Thread Sam Edwards
: Clang's and other gaslike assemblers lack this implicit alignment. Whether or not this is considered a bug in those assemblers, it is better to ask directly for what we want. [1]: https://sourceware.org/bugzilla/show_bug.cgi?id=12931 Signed-off-by: Sam Edwards --- arch/arm/include/asm/link

[PATCH 1/3] makefile: Fix symbol typo in binary_size_check

2023-05-13 Thread Sam Edwards
The start-of-image marker symbol is `__image_copy_start`; by searching for `_image_copy_start` instead, this check can accidentally match `_image_copy_start_ofs`. Signed-off-by: Sam Edwards --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile

[PATCH 2/3] makefile: Consider "no relocs" to be "no unexpected relocs"

2023-05-13 Thread Sam Edwards
Signed-off-by: Sam Edwards --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 22bdc30109..20785860f7 100644 --- a/Makefile +++ b/Makefile @@ -2109,7 +2109,8 @@ System.map: u-boot checkarmreloc: u-boot @RELOC

[PATCH 3/3] clang: Link with --no-pie instead of --apply-dynamic-relocs

2023-05-13 Thread Sam Edwards
card these. Since the build process does not appear to make use of the dynamic segment at all, it would be more sensible to suppress it entirely. Signed-off-by: Sam Edwards --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 20785860f7..

Re: [PATCH] sunxi: Fix typo in include guard

2023-05-16 Thread Sam Edwards
On 5/15/23 03:48, Andre Przywara wrote: Ahoy, Andre! > How did you find this? Just by accident? I was wondering if we could > check the tree automatically for those accidents. I found it both automatically and by accident. :) My cross-compiler of choice is Clang (as I don't have to rebuild/re

Re: [PATCH 3/3] clang: Link with --no-pie instead of --apply-dynamic-relocs

2023-05-16 Thread Sam Edwards
On 5/14/23 09:28, Tom Rini wrote: Hi Tom! How extensively have you tested this change? I tested it in building for the arm/sunxi target. U-Boot does not build at all (on Clang+LLD) in its current state: ld.lld: error: section type mismatch for .gnu.version_r >>> :(.gnu.version_r): SHT_GNU_

Re: [RFC PATCH 08/17] sunxi: introduce NCAT2 generation model

2023-05-16 Thread Sam Edwards
Hi Andre! Thank you for your efforts on this patchset; I've been test-driving it a bit myself this week. On 12/5/22 17:45, Andre Przywara wrote: +#define SUNXI_RTC_BASE 0x0700 +#define SUNXI_R_CPUCFG_BASE0x07000400 +#define SUNXI_PRCM_BASE

Re: [RFC PATCH 13/17] sunxi: add early Allwinner R528/T113 SoC support

2023-05-16 Thread Sam Edwards
On 12/5/22 17:45, Andre Przywara wrote: diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index 3763ec3d2e4..1cda5e2 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -148,6 +148,10 @@ static int gpio_init(void) sunxi_gpio_set_cfgpin(SU

Re: [RFC PATCH 08/17] sunxi: introduce NCAT2 generation model

2023-05-16 Thread Sam Edwards
On 5/16/23 15:08, Andre Przywara wrote: This whole memory map is somewhat of a legacy. Apart from a few addresses for the SPL needs we shouldn't have those defines at all. Some symbols are needed because there are other macros using them, although these then are eventually unused. I have some pat

[PATCH] mmc: fix improper use of memset

2023-05-19 Thread Sam Edwards
Buffers created through DEFINE_(CACHE_)ALIGN_BUFFER are actually pointers to the real underlying buffer. Using sizeof(...) is not appropriate in this case. Signed-off-by: Sam Edwards --- drivers/mmc/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/mmc.c b

[RFC PATCH 00/10] Improve ARM target's support for LLVM toolchain

2023-05-21 Thread Sam Edwards
ill=0xff, which is not supported in llvm-objcopy - llvm-objcopy also doesn't appear to speak S-Record; the u-boot.srec target has to be deleted manually - llvm-objcopy gets upset at some of the EFI code, since the EFI linker scripts preserve dynamic sections that llvm-objcopy doesn&

[RFC PATCH 01/10] makefile: Fix symbol typo in binary_size_check

2023-05-21 Thread Sam Edwards
The start-of-image marker symbol is `__image_copy_start`; by searching for `_image_copy_start` instead, this check can accidentally match `_image_copy_start_ofs`. Signed-off-by: Sam Edwards Reviewed-by: Tom Rini --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[RFC PATCH 02/10] arm: set alignment properly for asm funcs

2023-05-21 Thread Sam Edwards
: Clang's and other gaslike assemblers lack this implicit alignment. Whether or not this is considered a bug in those assemblers, it is better to ask directly for what we want. [1]: https://sourceware.org/bugzilla/show_bug.cgi?id=12931 Signed-off-by: Sam Edwards --- arch/arm/include/asm/link

[RFC PATCH 03/10] arm: exclude eabi_compat from LTO

2023-05-21 Thread Sam Edwards
These symbols need to survive the IR-level dead function elimination pass, since nothing at the IR level is referencing them (calls to these are inserted later, at codegen time). Signed-off-by: Sam Edwards --- arch/arm/lib/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm

[RFC PATCH 04/10] arm: add __aeabi_memclr in eabi_compat

2023-05-21 Thread Sam Edwards
This is sometimes used by LLVM's code generator. Signed-off-by: Sam Edwards --- arch/arm/lib/eabi_compat.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c index f7029918d4..059ca07265 100644 --- a/arch/arm/lib/eabi_compat.c

[RFC PATCH 05/10] arm: add aligned-memory aliases to eabi_compat

2023-05-21 Thread Sam Edwards
These are sometimes used by LLVM's code-generator, when it can guarantee that the memory buffer being passed is aligned on a (4- or 8-byte) boundary. They can safely be aliases to the unaligned versions. Signed-off-by: Sam Edwards --- arch/arm/lib/eabi_compat.c | 12 1

[RFC PATCH 06/10] arm: discard .gnu.version* sections

2023-05-21 Thread Sam Edwards
These are often a consequence of --pie, but they aren't actually used in the runtime relocation code. It is better to discard them than to aggregate them, because they tend to be of different types, and this upsets some linkers (e.g. LLD). Signed-off-by: Sam Edwards --- arch/arm/cpu/u-boo

[RFC PATCH 08/10] arm: efi_loader: move .dynamic out of .text in EFI

2023-05-21 Thread Sam Edwards
This is not proper: A .text section is SHT_PROGBITS, while the .dynamic section is SHT_DYNAMIC. Attempting to combine them like this creates a section type mismatch. It does seem that GNU ld does not complain, but LLVM's lld considers this an error. Signed-off-by: Sam Edwards Cc: Hei

[RFC PATCH 07/10] arm: efi_loader: discard hash, unwind information

2023-05-21 Thread Sam Edwards
LLD tends to put these at the very beginning of the file, only for the .text 0x0 directive to end up going backward and overlapping them, creating an error. Since they don't appear to be used at runtime, just discard them. Signed-off-by: Sam Edwards --- arch/arm/lib/elf_arm_efi.lds | 3 +

[RFC PATCH 09/10] arm: discard all .dyn* sections

2023-05-21 Thread Sam Edwards
27;s best to discard what we don't need. Signed-off-by: Sam Edwards --- arch/arm/cpu/u-boot.lds | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index 8cdf08a730..bd4650bd86 100644 --- a/arch/arm/cpu/u-boot

[RFC PATCH 10/10] arm: migrate away from sections.c

2023-05-21 Thread Sam Edwards
were marking meant the markers could end up with an unintended section inserted within that region. Signed-off-by: Sam Edwards Cc: Albert ARIBAUD --- arch/arm/cpu/armv8/spl_data.c| 4 +- arch/arm/cpu/armv8/u-boot-spl.lds| 26 +++ arch/arm/cpu/armv8/u-boo

Re: [RFC PATCH 00/10] Improve ARM target's support for LLVM toolchain

2023-05-21 Thread Sam Edwards
On 5/20/23 22:26, Heinrich Schuchardt wrote: Hello Sam, Hi Heinrich! Good to hear from you. I guess the documentation and the CI testing would also have to be adjusted. Ah, yeah, those are going to be big things for me to look at when this series starts to mature out of the RFC phase. CI i

Re: [RFC PATCH 10/17] clk: sunxi: Add support for the D1 CCU

2023-05-21 Thread Sam Edwards
On 12/5/22 17:45, Andre Przywara wrote: From: Samuel Holland Since the D1 CCU binding is defined, we can add support for its gates/resets, following the pattern of the existing drivers. Signed-off-by: Samuel Holland Reviewed-by: Andre Przywara Acked-by: Sean Anderson Hi Andre, So far so

Re: [RFC PATCH 08/10] arm: efi_loader: move .dynamic out of .text in EFI

2023-05-22 Thread Sam Edwards
On 5/22/23 02:10, Heinrich Schuchardt wrote: Hi Heinrich, .dynamic should be aligned. Structure Elf64_Dyn requires at least 8 byte alignment. As best as I can tell, linkers (certainly lld[1], apparently also GNU ld judging by its default linker scripts) themselves set the proper word alignm

Re: [RFC PATCH 07/10] arm: efi_loader: discard hash, unwind information

2023-05-22 Thread Sam Edwards
Hi Ilias, On 5/22/23 01:00, Ilias Apalodimas wrote: The reason we end up with both hash and gnu.hash is because the hash style is set to 'both'. Should we perhaps use (and strip) only one of them? If we do keep one, it should probably be .hash -- see commit b02bfc4dfc. I admit I'm completely

Re: [RFC PATCH 00/10] Improve ARM target's support for LLVM toolchain

2023-05-22 Thread Sam Edwards
Hi Ilias, On 5/22/23 00:52, Ilias Apalodimas wrote: I can help clean up the arm architecture even further. I was toying with the idea of having page-aligned sections and eventually map u-boot with proper permissions per section. Right now (at least for the majority of arm platforms) we are doi

Re: [RFC PATCH 00/10] Improve ARM target's support for LLVM toolchain

2023-05-22 Thread Sam Edwards
Hi Tom, On 5/22/23 09:30, Tom Rini wrote: I think objcopy is a bit of a stretch at this point and it's not clear from the above if you're also making use of the assembler. I agree, since getting llvm-objcopy to play nice with this currently requires that I make a handful of small hack edits t

Re: [PATCH] mmc: fix improper use of memset

2023-05-22 Thread Sam Edwards
Hi, Peng Fan! Thank you for your review. :) On 5/22/23 19:44, Peng Fan wrote: This looks correct to me. BTW: do you met any issues during test? I do not think I understand the question. Are you asking, "Did you send this patch because the current MMC driver was having problems on a real devi

Re: [PATCH] fs/erofs: Introduce new features including ztailpacking, fragments and dedupe

2023-07-25 Thread Sam Edwards
Hi folks, On 7/7/23 09:52, Yifan Zhao wrote: diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h index 4af7c91560..433a3c6c1e 100644 --- a/fs/erofs/internal.h +++ b/fs/erofs/internal.h +/* make sure that any user of the erofs headers has at least 64bit off_t type */ +extern int erofs_assert_

[PATCH] i2c: mvtwsi: reset controller if stuck in "bus error" state

2023-07-25 Thread Sam Edwards
is found to be held low, in an attempt to force the bus back to an idle state. This patch only resets the controller in case something else had previously upset it, and (in principle) results in no externally-observable change in behavior. Signed-off-by: Sam Edwards --- drive

Re: [PATCH] sunxi: remove CONFIG_SATAPWR

2023-07-26 Thread Sam Edwards
(ret) { debug("%s: Failed to probe (err=%d)\n", __func__, ret); Love these sorts of clean-ups. I don't have a sunxi with SATA so I can't test it, but I've been running my target on this patch in some form or another for several weeks, and the code looks good, so: Reviewed-by: Sam Edwards

Re: [PATCH] fs/erofs: Remove an unnecessary assertion

2023-07-26 Thread Sam Edwards
Thanks greatly for the speedy turnaround on this patch! On 7/25/23 22:56, Yifan Zhao wrote: Fixes: 3a21e92fc255 ("fs/erofs: Introduce new features including ztailpacking, fragments and dedupe") Signed-off-by: Yifan Zhao Tested-by: Sam Edwards

Re: [PATCH 15/20] sunxi: add R528/T113-s3/D1(s) DRAM initialisation code

2023-07-27 Thread Sam Edwards
I've had countless successful boots of a T113-s3 using this DRAM controller code, so: On 7/21/23 07:46, Andre Przywara wrote: Signed-off-by: Andre Przywara Tested-by: Sam Edwards

Re: [PATCH 01/20] net: sunxi_emac: chase DT nodes to find PHY regulator

2023-08-09 Thread Sam Edwards
er. Signed-off-by: Andre Przywara Reviewed-by: Sam Edwards Thanks, Sam

Re: [PATCH 02/20] sunxi: remove CONFIG_MACPWR

2023-08-09 Thread Sam Edwards
n drop the current code from board.c, which was doing that job before. This allows us to remove the MACPWR Kconfig definition and the respective values from the defconfigs. Signed-off-by: Andre Przywara Reviewed-by: Sam Edwards Thanks, Sam

Re: [PATCH 03/20] pinctrl: sunxi: add GPIO in/out wrappers

2023-08-09 Thread Sam Edwards
and we can abstract the new D1 pinctrl more easily. Signed-off-by: Andre Przywara Reviewed-by: Sam Edwards Tested-by: Sam Edwards Thanks, Sam

Re: [PATCH 07/20] pinctrl: sunxi: add new D1 pinctrl support

2023-08-09 Thread Sam Edwards
Reviewed-by: Sam Edwards Tested-by: Sam Edwards Thanks, Sam

Re: [PATCH 08/20] sunxi: introduce NCAT2 generation model

2023-08-09 Thread Sam Edwards
controller). This paves the way to introduce a first user of this generation. Signed-off-by: Andre Przywara Reviewed-by: Sam Edwards Tested-by: Sam Edwards Thanks, Sam

Re: [PATCH 19/20] ARM: dts: sunxi: add Allwinner T113-s SoC .dtsi

2023-08-09 Thread Sam Edwards
ide this in our generic sunxi-u-boot.dtsi, to let U-Boot pick up this watchdog, so that the generic reset driver will work. Signed-off-by: Andre Przywara Reviewed-by: Sam Edwards Tested-by: Sam Edwards diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi index af419c7e5

Re: [PATCH 09/20] pinctrl: sunxi: add Allwinner D1 pinctrl description

2023-08-09 Thread Sam Edwards
On 7/21/23 07:45, Andre Przywara wrote: diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index fc80fe50b14..c6115112688 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -748,6 +748,28 @@ static const struc

[RFC PATCH 0/4] mtd: ubi: Enable accessing RO filesystems in UBI vols

2023-08-11 Thread Sam Edwards
"ubi" sound, or should I be conceding that to UBIFS and using a new type name for static UBI volumes? 4) Does my choose_blksz_for_volume() function make sense, or should I always be using a preferred block size (like 512) if possible? Cheers, Sam Sam Edwards (4): mtd: ubi: registe

[RFC PATCH 1/4] mtd: ubi: register UBI attachments as DM devices

2023-08-11 Thread Sam Edwards
nt for the BLK devices that represent the static volumes. Signed-off-by: Sam Edwards --- cmd/ubi.c| 11 ++ drivers/mtd/ubi/Makefile | 1 + drivers/mtd/ubi/ubi-uclass.c | 74 include/dm/uclass-id.h | 1 + include/ubi_uboot.h

[RFC PATCH 2/4] mtd: ubi: bind block device driver for static volumes

2023-08-11 Thread Sam Edwards
This makes static UBI volumes readable as block devices, however no mechanism for selecting these volume devices yet exists. Signed-off-by: Sam Edwards --- drivers/mtd/ubi/ubi-uclass.c | 110 +++ 1 file changed, 110 insertions(+) diff --git a/drivers/mtd/ubi/ubi

[RFC PATCH 3/4] disk: part: fall-through if "ubi" requested but ubifs not mounted

2023-08-11 Thread Sam Edwards
s a plain "Bad device specification" and does not suggest using ubifsmount. Signed-off-by: Sam Edwards --- disk/part.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/disk/part.c b/disk/part.c index 0a03b8213d..1ad8277b65 100644 --- a/

[RFC PATCH 4/4] HACK: enable access to `ubi 0:volname` block devices

2023-08-11 Thread Sam Edwards
--- disk/part.c | 56 + 1 file changed, 56 insertions(+) diff --git a/disk/part.c b/disk/part.c index 1ad8277b65..85eb51429a 100644 --- a/disk/part.c +++ b/disk/part.c @@ -14,6 +14,9 @@ #include #include #include +#include +#include +#in

[PATCH 0/3] Allwinner R528/T113s PSCI

2023-08-11 Thread Sam Edwards
hanks, Sam Sam Edwards (3): sunxi: psci: clean away preprocessor macros sunxi: psci: refactor register access to separate functions sunxi: psci: implement PSCI on R528 arch/arm/cpu/armv7/sunxi/psci.c | 185 +--- arch/arm/mach-sunxi/Kconfig | 2 + include/co

[PATCH 1/3] sunxi: psci: clean away preprocessor macros

2023-08-11 Thread Sam Edwards
ere are no functional changes here. Signed-off-by: Sam Edwards --- arch/arm/cpu/armv7/sunxi/psci.c | 94 ++--- 1 file changed, 41 insertions(+), 53 deletions(-) diff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c index e1d3638b5c..7809b07

[PATCH 2/3] sunxi: psci: refactor register access to separate functions

2023-08-11 Thread Sam Edwards
same logic. Signed-off-by: Sam Edwards --- arch/arm/cpu/armv7/sunxi/psci.c | 66 +++-- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c index 7809b074f8..94120e7526 100644 --- a/arch

[PATCH 3/3] sunxi: psci: implement PSCI on R528

2023-08-11 Thread Sam Edwards
This patch adds the necessary code to make nonsec booting and PSCI secondary core management functional on the R528/T113. Signed-off-by: Sam Edwards Tested-by: Maksim Kiselev --- arch/arm/cpu/armv7/sunxi/psci.c | 47 - arch/arm/mach-sunxi/Kconfig | 2

Re: [PATCH 1/3] sunxi: psci: clean away preprocessor macros

2023-08-14 Thread Sam Edwards
Hi Andre, On 8/14/23 10:37, Andre Przywara wrote: So I think we can get rid of this: - GEN_H6 never compiles this code here, as both H6 and H616 are arm64. Easy! - We can define SUNXI_PRCM_BASE for NCAT2, I believe Samuel once mentioned that the D1/T113 does have such a block, actually. Wi

Re: [PATCH 0/3] Allwinner R528/T113s PSCI

2023-08-14 Thread Sam Edwards
On 8/14/23 08:06, Andre Przywara wrote: Hi Sam, many many thanks for sending this, I especially like your clean up around the #ifdef's! The patches looks good on the first glance (apart from some regression in patch 3/3), but I will reply to them individually. Cheers, Andre Thanks for your a

Re: [PATCH 1/3] sunxi: psci: clean away preprocessor macros

2023-08-14 Thread Sam Edwards
On 8/14/23 15:05, Andre Przywara wrote: Yes, I will add this to the header file, either defined as 0, or to its actual address. Gotcha; my v2 will also assume you've taken care of merging these guys: +#define SUNXI_CPUX_BASE0x0901 +#define SUNXI_CPUCFG_BASE

[PATCH] pci: pcie-brcmstb: bring over some robustness improvements from Linux

2023-08-14 Thread Sam Edwards
interrupt which will crash U-Boot. - Wait for the recommended 100ms after PERST# is deasserted. I sent this patch while debugging a crash involving PCIe, but these are unrelated improvements. I do not believe that this patch fixes any real-world bug. Signed-off-by: Sam Edwards --- drivers/pci

Re: [PATCH 3/3] sunxi: psci: implement PSCI on R528

2023-08-15 Thread Sam Edwards
On 8/14/23 08:16, Andre Przywara wrote: Hi Sam, This patch adds the necessary code to make nonsec booting and PSCI secondary core management functional on the R528/T113. Unfortunately this patch breaks the build on older 32-bit SoCs, as SUNXI_CPUX_BASE is not defined there. That's a typical p

Re: [PATCH 3/3] sunxi: psci: implement PSCI on R528

2023-08-15 Thread Sam Edwards
On 8/15/23 15:59, Andre Przywara wrote: Hi Sam, Hi Andre, So that's a bit more nasty indeed. I don't even know if R_CPUCFG really makes sense here, as the _R_ term typically refers to the management processor, which the D1/R528 don't have. Or at least the always-on power domain, but then agai

[PATCH v2 0/5] Allwinner R528/T113s PSCI

2023-08-16 Thread Sam Edwards
d using the PRCM struct in psci.c. Cheers, Sam Sam Edwards (5): sunxi: psci: clean away preprocessor macros sunxi: psci: refactor register access to separate functions sunxi: psci: stop modeling register layout with C structs sunxi: psci: implement PSCI on R528 HACK: sunxi: psci: be co

[PATCH v2 1/5] sunxi: psci: clean away preprocessor macros

2023-08-16 Thread Sam Edwards
ere are no functional changes here. Signed-off-by: Sam Edwards --- arch/arm/cpu/armv7/sunxi/psci.c | 102 +--- 1 file changed, 42 insertions(+), 60 deletions(-) diff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c index e1d3638b5c..7804e09

[PATCH v2 2/5] sunxi: psci: refactor register access to separate functions

2023-08-16 Thread Sam Edwards
same logic. Signed-off-by: Sam Edwards --- arch/arm/cpu/armv7/sunxi/psci.c | 66 +++-- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c index 7804e0933b..e2845f21ab 100644 --- a/arch

[PATCH v2 3/5] sunxi: psci: stop modeling register layout with C structs

2023-08-16 Thread Sam Edwards
its associated header file existed only to support PSCI code, so also delete them altogether. Signed-off-by: Sam Edwards --- arch/arm/cpu/armv7/sunxi/psci.c | 57 arch/arm/include/asm/arch-sunxi/cpucfg.h | 67 2 files changed, 23 insertions

[PATCH v2 4/5] sunxi: psci: implement PSCI on R528

2023-08-16 Thread Sam Edwards
This patch adds the necessary code to make nonsec booting and PSCI secondary core management functional on the R528/T113. Signed-off-by: Sam Edwards Tested-by: Maksim Kiselev --- arch/arm/cpu/armv7/sunxi/psci.c | 48 - arch/arm/mach-sunxi/Kconfig | 2

[PATCH v2 5/5] HACK: sunxi: psci: be compatible with v1 of R528 patchset

2023-08-16 Thread Sam Edwards
This is a hack for reviewer QoL. It is not being submitted for mainline inclusion. --- arch/arm/cpu/armv7/sunxi/psci.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c index b4ce4f6def..27bac291d5 100644 --- a/arch/

[PATCH] pci: pcie-brcmstb: do not rely on CLKREQ# signal

2023-08-16 Thread Sam Edwards
lled in slot 3 of a Turing Pi 2 cluster board. [1]: https://lore.kernel.org/all/20230428223500.23337-1-jim2101...@gmail.com/ Signed-off-by: Sam Edwards --- drivers/pci/pcie_brcmstb.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pcie_brcmstb.c b/

Re: [PATCH v2 2/5] sunxi: psci: refactor register access to separate functions

2023-08-18 Thread Sam Edwards
On 8/18/23 07:57, Andre Przywara wrote: On Wed, 16 Aug 2023 10:34:17 -0700 Sam Edwards wrote: Hi Sam, Likewise Andre, -static void __secure sunxi_set_entry_address(void *entry) +static void __secure sunxi_cpu_set_entry(int __always_unused cpu, void *entry) So what is the reasoning behind

Re: [PATCH v2 1/5] sunxi: psci: clean away preprocessor macros

2023-08-18 Thread Sam Edwards
I can identify what's changing. If it's easy enough, I'd like to adjust my patch so that the optimizer does produce the same output. (Keep in mind I'm on Clang, though. If Clang already gives the same output for both, I'll just report back to use that when comparing.) S

Re: [PATCH v2 1/5] sunxi: psci: clean away preprocessor macros

2023-08-18 Thread Sam Edwards
On 8/18/23 10:40, Sam Edwards wrote: On 8/18/23 07:11, Andre Przywara wrote: Hi Andre, The resulting object file is different (8 byte larger, even), so it's hard to prove I'm no stranger to reading object code. Since the output should be identical in principle, I'll spend

Re: [PATCH 3/3] sunxi: psci: implement PSCI on R528

2023-08-18 Thread Sam Edwards
On 8/18/23 07:27, Andre Przywara wrote: Hi Andre, So instead of trying to derive some pattern from where there is none, I'd rather do: config SUNXI_CPU_HOTPLUG_ADDRESS hex default 0x01c000bc if MACH_SUN8I_R40 But the hotplug flag register is at 0x01c000b8 for R40? ..

Re: [PATCH v2] board: rockchip: Add the Turing RK1 SoM

2023-12-15 Thread Sam Edwards
Hi Joshua, I just updated my own modules to this version of the patch and all continues to be well. On 12/14/23 16:46, Joshua Riek wrote: Signed-off-by: Joshua Riek Cc: Sam Edwards Tested-by: Sam Edwards Thanks for the continued efforts, my friend! Happy Friday, Sam

Re: [PATCH v2 2/2] usb: musb-new: sunxi: make compatible with UDC/DM gadget model

2024-06-27 Thread Sam Edwards
On 6/27/24 09:06, Andre Przywara wrote: On Thu, 8 Jun 2023 13:56:31 -0600 Sam Edwards wrote: Hi, John asked me have a look at this. Hi Andre, it's good to hear from you again, I'd first like to make sure you're aware that the date on this patch is June *2023,* not

[PATCH] fs: btrfs: fix reading when length specified

2023-11-11 Thread Sam Edwards
nitrd= via 'bootefi' from a btrfs partition. The EFI stub entered an infinite loop of zero-length reads while trying to read the initrd, and the boot process stalled indefinitely. Signed-off-by: Sam Edwards --- fs/btrfs/btrfs.c | 15 ++- 1 file changed, 6 insertions(+), 9 deleti

Re: [PATCH] fs: btrfs: fix reading when length specified

2023-11-16 Thread Sam Edwards
- which in practice means it reads the whole file in one exact-filesize chunk. So, to answer your questions: "either/both depending on platform." (The bug in the U-Boot implementation doubtlessly affects more than just EFI; I only happened to discover it while trying to use EFI.) Signed

[PATCH v3] configs: rk3588-turing-rk1: disable SPI flash by default

2024-05-02 Thread Sam Edwards
causes confusion among downstream users as to whether the SPI image needs to be distributed. Fixes: 153ac950a599 ("board: rockchip: Add the Turing RK1 SoM") Suggested-by: Florian Klink Signed-off-by: Sam Edwards Acked-by: Joshua Riek Reviewed-by: Jonas Karlman --- Changes v1->v2 (b

Re: [PATCH v2 0/2] sunxi, usb: UDC/DM gadget model support

2024-04-11 Thread Sam Edwards
On Thu, Apr 11, 2024 at 1:40 AM John Watts wrote: > > On Thu, Apr 11, 2024 at 12:52:14AM -0600, Sam Edwards wrote: > > Hi John, > > > > This patch was developed against (and used very heavily on) the Turing > > Pi 2, which has an Allwinner T113-s3 SoC. Likely it s

Re: [PATCH v2] board: rockchip: Add the Turing RK1 SoM

2024-04-11 Thread Sam Edwards
On Thu, Apr 11, 2024 at 1:29 AM Florian Klink wrote: > > On 23-12-14 18:46:47, Joshua Riek wrote: > >The Turing RK1 is a Rockchip RK3588 based SoM from Turing Machines. > > > >Specifications: > > > >Rockchip RK3588 SoC > >4x ARM Cortex-A76, 4x ARM Cortex-A55 > >8/16/32GB memory LPDDR4x

Re: [PATCH RFC 00/15] Support SPI NAND booting on the T113

2024-04-11 Thread Sam Edwards
On Wed, Apr 10, 2024 at 10:26 PM John Watts wrote: > > This series is my current working and tested setup for booting from > SPI NAND chips on the Allwinner T113. > > I have included the following patches from others. I may have modified > them to work with the latest mainline: > > https://lore.ke

[PATCH] configs: turing-rk1: disable SPI flash by default

2024-04-13 Thread Sam Edwards
causes confusion among downstream users as to whether the SPI image needs to be distributed. Fixes: 153ac950a599 ("board: rockchip: Add the Turing RK1 SoM") Suggested-by: Florian Klink Signed-off-by: Sam Edwards Acked-by: Joshua Riek --- configs/turing-rk1-rk3588_defconfig | 6

[PATCH] configs: turing-rk1: disable SPI flash by default

2024-04-13 Thread Sam Edwards
causes confusion among downstream users as to whether the SPI image needs to be distributed. Fixes: 153ac950a599 ("board: rockchip: Add the Turing RK1 SoM") Suggested-by: Florian Klink Signed-off-by: Sam Edwards Acked-by: Joshua Riek Reviewed-by: Jonas Karlman --- Changes v1->v2 (b

  1   2   3   >