Skip to content

Allwinner R528/T113s PSCI

Sam Edwards u-boot 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 4 repliesIn review
  2. v34 patches 0 repliesSuperseded
  3. v25 patches 13 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches12 repliesSuperseded

Changes in v4 from the cover letter

- The GIC base address override is done through Kconfig, instead of in sunxi-common.h

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4sunxi: psci: clean away preprocessor macrosarch/arm/cpu/armv7/sunxi/psci.c+43 -600 replies
2/4sunxi: psci: refactor register access to separate functionsarch/arm/cpu/armv7/sunxi/psci.c+47 -190 replies
3/4sunxi: psci: stop modeling register layout with C structsarch/arm/cpu/armv7/sunxi/psci.c arch/arm/include/asm/arch-sunxi/cpucfg.h+23 -1011 reply
4/4sunxi: psci: implement PSCI on R528arch/arm/cpu/armv7/Kconfig arch/arm/cpu/armv7/sunxi/psci.c arch/arm/mach-sunxi/Kconfig+52 -22 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchAndre PrzywaraMaksim KiselevKevin Amadiva
1/4R-b
2/4R-b
3/4R-b
4/4R-b T-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

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

Hi list,

This is the third, and hopefully final, version of my patchset for PSCI support on R528/T113-s3. This one, as always, depends on Andre Przywara's T113s support series (v2), available on the list and also located on a Git branch at:
https://source.denx.de/u-boot/custodians/u-boot-sunxi.git t113s-v2

NOTE THAT THIS ALSO depends on the following commit on master:
3d5e52bd97 ("ARM: psci: move GIC address override to Kconfig")

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.

Warm regards,
Sam

Changes v3->v4:
- The GIC base address override is done through Kconfig, instead of in sunxi-common.h

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.

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/Kconfig               |   3 +-
 arch/arm/cpu/armv7/sunxi/psci.c          | 185 ++++++++++++++---------
 arch/arm/include/asm/arch-sunxi/cpucfg.h |  67 --------
 arch/arm/mach-sunxi/Kconfig              |   4 +
 4 files changed, 121 insertions(+), 138 deletions(-)
 delete mode 100644 arch/arm/include/asm/arch-sunxi/cpucfg.h
Signature · 1 line
2.41.0