From 5405742d1e86d88ca3fc116cbfc6c7ebe5380406 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Fri, 8 Jan 2010 00:04:01 +0100 Subject: [PATCH] jz4740: pm.c buildfix and cleanup --- .../xburst/files-2.6.31/arch/mips/jz4740/pm.c | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/target/linux/xburst/files-2.6.31/arch/mips/jz4740/pm.c b/target/linux/xburst/files-2.6.31/arch/mips/jz4740/pm.c index 6f40a91c1..744cbc928 100644 --- a/target/linux/xburst/files-2.6.31/arch/mips/jz4740/pm.c +++ b/target/linux/xburst/files-2.6.31/arch/mips/jz4740/pm.c @@ -29,29 +29,22 @@ extern void jz4740_intc_suspend(void); extern void jz4740_intc_resume(void); -extern void jz_gpiolib_suspend(void); -extern void jz_gpiolib_resume(void); static int jz_pm_enter(suspend_state_t state) { - unsigned long delta; unsigned long nfcsr = REG_EMC_NFCSR; uint32_t scr = REG_CPM_SCR; - /* Preserve current time */ - delta = xtime.tv_sec - REG_RTC_RSR; - - /* Disable nand flash */ + /* Disable nand flash */ REG_EMC_NFCSR = ~0xff; udelay(100); - /*stop udc and usb*/ + /*stop udc and usb*/ REG_CPM_SCR &= ~( 1<<6 | 1<<7); REG_CPM_SCR |= 0<<6 | 1<<7; - jz_gpiolib_suspend(); - jz4740_intc_suspend(); + jz4740_intc_suspend(); /* Enter SLEEP mode */ REG_CPM_LCR &= ~CPM_LCR_LPM_MASK; @@ -64,18 +57,14 @@ static int jz_pm_enter(suspend_state_t state) REG_CPM_LCR &= ~CPM_LCR_LPM_MASK; REG_CPM_LCR |= CPM_LCR_LPM_IDLE; - /* Restore nand flash control register */ + /* Restore nand flash control register */ REG_EMC_NFCSR = nfcsr; - jz4740_intc_resume(); - jz_gpiolib_resume(); + jz4740_intc_resume(); /* Restore sleep control register */ REG_CPM_SCR = scr; - /* Restore current time */ - xtime.tv_sec = REG_RTC_RSR + delta; - return 0; }