Hi Roel, On Tue, Jul 21, 2009 at 2:46 PM, Roel Kluin<roel.kluin@xxxxxxxxx> wrote: > Only registers [0-DDMA_CHANNEL_BASE][0-6] are used by the suspend > and resume routines. > > Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx> > --- > These routines are on the bottom of the file. Only used are > registers: > > au1xxx_dbdma_pm_regs[0][0-3] > > and > > au1xxx_dbdma_pm_regs[1-NUM_DBDMA_CHANS][0-6] > > Is my patch right, that assumes that the array can be smaller, or > should the storage and recovery of other registers be added? Actually, I think there's a bug in the save/restore functions. This: for (i = 1, addr = DDMA_CHANNEL_BASE; i < NUM_DBDMA_CHANS; i++) { should be changed to for (i = 1, addr = DDMA_CHANNEL_BASE; i <= NUM_DBDMA_CHANS; i++) as there are 16 individual channels (NUM_DBDMA_CHANS) to save/restore plus the global ddma block config (the +1). And looking closer at it, the last register in a channel can be skipped since it's read-only (at offset 0x18). So, 6 slots per channel for 16 channels plus one row for the ddma global config are enough: static u32 au1xxx_dbdma_pm_regs[NUM_DBDMA_CHANS + 1][6]; Thanks! Manuel Lauss _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm