/* * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) * * Authors: * Inochi Amaoto * YuQing Cai * ZhenYu Zhang <1204122531@qq.com> */ #include #include #include #include #include #include #include #include #include static u32 selected_hartid = 0; static bool sg2260_cold_boot_allowed(u32 hartid, const struct fdt_match *match) { if (selected_hartid != -1) return (selected_hartid == hartid); return true; } static int sg2260_extensions_init(const struct fdt_match *match, struct sbi_hart_features *hfeatures) { thead_c9xx_register_pmu_device(); return 0; } static const struct fdt_match sophgo_sg2260_match[] = { { .compatible = "sophgo, sg2260" }, { }, }; const struct platform_override sophgo_sg2260 = { .match_table = sophgo_sg2260_match, .cold_boot_allowed = sg2260_cold_boot_allowed, .extensions_init = sg2260_extensions_init, };