HSM implementation for Allwinner D1
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest9 patches 0 repliesNew
- v2 RFC9 patches 0 repliesSuperseded
- v1 RFC2 patches 0 repliesSuperseded
Changes in v3 from the cover letter
- Fix typo in commit message
- Move comment about priority range to function declaration
- Rename irqchip_plic_* functions to fdt_plic_*
- Add a "bool smode" parameter instead of hard coding the context ID
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | lib: sbi_hsm: Call a device hook during hart resumeinclude/ lib/ | +16 | 0 replies | |
| 2/9 | lib: sbi_hsm: Assume a consistent resume addressinclude/ lib/ | +22 | 0 replies | |
| 3/9 | lib: irqchip/plic: Constify plic_data pointersinclude/ lib/ | +11 | 0 replies | |
| 4/9 | lib: irqchip/plic: Factor out a context init functioninclude/ lib/ platform/ +1 more | +48 | 0 replies | |
| 5/9 | lib: irqchip/plic: Add context save/restore helpersinclude/ lib/ | +54 | 0 replies | |
| 6/9 | lib: irqchip/plic: Add priority save/restore helpersinclude/ lib/ | +24 | 0 replies | |
| 7/9 | lib: utils/irqchip: Add FDT wrappers for PLIC save/restore functionsinclude/ lib/ | +52 | 1 reply | |
| 8/9 | lib: utils/irqchip: Add wrapper for T-HEAD PLIC delegationinclude/ lib/ | +9 | 0 replies | |
| 9/9 | platform: Add HSM implementation for Allwinner D1platform/ platform/ | +216 | 1 reply |
Reviews trailers per patch
All 9 patches have a Reviewed-by or Acked-by.
| Patch | Anup Patel |
|---|---|
| 1/9 | R-b |
| 2/9 | R-b |
| 3/9 | R-b |
| 4/9 | R-b |
| 5/9 | R-b |
| 6/9 | R-b |
| 7/9 | R-b |
| 8/9 | R-b |
| 9/9 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/9] HSM implementation for Allwinner D1
This series adds a minimal working HSM implementation for the Allwinner D1 SoC. It works with the Linux sbi_cpuidle driver. Even with canned values for entry/exit latency, I am seeing 30-45 mW reduction in power usage at idle.
Since this is the first HSM driver submission, there is no example to follow. I have updated the series based on the comments to the RFCs. Still, comments welcome!
Regards,
Samuel
Changes in v3:
- Fix typo in commit message
- Move comment about priority range to function declaration
- Rename irqchip_plic_* functions to fdt_plic_*
- Add a "bool smode" parameter instead of hard coding the context ID
Changes in v2:
- Rebase on top of the current master branch
- Use array_size() from sbi_types.h
- Use a separate variable for each CSR instead of an array
- Use the PLIC helpers added in earlier patches
- Use the saved SIE bits to program the wakeup interrupt mask
- Set the entry address only once during cold boot
- Use the generic implementation for retentive suspend
- Clean up/add comments throughout the HSM implementation
Samuel Holland (9):
lib: sbi_hsm: Call a device hook during hart resume
lib: sbi_hsm: Assume a consistent resume address
lib: irqchip/plic: Constify plic_data pointers
lib: irqchip/plic: Factor out a context init function
lib: irqchip/plic: Add context save/restore helpers
lib: irqchip/plic: Add priority save/restore helpers
lib: utils/irqchip: Add FDT wrappers for PLIC save/restore functions
lib: utils/irqchip: Add wrapper for T-HEAD PLIC delegation
platform: Add HSM implementation for Allwinner D1
include/sbi/sbi_hsm.h | 12 +- include/sbi_utils/irqchip/fdt_irqchip_plic.h | 22 ++ include/sbi_utils/irqchip/plic.h | 20 +- lib/sbi/sbi_hsm.c | 54 ++--- lib/utils/irqchip/fdt_irqchip_plic.c | 39 ++++ lib/utils/irqchip/plic.c | 124 ++++++++--- platform/fpga/ariane/platform.c | 19 +- platform/fpga/openpiton/platform.c | 19 +- platform/generic/allwinner/objects.mk | 6 + platform/generic/allwinner/sun20i-d1.c | 210 +++++++++++++++++++ 10 files changed, 442 insertions(+), 83 deletions(-) create mode 100644 include/sbi_utils/irqchip/fdt_irqchip_plic.h create mode 100644 platform/generic/allwinner/objects.mk create mode 100644 platform/generic/allwinner/sun20i-d1.c
Signature · 1 line
2.35.1