{
return virt_to_phys(sp);
}
-
-/*
- * Called after processes are frozen, but before we shut down devices.
- */
-int pxa_pm_prepare(suspend_state_t state)
-{
- extern int pxa_cpu_pm_prepare(suspend_state_t state);
-
- return pxa_cpu_pm_prepare(state);
-}
-
-EXPORT_SYMBOL_GPL(pxa_pm_prepare);
-
-static struct pm_ops pxa_pm_ops = {
- .prepare = pxa_pm_prepare,
- .enter = pxa_pm_enter,
- .valid = pm_valid_only_mem,
-};
-
-static int __init pxa_pm_init(void)
-{
- pm_set_ops(&pxa_pm_ops);
- return 0;
-}
-
-device_initcall(pxa_pm_init);
#include <asm/hardware.h>
#include <asm/arch/pxa-regs.h>
+#include <asm/arch/pm.h>
#include "generic.h"
#ifdef CONFIG_PM
-int pxa_cpu_pm_prepare(suspend_state_t state)
+int pxa_pm_prepare(suspend_state_t state)
{
switch (state) {
case PM_SUSPEND_MEM:
}
}
+static struct pm_ops pxa25x_pm_ops = {
+ .prepare = pxa_pm_prepare,
+ .enter = pxa_pm_enter,
+ .valid = pm_valid_only_mem,
+};
#endif
+
+static int __init pxa25x_init(void)
+{
+ if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
+#ifdef CONFIG_PM
+ pm_set_ops(&pxa25x_pm_ops);
+#endif
+ }
+ return 0;
+}
+
+subsys_initcall(pxa25x_init);
#include <asm/irq.h>
#include <asm/arch/pxa-regs.h>
#include <asm/arch/ohci.h>
+#include <asm/arch/pm.h>
#include "generic.h"
#ifdef CONFIG_PM
-int pxa_cpu_pm_prepare(suspend_state_t state)
+int pxa_pm_prepare(suspend_state_t state)
{
switch (state) {
case PM_SUSPEND_MEM:
}
}
+static struct pm_ops pxa27x_pm_ops = {
+ .prepare = pxa_pm_prepare,
+ .enter = pxa_pm_enter,
+ .valid = pm_valid_only_mem,
+};
#endif
/*
static int __init pxa27x_init(void)
{
- return platform_add_devices(devices, ARRAY_SIZE(devices));
+ int ret = 0;
+ if (cpu_is_pxa27x()) {
+#ifdef CONFIG_PM
+ pm_set_ops(&pxa27x_pm_ops);
+#endif
+ ret = platform_add_devices(devices, ARRAY_SIZE(devices));
+ }
+ return ret;
}
subsys_initcall(pxa27x_init);