aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChander Kashyap <chander.kashyap@linaro.org>2014-07-05 06:24:34 +0900
committerAlex Shi <alex.shi@linaro.org>2014-12-04 10:01:50 +0800
commit91c01e3decb0f5d12dc1f7c19084e91ac3aa1734 (patch)
tree578c36668552b5b11438a5df1d867007a277476a
parent5e036adf41923c9a42e0731ca07595709944558d (diff)
cpuidle: big.LITTLE: add of_device_id structure
This driver will be used by many big.Little Soc's. As of now it does string matching of hardcoded compatible string to init the driver. This comparison list will keep on growing with addition of new SoC's. Hence add of_device_id structure to collect the compatible strings of SoC's using this driver. Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> (cherry picked from commit e2e54362d9c8c1e8d52ff576a4e0f6e61f569356) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--drivers/cpuidle/cpuidle-big_little.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle/cpuidle-big_little.c
index b45fc624904..4cd02bd2e3b 100644
--- a/drivers/cpuidle/cpuidle-big_little.c
+++ b/drivers/cpuidle/cpuidle-big_little.c
@@ -163,14 +163,23 @@ static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id)
return 0;
}
+static const struct of_device_id compatible_machine_match[] = {
+ { .compatible = "arm,vexpress,v2p-ca15_a7" },
+ {},
+};
+
static int __init bl_idle_init(void)
{
int ret;
+ struct device_node *root = of_find_node_by_path("/");
+
+ if (!root)
+ return -ENODEV;
/*
* Initialize the driver just for a compliant set of machines
*/
- if (!of_machine_is_compatible("arm,vexpress,v2p-ca15_a7"))
+ if (!of_match_node(compatible_machine_match, root))
return -ENODEV;
/*
* For now the differentiation between little and big cores