diff options
-rw-r--r-- | arch/arm/mach-shmobile/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-kzm9g.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/pm-sh73a0.c | 32 |
4 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 0b7147928aa3..f6aba6d61d89 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -37,6 +37,7 @@ obj-$(CONFIG_ARCH_SHMOBILE) += pm-rmobile.o | |||
37 | obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o | 37 | obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o |
38 | obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o | 38 | obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o |
39 | obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o | 39 | obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o |
40 | obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o | ||
40 | 41 | ||
41 | # Board objects | 42 | # Board objects |
42 | obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o | 43 | obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o |
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index ac9428530d7b..363c6edfa3cd 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c | |||
@@ -772,6 +772,8 @@ static void __init kzm_init(void) | |||
772 | 772 | ||
773 | sh73a0_add_standard_devices(); | 773 | sh73a0_add_standard_devices(); |
774 | platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices)); | 774 | platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices)); |
775 | |||
776 | sh73a0_pm_init(); | ||
775 | } | 777 | } |
776 | 778 | ||
777 | static void kzm9g_restart(char mode, const char *cmd) | 779 | static void kzm9g_restart(char mode, const char *cmd) |
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 2d1686becdd5..f221c116e968 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -40,6 +40,7 @@ extern void sh73a0_add_early_devices(void); | |||
40 | extern void sh73a0_add_standard_devices(void); | 40 | extern void sh73a0_add_standard_devices(void); |
41 | extern void sh73a0_clock_init(void); | 41 | extern void sh73a0_clock_init(void); |
42 | extern void sh73a0_pinmux_init(void); | 42 | extern void sh73a0_pinmux_init(void); |
43 | extern void sh73a0_pm_init(void); | ||
43 | extern struct clk sh73a0_extal1_clk; | 44 | extern struct clk sh73a0_extal1_clk; |
44 | extern struct clk sh73a0_extal2_clk; | 45 | extern struct clk sh73a0_extal2_clk; |
45 | extern struct clk sh73a0_extcki_clk; | 46 | extern struct clk sh73a0_extcki_clk; |
diff --git a/arch/arm/mach-shmobile/pm-sh73a0.c b/arch/arm/mach-shmobile/pm-sh73a0.c new file mode 100644 index 000000000000..99086e98fbbc --- /dev/null +++ b/arch/arm/mach-shmobile/pm-sh73a0.c | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * sh73a0 Power management support | ||
3 | * | ||
4 | * Copyright (C) 2012 Bastian Hecht <hechtb+renesas@gmail.com> | ||
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. | ||
9 | */ | ||
10 | |||
11 | #include <linux/suspend.h> | ||
12 | #include <mach/common.h> | ||
13 | |||
14 | #ifdef CONFIG_SUSPEND | ||
15 | static int sh73a0_enter_suspend(suspend_state_t suspend_state) | ||
16 | { | ||
17 | cpu_do_idle(); | ||
18 | return 0; | ||
19 | } | ||
20 | |||
21 | static void sh73a0_suspend_init(void) | ||
22 | { | ||
23 | shmobile_suspend_ops.enter = sh73a0_enter_suspend; | ||
24 | } | ||
25 | #else | ||
26 | static void sh73a0_suspend_init(void) {} | ||
27 | #endif | ||
28 | |||
29 | void __init sh73a0_pm_init(void) | ||
30 | { | ||
31 | sh73a0_suspend_init(); | ||
32 | } | ||