mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-06-26 16:18:59 +00:00
platform: generic: Allow platform_override to perform firmware init
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>
This commit is contained in:
parent
6957ae0e91
commit
cb7e7c3325
2 changed files with 4 additions and 0 deletions
|
@ -26,6 +26,7 @@ struct platform_override {
|
|||
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,
|
||||
|
|
|
@ -85,6 +85,9 @@ unsigned long fw_platform_init(unsigned long arg0, unsigned long arg1,
|
|||
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue