Linux kernel support for the S3C2410 sleep mode

Source: Internet
Author: User
Article title: Linux kernel support for the S3C2410 sleep mode. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Author: Liu Hongtao, senior lecturer of Huaqing vision embedded College, and an arm ATC authorized training instructor.

I. S3C2410 supports four power supply modes

(1) NORMAL MODE

Maximum power consumption. you can disable the clock of a specific controller to reduce power consumption.

(2) SLOW MODE

In this mode, there can be no internal PLL, and the power consumption depends on the frequency of the external clock.

(3) IDLE MODE

FCLK is shut down, mainly because of CPU core power saving. Can be awakened by any external interruption

(4) Power_OFF MODE

In addition to the processor wake-up logic unit, the processor does not consume any power. You can use EINT [] or RTC alarm interrupt to wake up the system.

II. Introduction to various power-saving modes of S3C2410

(1) SLOW mode (SLOW)

Set SLOW_BIT of CLKSLOW to 1

(2) IDLE)

CLKCON [2] is set to 1 and then enters

(3) power-down mode (Power_OFF)

CLKCON [3] is set to 1

III. preparations before S3C2410 enters the power-down mode

1. set reasonable GPIO for power-down mode

2. Block all interrupts in the interrupt shield register.

3. reasonably configure the wake-up source, including real-time clock

4. suspend USB. Miscr [] = 11b

5. store the sleep return address or data that is not lost in the power-down mode in GSTATUS3, 4

6. configure miscr [1:0] to pull the data bus

7. disable LCD

8. read REFRESH, CLKCON, and miscr registers to populate TLB.

8th points may be a little difficult to understand. you need to explain it:

The reason is that you need to suspend the SDRAM before entering the power-down mode. after the SDRAM is suspended, you also need to operate the REFRESH, CLKCON, and miscr special function registers. the addresses of these registers may be virtual addresses, this requires corresponding entries in TLB. If not, you need to fetch the corresponding page table from the sdram. at this time, the sdram has been suspended. to prevent this problem, you can read the address to be accessed before suspending the sdram, in this way, the corresponding page table items will be retained in the TLB, and the access to REFRESH, CLKCON, and miscr will not require the support of sdram.

9. set REFRESH [22] = 1b to enable the self-REFRESH mode for the sdram.

10. wait for the self-refresh of sdram to be effective.

11. set miscr [] = 111b to enable the signal (SCLK0, SCLK1 and SCKE) of the SDRAM to be protected in Power_OF mode.

12. set CLKCON to enter the Power_OFF mode.

IV. wake-up process in power-down mode of S3C2410

1. wake up the source system to generate an internal reset signal

2. after the system is reset, test whether GSTATUS2 [2] is indeed awakened from Power_OFF mode.

3. set miscr [] = 000b to release the SDRAM signal protection

4. configure the SDRAM controller

5. wait until the SDRAM is automatically refreshed and released

6. Read the values of GSTATUS3 and 4 and use them to return to the program location before sleep.

Note: to wake up the system using an external interrupt EINT [], you must keep the nBATT_FLT high.

V. configure 2.6.26.5 kernel to support S3C2410 power management

[1] [2] [3] Next page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.