platform: generic: spacemit: add K1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 26 lines · 朱贤彬
Hi Xiang W
Only the primary core will be brought up, so we do not need to implement
cold_boot_allowed. The CSR operation here can be moved tonascent_initFrom our platform, the
nascent_initcann't be called from generic_nascent_initXiang W<[email protected]> 在 2025年9月26日 周五 15:17 写道:> +static int
spacemit_k1_final_init(bool cold_boot)
> +{
> + returngeneric_final_init(cold_boot);
> +}
> +
> +static boolspacemit_cold_boot_allowed(u32 hartid)> +{
> +csr_set(CSR_ML2SETUP, 1 << (hartid % PLATFORM_MAX_CPUS_PER_CLUSTER));
> +
> + return !hartid;
> +}
Only the primary core will be brought up, so we do not need to implementcold_boot_allowed. The CSR operation here can be moved tonascent_init
Quoted 2 lines
Regards,
Xiang W
Since Xianbin sent a wrong style email, so I clarfy it here:
"From our platform, the nascent_init cann't be called from generic_nascent_init"
Thanks,
- Troy
Quoted 24 lines
> +
> +static int spacemit_k1_platform_init(const void *fdt, int nodeoff,
> + const structfdt_match*match)
> +{
> + generic_platform_ops.early_init =spacemit_k1_early_init;
> + generic_platform_ops.final_init =spacemit_k1_final_init;
> + generic_platform_ops.cold_boot_allowed =spacemit_cold_boot_allowed;
> +
> + return 0;
> +}
> +
> +static const structfdt_matchspacemit_k1_match[] = {
> + { .compatible = "spacemit,k1" },
> + { /* sentinel */ }
> +};
> +
> +const structfdt_driverspacemit_k1= {
> + .match_table =spacemit_k1_match,
> + .init =spacemit_k1_platform_init,
> +};
>
> --
> 2.51.0
>
Signature · 3 lines
opensbi mailing list [email protected] http://lists.infradead.org/mailman/listinfo/opensbi