[Top] [All Lists]

Re: [PATCH] mips: decrease size of au1xxx_dbdma_pm_regs[][]

To: Roel Kluin <>
Subject: Re: [PATCH] mips: decrease size of au1xxx_dbdma_pm_regs[][]
From: Manuel Lauss <>
Date: Tue, 21 Jul 2009 15:06:09 +0200
Cc:,,,, Andrew Morton <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=VlwtZ8kS5JO8q5yrMlY8xn9BgX7X41U5erP8Y+cGjjY=; b=Q2exc7rqtWfhewEsYyxMKVrP8iPFyaNudmA/Ofys+kB42tKgFKX3Xk/M/IFlNuAaxw pU7yPHufBAtc8S1Z+e3ojZXTJvl1AaLSzgqONssA6iJ3iPlkdoBT1Gsy2Gw05XHgN9QY xjZMVd+sNuXyqC+/xZBftimvqPov9t6LhYXfI=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Pr3/kjgv5i+5Mn9+YHcMBDbUEa7/EYK0kdne6zl9Wn5tXYG5xPrLgAI1qf3B0rhSPe mapmCLjiwEE6zzWZPPncR1d7gSw95q/Ah8zwI92nBh6uBEl+4RiQDEdXrRIo9PBrFiZq 7Rj+nownaqhTFXNOItUrAWENiSYLS9g9dldUE=
In-reply-to: <>
Original-recipient: rfc822;
References: <>
Hi Roel,

On Tue, Jul 21, 2009 at 2:46 PM, Roel Kluin<> wrote:
> Only registers [0-DDMA_CHANNEL_BASE][0-6] are used by the suspend
> and resume routines.
> Signed-off-by: Roel Kluin <>
> ---
> 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.

  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];

      Manuel Lauss

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