Re: [PATCH v2 07/11] OMAP2/3/4: DMA: HWMOD: Device registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Manjunatha GK <manjugk@xxxxxx> writes:

> This patch converts omap2/3/4 dma driver into platform
> devices through using omap hwmod, omap device and runtime pm
> frameworks.
>
> Signed-off-by: Manjunatha GK <manjugk@xxxxxx>
> Cc: Benoit Cousson <b-cousson@xxxxxx>
> Cc: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>
> Cc: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
> ---
>  arch/arm/mach-omap2/dma.c              |  134 ++++++++++++++++++++++++++++++++
>  arch/arm/mach-omap2/include/mach/dma.h |   80 +++++++++++++++++++
>  2 files changed, 214 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/dma.c
>  create mode 100644 arch/arm/mach-omap2/include/mach/dma.h
>
> diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
> new file mode 100644
> index 0000000..f369bee
> --- /dev/null
> +++ b/arch/arm/mach-omap2/dma.c
> @@ -0,0 +1,134 @@
> +/*
> + * dma.c - OMAP2 specific DMA code
> + *
> + * Copyright (C) 2003 - 2008 Nokia Corporation
> + * Author: Juha Yrjölä <juha.yrjola@xxxxxxxxx>
> + * DMA channel linking for 1610 by Samuel Ortiz <samuel.ortiz@xxxxxxxxx>
> + * Graphics DMA and LCD DMA graphics tranformations
> + * by Imre Deak <imre.deak@xxxxxxxxx>
> + * OMAP2/3 support Copyright (C) 2004-2007 Texas Instruments, Inc.
> + * Some functions based on earlier dma-omap.c Copyright (C) 2001 RidgeRun, Inc.
> + *
> + * Copyright (C) 2009 Texas Instruments
> + * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@xxxxxx>
> + *
> + * Copyright (C) 2010 Texas Instruments, Inc.
> + * Converted DMA library into platform driver by Manjunatha GK <manjugk@xxxxxx>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include <linux/err.h>
> +#include <linux/slab.h>
> +#include <linux/pm_runtime.h>
> +#include <linux/io.h>
> +#include <linux/module.h>
> +#include <linux/init.h>
> +#include <linux/sched.h>
> +#include <linux/spinlock.h>
> +#include <linux/errno.h>
> +#include <linux/interrupt.h>
> +#include <linux/irq.h>
> +#include <linux/device.h>
> +
> +#include <plat/irqs.h>
> +#include <plat/omap_hwmod.h>
> +#include <plat/omap_device.h>
> +#include <plat/dma.h>
> +
> +#define dma_read(reg)							\
> +({									\
> +	u32 __val;							\
> +	__val = __raw_readl(dma_base + OMAP_DMA4_##reg);		\
> +	__val;								\
> +})
> +
> +#define dma_write(val, reg)						\
> +({									\
> +	__raw_writel((val), dma_base + OMAP_DMA4_##reg);		\
> +})

I know these are copy paste from the original code, but please convert
into static inline functions.

Also, I don't see dma_write() used in this patch.

> +static struct omap_dma_dev_attr *d;
> +static void __iomem *dma_base;
> +static struct omap_system_dma_plat_info *omap2_pdata;
> +static int dma_caps0_status;
> +
> +static struct omap_device_pm_latency omap2_dma_latency[] = {
> +	{
> +	.deactivate_func = omap_device_idle_hwmods,
> +	.activate_func	 = omap_device_enable_hwmods,
> +	.flags		 = OMAP_DEVICE_LATENCY_AUTO_ADJUST,

missing indentation

> +	},
> +};

[...]

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux