mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-11-23 03:04:21 +00:00
lib: utils/suspend: Add SiFive SMC0 driver
The SiFive SMC0 controls the clock and power domain of the core complex on the SiFive platform. The core complex enters the low power state after the secondary cores enter the tile power gating and last core execute the `CEASE` instruction with the corresponding SMC0 configurations. The devices that inside both tile power domain and core complex power domain will be off, including caches and timer. Therefore we need to flush the last level cache before entering the core complex power gating and update the timer after waking up. Reviewed-by: Cyan Yang <cyan.yang@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Nick Hu <nick.hu@sifive.com> Link: https://lore.kernel.org/r/20251020-cache-upstream-v7-12-69a132447d8a@sifive.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
14
include/sbi_utils/hsm/fdt_hsm_sifive_tmc0.h
Normal file
14
include/sbi_utils/hsm/fdt_hsm_sifive_tmc0.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*
|
||||
* Copyright (c) 2025 SiFive Inc.
|
||||
*/
|
||||
|
||||
#ifndef __FDT_HSM_SIFIVE_TMC0_H__
|
||||
#define __FDT_HSM_SIFIVE_TMC0_H__
|
||||
|
||||
int sifive_tmc0_set_wakemask_enareq(u32 hartid);
|
||||
void sifive_tmc0_set_wakemask_disreq(u32 hartid);
|
||||
bool sifive_tmc0_is_pg(u32 hartid);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user