Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dma-imx.h
Go to the documentation of this file.
1 /*
2  * Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8 
9 #ifndef __ASM_ARCH_MXC_DMA_H__
10 #define __ASM_ARCH_MXC_DMA_H__
11 
12 #include <linux/scatterlist.h>
13 #include <linux/device.h>
14 #include <linux/dmaengine.h>
15 
16 /*
17  * This enumerates peripheral types. Used for SDMA.
18  */
20  IMX_DMATYPE_SSI, /* MCU domain SSI */
21  IMX_DMATYPE_SSI_SP, /* Shared SSI */
22  IMX_DMATYPE_MMC, /* MMC */
23  IMX_DMATYPE_SDHC, /* SDHC */
24  IMX_DMATYPE_UART, /* MCU domain UART */
25  IMX_DMATYPE_UART_SP, /* Shared UART */
26  IMX_DMATYPE_FIRI, /* FIRI */
27  IMX_DMATYPE_CSPI, /* MCU domain CSPI */
28  IMX_DMATYPE_CSPI_SP, /* Shared CSPI */
29  IMX_DMATYPE_SIM, /* SIM */
30  IMX_DMATYPE_ATA, /* ATA */
31  IMX_DMATYPE_CCM, /* CCM */
32  IMX_DMATYPE_EXT, /* External peripheral */
33  IMX_DMATYPE_MSHC, /* Memory Stick Host Controller */
34  IMX_DMATYPE_MSHC_SP, /* Shared Memory Stick Host Controller */
35  IMX_DMATYPE_DSP, /* DSP */
36  IMX_DMATYPE_MEMORY, /* Memory */
37  IMX_DMATYPE_FIFO_MEMORY,/* FIFO type Memory */
38  IMX_DMATYPE_SPDIF, /* SPDIF */
39  IMX_DMATYPE_IPU_MEMORY, /* IPU Memory */
40  IMX_DMATYPE_ASRC, /* ASRC */
41  IMX_DMATYPE_ESAI, /* ESAI */
42 };
43 
48 };
49 
50 struct imx_dma_data {
51  int dma_request; /* DMA request line */
53  int priority;
54 };
55 
56 static inline int imx_dma_is_ipu(struct dma_chan *chan)
57 {
58  return !strcmp(dev_name(chan->device->dev), "ipu-core");
59 }
60 
61 static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
62 {
63  return strstr(dev_name(chan->device->dev), "sdma") ||
64  !strcmp(dev_name(chan->device->dev), "imx-dma");
65 }
66 
67 #endif