diff options
author | Kevin Hilman <khilman@linaro.org> | 2013-10-14 10:30:11 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2013-10-14 11:10:33 -0700 |
commit | 8620d2c536dc5805bca75a76053a1becb728ddc8 (patch) | |
tree | 3899970e036cdf890af19d8faa26d7e40d6802fa /arch/arm/mach-keystone/pm_domain.c | |
parent | f797bd4a02056dceb3c0fc9813d991eb4ee62a19 (diff) | |
download | linux-8620d2c536dc5805bca75a76053a1becb728ddc8.tar.bz2 |
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>
Diffstat (limited to 'arch/arm/mach-keystone/pm_domain.c')
-rw-r--r-- | arch/arm/mach-keystone/pm_domain.c | 12 |
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 @@ #include <linux/pm_clock.h> #include <linux/platform_device.h> #include <linux/clk-provider.h> +#include <linux/of.h> #ifdef CONFIG_PM_RUNTIME static int keystone_pm_runtime_suspend(struct device *dev) @@ -60,8 +61,19 @@ static struct pm_clk_notifier_block platform_domain_notifier = { .pm_domain = &keystone_pm_domain, }; +static struct of_device_id of_keystone_table[] = { + {.compatible = "ti,keystone"}, + { /* end of list */ }, +}; + int __init keystone_pm_runtime_init(void) { + struct device_node *np; + + np = of_find_matching_node(NULL, of_keystone_table); + if (!np) + return 0; + of_clk_init(NULL); pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier); |