diff options
author | Frode Isaksen <fisaksen@baylibre.com> | 2017-12-19 11:15:35 +0000 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2018-02-07 11:47:29 +0000 |
commit | c4a6287185179732dfc1e903c195ff90c19f1065 (patch) | |
tree | d35f5010dbd952e40f5c178322026445b55757c1 /meta-eas/recipes-kernel/linux/linux-renesas/0071-arm64-Add-Hikey-energy-model.patch | |
parent | 109dea1d5c5a38807b098b588584636ae636a302 (diff) |
This layer provides Energy Aware Scheduling (EAS) patcheseel_5.1.0eel_5.0.3eel_5.0.2eel/5.1.0eel/5.0.3eel/5.0.25.1.05.0.35.0.2eel
For the moment only for Renesas R-Car Gen3 SoC's.
Can be expanded for other SoC's by setting the machine
feature biglittle and provide the relevant EAS patches.
Bug-AGL: SPEC-813
Change-Id: I2b5e69c515c33e57be19b30466fe208d7b8ac1a5
Signed-off-by: Frode Isaksen <fisaksen@baylibre.com>
Diffstat (limited to 'meta-eas/recipes-kernel/linux/linux-renesas/0071-arm64-Add-Hikey-energy-model.patch')
-rw-r--r-- | meta-eas/recipes-kernel/linux/linux-renesas/0071-arm64-Add-Hikey-energy-model.patch | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/meta-eas/recipes-kernel/linux/linux-renesas/0071-arm64-Add-Hikey-energy-model.patch b/meta-eas/recipes-kernel/linux/linux-renesas/0071-arm64-Add-Hikey-energy-model.patch new file mode 100644 index 0000000..891ca92 --- /dev/null +++ b/meta-eas/recipes-kernel/linux/linux-renesas/0071-arm64-Add-Hikey-energy-model.patch @@ -0,0 +1,87 @@ +From 0eeb3c8bc2f3436b44096bd0659050ce301f49ae Mon Sep 17 00:00:00 2001 +From: Dietmar Eggemann <dietmar.eggemann@arm.com> +Date: Tue, 16 Aug 2016 14:10:38 +0100 +Subject: [PATCH 71/92] arm64: Add Hikey energy model + +Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com> +(cherry picked from commit 75751f967eca10b6cced89831efa39d28699ba37) +Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com> +--- + arch/arm64/kernel/energy_model.h | 52 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 52 insertions(+) + +diff --git a/arch/arm64/kernel/energy_model.h b/arch/arm64/kernel/energy_model.h +index 170dd84..a71c78d 100644 +--- a/arch/arm64/kernel/energy_model.h ++++ b/arch/arm64/kernel/energy_model.h +@@ -107,6 +107,52 @@ + .cap_states = cap_states_core_juno_a57, + }; + ++/* HiKey */ ++ ++static struct idle_state idle_states_cluster_hikey[] = { ++ { .power = 107 }, /* arch_cpu_idle() (active idle) = WFI */ ++ { .power = 107 }, /* WFI */ ++ { .power = 47 }, /* cpu-sleep */ ++ { .power = 0 }, /* cluster-sleep */ ++}; ++ ++static struct capacity_state cap_states_cluster_hikey[] = { ++ { .cap = 178, .power = 16, }, /* 208 MHz */ ++ { .cap = 369, .power = 29, }, /* 432 MHz */ ++ { .cap = 622, .power = 47, }, /* 729 MHz */ ++ { .cap = 819, .power = 75, }, /* 960 MHz */ ++ { .cap = 1024, .power = 112, }, /* 1200 MHz */ ++}; ++ ++static struct sched_group_energy energy_cluster_hikey = { ++ .nr_idle_states = ARRAY_SIZE(idle_states_cluster_hikey), ++ .idle_states = idle_states_cluster_hikey, ++ .nr_cap_states = ARRAY_SIZE(cap_states_cluster_hikey), ++ .cap_states = cap_states_cluster_hikey, ++}; ++ ++static struct idle_state idle_states_core_hikey[] = { ++ { .power = 15 }, /* arch_cpu_idle() (active idle) = WFI */ ++ { .power = 15 }, /* WFI */ ++ { .power = 0 }, /* cpu-sleep */ ++ { .power = 0 }, /* cluster-sleep */ ++}; ++ ++static struct capacity_state cap_states_core_hikey[] = { ++ { .cap = 178, .power = 69, }, /* 208 MHz */ ++ { .cap = 369, .power = 125, }, /* 432 MHz */ ++ { .cap = 622, .power = 224, }, /* 729 MHz */ ++ { .cap = 819, .power = 367, }, /* 960 MHz */ ++ { .cap = 1024, .power = 670, }, /* 1200 MHz */ ++}; ++ ++static struct sched_group_energy energy_core_hikey = { ++ .nr_idle_states = ARRAY_SIZE(idle_states_core_hikey), ++ .idle_states = idle_states_core_hikey, ++ .nr_cap_states = ARRAY_SIZE(cap_states_core_hikey), ++ .cap_states = cap_states_core_hikey, ++}; ++ + /* An energy model contains core and cluster sched group energy for 2 + * clusters (cluster id 0 and 1). set_energy_model() relies on this + * feature. It is enforced by a BUG_ON in energy(). +@@ -122,8 +168,14 @@ struct energy_model { + { &energy_cluster_juno_a57, &energy_cluster_juno_a53, }, + }; + ++static struct energy_model hikey_model = { ++ { &energy_core_hikey, &energy_core_hikey, }, ++ { &energy_cluster_hikey, &energy_cluster_hikey, }, ++}; ++ + static struct of_device_id model_matches[] = { + { .compatible = "arm,juno", .data = &juno_model }, ++ { .compatible = "hisilicon,hi6220-hikey", .data = &hikey_model }, + {}, + }; + +-- +1.9.1 + |