[PATCH v7 00/12] Add SiFive TMC0 and SMC0 driver
Anup Patel
anup at brainfault.org
Mon Oct 27 23:02:37 PDT 2025
On Mon, Oct 20, 2025 at 11:56 AM Nick Hu <nick.hu at sifive.com> wrote:
>
> SiFive TMC0 and SMC0 are the power controllers that controls the Tile and
> CoreComplex power domain. Add the drivers to support the power
> management features such as HSM STOP and System Suspend.
>
> Features such as power management may require flushing the entire
> cache before entering a non-retention power state. To support this, a
> simple cache flush framework is introduced to allow the external CMO
> to perform a full cache flush.
>
> ---
> Changes in v7:
> - Update the change log of PATCH 9 and PATCH 12 because the TMC0 and SMC0 are moved to the
> lib/utils/hsm and lib/utils/suspend.
> - Add new commit to Extend the sbi_ipi_raw_send() to use all available IPI device in
> PATCH 8 and use it in PATCH 9
> - Add `system_resume` callback for system suspend
> - Since the SMC0 driver need the `aplic_reinit_all()`, update the
> SMC0 Kconfig option to depend upon the APLIC Kconfig option
> - Link to v6: https://lore.kernel.org/r/20250905-cache-upstream-v6-0-6a6da629c961@sifive.com
>
> Changes in v6:
> - Rename the aplic_restore() to aplic_reinit_all()
> - Remove fdt_hsm_sifive_tmc0_cold_init() from TMC0 header file
> - Remove the sifive_dev_platform.c
> - Add a dummy inline flavor of fdt_cmo_init() for the case where CONFIG_FDT_CACHE is disabled
> - Link to v5: https://lore.kernel.org/r/20250902-cache-upstream-v5-0-af60a067f47a@sifive.com
>
> Changes in v5:
> - Put the SiFive TMC0 driver to the fdt_early_driver
> - Fix the format of the comments in SiFive TMC0 driver
>
> Changes in v4:
> - Call fdt_cmo_init() directly as part of generic_early_init()
> - Rename SBI_HART_EXT_XSF* to SBI_HART_EXT_XSIFIVE*
> - Move the TMC0 driver to the lib/utils/hsm/
> - Move the SMC0 driver to the lib/utils/suspend/
>
> Changes in v3:
> - Add the SiFive TMC and SMC driver
>
> Changes in v2:
> - Since the platform override hooks was deprecated, use the fdt_driver
> for initializing the sifive_dev_platform.
>
> ---
> Nick Hu (10):
> lib: utils: Add cache flush library
> lib: utils: Add FDT cache library
> lib: utils/cache: Add fdt cmo helpers
> lib: sbi: Add SiFive proprietary xsfcflushdlone
> lib: sbi: Add SiFive proprietary xsfcease
> lib: sbi: Extends sbi_ipi_raw_send() to use all available IPI devices
> lib: utils/irqchip: Add APLIC restore function
> platform: sifive: Add SiFive TMC0 driver
> lib: utils/timer: Expose timer update function
> platform: sifive: Add SiFive SMC0 driver
>
> Vincent Chen (1):
> utils: cache: Add SiFive ccache controller
>
Applied this series to the riscv/opensbi repo.
Thanks,
Anup
More information about the opensbi
mailing list