sched: eas: add sched-energy support for gxm [1/1]
authorHanjie Lin <hanjie.lin@amlogic.com>
Thu, 31 Jan 2019 02:58:01 +0000 (10:58 +0800)
committerLuan Yuan <luan.yuan@amlogic.com>
Wed, 13 Mar 2019 12:22:32 +0000 (20:22 +0800)
PD#SWPL-4651

Problem:
Kernel 32bit Support for S912(kernel 4.9)

Solution:
add arm/arm64 sched-energy dts

Verify:
q201

Change-Id: I13077632b730d5f2b1427b3d9bee9ff24031cfcd
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
arch/arm/boot/dts/amlogic/gxm-sched-energy.dtsi [new file with mode: 0644]
arch/arm/boot/dts/amlogic/mesongxm.dtsi
arch/arm64/boot/dts/amlogic/gxm-sched-energy.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/amlogic/mesongxm.dtsi

diff --git a/arch/arm/boot/dts/amlogic/gxm-sched-energy.dtsi b/arch/arm/boot/dts/amlogic/gxm-sched-energy.dtsi
new file mode 100644 (file)
index 0000000..30fca09
--- /dev/null
@@ -0,0 +1,68 @@
+/ {
+       energy-costs {
+               CPU_COST_A53_HS: core-cost0 {
+                       busy-cost-data = <
+                               33  4
+                               83  23
+                               166 41
+                               221 54
+                               332 78
+                               399 92
+                               503 135
+                       >;
+                       idle-cost-data = <
+                               3
+                               0
+                               0
+                       >;
+               };
+
+               CPU_COST_A53: core-cost1 {
+                       busy-cost-data = <
+                               33  4
+                               83  23
+                               166 41
+                               221 54
+                               332 78
+                       >;
+                       idle-cost-data = <
+                               3
+                               0
+                               0
+                       >;
+               };
+
+               CLUSTER_COST_A53_HS: cluster-cost0 {
+                       busy-cost-data = <
+                               33  7
+                               83  8
+                               166 9
+                               221 10
+                               332 13
+                               399 15
+                               503 23
+                       >;
+                       idle-cost-data = <
+                               6
+                               6
+                               0
+                       >;
+               };
+
+               CLUSTER_COST_A53: cluster-cost1 {
+                       busy-cost-data = <
+                               33  7
+                               83  8
+                               166 9
+                               221 10
+                               332 13
+                       >;
+                       idle-cost-data = <
+                               6
+                               6
+                               0
+                       >;
+               };
+
+       };
+};
index a0a01d0..d4e5245 100644 (file)
@@ -26,6 +26,7 @@
 #include <dt-bindings/pwm/pwm.h>
 #include <dt-bindings/pwm/meson.h>
 #include "mesongxm-gpu-t82x.dtsi"
