aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-07-05 04:26:31 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-07-06 14:40:17 -0400
commit802a5639aa7041b27cb865d3be289cd8afe3387b (patch)
tree07758785d8c128290babef0de2b47fd475210a59 /arch/arm
parent8459293c27bcd13aabacb7ee8097f6818f2ceedb (diff)
ARM: shmobile: r8a7740: add A3SP pm domain support
This patch adds basic A3SP pm domain support. Now, below devices can be controled by PM DMAC1/2/3, IPMMU, DDM, FLCTL, SYS-HPB, BBIF1, MSIOF1/2, SCIFA,SCIFB, IIC1, IrDA, USBH, USBDMAC, SDHI0/1/2, TPU, DREQPAK (Sys), MMCIF, RSPI, SIM, USBF Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a7740.h1
-rw-r--r--arch/arm/mach-shmobile/pm-r8a7740.c19
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7740.c16
3 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h
index e8c87e92a60d..a5691cf38475 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7740.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h
@@ -608,6 +608,7 @@ enum {
608 608
609#ifdef CONFIG_PM 609#ifdef CONFIG_PM
610extern struct rmobile_pm_domain r8a7740_pd_a4s; 610extern struct rmobile_pm_domain r8a7740_pd_a4s;
611extern struct rmobile_pm_domain r8a7740_pd_a3sp;
611#endif /* CONFIG_PM */ 612#endif /* CONFIG_PM */
612 613
613#endif /* __ASM_R8A7740_H__ */ 614#endif /* __ASM_R8A7740_H__ */
diff --git a/arch/arm/mach-shmobile/pm-r8a7740.c b/arch/arm/mach-shmobile/pm-r8a7740.c
index d2fe81570a74..de7c6214ce63 100644
--- a/arch/arm/mach-shmobile/pm-r8a7740.c
+++ b/arch/arm/mach-shmobile/pm-r8a7740.c
@@ -8,6 +8,7 @@
8 * License. See the file "COPYING" in the main directory of this archive 8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details. 9 * for more details.
10 */ 10 */
11#include <linux/console.h>
11#include <mach/pm-rmobile.h> 12#include <mach/pm-rmobile.h>
12 13
13#ifdef CONFIG_PM 14#ifdef CONFIG_PM
@@ -27,4 +28,22 @@ struct rmobile_pm_domain r8a7740_pd_a4s = {
27 .no_debug = true, 28 .no_debug = true,
28 .suspend = r8a7740_pd_a4s_suspend, 29 .suspend = r8a7740_pd_a4s_suspend,
29}; 30};
31
32static int r8a7740_pd_a3sp_suspend(void)
33{
34 /*
35 * Serial consoles make use of SCIF hardware located in A3SP,
36 * keep such power domain on if "no_console_suspend" is set.
37 */
38 return console_suspend_enabled ? 0 : -EBUSY;
39}
40
41struct rmobile_pm_domain r8a7740_pd_a3sp = {
42 .genpd.name = "A3SP",
43 .bit_shift = 11,
44 .gov = &pm_domain_always_on_gov,
45 .no_debug = true,
46 .suspend = r8a7740_pd_a3sp_suspend,
47};
48
30#endif /* CONFIG_PM */ 49#endif /* CONFIG_PM */
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index c37ad75151f3..59c794122804 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -674,12 +674,28 @@ void __init r8a7740_add_standard_devices(void)
674 674
675 /* PM domain */ 675 /* PM domain */
676 rmobile_init_pm_domain(&r8a7740_pd_a4s); 676 rmobile_init_pm_domain(&r8a7740_pd_a4s);
677 rmobile_init_pm_domain(&r8a7740_pd_a3sp);
678
679 rmobile_pm_add_subdomain(&r8a7740_pd_a4s, &r8a7740_pd_a3sp);
677 680
678 /* add devices */ 681 /* add devices */
679 platform_add_devices(r8a7740_early_devices, 682 platform_add_devices(r8a7740_early_devices,
680 ARRAY_SIZE(r8a7740_early_devices)); 683 ARRAY_SIZE(r8a7740_early_devices));
681 platform_add_devices(r8a7740_late_devices, 684 platform_add_devices(r8a7740_late_devices,
682 ARRAY_SIZE(r8a7740_late_devices)); 685 ARRAY_SIZE(r8a7740_late_devices));
686
687 /* add devices to PM domain */
688
689 rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif0_device);
690 rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif1_device);
691 rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif2_device);
692 rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif3_device);
693 rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif4_device);
694 rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif5_device);
695 rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif6_device);
696 rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif7_device);
697 rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scifb_device);
698 rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &i2c1_device);
683} 699}
684 700
685static void __init r8a7740_earlytimer_init(void) 701static void __init r8a7740_earlytimer_init(void)