diff options
-rw-r--r-- | drivers/Makefile | 2 | ||||
-rw-r--r-- | drivers/sh/Makefile | 14 | ||||
-rw-r--r-- | drivers/sh/pm_runtime.c | 20 |
3 files changed, 28 insertions, 8 deletions
diff --git a/drivers/Makefile b/drivers/Makefile index d05d81b19b50..7183b6af5dac 100644 --- a/drivers/Makefile +++ b/drivers/Makefile | |||
@@ -119,7 +119,7 @@ obj-$(CONFIG_SGI_SN) += sn/ | |||
119 | obj-y += firmware/ | 119 | obj-y += firmware/ |
120 | obj-$(CONFIG_CRYPTO) += crypto/ | 120 | obj-$(CONFIG_CRYPTO) += crypto/ |
121 | obj-$(CONFIG_SUPERH) += sh/ | 121 | obj-$(CONFIG_SUPERH) += sh/ |
122 | obj-$(CONFIG_ARCH_SHMOBILE_LEGACY) += sh/ | 122 | obj-$(CONFIG_ARCH_SHMOBILE) += sh/ |
123 | ifndef CONFIG_ARCH_USES_GETTIMEOFFSET | 123 | ifndef CONFIG_ARCH_USES_GETTIMEOFFSET |
124 | obj-y += clocksource/ | 124 | obj-y += clocksource/ |
125 | endif | 125 | endif |
diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile index fc67f564f02c..788ed9b59b4e 100644 --- a/drivers/sh/Makefile +++ b/drivers/sh/Makefile | |||
@@ -1,10 +1,12 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the SuperH specific drivers. | 2 | # Makefile for the SuperH specific drivers. |
3 | # | 3 | # |
4 | obj-y := intc/ | 4 | obj-$(CONFIG_SUPERH) += intc/ |
5 | obj-$(CONFIG_ARCH_SHMOBILE_LEGACY) += intc/ | ||
6 | ifneq ($(CONFIG_COMMON_CLK),y) | ||
7 | obj-$(CONFIG_HAVE_CLK) += clk/ | ||
8 | endif | ||
9 | obj-$(CONFIG_MAPLE) += maple/ | ||
10 | obj-$(CONFIG_SUPERHYWAY) += superhyway/ | ||
5 | 11 | ||
6 | obj-$(CONFIG_HAVE_CLK) += clk/ | 12 | obj-y += pm_runtime.o |
7 | obj-$(CONFIG_MAPLE) += maple/ | ||
8 | obj-$(CONFIG_SUPERHYWAY) += superhyway/ | ||
9 | |||
10 | obj-y += pm_runtime.o | ||
diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c index 8afa5a4589f2..10c65eb51f85 100644 --- a/drivers/sh/pm_runtime.c +++ b/drivers/sh/pm_runtime.c | |||
@@ -50,8 +50,25 @@ static struct pm_clk_notifier_block platform_bus_notifier = { | |||
50 | .con_ids = { NULL, }, | 50 | .con_ids = { NULL, }, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static bool default_pm_on; | ||
54 | |||
53 | static int __init sh_pm_runtime_init(void) | 55 | static int __init sh_pm_runtime_init(void) |
54 | { | 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); | 72 | pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier); |
56 | return 0; | 73 | return 0; |
57 | } | 74 | } |
@@ -59,7 +76,8 @@ core_initcall(sh_pm_runtime_init); | |||
59 | 76 | ||
60 | static int __init sh_pm_runtime_late_init(void) | 77 | static int __init sh_pm_runtime_late_init(void) |
61 | { | 78 | { |
62 | pm_genpd_poweroff_unused(); | 79 | if (default_pm_on) |
80 | pm_genpd_poweroff_unused(); | ||
63 | return 0; | 81 | return 0; |
64 | } | 82 | } |
65 | late_initcall(sh_pm_runtime_late_init); | 83 | late_initcall(sh_pm_runtime_late_init); |