Message ID | tencent_6C2A44A1919D0F42D0423BC3D11697348605@qq.com |
---|---|
State | Accepted |
Headers | show |
Series | platform: generic: thead: Add Canaan K230 PMU support | expand |
On Sun, Apr 21, 2024 at 11:52:09PM GMT, Yangyu Chen wrote: > Canaan Kendryte K230 SoC has T-Head C908 cores inside. The dt-binding has > been merged into the linux kernel [1]. However, it has early version of > C908 core which does not have Sscofpmf and need to use T-Head PMU > extension. Thus, we add a K230 compatible string to thead_generic_match > and set quirk for T-Head PMU. > > [1] https://lore.kernel.org/linux-riscv/tencent_4D85743622F39109466913393EE2F6C5980A@qq.com/ > LGTM. Reviewed-by: Inochi Amaoto <inochiama@outlook.com> > Signed-off-by: Yangyu Chen <cyy@cyyself.name> > --- > platform/generic/thead/thead-generic.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/platform/generic/thead/thead-generic.c b/platform/generic/thead/thead-generic.c > index da55e05..3b59a0d 100644 > --- a/platform/generic/thead/thead-generic.c > +++ b/platform/generic/thead/thead-generic.c > @@ -45,8 +45,13 @@ static struct thead_generic_quirks thead_th1520_quirks = { > .errata = THEAD_QUIRK_ERRATA_TLB_FLUSH | THEAD_QUIRK_ERRATA_THEAD_PMU, > }; > > +static struct thead_generic_quirks canaan_k230_quirks = { > + .errata = THEAD_QUIRK_ERRATA_THEAD_PMU, > +}; > + > static const struct fdt_match thead_generic_match[] = { > { .compatible = "thead,th1520", .data = &thead_th1520_quirks }, > + { .compatible = "canaan,kendryte-k230", .data = &canaan_k230_quirks }, > { }, > }; > > -- > 2.43.0 > > > -- > opensbi mailing list > opensbi@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/opensbi
On Sun, Apr 21, 2024 at 9:22 PM Yangyu Chen <cyy@cyyself.name> wrote: > > Canaan Kendryte K230 SoC has T-Head C908 cores inside. The dt-binding has > been merged into the linux kernel [1]. However, it has early version of > C908 core which does not have Sscofpmf and need to use T-Head PMU > extension. Thus, we add a K230 compatible string to thead_generic_match > and set quirk for T-Head PMU. > > [1] https://lore.kernel.org/linux-riscv/tencent_4D85743622F39109466913393EE2F6C5980A@qq.com/ > > Signed-off-by: Yangyu Chen <cyy@cyyself.name> LGTM. Reviewed-by: Anup Patel <anup@brainfault.org> Applied this patch to the riscv/opensbi repo. Thanks, Anup > --- > platform/generic/thead/thead-generic.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/platform/generic/thead/thead-generic.c b/platform/generic/thead/thead-generic.c > index da55e05..3b59a0d 100644 > --- a/platform/generic/thead/thead-generic.c > +++ b/platform/generic/thead/thead-generic.c > @@ -45,8 +45,13 @@ static struct thead_generic_quirks thead_th1520_quirks = { > .errata = THEAD_QUIRK_ERRATA_TLB_FLUSH | THEAD_QUIRK_ERRATA_THEAD_PMU, > }; > > +static struct thead_generic_quirks canaan_k230_quirks = { > + .errata = THEAD_QUIRK_ERRATA_THEAD_PMU, > +}; > + > static const struct fdt_match thead_generic_match[] = { > { .compatible = "thead,th1520", .data = &thead_th1520_quirks }, > + { .compatible = "canaan,kendryte-k230", .data = &canaan_k230_quirks }, > { }, > }; > > -- > 2.43.0 > > > -- > opensbi mailing list > opensbi@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/opensbi
diff --git a/platform/generic/thead/thead-generic.c b/platform/generic/thead/thead-generic.c index da55e05..3b59a0d 100644 --- a/platform/generic/thead/thead-generic.c +++ b/platform/generic/thead/thead-generic.c @@ -45,8 +45,13 @@ static struct thead_generic_quirks thead_th1520_quirks = { .errata = THEAD_QUIRK_ERRATA_TLB_FLUSH | THEAD_QUIRK_ERRATA_THEAD_PMU, }; +static struct thead_generic_quirks canaan_k230_quirks = { + .errata = THEAD_QUIRK_ERRATA_THEAD_PMU, +}; + static const struct fdt_match thead_generic_match[] = { { .compatible = "thead,th1520", .data = &thead_th1520_quirks }, + { .compatible = "canaan,kendryte-k230", .data = &canaan_k230_quirks }, { }, };
Canaan Kendryte K230 SoC has T-Head C908 cores inside. The dt-binding has been merged into the linux kernel [1]. However, it has early version of C908 core which does not have Sscofpmf and need to use T-Head PMU extension. Thus, we add a K230 compatible string to thead_generic_match and set quirk for T-Head PMU. [1] https://lore.kernel.org/linux-riscv/tencent_4D85743622F39109466913393EE2F6C5980A@qq.com/ Signed-off-by: Yangyu Chen <cyy@cyyself.name> --- platform/generic/thead/thead-generic.c | 5 +++++ 1 file changed, 5 insertions(+)