Date:2010-01-08 00:04:01 (3 years 4 months ago)
Author:Lars C.
Commit:5405742d1e86d88ca3fc116cbfc6c7ebe5380406
Message:jz4740: pm.c buildfix and cleanup

Files: target/linux/xburst/files-2.6.31/arch/mips/jz4740/pm.c (2 diffs)

Change Details

target/linux/xburst/files-2.6.31/arch/mips/jz4740/pm.c
2929
3030extern void jz4740_intc_suspend(void);
3131extern void jz4740_intc_resume(void);
32extern void jz_gpiolib_suspend(void);
33extern void jz_gpiolib_resume(void);
3432
3533static int jz_pm_enter(suspend_state_t state)
3634{
37    unsigned long delta;
3835    unsigned long nfcsr = REG_EMC_NFCSR;
3936    uint32_t scr = REG_CPM_SCR;
4037
41    /* Preserve current time */
42    delta = xtime.tv_sec - REG_RTC_RSR;
43
44    /* Disable nand flash */
38    /* Disable nand flash */
4539    REG_EMC_NFCSR = ~0xff;
4640
4741     udelay(100);
4842
49    /*stop udc and usb*/
43    /*stop udc and usb*/
5044    REG_CPM_SCR &= ~( 1<<6 | 1<<7);
5145    REG_CPM_SCR |= 0<<6 | 1<<7;
5246
53    jz_gpiolib_suspend();
54    jz4740_intc_suspend();
47    jz4740_intc_suspend();
5548
5649     /* Enter SLEEP mode */
5750    REG_CPM_LCR &= ~CPM_LCR_LPM_MASK;
...... 
6457    REG_CPM_LCR &= ~CPM_LCR_LPM_MASK;
6558    REG_CPM_LCR |= CPM_LCR_LPM_IDLE;
6659
67    /* Restore nand flash control register */
60    /* Restore nand flash control register */
6861    REG_EMC_NFCSR = nfcsr;
6962
70    jz4740_intc_resume();
71    jz_gpiolib_resume();
63    jz4740_intc_resume();
7264
7365    /* Restore sleep control register */
7466    REG_CPM_SCR = scr;
7567
76    /* Restore current time */
77    xtime.tv_sec = REG_RTC_RSR + delta;
78
7968    return 0;
8069}
8170

Archive Download the corresponding diff file



interactive