Pull ARM SoC platform changes from Arnd Bergmann:
"New and updated SoC support. Among the things new for this release
are:
- at91: Added support for the new SAMA5D4 SoC, following the earlier
SAMA5D3
- bcm: Added support for BCM63XX family of DSL SoCs
- hisi: Added support for HiP04 server-class SoC
- meson: Initial support for the Amlogic Meson6 (aka 8726MX) platform
- shmobile: added support for new r8a7794 (R-Car E2) automotive SoC
Noteworthy changes to existing SoC support are:
- imx: convert i.MX1 to device tree
- omap: lots of power management work
- omap: base support to enable moving to standard UART driver
- shmobile: lots of progress for multiplatform support, still
ongoing"
* tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (171 commits)
ARM: hisi: depend on ARCH_MULTI_V7
CNS3xxx: Fix debug UART.
ARM: at91: fix nommu build regression
ARM: meson: add basic support for MesonX SoCs
ARM: meson: debug: add debug UART for earlyprintk support
irq: Export handle_fasteoi_irq
ARM: mediatek: Add earlyprintk support for mt6589
ARM: hisi: Fix platmcpm compilation when ARMv6 is selected
ARM: debug: fix alphanumerical order on debug uarts
ARM: at91: document Atmel SMART compatibles
ARM: at91: add sama5d4 support to sama5_defconfig
ARM: at91: dt: add device tree file for SAMA5D4ek board
ARM: at91: dt: add device tree file for SAMA5D4 SoC
ARM: at91: SAMA5D4 SoC detection code and low level routines
ARM: at91: introduce basic SAMA5D4 support
clk: at91: add a driver for the h32mx clock
ARM: pxa3xx: provide specific platform_devices for all ssp ports
ARM: pxa: ssp: provide platform_device_id for PXA3xx
ARM: OMAP4+: Remove static iotable mappings for SRAM
ARM: OMAP4+: Move SRAM data to DT
...
80 lines
1.8 KiB
C
80 lines
1.8 KiB
C
/*
|
|
* r8a7740 power management support
|
|
*
|
|
* Copyright (C) 2012 Renesas Solutions Corp.
|
|
* Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*/
|
|
#include <linux/console.h>
|
|
#include <linux/suspend.h>
|
|
#include "common.h"
|
|
#include "pm-rmobile.h"
|
|
|
|
#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM)
|
|
static int r8a7740_pd_a4s_suspend(void)
|
|
{
|
|
/*
|
|
* The A4S domain contains the CPU core and therefore it should
|
|
* only be turned off if the CPU is not in use.
|
|
*/
|
|
return -EBUSY;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
static struct rmobile_pm_domain r8a7740_pm_domains[] = {
|
|
{
|
|
.genpd.name = "A4LC",
|
|
.bit_shift = 1,
|
|
}, {
|
|
.genpd.name = "A4S",
|
|
.bit_shift = 10,
|
|
.gov = &pm_domain_always_on_gov,
|
|
.no_debug = true,
|
|
.suspend = r8a7740_pd_a4s_suspend,
|
|
}, {
|
|
.genpd.name = "A3SP",
|
|
.bit_shift = 11,
|
|
.gov = &pm_domain_always_on_gov,
|
|
.no_debug = true,
|
|
.suspend = r8a7740_pd_a3sp_suspend,
|
|
},
|
|
};
|
|
|
|
void __init r8a7740_init_pm_domains(void)
|
|
{
|
|
rmobile_init_domains(r8a7740_pm_domains, ARRAY_SIZE(r8a7740_pm_domains));
|
|
pm_genpd_add_subdomain_names("A4S", "A3SP");
|
|
}
|
|
#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */
|
|
|
|
#ifdef CONFIG_SUSPEND
|
|
static int r8a7740_enter_suspend(suspend_state_t suspend_state)
|
|
{
|
|
cpu_do_idle();
|
|
return 0;
|
|
}
|
|
|
|
static void r8a7740_suspend_init(void)
|
|
{
|
|
shmobile_suspend_ops.enter = r8a7740_enter_suspend;
|
|
}
|
|
#else
|
|
static void r8a7740_suspend_init(void) {}
|
|
#endif
|
|
|
|
void __init r8a7740_pm_init(void)
|
|
{
|
|
r8a7740_suspend_init();
|
|
}
|