| pm-upd3.patch | | Files affected: | arch/arm/mach-s3c2410/pm.c | 36 20 + 16 - 0 ! | arch/arm/mach-s3c2410/pm.h | 15 15 + 0 - 0 ! | 2 files changed, 35 insertions(+), 16 deletions(-) | | Ben Dooks, Tue, 09 Nov 2004 11:31:22 +0000 --- linux-2.6.10-rc1-bk18/arch/arm/mach-s3c2410/pm.c 2004-11-09 00:35:22.000000000 +0000 +++ linux-2.6.10-rc1-bk14-serial1-work/arch/arm/mach-s3c2410/pm.c 2004-11-09 11:24:16.000000000 +0000 @@ -59,16 +59,6 @@ #define PFX "s3c24xx-pm: " -/* sleep save info */ - -struct sleep_save { - unsigned long reg; - unsigned long val; -}; - -#define SAVE_ITEM(x) \ - { .reg = (x) } - static struct sleep_save core_save[] = { SAVE_ITEM(S3C2410_LOCKTIME), SAVE_ITEM(S3C2410_CLKCON), @@ -81,21 +71,32 @@ * wrong here, as we modify the refresh and both pll settings. */ + SAVE_ITEM(S3C2410_BWSCON), + SAVE_ITEM(S3C2410_BANKCON0), + SAVE_ITEM(S3C2410_BANKCON1), + SAVE_ITEM(S3C2410_BANKCON2), + SAVE_ITEM(S3C2410_BANKCON3), + SAVE_ITEM(S3C2410_BANKCON4), + SAVE_ITEM(S3C2410_BANKCON5), + SAVE_ITEM(S3C2410_REFRESH), + SAVE_ITEM(S3C2410_CLKDIVN), SAVE_ITEM(S3C2410_MPLLCON), SAVE_ITEM(S3C2410_UPLLCON), - SAVE_ITEM(S3C2410_CLKDIVN), SAVE_ITEM(S3C2410_CLKSLOW), }; /* this lot should be really saved by the IRQ code */ static struct sleep_save irq_save[] = { - SAVE_ITEM(S3C2410_EINTMASK), - SAVE_ITEM(S3C2410_INTMSK), + SAVE_ITEM(S3C2410_EXTINT0), + SAVE_ITEM(S3C2410_EXTINT1), + SAVE_ITEM(S3C2410_EXTINT2), SAVE_ITEM(S3C2410_EINFLT0), SAVE_ITEM(S3C2410_EINFLT1), SAVE_ITEM(S3C2410_EINFLT2), - SAVE_ITEM(S3C2410_EINFLT3) + SAVE_ITEM(S3C2410_EINFLT3), + SAVE_ITEM(S3C2410_EINTMASK), + SAVE_ITEM(S3C2410_INTMSK) }; static struct sleep_save gpio_save[] = { @@ -129,6 +130,9 @@ SAVE_ITEM(S3C2410_GPHCON), SAVE_ITEM(S3C2410_GPHDAT), SAVE_ITEM(S3C2410_GPHUP), + + SAVE_ITEM(S3C2410_DCLKCON), + }; #ifdef CONFIG_S3C2410_PM_DEBUG @@ -384,7 +388,7 @@ /* helper functions to save and restore register state */ -static void s3c2410_pm_do_save(struct sleep_save *ptr, int count) +void s3c2410_pm_do_save(struct sleep_save *ptr, int count) { for (; count > 0; count--, ptr++) { ptr->val = __raw_readl(ptr->reg); @@ -400,7 +404,7 @@ * restore the UARTs state yet */ -static void s3c2410_pm_do_restore(struct sleep_save *ptr, int count) +void s3c2410_pm_do_restore(struct sleep_save *ptr, int count) { for (; count > 0; count--, ptr++) { printk(KERN_DEBUG "restore %08lx (restore %08lx, was %08x)\n", --- linux-2.6.10-rc1-bk18/arch/arm/mach-s3c2410/pm.h 2004-11-09 00:35:22.000000000 +0000 +++ linux-2.6.10-rc1-bk14-serial1-work/arch/arm/mach-s3c2410/pm.h 2004-11-09 11:24:35.000000000 +0000 @@ -34,3 +34,18 @@ extern void s3c2410_cpu_resume(void); extern unsigned long s3c2410_sleep_save_phys; + +/* sleep save info */ + +struct sleep_save { + unsigned long reg; + unsigned long val; +}; + +#define SAVE_ITEM(x) \ + { .reg = (x) } + +extern void s3c2410_pm_do_save(struct sleep_save *ptr, int count); +extern void s3c2410_pm_do_restore(struct sleep_save *ptr, int count); + +