回复:Re: [PATCH v3 1/3] platform: generic: spacemit: add K1
Troy Mitchell
troy.mitchell at linux.spacemit.com
Wed Oct 8 18:07:06 PDT 2025
On Thu, Oct 09, 2025 at 08:43:29AM +0800, 朱贤彬 wrote:
> 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 to nascent_init
>
>
> From our platform, the nascent_init cann't be called from generic_nascent_init
>
>
> Xiang W<wxjstz at 126.com> 在 2025年9月26日 周五 15:17 写道:
>
> > +static int spacemit_k1_final_init(bool cold_boot)
> > +{
> > + return generic_final_init(cold_boot);
> > +}
> > +
> > +static bool spacemit_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 implement
> cold_boot_allowed. The CSR operation here can be moved to nascent_init
>
> 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
> > +
> > +static int spacemit_k1_platform_init(const void *fdt, int nodeoff,
> > + const struct fdt_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 struct fdt_match spacemit_k1_match[] = {
> > + { .compatible = "spacemit,k1" },
> > + { /* sentinel */ }
> > +};
> > +
> > +const struct fdt_driver spacemit_k1 = {
> > + .match_table = spacemit_k1_match,
> > + .init = spacemit_k1_platform_init,
> > +};
> >
> > --
> > 2.51.0
> >
More information about the opensbi
mailing list