mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-02-27 18:01:45 +00:00
Refactor ATCSMU (System Management Unit) support by moving it from a system utility into a dedicated FDT-based HSM driver. Key changes include: - Moving the functions in lib/utils/sys/atcsmu.c into the new HSM driver - Moving hart start and stop operations on AE350 platform into the new HSM driver - Converting the assembly-based functions in sleep.S to C code for the readability - Updating the ATCWDT200 driver Signed-off-by: Ben Zong-You Xie <ben717@andestech.com> Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com> Link: https://lore.kernel.org/r/20251229071914.1451587-2-ben717@andestech.com Signed-off-by: Anup Patel <anup@brainfault.org>
39 lines
889 B
C
39 lines
889 B
C
/*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2025 Andes Technology Corporation
|
|
*/
|
|
|
|
#include <andes/andes.h>
|
|
#include <andes/andes_pmu.h>
|
|
#include <andes/andes_sbi.h>
|
|
#include <platform_override.h>
|
|
#include <sbi_utils/fdt/fdt_helper.h>
|
|
|
|
extern void _start_warm(void);
|
|
|
|
void ae350_enable_coherency_warmboot(void)
|
|
{
|
|
ae350_enable_coherency();
|
|
_start_warm();
|
|
}
|
|
|
|
static int ae350_platform_init(const void *fdt, int nodeoff, const struct fdt_match *match)
|
|
{
|
|
generic_platform_ops.extensions_init = andes_pmu_extensions_init;
|
|
generic_platform_ops.pmu_init = andes_pmu_init;
|
|
generic_platform_ops.vendor_ext_provider = andes_sbi_vendor_ext_provider;
|
|
|
|
return 0;
|
|
}
|
|
|
|
static const struct fdt_match andes_ae350_match[] = {
|
|
{ .compatible = "andestech,ae350" },
|
|
{ },
|
|
};
|
|
|
|
const struct fdt_driver andes_ae350 = {
|
|
.match_table = andes_ae350_match,
|
|
.init = ae350_platform_init,
|
|
};
|