From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] pm in the bitsy From: Sape Mullender MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Message-Id: <20010601170945.2ABE3199EC@mail.cse.psu.edu> Date: Fri, 1 Jun 2001 13:09:38 -0400 Topicbox-Message-UUID: ad84f9c0-eac9-11e9-9e20-41e7f4b1d025 Nemo, > I only took a quick look, so this could be wrong; but I think that > rs232, lcd, audio, and of course sa1100 are doing a power off and have > the code to get back on. Perhaps the pcmcia/wavelan will not do so (I > didn't check that yet). Peter Bosch — who joined our group a few months ago — is working on code for all of our architectures to support dynamic pcmcia and cardbus card insertion and removal. Power management will fall out of that. If you want, you can do a quick hack for the Wavelan, but there will be better code at some point. The power code in the other drivers does exist but hasn't been tested yet. I do turn power off on close in the audio driver, so powering in/off is not a problem, but I haven't tested how open-file state survives power-off followed by power-on. > Regarding the power-on entry point, my boot loader is already jumping > (well, not sure yet, but looks like), to the address kept in > powerregs->pspr. The linux code was kind of a tutorial here. > So, if I'm not so mistaken, I think I'd only need to save all the > processor state and write an assembly routine to reload it (placing its > address into powerregs->pspr in sa1100_power_off). That's the impression I got. A good idea might be to make the first instruction of pwer-restore be to reload powerregs->pspr with the cold-boot address. If things go wrong in the power-up code, at least you'll come back to life by recycling power. > My only problem is that I'm learning arm assembler while trying to get > this working, so I'm not too optimistic regarding the final result. You'll also have to learn Ken's loader which may be even harder. It still confuses me occasionally. > In any case, if you still think I'm missing something (well, probably > many things) and you have a minute to let me know, that would be great. We'd love it if you could get started on power management for the BItsy and we'll definitely help you where we can. By the way, during the conversion to 9P2000, I added the power and configure entry points to the devtab for all of our systems — they only existed for the bitsy. Peter Bosch will have a lot to say about how we use the configure entry point; we can dictate the use of the power entry point. Sape