lkml.org 
[lkml]   [2011]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dmaengine/ste_dma40: support pm in dma40
On Wed, Nov 16, 2011 at 07:30:03 +0100, Narayanan GOPALAKRISHNAN wrote:
> This patch adds power management support to the dma40
> driver. The DMA registers are backed up and restored,
> during suspend/resume. Also flags to track the dma usage
> have been introduced to facilitate this. Patch also includes
> few other minor changes, related to formatting, grammar.
>
> Signed-off-by: Narayanan G <narayanan.gopalakrishnan@stericsson.com>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> + spinlock_t usage_lock;
> + u32 reg_val_backup[BACKUP_REGS_SZ];
> + u32 reg_val_backup_v3[BACKUP_REGS_SZ_V3];
> + u32 *reg_val_backup_chan;
> + bool initialized;

Made this more readable.

>
> +static void d40_power_off(struct d40_base *base, int phy_num)
> +{
> + u32 gcc;
> + int i;
> + int j;
> + int p;
> +
> + /*
> + * Disable the rest of the code for v1, because of GCC register HW bugs
> + * which are not worth working around.
> + */
> + if (base->rev == 1)
> + return;
> +

removed the unconditional return.

> +static void d40_power_on(struct d40_base *base, int phy_num)
> +{
> + u32 gcc;
> +
> + /*
> + * Disable the rest of the code for v1, because of GCC register HW bugs
> + * which are not worth working around.
> + */
> + if (base->rev == 1)
> + return;

Again, removed the unconditional return.

Other changes from v1 of this patch:
1. Removed the usage counter and manage with the pm_runtime_xxx funcs.
2. Do not switch off the reserved channels.

Thanks,
Narayanan


\
 
 \ /
  Last update: 2011-11-16 08:09    [W:0.087 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site