Skip to content

Add hart state management and system suspend support for AE350

Ben Zong-You Xie opensbi 1 version Applied

Status from this message: Applied this series to the riscv/opensbi repo.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5lib: utils/hsm: factor out ATCSMU code into an HSM driverinclude/sbi_utils/hsm/fdt_hsm_andes_atcsmu.h include/sbi_utils/sys/atcsmu.h lib/utils/hsm/Kconfig +13 more+301 -3480 replies
2/5platform: generic/andes: add CSR save and restore functions for AE350 platformlib/utils/hsm/fdt_hsm_andes_atcsmu.c platform/generic/andes/ae350.c platform/generic/include/andes/andes.h+77 -10 replies
3/5lib: utils/cache: add cache enable functioninclude/sbi_utils/cache/cache.h include/sbi_utils/cache/fdt_cmo_helper.h lib/utils/cache/cache.c +1 more+58 -00 replies
4/5lib: utils/cache: add Andes last level cache controllerinclude/sbi_utils/hsm/fdt_hsm_andes_atcsmu.h lib/utils/cache/Kconfig lib/utils/cache/fdt_andes_llcache.c +3 more+200 -00 replies
5/5lib: utils/suspend: add Andes ATCSMU suspend driverinclude/sbi_utils/hsm/fdt_hsm_andes_atcsmu.h lib/utils/hsm/fdt_hsm_andes_atcsmu.c lib/utils/suspend/Kconfig +4 more+178 -102 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Add hart state management and system suspend support for AE350

This patch series introduces support for hart state management and system suspend functionalities on the Andes AE350 platform. For the hart state management, AE350 platform supports CPU hotplug. For the system suspend, there are two platform-specific low-power modes, including deep sleep (suspend to RAM) and light sleep (suspend to standby).

Below is the patch summary:
[1/5]: The Andes System Management Unit (ATCSMU) logic is factored out into
a dedicated FDT-based HSM driver, improving code reuse and maintainability.
[2/5]: Implement the functions to save and restore platform-specific CSRs
which are lost during CPU hotplug or deep sleep.
[3/5]: Add the functions to enable/disable the cache.
[4/5]: A new Last Level Cache (LLC) driver is introduced to handle required
cache operations for deep sleep.
[5/5]: An ATCSMU-based suspend driver is implemented to support Andes deep
sleep and light sleep, providing the OS with access to standardized SBI system suspend extensions.

Ben Zong-You Xie (5):
lib: utils/hsm: factor out ATCSMU code into an HSM driver
platform: generic/andes: add CSR save and restore functions for AE350
platform
lib: utils/cache: add cache enable function
lib: utils/cache: add Andes last level cache controller
lib: utils/suspend: add Andes ATCSMU suspend driver

 include/sbi_utils/cache/cache.h              |  11 +
 include/sbi_utils/cache/fdt_cmo_helper.h     |  13 ++
 include/sbi_utils/hsm/fdt_hsm_andes_atcsmu.h |  65 ++++++
 include/sbi_utils/sys/atcsmu.h               |  59 ------
 lib/utils/cache/Kconfig                      |   5 +
 lib/utils/cache/cache.c                      |  11 +
 lib/utils/cache/fdt_andes_llcache.c          | 166 +++++++++++++++
 lib/utils/cache/fdt_cmo_helper.c             |  23 ++
 lib/utils/cache/objects.mk                   |   3 +
 lib/utils/hsm/Kconfig                        |   4 +
 lib/utils/hsm/fdt_hsm_andes_atcsmu.c         | 210 +++++++++++++++++++
 lib/utils/hsm/objects.mk                     |   5 +-
 lib/utils/reset/Kconfig                      |   2 +-
 lib/utils/reset/fdt_reset_atcwdt200.c        |  22 +-
 lib/utils/suspend/Kconfig                    |   5 +
 lib/utils/suspend/fdt_suspend_andes_atcsmu.c | 119 +++++++++++
 lib/utils/suspend/objects.mk                 |   3 +
 lib/utils/sys/Kconfig                        |   4 -
 lib/utils/sys/atcsmu.c                       |  89 --------
 lib/utils/sys/objects.mk                     |   1 -
 platform/generic/Kconfig                     |   1 -
 platform/generic/andes/ae350.c               | 147 +++++--------
 platform/generic/andes/objects.mk            |   2 +-
 platform/generic/andes/sleep.S               |  70 -------
 platform/generic/configs/defconfig           |   3 +
 platform/generic/include/andes/andes.h       |  84 +++++++-
 26 files changed, 791 insertions(+), 336 deletions(-)
 create mode 100644 include/sbi_utils/hsm/fdt_hsm_andes_atcsmu.h
 delete mode 100644 include/sbi_utils/sys/atcsmu.h
 create mode 100644 lib/utils/cache/fdt_andes_llcache.c
 create mode 100644 lib/utils/hsm/fdt_hsm_andes_atcsmu.c
 create mode 100644 lib/utils/suspend/fdt_suspend_andes_atcsmu.c
 delete mode 100644 lib/utils/sys/atcsmu.c
 delete mode 100644 platform/generic/andes/sleep.S

--
2.34.1

Signature · 3 lines
opensbi mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/opensbi