[ARM] 3999/1: RX3715: suspend to RAM support
The RX3715 is similar to the H1940 in the way that suspend to RAM works, so we can use most of the extant support for the H1940 with only a few modifictions Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
b2eba6bb44
commit
bbf6f2809d
|
@ -41,9 +41,16 @@ config BAST_PC104_IRQ
|
||||||
Say Y here to enable the PC104 IRQ routing on the
|
Say Y here to enable the PC104 IRQ routing on the
|
||||||
Simtec BAST (EB2410ITX)
|
Simtec BAST (EB2410ITX)
|
||||||
|
|
||||||
|
config PM_H1940
|
||||||
|
bool
|
||||||
|
depends on PM
|
||||||
|
help
|
||||||
|
Internal node for H1940 and related PM
|
||||||
|
|
||||||
config ARCH_H1940
|
config ARCH_H1940
|
||||||
bool "IPAQ H1940"
|
bool "IPAQ H1940"
|
||||||
select CPU_S3C2410
|
select CPU_S3C2410
|
||||||
|
select PM_H1940
|
||||||
help
|
help
|
||||||
Say Y here if you are using the HP IPAQ H1940
|
Say Y here if you are using the HP IPAQ H1940
|
||||||
|
|
||||||
|
@ -115,6 +122,7 @@ config MACH_VR1000
|
||||||
config MACH_RX3715
|
config MACH_RX3715
|
||||||
bool "HP iPAQ rx3715"
|
bool "HP iPAQ rx3715"
|
||||||
select CPU_S3C2440
|
select CPU_S3C2440
|
||||||
|
select PM_H1940
|
||||||
help
|
help
|
||||||
Say Y here if you are using the HP iPAQ rx3715.
|
Say Y here if you are using the HP iPAQ rx3715.
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ obj-$(CONFIG_CPU_S3C2410_DMA) += s3c2410-dma.o
|
||||||
|
|
||||||
obj-$(CONFIG_PM) += pm.o sleep.o
|
obj-$(CONFIG_PM) += pm.o sleep.o
|
||||||
obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o
|
obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o
|
||||||
|
obj-$(CONFIG_PM_H1940) += pm-h1940.o
|
||||||
|
|
||||||
# S3C2412 support
|
# S3C2412 support
|
||||||
obj-$(CONFIG_CPU_S3C2412) += s3c2412.o
|
obj-$(CONFIG_CPU_S3C2412) += s3c2412.o
|
||||||
|
@ -77,7 +78,7 @@ obj-$(CONFIG_MACH_AML_M5900) += mach-amlm5900.o
|
||||||
obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o
|
obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o
|
||||||
obj-$(CONFIG_MACH_OSIRIS) += mach-osiris.o
|
obj-$(CONFIG_MACH_OSIRIS) += mach-osiris.o
|
||||||
obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o
|
obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o
|
||||||
obj-$(CONFIG_ARCH_H1940) += mach-h1940.o pm-h1940.o
|
obj-$(CONFIG_ARCH_H1940) += mach-h1940.o
|
||||||
obj-$(CONFIG_MACH_N30) += mach-n30.o
|
obj-$(CONFIG_MACH_N30) += mach-n30.o
|
||||||
obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o
|
obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o
|
||||||
obj-$(CONFIG_MACH_SMDK2413) += mach-smdk2413.o
|
obj-$(CONFIG_MACH_SMDK2413) += mach-smdk2413.o
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#include <asm/arch/regs-gpio.h>
|
#include <asm/arch/regs-gpio.h>
|
||||||
#include <asm/arch/regs-lcd.h>
|
#include <asm/arch/regs-lcd.h>
|
||||||
|
|
||||||
|
#include <asm/arch/h1940.h>
|
||||||
#include <asm/arch/nand.h>
|
#include <asm/arch/nand.h>
|
||||||
#include <asm/arch/fb.h>
|
#include <asm/arch/fb.h>
|
||||||
|
|
||||||
|
@ -224,7 +225,9 @@ static void __init rx3715_init_irq(void)
|
||||||
|
|
||||||
static void __init rx3715_init_machine(void)
|
static void __init rx3715_init_machine(void)
|
||||||
{
|
{
|
||||||
|
memcpy(phys_to_virt(H1940_SUSPEND_RESUMEAT), h1940_pm_return, 1024);
|
||||||
s3c2410_pm_init();
|
s3c2410_pm_init();
|
||||||
|
|
||||||
s3c24xx_fb_set_platdata(&rx3715_lcdcfg);
|
s3c24xx_fb_set_platdata(&rx3715_lcdcfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,22 @@ static void s3c2410_pm_prepare(void)
|
||||||
__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
|
__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* the RX3715 uses similar code and the same H1940 and the
|
||||||
|
* same offsets for resume and checksum pointers */
|
||||||
|
|
||||||
|
if (machine_is_rx3715()) {
|
||||||
|
void *base = phys_to_virt(H1940_SUSPEND_CHECK);
|
||||||
|
unsigned long ptr;
|
||||||
|
unsigned long calc = 0;
|
||||||
|
|
||||||
|
/* generate check for the bootloader to check on resume */
|
||||||
|
|
||||||
|
for (ptr = 0; ptr < 0x40000; ptr += 0x4)
|
||||||
|
calc += __raw_readl(base+ptr);
|
||||||
|
|
||||||
|
__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
|
||||||
|
}
|
||||||
|
|
||||||
if ( machine_is_aml_m5900() )
|
if ( machine_is_aml_m5900() )
|
||||||
s3c2410_gpio_setpin(S3C2410_GPF2, 1);
|
s3c2410_gpio_setpin(S3C2410_GPF2, 1);
|
||||||
|
|
||||||
|
|
|
@ -619,7 +619,9 @@ void __init reserve_node_zero(pg_data_t *pgdat)
|
||||||
if (machine_is_p720t())
|
if (machine_is_p720t())
|
||||||
res_size = 0x00014000;
|
res_size = 0x00014000;
|
||||||
|
|
||||||
if (machine_is_h1940()) {
|
/* H1940 and RX3715 need to reserve this for suspend */
|
||||||
|
|
||||||
|
if (machine_is_h1940() || machine_is_rx3715()) {
|
||||||
reserve_bootmem_node(pgdat, 0x30003000, 0x1000);
|
reserve_bootmem_node(pgdat, 0x30003000, 0x1000);
|
||||||
reserve_bootmem_node(pgdat, 0x30081000, 0x1000);
|
reserve_bootmem_node(pgdat, 0x30081000, 0x1000);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue