OMAP3: PM: Fix secure SRAM context save/restore
authorKalle Jokiniemi <kalle.jokiniemi@digia.com>
Thu, 26 Mar 2009 13:59:00 +0000 (15:59 +0200)
committerKevin Hilman <khilman@deeprootsystems.com>
Wed, 11 Nov 2009 22:42:26 +0000 (14:42 -0800)
commitba50ea7eb9ce663511013b35608cf0753c9ab674
treee3dc023dd370a66ece98ba3fdae2f90db871cdbf
parent133464dc30846282b5f852433d7b6a31f292f886
OMAP3: PM: Fix secure SRAM context save/restore

The secure sram context save uses dma channels 0 and 1.
In order to avoid collision between kernel DMA transfers and
ROM code dma transfers, we need to reserve DMA channels 0
1 on high security devices.

A bug in ROM code leaves dma irq status bits uncleared.
Hence those irq status bits need to be cleared when restoring
DMA context after off mode.

There was also a faulty parameter given to PPA in the secure
ram context save assembly code, which caused interrupts to
be enabled during secure ram context save. This caused the
save to fail sometimes, which resulted the saved context
to be corrupted, but also left DMA channels in secure mode.
The secure mode DMA channels caused "DMA secure error with
device 0" errors to be displayed.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@digia.com>
Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-omap2/sleep34xx.S
arch/arm/plat-omap/dma.c