aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-shmobile/Makefile1
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a7740.h6
-rw-r--r--arch/arm/mach-shmobile/pm-r8a7740.c30
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7740.c5
4 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index 3ffe4126922f..0df5ae6740c6 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_SUSPEND) += suspend.o
41obj-$(CONFIG_CPU_IDLE) += cpuidle.o 41obj-$(CONFIG_CPU_IDLE) += cpuidle.o
42obj-$(CONFIG_ARCH_SHMOBILE) += pm-rmobile.o 42obj-$(CONFIG_ARCH_SHMOBILE) += pm-rmobile.o
43obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o 43obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o
44obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o
44obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o 45obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o
45 46
46# Board objects 47# Board objects
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h
index 8bd7b9c136a1..e8c87e92a60d 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7740.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h
@@ -19,6 +19,8 @@
19#ifndef __ASM_R8A7740_H__ 19#ifndef __ASM_R8A7740_H__
20#define __ASM_R8A7740_H__ 20#define __ASM_R8A7740_H__
21 21
22#include <mach/pm-rmobile.h>
23
22/* 24/*
23 * MD_CKx pin 25 * MD_CKx pin
24 */ 26 */
@@ -604,4 +606,8 @@ enum {
604 SHDMA_SLAVE_USBHS_RX, 606 SHDMA_SLAVE_USBHS_RX,
605}; 607};
606 608
609#ifdef CONFIG_PM
610extern struct rmobile_pm_domain r8a7740_pd_a4s;
611#endif /* CONFIG_PM */
612
607#endif /* __ASM_R8A7740_H__ */ 613#endif /* __ASM_R8A7740_H__ */
diff --git a/arch/arm/mach-shmobile/pm-r8a7740.c b/arch/arm/mach-shmobile/pm-r8a7740.c
new file mode 100644
index 000000000000..d2fe81570a74
--- /dev/null
+++ b/arch/arm/mach-shmobile/pm-r8a7740.c
@@ -0,0 +1,30 @@
1/*
2 * r8a7740 power management support
3 *
4 * Copyright (C) 2012 Renesas Solutions Corp.
5 * Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 */
11#include <mach/pm-rmobile.h>
12
13#ifdef CONFIG_PM
14static int r8a7740_pd_a4s_suspend(void)
15{
16 /*
17 * The A4S domain contains the CPU core and therefore it should
18 * only be turned off if the CPU is in use.
19 */
20 return -EBUSY;
21}
22
23struct rmobile_pm_domain r8a7740_pd_a4s = {
24 .genpd.name = "A4S",
25 .bit_shift = 10,
26 .gov = &pm_domain_always_on_gov,
27 .no_debug = true,
28 .suspend = r8a7740_pd_a4s_suspend,
29};
30#endif /* CONFIG_PM */
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 48d7bbf0d2e2..c37ad75151f3 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -29,6 +29,7 @@
29#include <linux/dma-mapping.h> 29#include <linux/dma-mapping.h>
30#include <mach/dma-register.h> 30#include <mach/dma-register.h>
31#include <mach/r8a7740.h> 31#include <mach/r8a7740.h>
32#include <mach/pm-rmobile.h>
32#include <mach/common.h> 33#include <mach/common.h>
33#include <mach/irqs.h> 34#include <mach/irqs.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
@@ -671,6 +672,10 @@ void __init r8a7740_add_standard_devices(void)
671 r8a7740_i2c_workaround(&i2c0_device); 672 r8a7740_i2c_workaround(&i2c0_device);
672 r8a7740_i2c_workaround(&i2c1_device); 673 r8a7740_i2c_workaround(&i2c1_device);
673 674
675 /* PM domain */
676 rmobile_init_pm_domain(&r8a7740_pd_a4s);
677
678 /* add devices */
674 platform_add_devices(r8a7740_early_devices, 679 platform_add_devices(r8a7740_early_devices,
675 ARRAY_SIZE(r8a7740_early_devices)); 680 ARRAY_SIZE(r8a7740_early_devices));
676 platform_add_devices(r8a7740_late_devices, 681 platform_add_devices(r8a7740_late_devices,