Hi Dirk, Have you found out whether it is possible to use the OMAP method on Davinci? If so, do you know of any code that has been written/ported to Davinci?
Thanks, Allan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dirk Behme Sent: 12. november 2007 20:37 To: [email protected] Subject: DaVinci ARM wake from WFI mode? I read a little about sleep/wakeup of DaVinci ARM part and compared it with what I know from OMAP. Now I wonder if DaVinci ARM can exit ARM wake-for-interrupt mode (WFI) if ARM I- and F-IRQs are disabled? sprue14a [1] states (section 8.4.1, page 92): -- cut -- The following sequence describes the procedure to wake up from the wait-for-interrupt mode: - To wake up from the wait-for-interrupt mode, trigger any enabled interrupt (for example, an external interrupt). - The ARM's PC jumps to the IRQ vector and you must handle the interrupt in an interrupt service routine (ISR). Exit the ISR and continue normal program execution starting from the instruction immediately following the instruction that enabled wait-for-interrupt mode: mcr p15, #0, r3, c7, c0, #4. -- cut -- Assuming that SDRAM is in self refresh mode and therefore WFI enter/exit code is in internal (TCM) SRAM, ISR has to be in SRAM as well? This implies that - ARMs IRQ entry has to be mapped by MMU from standard Linux location to SRAM - All MMU translation for ARMs IRQ/ISR to internal SRAM has to be in TLB cause MMU tables in SDRAM are not accessible - ISR can't really handle data cause all (Linux-) data handling code is located in SDRAM (still in self refresh). It has to be a "minimal" ISR, main job is to wake the system and not to handle data. What I know from OMAP is that ARM is able to exit WFI with ARM I- and F-IRQ *disabled* (local_irq_disable() & local_fiq_disable()). On OMAP, while going to sleep, still running from SDRAM, you configure some interrupts as wake sources and then disable ARM I- and F-IRQ. Then you jump to SRAM, enable SDRAM self refresh and go to WFI. Then, ARM can still wake from interrupt, but *doesn't* jump to ISR immediately cause I- and F-IRQ are still off. Enabling SDRAM, jumping back to SDRAM, enabling ARMs I- and F-IRQ and *then* system jump and use normal Linux ISRs for wake interrupt. This is quite elegant and avoids complex programming steps like above necessary on DaVinci? Or did I miss anything here? Best regards Dirk [1] http://focus.ti.com/dsp/docs/dspsupporttechdocsc.tsp?sectionId=3&tabId=4 09&familyId=1302&abstractName=sprue14a _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
