aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2013-10-14 13:30:11 -0400
committerKevin Hilman <khilman@linaro.org>2013-10-14 14:10:33 -0400
commit8620d2c536dc5805bca75a76053a1becb728ddc8 (patch)
tree3899970e036cdf890af19d8faa26d7e40d6802fa
parentf797bd4a02056dceb3c0fc9813d991eb4ee62a19 (diff)
ARM: keystone: fix PM domain initcall to be keystone only
initcalls need to have platform specific checks so they are not run in multi-platform builds. Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Kevin Hilman <khilman@linaro.org>
-rw-r--r--arch/arm/mach-keystone/pm_domain.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-keystone/pm_domain.c b/arch/arm/mach-keystone/pm_domain.c
index beac3fb1d205..29625232e954 100644
--- a/arch/arm/mach-keystone/pm_domain.c
+++ b/arch/arm/mach-keystone/pm_domain.c
@@ -17,6 +17,7 @@
17#include <linux/pm_clock.h> 17#include <linux/pm_clock.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/clk-provider.h> 19#include <linux/clk-provider.h>
20#include <linux/of.h>
20 21
21#ifdef CONFIG_PM_RUNTIME 22#ifdef CONFIG_PM_RUNTIME
22static int keystone_pm_runtime_suspend(struct device *dev) 23static int keystone_pm_runtime_suspend(struct device *dev)
@@ -60,8 +61,19 @@ static struct pm_clk_notifier_block platform_domain_notifier = {
60 .pm_domain = &keystone_pm_domain, 61 .pm_domain = &keystone_pm_domain,
61}; 62};
62 63
64static struct of_device_id of_keystone_table[] = {
65 {.compatible = "ti,keystone"},
66 { /* end of list */ },
67};
68
63int __init keystone_pm_runtime_init(void) 69int __init keystone_pm_runtime_init(void)
64{ 70{
71 struct device_node *np;
72
73 np = of_find_matching_node(NULL, of_keystone_table);
74 if (!np)
75 return 0;
76
65 of_clk_init(NULL); 77 of_clk_init(NULL);
66 pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier); 78 pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier);
67 79