2 * Runtime PM support code
4 * Copyright (C) 2009-2010 Magnus Damm
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
11 #include <linux/init.h>
12 #include <linux/kernel.h>
14 #include <linux/pm_runtime.h>
15 #include <linux/pm_domain.h>
16 #include <linux/pm_clock.h>
17 #include <linux/platform_device.h>
18 #include <linux/clk.h>
19 #include <linux/sh_clk.h>
20 #include <linux/bitmap.h>
21 #include <linux/slab.h>
23 static struct dev_pm_domain default_pm_domain
= {
25 USE_PM_CLK_RUNTIME_OPS
26 USE_PLATFORM_PM_SLEEP_OPS
30 static struct pm_clk_notifier_block platform_bus_notifier
= {
31 .pm_domain
= &default_pm_domain
,
35 static int __init
sh_pm_runtime_init(void)
37 if (IS_ENABLED(CONFIG_ARCH_SHMOBILE_MULTI
)) {
38 if (!of_machine_is_compatible("renesas,emev2") &&
39 !of_machine_is_compatible("renesas,r7s72100") &&
40 #ifndef CONFIG_PM_GENERIC_DOMAINS_OF
41 !of_machine_is_compatible("renesas,r8a73a4") &&
42 !of_machine_is_compatible("renesas,r8a7740") &&
43 !of_machine_is_compatible("renesas,sh73a0") &&
45 !of_machine_is_compatible("renesas,r8a7778") &&
46 !of_machine_is_compatible("renesas,r8a7779") &&
47 !of_machine_is_compatible("renesas,r8a7790") &&
48 !of_machine_is_compatible("renesas,r8a7791") &&
49 !of_machine_is_compatible("renesas,r8a7792") &&
50 !of_machine_is_compatible("renesas,r8a7793") &&
51 !of_machine_is_compatible("renesas,r8a7794"))
55 pm_clk_add_notifier(&platform_bus_type
, &platform_bus_notifier
);
58 core_initcall(sh_pm_runtime_init
);