aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle
diff options
context:
space:
mode:
authorChander Kashyap <chander.kashyap@linaro.org>2014-07-04 17:24:34 -0400
committerKukjin Kim <kgene.kim@samsung.com>2014-07-18 14:35:53 -0400
commite2e54362d9c8c1e8d52ff576a4e0f6e61f569356 (patch)
tree9b6c649c3df185e5f133c8c32f3f713eb6408c70 /drivers/cpuidle
parent1795cd9b3a91d4b5473c97f491d63892442212ab (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>
Diffstat (limited to 'drivers/cpuidle')
-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 b45fc6249041..4cd02bd2e3ba 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)
163 return 0; 163 return 0;
164} 164}
165 165
166static const struct of_device_id compatible_machine_match[] = {
167 { .compatible = "arm,vexpress,v2p-ca15_a7" },
168 {},
169};
170
166static int __init bl_idle_init(void) 171static int __init bl_idle_init(void)
167{ 172{
168 int ret; 173 int ret;
174 struct device_node *root = of_find_node_by_path("/");
175
176 if (!root)
177 return -ENODEV;
169 178
170 /* 179 /*
171 * Initialize the driver just for a compliant set of machines 180 * Initialize the driver just for a compliant set of machines
172 */ 181 */
173 if (!of_machine_is_compatible("arm,vexpress,v2p-ca15_a7")) 182 if (!of_match_node(compatible_machine_match, root))
174 return -ENODEV; 183 return -ENODEV;
175 /* 184 /*
176 * For now the differentiation between little and big cores 185 * For now the differentiation between little and big cores