We add a generic platform override callback to allow platform specific firmware init.
Signed-off-by: Wei Liang Lim <weiliang.lim@starfivetech.com>
Reviewed-by: Chee Hong Ang <cheehong.ang@starfivetech.com>
Reviewed-by: Jun Liang Tan <junliang.tan@starfivetech.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
int (*fdt_fixup)(void *fdt, const struct fdt_match *match);
int (*extensions_init)(const struct fdt_match *match,
struct sbi_hart_features *hfeatures);
+ void (*fw_init)(void *fdt, const struct fdt_match *match);
int (*vendor_ext_check)(long extid, const struct fdt_match *match);
int (*vendor_ext_provider)(long extid, long funcid,
const struct sbi_trap_regs *regs,
fw_platform_lookup_special(fdt, root_offset);
+ if (generic_plat && generic_plat->fw_init)
+ generic_plat->fw_init(fdt, generic_plat_match);
+
model = fdt_getprop(fdt, root_offset, "model", &len);
if (model)
sbi_strncpy(platform.name, model, sizeof(platform.name) - 1);