+#include "gxm-sched-energy.dtsi"
 / {
        cpus:cpus {
                #address-cells = <1>;
@@ -69,6 +70,8 @@
                        clocks = <&scpi_dvfs 0>;
                        clock-names = "cpu-cluster.0";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53_HS
+                                               &CLUSTER_COST_A53_HS>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
@@ -83,6 +86,8 @@
                        clocks = <&scpi_dvfs 0>;
                        clock-names = "cpu-cluster.0";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53_HS
+                                               &CLUSTER_COST_A53_HS>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
                        clocks = <&scpi_dvfs 0>;
                        clock-names = "cpu-cluster.0";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53_HS
+                                               &CLUSTER_COST_A53_HS>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
                        clocks = <&scpi_dvfs 0>;
                        clock-names = "cpu-cluster.0";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53_HS
+                                               &CLUSTER_COST_A53_HS>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
                        clocks = <&scpi_dvfs 1>;
                        clock-names = "cpu-cluster.1";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53
+                                               &CLUSTER_COST_A53>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
                        clocks = <&scpi_dvfs 1>;
                        clock-names = "cpu-cluster.1";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53
+                                               &CLUSTER_COST_A53>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
                        clocks = <&scpi_dvfs 1>;
                        clock-names = "cpu-cluster.1";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53
+                                               &CLUSTER_COST_A53>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
                        clocks = <&scpi_dvfs 1>;
                        clock-names = "cpu-cluster.1";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53
+                                               &CLUSTER_COST_A53>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
diff --git a/arch/arm64/boot/dts/amlogic/gxm-sched-energy.dtsi b/arch/arm64/boot/dts/amlogic/gxm-sched-energy.dtsi
new file mode 100644 (file)
index 0000000..30fca09
--- /dev/null
@@ -0,0 +1,68 @@
+/ {
+       energy-costs {
+               CPU_COST_A53_HS: core-cost0 {
+                       busy-cost-data = <
+                               33  4
+                               83  23
+                               166 41
+                               221 54
+                               332 78
+                               399 92
+                               503 135
+                       >;
+                       idle-cost-data = <
+                               3
+                               0
+                               0
+                       >;
+               };
+
+               CPU_COST_A53: core-cost1 {
+                       busy-cost-data = <
+                               33  4
+                               83  23
+                               166 41
+                               221 54
+                               332 78
+                       >;
+                       idle-cost-data = <
+                               3
+                               0
+                               0
+                       >;
+               };
+
+               CLUSTER_COST_A53_HS: cluster-cost0 {
+                       busy-cost-data = <
+                               33  7
+                               83  8
+                               166 9
+                               221 10
+                               332 13
+                               399 15
+                               503 23
+                       >;
+                       idle-cost-data = <
+                               6
+                               6
+                               0
+                       >;
+               };
+
+               CLUSTER_COST_A53: cluster-cost1 {
+                       busy-cost-data = <
+                               33  7
+                               83  8
+                               166 9
+                               221 10
+                               332 13
+                       >;
+                       idle-cost-data = <
+                               6
+                               6
+                               0
+                       >;
+               };
+
+       };
+};
index 45c4990..ef1e45c 100644 (file)
@@ -26,6 +26,7 @@
 #include <dt-bindings/pwm/pwm.h>
 #include <dt-bindings/pwm/meson.h>
 #include "mesongxm-gpu-t82x.dtsi"
+#include "gxm-sched-energy.dtsi"
 / {
        cpus:cpus {
                #address-cells = <2>;
@@ -69,6 +70,8 @@
                        clocks = <&scpi_dvfs 0>;
                        clock-names = "cpu-cluster.0";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53_HS
+                                               &CLUSTER_COST_A53_HS>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
@@ -83,6 +86,8 @@
                        clocks = <&scpi_dvfs 0>;
                        clock-names = "cpu-cluster.0";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53_HS
+                                               &CLUSTER_COST_A53_HS>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
                        clocks = <&scpi_dvfs 0>;
                        clock-names = "cpu-cluster.0";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53_HS
+                                               &CLUSTER_COST_A53_HS>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
                        clocks = <&scpi_dvfs 0>;
                        clock-names = "cpu-cluster.0";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53_HS
+                                               &CLUSTER_COST_A53_HS>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
                        clocks = <&scpi_dvfs 1>;
                        clock-names = "cpu-cluster.1";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53
+                                               &CLUSTER_COST_A53>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
                        clocks = <&scpi_dvfs 1>;
                        clock-names = "cpu-cluster.1";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53
+                                               &CLUSTER_COST_A53>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
                        clocks = <&scpi_dvfs 1>;
                        clock-names = "cpu-cluster.1";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53
+                                               &CLUSTER_COST_A53>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;
                        clocks = <&scpi_dvfs 1>;
                        clock-names = "cpu-cluster.1";
                        cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53
+                                               &CLUSTER_COST_A53>;
 /*
  *             cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0
  *                             &SYSTEM_SLEEP_0>;