diff mbox series

[v3,08/15] platform: andes: Enable Andes PMU for AE350

Message ID 20231122073617.379441-9-peterlin@andestech.com
State Changes Requested
Headers show
Series Add Andes PMU extension support | expand

Commit Message

Yu-Chien Peter Lin Nov. 22, 2023, 7:36 a.m. UTC
Enable Andes PMU extension support for AE350 platforms.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
---
Changes v1 -> v2:
  - Implement ae350_extensions_init()
Changes v2 -> v3:
  - Use the andes_pmu_extensions_init() and andes_pmu_init() provided by andes_pmu.c
    We have no plan to introduce other extensions in near future so extensions_init()
    bind with andes_pmu_extensions_init() directly.
---
 platform/generic/Kconfig       | 1 +
 platform/generic/andes/ae350.c | 3 +++
 2 files changed, 4 insertions(+)

Comments

Atish Patra Nov. 23, 2023, 4:55 p.m. UTC | #1
On Tue, Nov 21, 2023 at 11:40 PM Yu Chien Peter Lin
<peterlin@andestech.com> wrote:
>
> Enable Andes PMU extension support for AE350 platforms.
>
> Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
> ---
> Changes v1 -> v2:
>   - Implement ae350_extensions_init()
> Changes v2 -> v3:
>   - Use the andes_pmu_extensions_init() and andes_pmu_init() provided by andes_pmu.c
>     We have no plan to introduce other extensions in near future so extensions_init()
>     bind with andes_pmu_extensions_init() directly.
> ---
>  platform/generic/Kconfig       | 1 +
>  platform/generic/andes/ae350.c | 3 +++
>  2 files changed, 4 insertions(+)
>
> diff --git a/platform/generic/Kconfig b/platform/generic/Kconfig
> index a902cf3..89e5603 100644
> --- a/platform/generic/Kconfig
> +++ b/platform/generic/Kconfig
> @@ -32,6 +32,7 @@ config PLATFORM_ALLWINNER_D1
>  config PLATFORM_ANDES_AE350
>         bool "Andes AE350 support"
>         select SYS_ATCSMU
> +       select ANDES_PMU
>         default n
>
>  config PLATFORM_RENESAS_RZFIVE
> diff --git a/platform/generic/andes/ae350.c b/platform/generic/andes/ae350.c
> index 80eca05..dc769b7 100644
> --- a/platform/generic/andes/ae350.c
> +++ b/platform/generic/andes/ae350.c
> @@ -8,6 +8,7 @@
>   */
>
>  #include <platform_override.h>
> +#include <andes/andes_pmu.h>
>  #include <sbi_utils/fdt/fdt_helper.h>
>  #include <sbi_utils/fdt/fdt_fixup.h>
>  #include <sbi_utils/sys/atcsmu.h>
> @@ -118,4 +119,6 @@ static const struct fdt_match andes_ae350_match[] = {
>  const struct platform_override andes_ae350 = {
>         .match_table = andes_ae350_match,
>         .final_init  = ae350_final_init,
> +       .extensions_init = andes_pmu_extensions_init,
> +       .pmu_init = andes_pmu_init,
>  };
> --
> 2.34.1
>


Reviewed-by: Atish Patra <atishp@rivosinc.com>
Lad, Prabhakar Nov. 24, 2023, 2:52 p.m. UTC | #2
On Wed, Nov 22, 2023 at 7:41 AM Yu Chien Peter Lin
<peterlin@andestech.com> wrote:
>
> Enable Andes PMU extension support for AE350 platforms.
>
> Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
> ---
> Changes v1 -> v2:
>   - Implement ae350_extensions_init()
> Changes v2 -> v3:
>   - Use the andes_pmu_extensions_init() and andes_pmu_init() provided by andes_pmu.c
>     We have no plan to introduce other extensions in near future so extensions_init()
>     bind with andes_pmu_extensions_init() directly.
> ---
>  platform/generic/Kconfig       | 1 +
>  platform/generic/andes/ae350.c | 3 +++
>  2 files changed, 4 insertions(+)
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Cheers,
Prabhakar

> diff --git a/platform/generic/Kconfig b/platform/generic/Kconfig
> index a902cf3..89e5603 100644
> --- a/platform/generic/Kconfig
> +++ b/platform/generic/Kconfig
> @@ -32,6 +32,7 @@ config PLATFORM_ALLWINNER_D1
>  config PLATFORM_ANDES_AE350
>         bool "Andes AE350 support"
>         select SYS_ATCSMU
> +       select ANDES_PMU
>         default n
>
>  config PLATFORM_RENESAS_RZFIVE
> diff --git a/platform/generic/andes/ae350.c b/platform/generic/andes/ae350.c
> index 80eca05..dc769b7 100644
> --- a/platform/generic/andes/ae350.c
> +++ b/platform/generic/andes/ae350.c
> @@ -8,6 +8,7 @@
>   */
>
>  #include <platform_override.h>
> +#include <andes/andes_pmu.h>
>  #include <sbi_utils/fdt/fdt_helper.h>
>  #include <sbi_utils/fdt/fdt_fixup.h>
>  #include <sbi_utils/sys/atcsmu.h>
> @@ -118,4 +119,6 @@ static const struct fdt_match andes_ae350_match[] = {
>  const struct platform_override andes_ae350 = {
>         .match_table = andes_ae350_match,
>         .final_init  = ae350_final_init,
> +       .extensions_init = andes_pmu_extensions_init,
> +       .pmu_init = andes_pmu_init,
>  };
> --
> 2.34.1
>
>
> --
> opensbi mailing list
> opensbi@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi
diff mbox series

Patch

diff --git a/platform/generic/Kconfig b/platform/generic/Kconfig
index a902cf3..89e5603 100644
--- a/platform/generic/Kconfig
+++ b/platform/generic/Kconfig
@@ -32,6 +32,7 @@  config PLATFORM_ALLWINNER_D1
 config PLATFORM_ANDES_AE350
 	bool "Andes AE350 support"
 	select SYS_ATCSMU
+	select ANDES_PMU
 	default n
 
 config PLATFORM_RENESAS_RZFIVE
diff --git a/platform/generic/andes/ae350.c b/platform/generic/andes/ae350.c
index 80eca05..dc769b7 100644
--- a/platform/generic/andes/ae350.c
+++ b/platform/generic/andes/ae350.c
@@ -8,6 +8,7 @@ 
  */
 
 #include <platform_override.h>
+#include <andes/andes_pmu.h>
 #include <sbi_utils/fdt/fdt_helper.h>
 #include <sbi_utils/fdt/fdt_fixup.h>
 #include <sbi_utils/sys/atcsmu.h>
@@ -118,4 +119,6 @@  static const struct fdt_match andes_ae350_match[] = {
 const struct platform_override andes_ae350 = {
 	.match_table = andes_ae350_match,
 	.final_init  = ae350_final_init,
+	.extensions_init = andes_pmu_extensions_init,
+	.pmu_init = andes_pmu_init,
 };