Re: [PATCH] dmaengine/ste_dma40: support pm in dma40

From: Narayanan G
Date: Wed Nov 16 2011 - 02:06:54 EST


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@xxxxxxxxxxxxxx>
> Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> ---
> + 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/