[Top] [All Lists]

Re: FW: Alchemy power managment code.

To: Nico Coesel <>
Subject: Re: FW: Alchemy power managment code.
From: Sergei Shtylyov <>
Date: Thu, 13 Mar 2008 19:45:10 +0300
In-reply-to: <>
Organization: MontaVista Software Inc.
Original-recipient: rfc822;
References: <>
User-agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.2) Gecko/20040803

Nico Coesel wrote:

Funny you ask because I tried this yesterday on a AU1100 system with the
2.6.24 kernel (from I'm afraid I must say the kernel
crashes when I enable power management. The reason I want to use power
management is because I need to send the CPU to sleep when the system
shuts down. I hacked power.c and reset.c a bit so au_sleep() is called
when the system is shut down. Perhaps someone can confirm the
powermanagement can be made to work with some fixes (it didn't work with
2.6.21-rc4 either).

BTW, if you look at sleeper.S you'll find that save_and_sleep() trashes registers $1 and $2 because of reusing their stackframe slots to save Status and Context CP0 registers:

        sw      $1, PT_R1(sp)
        sw      $2, PT_R2(sp)

        mfc0    k0, CP0_STATUS
        sw      k0, 0x20(sp)            # equals PT_R2
        mfc0    k0, CP0_CONTEXT
        sw      k0, 0x1c(sp)            # equals PT_R1

Nico Coesel

WBR, Sergei

<Prev in Thread] Current Thread [Next in Thread>