public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Allwinner R528/T113s PSCI
@ 2023-09-30 18:34 Sam Edwards
  2023-09-30 18:34 ` [PATCH v3 1/4] sunxi: psci: clean away preprocessor macros Sam Edwards
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sam Edwards @ 2023-09-30 18:34 UTC (permalink / raw)
  To: u-boot, Andre Przywara, Jagan Teki
  Cc: Samuel Holland, Jernej Skrabec, Icenowy Zheng, Maksim Kiselev,
	Sam Edwards

Hi list,

This is the third version of my patchset for supporting PSCI on
R528/T113-s3. It is meant to be applied atop Andre Przywara's T113s support
series (v2). For convenience, the latter exists in a Git branch at:
https://source.denx.de/u-boot/custodians/u-boot-sunxi.git t113s-v2

It's looking like we're very close to finished here. The only "controversy"
that I expect is that patch 4/4 defines CFG_ARM_GIC_BASE_ADDRESS in
sunxi-common.h. There has previously been discussion about moving this to
Kconfig. I agree that this is a good change in principle, but I don't have the
available cycles to look into adding another Kconfig symbol (and cleaning up
Arndale, the other target which uses this) and so have opted to defer that
cleanup for another day.

For testing: I can confirm that patch 2/4 results in no change to machine code
whatsoever on any supported target. Patch 1/4 results in a minor machine code
change on R40 only. Patch 3/4 will likely require testing on each of the 4
"special case" sunxi targets (sun6i, sun7i, R40, H3) to ensure that register
offsets are kept consistent. Patch 4/4 needs testing on R528 only.

Changes v2->v3:
- Fix missing `cpu=0;` for the sun7i power management case.
- Make sunxi_cpu_power_off() a static function, per feedback on v2.
- Kevin Amadiva of MEC electronics got in touch with me off-list, reported
  success bringing up CPU1 of a T113 with this patchset, and kindly provided
  me with a Tested-by tag for patch 4/4.
- Remove a comment about R40/R528 being special, per feedback on v2.
- Simplify an if statement, per feedback on v2.
- Add missing 'select' directives to the R528 Kconfig, per feedback on v2.

Changes v1->v2:
- Power clamp is now adjusted ONLY on sun{6,7}i, H3, R40. The previous version
  was mistakenly doing this EXCEPT on those machines.
- Flattened sunxi_power_switch() into sunxi_cpu_set_power() for simplicity's
  sake.
- Moved the "power clamp is not NULL" 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_cpucfg_reg struct, and stopped using the PRCM struct in psci.c.

Happy Saturday all,
Sam

Sam Edwards (4):
  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

 arch/arm/cpu/armv7/sunxi/psci.c          | 185 ++++++++++++++---------
 arch/arm/include/asm/arch-sunxi/cpucfg.h |  67 --------
 arch/arm/mach-sunxi/Kconfig              |   4 +
 include/configs/sunxi-common.h           |   8 +
 4 files changed, 127 insertions(+), 137 deletions(-)
 delete mode 100644 arch/arm/include/asm/arch-sunxi/cpucfg.h

-- 
2.41.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-30 18:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-30 18:34 [PATCH v3 0/4] Allwinner R528/T113s PSCI Sam Edwards
2023-09-30 18:34 ` [PATCH v3 1/4] sunxi: psci: clean away preprocessor macros Sam Edwards
2023-09-30 18:34 ` [PATCH v3 2/4] sunxi: psci: refactor register access to separate functions Sam Edwards
2023-09-30 18:34 ` [PATCH v3 3/4] sunxi: psci: stop modeling register layout with C structs Sam Edwards
2023-09-30 18:34 ` [PATCH v3 4/4] sunxi: psci: implement PSCI on R528 Sam Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox