pm_runtime.c (42249094f79422fbf5ed4b54eeb48ff096809b8f) | pm_runtime.c (3c90c55dcde745bed81f6447f24ba96bda43d984) |
---|---|
1/* 2 * Runtime PM support code 3 * 4 * Copyright (C) 2009-2010 Magnus Damm 5 * 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 8 * for more details. --- 36 unchanged lines hidden (view full) --- 45 46#endif /* CONFIG_PM_RUNTIME */ 47 48static struct pm_clk_notifier_block platform_bus_notifier = { 49 .pm_domain = DEFAULT_PM_DOMAIN_PTR, 50 .con_ids = { NULL, }, 51}; 52 | 1/* 2 * Runtime PM support code 3 * 4 * Copyright (C) 2009-2010 Magnus Damm 5 * 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 8 * for more details. --- 36 unchanged lines hidden (view full) --- 45 46#endif /* CONFIG_PM_RUNTIME */ 47 48static struct pm_clk_notifier_block platform_bus_notifier = { 49 .pm_domain = DEFAULT_PM_DOMAIN_PTR, 50 .con_ids = { NULL, }, 51}; 52 |
53static bool default_pm_on; 54 |
|
53static int __init sh_pm_runtime_init(void) 54{ | 55static int __init sh_pm_runtime_init(void) 56{ |
57 if (IS_ENABLED(CONFIG_ARCH_SHMOBILE_MULTI)) { 58 if (!of_machine_is_compatible("renesas,emev2") && 59 !of_machine_is_compatible("renesas,r7s72100") && 60 !of_machine_is_compatible("renesas,r8a73a4") && 61 !of_machine_is_compatible("renesas,r8a7740") && 62 !of_machine_is_compatible("renesas,r8a7778") && 63 !of_machine_is_compatible("renesas,r8a7779") && 64 !of_machine_is_compatible("renesas,r8a7790") && 65 !of_machine_is_compatible("renesas,r8a7791") && 66 !of_machine_is_compatible("renesas,sh7372") && 67 !of_machine_is_compatible("renesas,sh73a0")) 68 return 0; 69 } 70 71 default_pm_on = true; |
|
55 pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier); 56 return 0; 57} 58core_initcall(sh_pm_runtime_init); 59 60static int __init sh_pm_runtime_late_init(void) 61{ | 72 pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier); 73 return 0; 74} 75core_initcall(sh_pm_runtime_init); 76 77static int __init sh_pm_runtime_late_init(void) 78{ |
62 pm_genpd_poweroff_unused(); | 79 if (default_pm_on) 80 pm_genpd_poweroff_unused(); |
63 return 0; 64} 65late_initcall(sh_pm_runtime_late_init); | 81 return 0; 82} 83late_initcall(sh_pm_runtime_late_init); |