Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319263
b: refs/heads/master
c: 802a563
h: refs/heads/master
i:
  319261: be52790
  319259: 062d53d
  319255: 749870f
  319247: d9e1146
  319231: f9bb9a1
v: v3
  • Loading branch information
Kuninori Morimoto authored and Rafael J. Wysocki committed Jul 6, 2012
1 parent bacd8d1 commit 24759ce
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8459293c27bcd13aabacb7ee8097f6818f2ceedb
refs/heads/master: 802a5639aa7041b27cb865d3be289cd8afe3387b
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-shmobile/include/mach/r8a7740.h
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ enum {

#ifdef CONFIG_PM
extern struct rmobile_pm_domain r8a7740_pd_a4s;
extern struct rmobile_pm_domain r8a7740_pd_a3sp;
#endif /* CONFIG_PM */

#endif /* __ASM_R8A7740_H__ */
19 changes: 19 additions & 0 deletions trunk/arch/arm/mach-shmobile/pm-r8a7740.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#include <linux/console.h>
#include <mach/pm-rmobile.h>

#ifdef CONFIG_PM
Expand All @@ -27,4 +28,22 @@ struct rmobile_pm_domain r8a7740_pd_a4s = {
.no_debug = true,
.suspend = r8a7740_pd_a4s_suspend,
};

static int r8a7740_pd_a3sp_suspend(void)
{
/*
* Serial consoles make use of SCIF hardware located in A3SP,
* keep such power domain on if "no_console_suspend" is set.
*/
return console_suspend_enabled ? 0 : -EBUSY;
}

struct rmobile_pm_domain r8a7740_pd_a3sp = {
.genpd.name = "A3SP",
.bit_shift = 11,
.gov = &pm_domain_always_on_gov,
.no_debug = true,
.suspend = r8a7740_pd_a3sp_suspend,
};

#endif /* CONFIG_PM */
16 changes: 16 additions & 0 deletions trunk/arch/arm/mach-shmobile/setup-r8a7740.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,12 +674,28 @@ void __init r8a7740_add_standard_devices(void)

/* PM domain */
rmobile_init_pm_domain(&r8a7740_pd_a4s);
rmobile_init_pm_domain(&r8a7740_pd_a3sp);

rmobile_pm_add_subdomain(&r8a7740_pd_a4s, &r8a7740_pd_a3sp);

/* add devices */
platform_add_devices(r8a7740_early_devices,
ARRAY_SIZE(r8a7740_early_devices));
platform_add_devices(r8a7740_late_devices,
ARRAY_SIZE(r8a7740_late_devices));

/* add devices to PM domain */

rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif0_device);
rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif1_device);
rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif2_device);
rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif3_device);
rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif4_device);
rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif5_device);
rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif6_device);
rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scif7_device);
rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &scifb_device);
rmobile_add_device_to_domain(&r8a7740_pd_a3sp, &i2c1_device);
}

static void __init r8a7740_earlytimer_init(void)
Expand Down

0 comments on commit 24759ce

Please sign in to comment.