Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
dma.h File Reference
#include <linux/platform_device.h>
#include "dma-44xx.h"

Go to the source code of this file.

Data Structures

struct  omap_dma_channel_params
 
struct  omap_dma_lch
 
struct  omap_dma_dev_attr
 
struct  omap_system_dma_plat_info
 

Macros

#define INT_DMA_LCD   25
 
#define OMAP_DMA_NO_DEVICE   0
 
#define OMAP_DMA_MCSI1_TX   1
 
#define OMAP_DMA_MCSI1_RX   2
 
#define OMAP_DMA_I2C_RX   3
 
#define OMAP_DMA_I2C_TX   4
 
#define OMAP_DMA_EXT_NDMA_REQ   5
 
#define OMAP_DMA_EXT_NDMA_REQ2   6
 
#define OMAP_DMA_UWIRE_TX   7
 
#define OMAP_DMA_MCBSP1_TX   8
 
#define OMAP_DMA_MCBSP1_RX   9
 
#define OMAP_DMA_MCBSP3_TX   10
 
#define OMAP_DMA_MCBSP3_RX   11
 
#define OMAP_DMA_UART1_TX   12
 
#define OMAP_DMA_UART1_RX   13
 
#define OMAP_DMA_UART2_TX   14
 
#define OMAP_DMA_UART2_RX   15
 
#define OMAP_DMA_MCBSP2_TX   16
 
#define OMAP_DMA_MCBSP2_RX   17
 
#define OMAP_DMA_UART3_TX   18
 
#define OMAP_DMA_UART3_RX   19
 
#define OMAP_DMA_CAMERA_IF_RX   20
 
#define OMAP_DMA_MMC_TX   21
 
#define OMAP_DMA_MMC_RX   22
 
#define OMAP_DMA_NAND   23
 
#define OMAP_DMA_IRQ_LCD_LINE   24
 
#define OMAP_DMA_MEMORY_STICK   25
 
#define OMAP_DMA_USB_W2FC_RX0   26
 
#define OMAP_DMA_USB_W2FC_RX1   27
 
#define OMAP_DMA_USB_W2FC_RX2   28
 
#define OMAP_DMA_USB_W2FC_TX0   29
 
#define OMAP_DMA_USB_W2FC_TX1   30
 
#define OMAP_DMA_USB_W2FC_TX2   31
 
#define OMAP_DMA_CRYPTO_DES_IN   32
 
#define OMAP_DMA_SPI_TX   33
 
#define OMAP_DMA_SPI_RX   34
 
#define OMAP_DMA_CRYPTO_HASH   35
 
#define OMAP_DMA_CCP_ATTN   36
 
#define OMAP_DMA_CCP_FIFO_NOT_EMPTY   37
 
#define OMAP_DMA_CMT_APE_TX_CHAN_0   38
 
#define OMAP_DMA_CMT_APE_RV_CHAN_0   39
 
#define OMAP_DMA_CMT_APE_TX_CHAN_1   40
 
#define OMAP_DMA_CMT_APE_RV_CHAN_1   41
 
#define OMAP_DMA_CMT_APE_TX_CHAN_2   42
 
#define OMAP_DMA_CMT_APE_RV_CHAN_2   43
 
#define OMAP_DMA_CMT_APE_TX_CHAN_3   44
 
#define OMAP_DMA_CMT_APE_RV_CHAN_3   45
 
#define OMAP_DMA_CMT_APE_TX_CHAN_4   46
 
#define OMAP_DMA_CMT_APE_RV_CHAN_4   47
 
#define OMAP_DMA_CMT_APE_TX_CHAN_5   48
 
#define OMAP_DMA_CMT_APE_RV_CHAN_5   49
 
#define OMAP_DMA_CMT_APE_TX_CHAN_6   50
 
#define OMAP_DMA_CMT_APE_RV_CHAN_6   51
 
#define OMAP_DMA_CMT_APE_TX_CHAN_7   52
 
#define OMAP_DMA_CMT_APE_RV_CHAN_7   53
 
#define OMAP_DMA_MMC2_TX   54
 
#define OMAP_DMA_MMC2_RX   55
 
#define OMAP_DMA_CRYPTO_DES_OUT   56
 
#define OMAP24XX_DMA_NO_DEVICE   0
 
#define OMAP24XX_DMA_XTI_DMA   1 /* S_DMA_0 */
 
#define OMAP24XX_DMA_EXT_DMAREQ0   2 /* S_DMA_1 */
 
#define OMAP24XX_DMA_EXT_DMAREQ1   3 /* S_DMA_2 */
 
#define OMAP24XX_DMA_GPMC   4 /* S_DMA_3 */
 
#define OMAP24XX_DMA_GFX   5 /* S_DMA_4 */
 
#define OMAP24XX_DMA_DSS   6 /* S_DMA_5 */
 
#define OMAP242X_DMA_VLYNQ_TX   7 /* S_DMA_6 */
 
#define OMAP24XX_DMA_EXT_DMAREQ2   7 /* S_DMA_6 */
 
#define OMAP24XX_DMA_CWT   8 /* S_DMA_7 */
 
#define OMAP24XX_DMA_AES_TX   9 /* S_DMA_8 */
 
#define OMAP24XX_DMA_AES_RX   10 /* S_DMA_9 */
 
#define OMAP24XX_DMA_DES_TX   11 /* S_DMA_10 */
 
#define OMAP24XX_DMA_DES_RX   12 /* S_DMA_11 */
 
#define OMAP24XX_DMA_SHA1MD5_RX   13 /* S_DMA_12 */
 
#define OMAP34XX_DMA_SHA2MD5_RX   13 /* S_DMA_12 */
 
#define OMAP242X_DMA_EXT_DMAREQ2   14 /* S_DMA_13 */
 
#define OMAP242X_DMA_EXT_DMAREQ3   15 /* S_DMA_14 */
 
#define OMAP242X_DMA_EXT_DMAREQ4   16 /* S_DMA_15 */
 
#define OMAP242X_DMA_EAC_AC_RD   17 /* S_DMA_16 */
 
#define OMAP242X_DMA_EAC_AC_WR   18 /* S_DMA_17 */
 
#define OMAP242X_DMA_EAC_MD_UL_RD   19 /* S_DMA_18 */
 
#define OMAP242X_DMA_EAC_MD_UL_WR   20 /* S_DMA_19 */
 
#define OMAP242X_DMA_EAC_MD_DL_RD   21 /* S_DMA_20 */
 
#define OMAP242X_DMA_EAC_MD_DL_WR   22 /* S_DMA_21 */
 
#define OMAP242X_DMA_EAC_BT_UL_RD   23 /* S_DMA_22 */
 
#define OMAP242X_DMA_EAC_BT_UL_WR   24 /* S_DMA_23 */
 
#define OMAP242X_DMA_EAC_BT_DL_RD   25 /* S_DMA_24 */
 
#define OMAP242X_DMA_EAC_BT_DL_WR   26 /* S_DMA_25 */
 
#define OMAP243X_DMA_EXT_DMAREQ3   14 /* S_DMA_13 */
 
#define OMAP24XX_DMA_SPI3_TX0   15 /* S_DMA_14 */
 
#define OMAP24XX_DMA_SPI3_RX0   16 /* S_DMA_15 */
 
#define OMAP24XX_DMA_MCBSP3_TX   17 /* S_DMA_16 */
 
#define OMAP24XX_DMA_MCBSP3_RX   18 /* S_DMA_17 */
 
#define OMAP24XX_DMA_MCBSP4_TX   19 /* S_DMA_18 */
 
#define OMAP24XX_DMA_MCBSP4_RX   20 /* S_DMA_19 */
 
#define OMAP24XX_DMA_MCBSP5_TX   21 /* S_DMA_20 */
 
#define OMAP24XX_DMA_MCBSP5_RX   22 /* S_DMA_21 */
 
#define OMAP24XX_DMA_SPI3_TX1   23 /* S_DMA_22 */
 
#define OMAP24XX_DMA_SPI3_RX1   24 /* S_DMA_23 */
 
#define OMAP243X_DMA_EXT_DMAREQ4   25 /* S_DMA_24 */
 
#define OMAP243X_DMA_EXT_DMAREQ5   26 /* S_DMA_25 */
 
#define OMAP34XX_DMA_I2C3_TX   25 /* S_DMA_24 */
 
#define OMAP34XX_DMA_I2C3_RX   26 /* S_DMA_25 */
 
#define OMAP24XX_DMA_I2C1_TX   27 /* S_DMA_26 */
 
#define OMAP24XX_DMA_I2C1_RX   28 /* S_DMA_27 */
 
#define OMAP24XX_DMA_I2C2_TX   29 /* S_DMA_28 */
 
#define OMAP24XX_DMA_I2C2_RX   30 /* S_DMA_29 */
 
#define OMAP24XX_DMA_MCBSP1_TX   31 /* S_DMA_30 */
 
#define OMAP24XX_DMA_MCBSP1_RX   32 /* S_DMA_31 */
 
#define OMAP24XX_DMA_MCBSP2_TX   33 /* S_DMA_32 */
 
#define OMAP24XX_DMA_MCBSP2_RX   34 /* S_DMA_33 */
 
#define OMAP24XX_DMA_SPI1_TX0   35 /* S_DMA_34 */
 
#define OMAP24XX_DMA_SPI1_RX0   36 /* S_DMA_35 */
 
#define OMAP24XX_DMA_SPI1_TX1   37 /* S_DMA_36 */
 
#define OMAP24XX_DMA_SPI1_RX1   38 /* S_DMA_37 */
 
#define OMAP24XX_DMA_SPI1_TX2   39 /* S_DMA_38 */
 
#define OMAP24XX_DMA_SPI1_RX2   40 /* S_DMA_39 */
 
#define OMAP24XX_DMA_SPI1_TX3   41 /* S_DMA_40 */
 
#define OMAP24XX_DMA_SPI1_RX3   42 /* S_DMA_41 */
 
#define OMAP24XX_DMA_SPI2_TX0   43 /* S_DMA_42 */
 
#define OMAP24XX_DMA_SPI2_RX0   44 /* S_DMA_43 */
 
#define OMAP24XX_DMA_SPI2_TX1   45 /* S_DMA_44 */
 
#define OMAP24XX_DMA_SPI2_RX1   46 /* S_DMA_45 */
 
#define OMAP24XX_DMA_MMC2_TX   47 /* S_DMA_46 */
 
#define OMAP24XX_DMA_MMC2_RX   48 /* S_DMA_47 */
 
#define OMAP24XX_DMA_UART1_TX   49 /* S_DMA_48 */
 
#define OMAP24XX_DMA_UART1_RX   50 /* S_DMA_49 */
 
#define OMAP24XX_DMA_UART2_TX   51 /* S_DMA_50 */
 
#define OMAP24XX_DMA_UART2_RX   52 /* S_DMA_51 */
 
#define OMAP24XX_DMA_UART3_TX   53 /* S_DMA_52 */
 
#define OMAP24XX_DMA_UART3_RX   54 /* S_DMA_53 */
 
#define OMAP24XX_DMA_USB_W2FC_TX0   55 /* S_DMA_54 */
 
#define OMAP24XX_DMA_USB_W2FC_RX0   56 /* S_DMA_55 */
 
#define OMAP24XX_DMA_USB_W2FC_TX1   57 /* S_DMA_56 */
 
#define OMAP24XX_DMA_USB_W2FC_RX1   58 /* S_DMA_57 */
 
#define OMAP24XX_DMA_USB_W2FC_TX2   59 /* S_DMA_58 */
 
#define OMAP24XX_DMA_USB_W2FC_RX2   60 /* S_DMA_59 */
 
#define OMAP24XX_DMA_MMC1_TX   61 /* S_DMA_60 */
 
#define OMAP24XX_DMA_MMC1_RX   62 /* S_DMA_61 */
 
#define OMAP24XX_DMA_MS   63 /* S_DMA_62 */
 
#define OMAP242X_DMA_EXT_DMAREQ5   64 /* S_DMA_63 */
 
#define OMAP243X_DMA_EXT_DMAREQ6   64 /* S_DMA_63 */
 
#define OMAP34XX_DMA_EXT_DMAREQ3   64 /* S_DMA_63 */
 
#define OMAP34XX_DMA_AES2_TX   65 /* S_DMA_64 */
 
#define OMAP34XX_DMA_AES2_RX   66 /* S_DMA_65 */
 
#define OMAP34XX_DMA_DES2_TX   67 /* S_DMA_66 */
 
#define OMAP34XX_DMA_DES2_RX   68 /* S_DMA_67 */
 
#define OMAP34XX_DMA_SHA1MD5_RX   69 /* S_DMA_68 */
 
#define OMAP34XX_DMA_SPI4_TX0   70 /* S_DMA_69 */
 
#define OMAP34XX_DMA_SPI4_RX0   71 /* S_DMA_70 */
 
#define OMAP34XX_DSS_DMA0   72 /* S_DMA_71 */
 
#define OMAP34XX_DSS_DMA1   73 /* S_DMA_72 */
 
#define OMAP34XX_DSS_DMA2   74 /* S_DMA_73 */
 
#define OMAP34XX_DSS_DMA3   75 /* S_DMA_74 */
 
#define OMAP34XX_DMA_MMC3_TX   77 /* S_DMA_76 */
 
#define OMAP34XX_DMA_MMC3_RX   78 /* S_DMA_77 */
 
#define OMAP34XX_DMA_USIM_TX   79 /* S_DMA_78 */
 
#define OMAP34XX_DMA_USIM_RX   80 /* S_DMA_79 */
 
#define OMAP36XX_DMA_UART4_TX   81 /* S_DMA_80 */
 
#define OMAP36XX_DMA_UART4_RX   82 /* S_DMA_81 */
 
#define AM35XX_DMA_UART4_TX   54
 
#define AM35XX_DMA_UART4_RX   55
 
#define OMAP1_DMA_TOUT_IRQ   (1 << 0)
 
#define OMAP_DMA_DROP_IRQ   (1 << 1)
 
#define OMAP_DMA_HALF_IRQ   (1 << 2)
 
#define OMAP_DMA_FRAME_IRQ   (1 << 3)
 
#define OMAP_DMA_LAST_IRQ   (1 << 4)
 
#define OMAP_DMA_BLOCK_IRQ   (1 << 5)
 
#define OMAP1_DMA_SYNC_IRQ   (1 << 6)
 
#define OMAP2_DMA_PKT_IRQ   (1 << 7)
 
#define OMAP2_DMA_TRANS_ERR_IRQ   (1 << 8)
 
#define OMAP2_DMA_SECURE_ERR_IRQ   (1 << 9)
 
#define OMAP2_DMA_SUPERVISOR_ERR_IRQ   (1 << 10)
 
#define OMAP2_DMA_MISALIGNED_ERR_IRQ   (1 << 11)
 
#define OMAP_DMA_CCR_EN   (1 << 7)
 
#define OMAP_DMA_CCR_RD_ACTIVE   (1 << 9)
 
#define OMAP_DMA_CCR_WR_ACTIVE   (1 << 10)
 
#define OMAP_DMA_CCR_SEL_SRC_DST_SYNC   (1 << 24)
 
#define OMAP_DMA_CCR_BUFFERING_DISABLE   (1 << 25)
 
#define OMAP_DMA_DATA_TYPE_S8   0x00
 
#define OMAP_DMA_DATA_TYPE_S16   0x01
 
#define OMAP_DMA_DATA_TYPE_S32   0x02
 
#define OMAP_DMA_SYNC_ELEMENT   0x00
 
#define OMAP_DMA_SYNC_FRAME   0x01
 
#define OMAP_DMA_SYNC_BLOCK   0x02
 
#define OMAP_DMA_SYNC_PACKET   0x03
 
#define OMAP_DMA_DST_SYNC_PREFETCH   0x02
 
#define OMAP_DMA_SRC_SYNC   0x01
 
#define OMAP_DMA_DST_SYNC   0x00
 
#define OMAP_DMA_PORT_EMIFF   0x00
 
#define OMAP_DMA_PORT_EMIFS   0x01
 
#define OMAP_DMA_PORT_OCP_T1   0x02
 
#define OMAP_DMA_PORT_TIPB   0x03
 
#define OMAP_DMA_PORT_OCP_T2   0x04
 
#define OMAP_DMA_PORT_MPUI   0x05
 
#define OMAP_DMA_AMODE_CONSTANT   0x00
 
#define OMAP_DMA_AMODE_POST_INC   0x01
 
#define OMAP_DMA_AMODE_SINGLE_IDX   0x02
 
#define OMAP_DMA_AMODE_DOUBLE_IDX   0x03
 
#define DMA_DEFAULT_FIFO_DEPTH   0x10
 
#define DMA_DEFAULT_ARB_RATE   0x01
 
#define DMA_THREAD_RESERVE_NORM   (0x00 << 12) /* Def */
 
#define DMA_THREAD_RESERVE_ONET   (0x01 << 12)
 
#define DMA_THREAD_RESERVE_TWOT   (0x02 << 12)
 
#define DMA_THREAD_RESERVE_THREET   (0x03 << 12)
 
#define DMA_THREAD_FIFO_NONE   (0x00 << 14) /* Def */
 
#define DMA_THREAD_FIFO_75   (0x01 << 14)
 
#define DMA_THREAD_FIFO_25   (0x02 << 14)
 
#define DMA_THREAD_FIFO_50   (0x03 << 14)
 
#define DMA_SYSCONFIG_MIDLEMODE_MASK   (3 << 12)
 
#define DMA_SYSCONFIG_CLOCKACTIVITY_MASK   (3 << 8)
 
#define DMA_SYSCONFIG_EMUFREE   (1 << 5)
 
#define DMA_SYSCONFIG_SIDLEMODE_MASK   (3 << 3)
 
#define DMA_SYSCONFIG_SOFTRESET   (1 << 2)
 
#define DMA_SYSCONFIG_AUTOIDLE   (1 << 0)
 
#define DMA_SYSCONFIG_MIDLEMODE(n)   ((n) << 12)
 
#define DMA_SYSCONFIG_SIDLEMODE(n)   ((n) << 3)
 
#define DMA_IDLEMODE_SMARTIDLE   0x2
 
#define DMA_IDLEMODE_NO_IDLE   0x1
 
#define DMA_IDLEMODE_FORCE_IDLE   0x0
 
#define OMAP_DMA_STATIC_CHAIN   0x1
 
#define OMAP_DMA_DYNAMIC_CHAIN   0x2
 
#define OMAP_DMA_CHAIN_ACTIVE   0x1
 
#define OMAP_DMA_CHAIN_INACTIVE   0x0
 
#define DMA_CH_PRIO_HIGH   0x1
 
#define DMA_CH_PRIO_LOW   0x0 /* Def */
 
#define IS_DMA_ERRATA(id)   (errata & (id))
 
#define SET_DMA_ERRATA(id)   (errata |= (id))
 
#define DMA_ERRATA_IFRAME_BUFFERING   BIT(0x0)
 
#define DMA_ERRATA_PARALLEL_CHANNELS   BIT(0x1)
 
#define DMA_ERRATA_i378   BIT(0x2)
 
#define DMA_ERRATA_i541   BIT(0x3)
 
#define DMA_ERRATA_i88   BIT(0x4)
 
#define DMA_ERRATA_3_3   BIT(0x5)
 
#define DMA_ROMCODE_BUG   BIT(0x6)
 
#define DMA_LINKED_LCH   BIT(0x0)
 
#define GLOBAL_PRIORITY   BIT(0x1)
 
#define RESERVE_CHANNEL   BIT(0x2)
 
#define IS_CSSA_32   BIT(0x3)
 
#define IS_CDSA_32   BIT(0x4)
 
#define IS_RW_PRIORITY   BIT(0x5)
 
#define ENABLE_1510_MODE   BIT(0x6)
 
#define SRC_PORT   BIT(0x7)
 
#define DST_PORT   BIT(0x8)
 
#define SRC_INDEX   BIT(0x9)
 
#define DST_INDEX   BIT(0xA)
 
#define IS_BURST_ONLY4   BIT(0xB)
 
#define CLEAR_CSR_ON_READ   BIT(0xC)
 
#define IS_WORD_16   BIT(0xD)
 
#define DMA_HAS_TRANSPARENT_CAPS   (0x1 << 18)
 
#define DMA_HAS_CONSTANT_FILL_CAPS   (0x1 << 19)
 
#define DMA_HAS_DESCRIPTOR_CAPS   (0x3 << 20)
 

Enumerations

enum  omap_reg_offsets {
  GCR, GSCR, GRST1, HW_ID,
  PCH2_ID, PCH0_ID, PCH1_ID, PCHG_ID,
  PCHD_ID, CAPS_0, CAPS_1, CAPS_2,
  CAPS_3, CAPS_4, PCH2_SR, PCH0_SR,
  PCH1_SR, PCHD_SR, REVISION, IRQSTATUS_L0,
  IRQSTATUS_L1, IRQSTATUS_L2, IRQSTATUS_L3, IRQENABLE_L0,
  IRQENABLE_L1, IRQENABLE_L2, IRQENABLE_L3, SYSSTATUS,
  OCP_SYSCONFIG, CPC, CCR2, LCH_CTRL,
  CSDP, CCR, CICR, CSR,
  CEN, CFN, CSFI, CSEI,
  CSAC, CDAC, CDEI, CDFI,
  CLNK_CTRL, CSSA, CDSA, COLOR,
  CCEN, CCFN, CDP, CNDP,
  CCDN
}
 
enum  omap_dma_burst_mode { OMAP_DMA_DATA_BURST_DIS = 0, OMAP_DMA_DATA_BURST_4, OMAP_DMA_DATA_BURST_8, OMAP_DMA_DATA_BURST_16 }
 
enum  end_type { OMAP_DMA_LITTLE_ENDIAN = 0, OMAP_DMA_BIG_ENDIAN }
 
enum  omap_dma_color_mode { OMAP_DMA_COLOR_DIS = 0, OMAP_DMA_CONSTANT_FILL, OMAP_DMA_TRANSPARENT_COPY }
 
enum  omap_dma_write_mode { OMAP_DMA_WRITE_NON_POSTED = 0, OMAP_DMA_WRITE_POSTED, OMAP_DMA_WRITE_LAST_NON_POSTED }
 
enum  omap_dma_channel_mode { OMAP_DMA_LCH_2D = 0, OMAP_DMA_LCH_G, OMAP_DMA_LCH_P, OMAP_DMA_LCH_PD }
 

Functions

void __init omap_init_consistent_dma_size (void)
 
void omap_set_dma_priority (int lch, int dst_port, int priority)
 
int omap_request_dma (int dev_id, const char *dev_name, void(*callback)(int lch, u16 ch_status, void *data), void *data, int *dma_ch)
 
void omap_enable_dma_irq (int ch, u16 irq_bits)
 
void omap_disable_dma_irq (int ch, u16 irq_bits)
 
void omap_free_dma (int ch)
 
void omap_start_dma (int lch)
 
void omap_stop_dma (int lch)
 
void omap_set_dma_transfer_params (int lch, int data_type, int elem_count, int frame_count, int sync_mode, int dma_trigger, int src_or_dst_synch)
 
void omap_set_dma_color_mode (int lch, enum omap_dma_color_mode mode, u32 color)
 
void omap_set_dma_write_mode (int lch, enum omap_dma_write_mode mode)
 
void omap_set_dma_channel_mode (int lch, enum omap_dma_channel_mode mode)
 
void omap_set_dma_src_params (int lch, int src_port, int src_amode, unsigned long src_start, int src_ei, int src_fi)
 
void omap_set_dma_src_index (int lch, int eidx, int fidx)
 
void omap_set_dma_src_data_pack (int lch, int enable)
 
void omap_set_dma_src_burst_mode (int lch, enum omap_dma_burst_mode burst_mode)
 
void omap_set_dma_dest_params (int lch, int dest_port, int dest_amode, unsigned long dest_start, int dst_ei, int dst_fi)
 
void omap_set_dma_dest_index (int lch, int eidx, int fidx)
 
void omap_set_dma_dest_data_pack (int lch, int enable)
 
void omap_set_dma_dest_burst_mode (int lch, enum omap_dma_burst_mode burst_mode)
 
void omap_set_dma_params (int lch, struct omap_dma_channel_params *params)
 
void omap_dma_link_lch (int lch_head, int lch_queue)
 
void omap_dma_unlink_lch (int lch_head, int lch_queue)
 
int omap_set_dma_callback (int lch, void(*callback)(int lch, u16 ch_status, void *data), void *data)
 
dma_addr_t omap_get_dma_src_pos (int lch)
 
dma_addr_t omap_get_dma_dst_pos (int lch)
 
void omap_clear_dma (int lch)
 
int omap_get_dma_active_status (int lch)
 
int omap_dma_running (void)
 
void omap_dma_set_global_params (int arb_rate, int max_fifo_depth, int tparams)
 omap_dma_set_global_params : Set global priority settings for dma
 
int omap_dma_set_prio_lch (int lch, unsigned char read_prio, unsigned char write_prio)
 omap_dma_set_prio_lch : Set channel wise priority settings
 
void omap_set_dma_dst_endian_type (int lch, enum end_type etype)
 
void omap_set_dma_src_endian_type (int lch, enum end_type etype)
 
int omap_get_dma_index (int lch, int *ei, int *fi)
 
void omap_dma_global_context_save (void)
 
void omap_dma_global_context_restore (void)
 
void omap_dma_disable_irq (int lch)
 
int omap_request_dma_chain (int dev_id, const char *dev_name, void(*callback)(int lch, u16 ch_status, void *data), int *chain_id, int no_of_chans, int chain_mode, struct omap_dma_channel_params params)
 omap_request_dma_chain : Request a chain of DMA channels
 
int omap_free_dma_chain (int chain_id)
 omap_free_dma_chain - Free all the logical channels in a chain.
 
int omap_dma_chain_a_transfer (int chain_id, int src_start, int dest_start, int elem_count, int frame_count, void *callbk_data)
 omap_dma_chain_a_transfer - Get a free channel from a chain, set the params and start the transfer.
 
int omap_start_dma_chain_transfers (int chain_id)
 omap_start_dma_chain_transfers - Start the chain
 
int omap_stop_dma_chain_transfers (int chain_id)
 omap_stop_dma_chain_transfers - Stop the dma transfer of a chain.
 
int omap_get_dma_chain_index (int chain_id, int *ei, int *fi)
 omap_get_dma_chain_index - Get the element and frame index of the ongoing DMA in chain
 
int omap_get_dma_chain_dst_pos (int chain_id)
 omap_get_dma_chain_dst_pos - Get the destination position of the ongoing DMA in chain
 
int omap_get_dma_chain_src_pos (int chain_id)
 omap_get_dma_chain_src_pos - Get the source position of the ongoing DMA in chain
 
int omap_modify_dma_chain_params (int chain_id, struct omap_dma_channel_params params)
 omap_modify_dma_chain_param : Modify the chain's params - Modify the params after setting it. Dont do this while dma is running!!
 
int omap_dma_chain_status (int chain_id)
 omap_dma_chain_status - Check if the chain is in active / inactive state.
 

Macro Definition Documentation

#define AM35XX_DMA_UART4_RX   55

Definition at line 203 of file dma.h.

#define AM35XX_DMA_UART4_TX   54

Definition at line 202 of file dma.h.

#define CLEAR_CSR_ON_READ   BIT(0xC)

Definition at line 314 of file dma.h.

#define DMA_CH_PRIO_HIGH   0x1

Definition at line 286 of file dma.h.

#define DMA_CH_PRIO_LOW   0x0 /* Def */

Definition at line 287 of file dma.h.

#define DMA_DEFAULT_ARB_RATE   0x01

Definition at line 252 of file dma.h.

#define DMA_DEFAULT_FIFO_DEPTH   0x10

Definition at line 251 of file dma.h.

#define DMA_ERRATA_3_3   BIT(0x5)

Definition at line 298 of file dma.h.

#define DMA_ERRATA_i378   BIT(0x2)

Definition at line 295 of file dma.h.

#define DMA_ERRATA_i541   BIT(0x3)

Definition at line 296 of file dma.h.

#define DMA_ERRATA_i88   BIT(0x4)

Definition at line 297 of file dma.h.

#define DMA_ERRATA_IFRAME_BUFFERING   BIT(0x0)

Definition at line 293 of file dma.h.

#define DMA_ERRATA_PARALLEL_CHANNELS   BIT(0x1)

Definition at line 294 of file dma.h.

#define DMA_HAS_CONSTANT_FILL_CAPS   (0x1 << 19)

Definition at line 319 of file dma.h.

#define DMA_HAS_DESCRIPTOR_CAPS   (0x3 << 20)

Definition at line 320 of file dma.h.

#define DMA_HAS_TRANSPARENT_CAPS   (0x1 << 18)

Definition at line 318 of file dma.h.

#define DMA_IDLEMODE_FORCE_IDLE   0x0

Definition at line 276 of file dma.h.

#define DMA_IDLEMODE_NO_IDLE   0x1

Definition at line 275 of file dma.h.

#define DMA_IDLEMODE_SMARTIDLE   0x2

Definition at line 274 of file dma.h.

#define DMA_LINKED_LCH   BIT(0x0)

Definition at line 302 of file dma.h.

#define DMA_ROMCODE_BUG   BIT(0x6)

Definition at line 299 of file dma.h.

#define DMA_SYSCONFIG_AUTOIDLE   (1 << 0)

Definition at line 269 of file dma.h.

#define DMA_SYSCONFIG_CLOCKACTIVITY_MASK   (3 << 8)

Definition at line 265 of file dma.h.

#define DMA_SYSCONFIG_EMUFREE   (1 << 5)

Definition at line 266 of file dma.h.

#define DMA_SYSCONFIG_MIDLEMODE (   n)    ((n) << 12)

Definition at line 271 of file dma.h.

#define DMA_SYSCONFIG_MIDLEMODE_MASK   (3 << 12)

Definition at line 264 of file dma.h.

#define DMA_SYSCONFIG_SIDLEMODE (   n)    ((n) << 3)

Definition at line 272 of file dma.h.

#define DMA_SYSCONFIG_SIDLEMODE_MASK   (3 << 3)

Definition at line 267 of file dma.h.

#define DMA_SYSCONFIG_SOFTRESET   (1 << 2)

Definition at line 268 of file dma.h.

#define DMA_THREAD_FIFO_25   (0x02 << 14)

Definition at line 260 of file dma.h.

#define DMA_THREAD_FIFO_50   (0x03 << 14)

Definition at line 261 of file dma.h.

#define DMA_THREAD_FIFO_75   (0x01 << 14)

Definition at line 259 of file dma.h.

#define DMA_THREAD_FIFO_NONE   (0x00 << 14) /* Def */

Definition at line 258 of file dma.h.

#define DMA_THREAD_RESERVE_NORM   (0x00 << 12) /* Def */

Definition at line 254 of file dma.h.

#define DMA_THREAD_RESERVE_ONET   (0x01 << 12)

Definition at line 255 of file dma.h.

#define DMA_THREAD_RESERVE_THREET   (0x03 << 12)

Definition at line 257 of file dma.h.

#define DMA_THREAD_RESERVE_TWOT   (0x02 << 12)

Definition at line 256 of file dma.h.

#define DST_INDEX   BIT(0xA)

Definition at line 312 of file dma.h.

#define DST_PORT   BIT(0x8)

Definition at line 310 of file dma.h.

#define ENABLE_1510_MODE   BIT(0x6)

Definition at line 308 of file dma.h.

#define GLOBAL_PRIORITY   BIT(0x1)

Definition at line 303 of file dma.h.

#define INT_DMA_LCD   25

Definition at line 34 of file dma.h.

#define IS_BURST_ONLY4   BIT(0xB)

Definition at line 313 of file dma.h.

#define IS_CDSA_32   BIT(0x4)

Definition at line 306 of file dma.h.

#define IS_CSSA_32   BIT(0x3)

Definition at line 305 of file dma.h.

#define IS_DMA_ERRATA (   id)    (errata & (id))

Definition at line 290 of file dma.h.

#define IS_RW_PRIORITY   BIT(0x5)

Definition at line 307 of file dma.h.

#define IS_WORD_16   BIT(0xD)

Definition at line 315 of file dma.h.

#define OMAP1_DMA_SYNC_IRQ   (1 << 6)

Definition at line 213 of file dma.h.

#define OMAP1_DMA_TOUT_IRQ   (1 << 0)

Definition at line 207 of file dma.h.

#define OMAP242X_DMA_EAC_AC_RD   17 /* S_DMA_16 */

Definition at line 117 of file dma.h.

#define OMAP242X_DMA_EAC_AC_WR   18 /* S_DMA_17 */

Definition at line 118 of file dma.h.

#define OMAP242X_DMA_EAC_BT_DL_RD   25 /* S_DMA_24 */

Definition at line 125 of file dma.h.

#define OMAP242X_DMA_EAC_BT_DL_WR   26 /* S_DMA_25 */

Definition at line 126 of file dma.h.

#define OMAP242X_DMA_EAC_BT_UL_RD   23 /* S_DMA_22 */

Definition at line 123 of file dma.h.

#define OMAP242X_DMA_EAC_BT_UL_WR   24 /* S_DMA_23 */

Definition at line 124 of file dma.h.

#define OMAP242X_DMA_EAC_MD_DL_RD   21 /* S_DMA_20 */

Definition at line 121 of file dma.h.

#define OMAP242X_DMA_EAC_MD_DL_WR   22 /* S_DMA_21 */

Definition at line 122 of file dma.h.

#define OMAP242X_DMA_EAC_MD_UL_RD   19 /* S_DMA_18 */

Definition at line 119 of file dma.h.

#define OMAP242X_DMA_EAC_MD_UL_WR   20 /* S_DMA_19 */

Definition at line 120 of file dma.h.

#define OMAP242X_DMA_EXT_DMAREQ2   14 /* S_DMA_13 */

Definition at line 114 of file dma.h.

#define OMAP242X_DMA_EXT_DMAREQ3   15 /* S_DMA_14 */

Definition at line 115 of file dma.h.

#define OMAP242X_DMA_EXT_DMAREQ4   16 /* S_DMA_15 */

Definition at line 116 of file dma.h.

#define OMAP242X_DMA_EXT_DMAREQ5   64 /* S_DMA_63 */

Definition at line 179 of file dma.h.

#define OMAP242X_DMA_VLYNQ_TX   7 /* S_DMA_6 */

Definition at line 105 of file dma.h.

#define OMAP243X_DMA_EXT_DMAREQ3   14 /* S_DMA_13 */

Definition at line 127 of file dma.h.

#define OMAP243X_DMA_EXT_DMAREQ4   25 /* S_DMA_24 */

Definition at line 138 of file dma.h.

#define OMAP243X_DMA_EXT_DMAREQ5   26 /* S_DMA_25 */

Definition at line 139 of file dma.h.

#define OMAP243X_DMA_EXT_DMAREQ6   64 /* S_DMA_63 */

Definition at line 180 of file dma.h.

#define OMAP24XX_DMA_AES_RX   10 /* S_DMA_9 */

Definition at line 109 of file dma.h.

#define OMAP24XX_DMA_AES_TX   9 /* S_DMA_8 */

Definition at line 108 of file dma.h.

#define OMAP24XX_DMA_CWT   8 /* S_DMA_7 */

Definition at line 107 of file dma.h.

#define OMAP24XX_DMA_DES_RX   12 /* S_DMA_11 */

Definition at line 111 of file dma.h.

#define OMAP24XX_DMA_DES_TX   11 /* S_DMA_10 */

Definition at line 110 of file dma.h.

#define OMAP24XX_DMA_DSS   6 /* S_DMA_5 */

Definition at line 104 of file dma.h.

#define OMAP24XX_DMA_EXT_DMAREQ0   2 /* S_DMA_1 */

Definition at line 100 of file dma.h.

#define OMAP24XX_DMA_EXT_DMAREQ1   3 /* S_DMA_2 */

Definition at line 101 of file dma.h.

#define OMAP24XX_DMA_EXT_DMAREQ2   7 /* S_DMA_6 */

Definition at line 106 of file dma.h.

#define OMAP24XX_DMA_GFX   5 /* S_DMA_4 */

Definition at line 103 of file dma.h.

#define OMAP24XX_DMA_GPMC   4 /* S_DMA_3 */

Definition at line 102 of file dma.h.

#define OMAP24XX_DMA_I2C1_RX   28 /* S_DMA_27 */

Definition at line 143 of file dma.h.

#define OMAP24XX_DMA_I2C1_TX   27 /* S_DMA_26 */

Definition at line 142 of file dma.h.

#define OMAP24XX_DMA_I2C2_RX   30 /* S_DMA_29 */

Definition at line 145 of file dma.h.

#define OMAP24XX_DMA_I2C2_TX   29 /* S_DMA_28 */

Definition at line 144 of file dma.h.

#define OMAP24XX_DMA_MCBSP1_RX   32 /* S_DMA_31 */

Definition at line 147 of file dma.h.

#define OMAP24XX_DMA_MCBSP1_TX   31 /* S_DMA_30 */

Definition at line 146 of file dma.h.

#define OMAP24XX_DMA_MCBSP2_RX   34 /* S_DMA_33 */

Definition at line 149 of file dma.h.

#define OMAP24XX_DMA_MCBSP2_TX   33 /* S_DMA_32 */

Definition at line 148 of file dma.h.

#define OMAP24XX_DMA_MCBSP3_RX   18 /* S_DMA_17 */

Definition at line 131 of file dma.h.

#define OMAP24XX_DMA_MCBSP3_TX   17 /* S_DMA_16 */

Definition at line 130 of file dma.h.

#define OMAP24XX_DMA_MCBSP4_RX   20 /* S_DMA_19 */

Definition at line 133 of file dma.h.

#define OMAP24XX_DMA_MCBSP4_TX   19 /* S_DMA_18 */

Definition at line 132 of file dma.h.

#define OMAP24XX_DMA_MCBSP5_RX   22 /* S_DMA_21 */

Definition at line 135 of file dma.h.

#define OMAP24XX_DMA_MCBSP5_TX   21 /* S_DMA_20 */

Definition at line 134 of file dma.h.

#define OMAP24XX_DMA_MMC1_RX   62 /* S_DMA_61 */

Definition at line 177 of file dma.h.

#define OMAP24XX_DMA_MMC1_TX   61 /* S_DMA_60 */

Definition at line 176 of file dma.h.

#define OMAP24XX_DMA_MMC2_RX   48 /* S_DMA_47 */

Definition at line 163 of file dma.h.

#define OMAP24XX_DMA_MMC2_TX   47 /* S_DMA_46 */

Definition at line 162 of file dma.h.

#define OMAP24XX_DMA_MS   63 /* S_DMA_62 */

Definition at line 178 of file dma.h.

#define OMAP24XX_DMA_NO_DEVICE   0

Definition at line 98 of file dma.h.

#define OMAP24XX_DMA_SHA1MD5_RX   13 /* S_DMA_12 */

Definition at line 112 of file dma.h.

#define OMAP24XX_DMA_SPI1_RX0   36 /* S_DMA_35 */

Definition at line 151 of file dma.h.

#define OMAP24XX_DMA_SPI1_RX1   38 /* S_DMA_37 */

Definition at line 153 of file dma.h.

#define OMAP24XX_DMA_SPI1_RX2   40 /* S_DMA_39 */

Definition at line 155 of file dma.h.

#define OMAP24XX_DMA_SPI1_RX3   42 /* S_DMA_41 */

Definition at line 157 of file dma.h.

#define OMAP24XX_DMA_SPI1_TX0   35 /* S_DMA_34 */

Definition at line 150 of file dma.h.

#define OMAP24XX_DMA_SPI1_TX1   37 /* S_DMA_36 */

Definition at line 152 of file dma.h.

#define OMAP24XX_DMA_SPI1_TX2   39 /* S_DMA_38 */

Definition at line 154 of file dma.h.

#define OMAP24XX_DMA_SPI1_TX3   41 /* S_DMA_40 */

Definition at line 156 of file dma.h.

#define OMAP24XX_DMA_SPI2_RX0   44 /* S_DMA_43 */

Definition at line 159 of file dma.h.

#define OMAP24XX_DMA_SPI2_RX1   46 /* S_DMA_45 */

Definition at line 161 of file dma.h.

#define OMAP24XX_DMA_SPI2_TX0   43 /* S_DMA_42 */

Definition at line 158 of file dma.h.

#define OMAP24XX_DMA_SPI2_TX1   45 /* S_DMA_44 */

Definition at line 160 of file dma.h.

#define OMAP24XX_DMA_SPI3_RX0   16 /* S_DMA_15 */

Definition at line 129 of file dma.h.

#define OMAP24XX_DMA_SPI3_RX1   24 /* S_DMA_23 */

Definition at line 137 of file dma.h.

#define OMAP24XX_DMA_SPI3_TX0   15 /* S_DMA_14 */

Definition at line 128 of file dma.h.

#define OMAP24XX_DMA_SPI3_TX1   23 /* S_DMA_22 */

Definition at line 136 of file dma.h.

#define OMAP24XX_DMA_UART1_RX   50 /* S_DMA_49 */

Definition at line 165 of file dma.h.

#define OMAP24XX_DMA_UART1_TX   49 /* S_DMA_48 */

Definition at line 164 of file dma.h.

#define OMAP24XX_DMA_UART2_RX   52 /* S_DMA_51 */

Definition at line 167 of file dma.h.

#define OMAP24XX_DMA_UART2_TX   51 /* S_DMA_50 */

Definition at line 166 of file dma.h.

#define OMAP24XX_DMA_UART3_RX   54 /* S_DMA_53 */

Definition at line 169 of file dma.h.

#define OMAP24XX_DMA_UART3_TX   53 /* S_DMA_52 */

Definition at line 168 of file dma.h.

#define OMAP24XX_DMA_USB_W2FC_RX0   56 /* S_DMA_55 */

Definition at line 171 of file dma.h.

#define OMAP24XX_DMA_USB_W2FC_RX1   58 /* S_DMA_57 */

Definition at line 173 of file dma.h.

#define OMAP24XX_DMA_USB_W2FC_RX2   60 /* S_DMA_59 */

Definition at line 175 of file dma.h.

#define OMAP24XX_DMA_USB_W2FC_TX0   55 /* S_DMA_54 */

Definition at line 170 of file dma.h.

#define OMAP24XX_DMA_USB_W2FC_TX1   57 /* S_DMA_56 */

Definition at line 172 of file dma.h.

#define OMAP24XX_DMA_USB_W2FC_TX2   59 /* S_DMA_58 */

Definition at line 174 of file dma.h.

#define OMAP24XX_DMA_XTI_DMA   1 /* S_DMA_0 */

Definition at line 99 of file dma.h.

#define OMAP2_DMA_MISALIGNED_ERR_IRQ   (1 << 11)

Definition at line 218 of file dma.h.

#define OMAP2_DMA_PKT_IRQ   (1 << 7)

Definition at line 214 of file dma.h.

#define OMAP2_DMA_SECURE_ERR_IRQ   (1 << 9)

Definition at line 216 of file dma.h.

#define OMAP2_DMA_SUPERVISOR_ERR_IRQ   (1 << 10)

Definition at line 217 of file dma.h.

#define OMAP2_DMA_TRANS_ERR_IRQ   (1 << 8)

Definition at line 215 of file dma.h.

#define OMAP34XX_DMA_AES2_RX   66 /* S_DMA_65 */

Definition at line 183 of file dma.h.

#define OMAP34XX_DMA_AES2_TX   65 /* S_DMA_64 */

Definition at line 182 of file dma.h.

#define OMAP34XX_DMA_DES2_RX   68 /* S_DMA_67 */

Definition at line 185 of file dma.h.

#define OMAP34XX_DMA_DES2_TX   67 /* S_DMA_66 */

Definition at line 184 of file dma.h.

#define OMAP34XX_DMA_EXT_DMAREQ3   64 /* S_DMA_63 */

Definition at line 181 of file dma.h.

#define OMAP34XX_DMA_I2C3_RX   26 /* S_DMA_25 */

Definition at line 141 of file dma.h.

#define OMAP34XX_DMA_I2C3_TX   25 /* S_DMA_24 */

Definition at line 140 of file dma.h.

#define OMAP34XX_DMA_MMC3_RX   78 /* S_DMA_77 */

Definition at line 194 of file dma.h.

#define OMAP34XX_DMA_MMC3_TX   77 /* S_DMA_76 */

Definition at line 193 of file dma.h.

#define OMAP34XX_DMA_SHA1MD5_RX   69 /* S_DMA_68 */

Definition at line 186 of file dma.h.

#define OMAP34XX_DMA_SHA2MD5_RX   13 /* S_DMA_12 */

Definition at line 113 of file dma.h.

#define OMAP34XX_DMA_SPI4_RX0   71 /* S_DMA_70 */

Definition at line 188 of file dma.h.

#define OMAP34XX_DMA_SPI4_TX0   70 /* S_DMA_69 */

Definition at line 187 of file dma.h.

#define OMAP34XX_DMA_USIM_RX   80 /* S_DMA_79 */

Definition at line 196 of file dma.h.

#define OMAP34XX_DMA_USIM_TX   79 /* S_DMA_78 */

Definition at line 195 of file dma.h.

#define OMAP34XX_DSS_DMA0   72 /* S_DMA_71 */

Definition at line 189 of file dma.h.

#define OMAP34XX_DSS_DMA1   73 /* S_DMA_72 */

Definition at line 190 of file dma.h.

#define OMAP34XX_DSS_DMA2   74 /* S_DMA_73 */

Definition at line 191 of file dma.h.

#define OMAP34XX_DSS_DMA3   75 /* S_DMA_74 */

Definition at line 192 of file dma.h.

#define OMAP36XX_DMA_UART4_RX   82 /* S_DMA_81 */

Definition at line 199 of file dma.h.

#define OMAP36XX_DMA_UART4_TX   81 /* S_DMA_80 */

Definition at line 198 of file dma.h.

#define OMAP_DMA_AMODE_CONSTANT   0x00

Definition at line 246 of file dma.h.

#define OMAP_DMA_AMODE_DOUBLE_IDX   0x03

Definition at line 249 of file dma.h.

#define OMAP_DMA_AMODE_POST_INC   0x01

Definition at line 247 of file dma.h.

#define OMAP_DMA_AMODE_SINGLE_IDX   0x02

Definition at line 248 of file dma.h.

#define OMAP_DMA_BLOCK_IRQ   (1 << 5)

Definition at line 212 of file dma.h.

#define OMAP_DMA_CAMERA_IF_RX   20

Definition at line 57 of file dma.h.

#define OMAP_DMA_CCP_ATTN   36

Definition at line 75 of file dma.h.

#define OMAP_DMA_CCP_FIFO_NOT_EMPTY   37

Definition at line 76 of file dma.h.

#define OMAP_DMA_CCR_BUFFERING_DISABLE   (1 << 25)

Definition at line 224 of file dma.h.

#define OMAP_DMA_CCR_EN   (1 << 7)

Definition at line 220 of file dma.h.

#define OMAP_DMA_CCR_RD_ACTIVE   (1 << 9)

Definition at line 221 of file dma.h.

#define OMAP_DMA_CCR_SEL_SRC_DST_SYNC   (1 << 24)

Definition at line 223 of file dma.h.

#define OMAP_DMA_CCR_WR_ACTIVE   (1 << 10)

Definition at line 222 of file dma.h.

#define OMAP_DMA_CHAIN_ACTIVE   0x1

Definition at line 282 of file dma.h.

#define OMAP_DMA_CHAIN_INACTIVE   0x0

Definition at line 283 of file dma.h.

#define OMAP_DMA_CMT_APE_RV_CHAN_0   39

Definition at line 78 of file dma.h.

#define OMAP_DMA_CMT_APE_RV_CHAN_1   41

Definition at line 80 of file dma.h.

#define OMAP_DMA_CMT_APE_RV_CHAN_2   43

Definition at line 82 of file dma.h.

#define OMAP_DMA_CMT_APE_RV_CHAN_3   45

Definition at line 84 of file dma.h.

#define OMAP_DMA_CMT_APE_RV_CHAN_4   47

Definition at line 86 of file dma.h.

#define OMAP_DMA_CMT_APE_RV_CHAN_5   49

Definition at line 88 of file dma.h.

#define OMAP_DMA_CMT_APE_RV_CHAN_6   51

Definition at line 90 of file dma.h.

#define OMAP_DMA_CMT_APE_RV_CHAN_7   53

Definition at line 92 of file dma.h.

#define OMAP_DMA_CMT_APE_TX_CHAN_0   38

Definition at line 77 of file dma.h.

#define OMAP_DMA_CMT_APE_TX_CHAN_1   40

Definition at line 79 of file dma.h.

#define OMAP_DMA_CMT_APE_TX_CHAN_2   42

Definition at line 81 of file dma.h.

#define OMAP_DMA_CMT_APE_TX_CHAN_3   44

Definition at line 83 of file dma.h.

#define OMAP_DMA_CMT_APE_TX_CHAN_4   46

Definition at line 85 of file dma.h.

#define OMAP_DMA_CMT_APE_TX_CHAN_5   48

Definition at line 87 of file dma.h.

#define OMAP_DMA_CMT_APE_TX_CHAN_6   50

Definition at line 89 of file dma.h.

#define OMAP_DMA_CMT_APE_TX_CHAN_7   52

Definition at line 91 of file dma.h.

#define OMAP_DMA_CRYPTO_DES_IN   32

Definition at line 71 of file dma.h.

#define OMAP_DMA_CRYPTO_DES_OUT   56

Definition at line 95 of file dma.h.

#define OMAP_DMA_CRYPTO_HASH   35

Definition at line 74 of file dma.h.

#define OMAP_DMA_DATA_TYPE_S16   0x01

Definition at line 227 of file dma.h.

#define OMAP_DMA_DATA_TYPE_S32   0x02

Definition at line 228 of file dma.h.

#define OMAP_DMA_DATA_TYPE_S8   0x00

Definition at line 226 of file dma.h.

#define OMAP_DMA_DROP_IRQ   (1 << 1)

Definition at line 208 of file dma.h.

#define OMAP_DMA_DST_SYNC   0x00

Definition at line 237 of file dma.h.

#define OMAP_DMA_DST_SYNC_PREFETCH   0x02

Definition at line 235 of file dma.h.

#define OMAP_DMA_DYNAMIC_CHAIN   0x2

Definition at line 281 of file dma.h.

#define OMAP_DMA_EXT_NDMA_REQ   5

Definition at line 42 of file dma.h.

#define OMAP_DMA_EXT_NDMA_REQ2   6

Definition at line 43 of file dma.h.

#define OMAP_DMA_FRAME_IRQ   (1 << 3)

Definition at line 210 of file dma.h.

#define OMAP_DMA_HALF_IRQ   (1 << 2)

Definition at line 209 of file dma.h.

#define OMAP_DMA_I2C_RX   3

Definition at line 40 of file dma.h.

#define OMAP_DMA_I2C_TX   4

Definition at line 41 of file dma.h.

#define OMAP_DMA_IRQ_LCD_LINE   24

Definition at line 61 of file dma.h.

#define OMAP_DMA_LAST_IRQ   (1 << 4)

Definition at line 211 of file dma.h.

#define OMAP_DMA_MCBSP1_RX   9

Definition at line 46 of file dma.h.

#define OMAP_DMA_MCBSP1_TX   8

Definition at line 45 of file dma.h.

#define OMAP_DMA_MCBSP2_RX   17

Definition at line 54 of file dma.h.

#define OMAP_DMA_MCBSP2_TX   16

Definition at line 53 of file dma.h.

#define OMAP_DMA_MCBSP3_RX   11

Definition at line 48 of file dma.h.

#define OMAP_DMA_MCBSP3_TX   10

Definition at line 47 of file dma.h.

#define OMAP_DMA_MCSI1_RX   2

Definition at line 39 of file dma.h.

#define OMAP_DMA_MCSI1_TX   1

Definition at line 38 of file dma.h.

#define OMAP_DMA_MEMORY_STICK   25

Definition at line 62 of file dma.h.

#define OMAP_DMA_MMC2_RX   55

Definition at line 94 of file dma.h.

#define OMAP_DMA_MMC2_TX   54

Definition at line 93 of file dma.h.

#define OMAP_DMA_MMC_RX   22

Definition at line 59 of file dma.h.

#define OMAP_DMA_MMC_TX   21

Definition at line 58 of file dma.h.

#define OMAP_DMA_NAND   23

Definition at line 60 of file dma.h.

#define OMAP_DMA_NO_DEVICE   0

Definition at line 37 of file dma.h.

#define OMAP_DMA_PORT_EMIFF   0x00

Definition at line 239 of file dma.h.

#define OMAP_DMA_PORT_EMIFS   0x01

Definition at line 240 of file dma.h.

#define OMAP_DMA_PORT_MPUI   0x05

Definition at line 244 of file dma.h.

#define OMAP_DMA_PORT_OCP_T1   0x02

Definition at line 241 of file dma.h.

#define OMAP_DMA_PORT_OCP_T2   0x04

Definition at line 243 of file dma.h.

#define OMAP_DMA_PORT_TIPB   0x03

Definition at line 242 of file dma.h.

#define OMAP_DMA_SPI_RX   34

Definition at line 73 of file dma.h.

#define OMAP_DMA_SPI_TX   33

Definition at line 72 of file dma.h.

#define OMAP_DMA_SRC_SYNC   0x01

Definition at line 236 of file dma.h.

#define OMAP_DMA_STATIC_CHAIN   0x1

Definition at line 280 of file dma.h.

#define OMAP_DMA_SYNC_BLOCK   0x02

Definition at line 232 of file dma.h.

#define OMAP_DMA_SYNC_ELEMENT   0x00

Definition at line 230 of file dma.h.

#define OMAP_DMA_SYNC_FRAME   0x01

Definition at line 231 of file dma.h.

#define OMAP_DMA_SYNC_PACKET   0x03

Definition at line 233 of file dma.h.

#define OMAP_DMA_UART1_RX   13

Definition at line 50 of file dma.h.

#define OMAP_DMA_UART1_TX   12

Definition at line 49 of file dma.h.

#define OMAP_DMA_UART2_RX   15

Definition at line 52 of file dma.h.

#define OMAP_DMA_UART2_TX   14

Definition at line 51 of file dma.h.

#define OMAP_DMA_UART3_RX   19

Definition at line 56 of file dma.h.

#define OMAP_DMA_UART3_TX   18

Definition at line 55 of file dma.h.

#define OMAP_DMA_USB_W2FC_RX0   26

Definition at line 63 of file dma.h.

#define OMAP_DMA_USB_W2FC_RX1   27

Definition at line 64 of file dma.h.

#define OMAP_DMA_USB_W2FC_RX2   28

Definition at line 65 of file dma.h.

#define OMAP_DMA_USB_W2FC_TX0   29

Definition at line 66 of file dma.h.

#define OMAP_DMA_USB_W2FC_TX1   30

Definition at line 67 of file dma.h.

#define OMAP_DMA_USB_W2FC_TX2   31

Definition at line 68 of file dma.h.

#define OMAP_DMA_UWIRE_TX   7

Definition at line 44 of file dma.h.

#define RESERVE_CHANNEL   BIT(0x2)

Definition at line 304 of file dma.h.

#define SET_DMA_ERRATA (   id)    (errata |= (id))

Definition at line 291 of file dma.h.

#define SRC_INDEX   BIT(0x9)

Definition at line 311 of file dma.h.

#define SRC_PORT   BIT(0x7)

Definition at line 309 of file dma.h.

Enumeration Type Documentation

enum end_type
Enumerator:
OMAP_DMA_LITTLE_ENDIAN 
OMAP_DMA_BIG_ENDIAN 

Definition at line 358 of file dma.h.

Enumerator:
OMAP_DMA_DATA_BURST_DIS 
OMAP_DMA_DATA_BURST_4 
OMAP_DMA_DATA_BURST_8 
OMAP_DMA_DATA_BURST_16 

Definition at line 351 of file dma.h.

Enumerator:
OMAP_DMA_LCH_2D 
OMAP_DMA_LCH_G 
OMAP_DMA_LCH_P 
OMAP_DMA_LCH_PD 

Definition at line 375 of file dma.h.

Enumerator:
OMAP_DMA_COLOR_DIS 
OMAP_DMA_CONSTANT_FILL 
OMAP_DMA_TRANSPARENT_COPY 

Definition at line 363 of file dma.h.

Enumerator:
OMAP_DMA_WRITE_NON_POSTED 
OMAP_DMA_WRITE_POSTED 
OMAP_DMA_WRITE_LAST_NON_POSTED 

Definition at line 369 of file dma.h.

Enumerator:
GCR 
GSCR 
GRST1 
HW_ID 
PCH2_ID 
PCH0_ID 
PCH1_ID 
PCHG_ID 
PCHD_ID 
CAPS_0 
CAPS_1 
CAPS_2 
CAPS_3 
CAPS_4 
PCH2_SR 
PCH0_SR 
PCH1_SR 
PCHD_SR 
REVISION 
IRQSTATUS_L0 
IRQSTATUS_L1 
IRQSTATUS_L2 
IRQSTATUS_L3 
IRQENABLE_L0 
IRQENABLE_L1 
IRQENABLE_L2 
IRQENABLE_L3 
SYSSTATUS 
OCP_SYSCONFIG 
CPC 
CCR2 
LCH_CTRL 
CSDP 
CCR 
CICR 
CSR 
CEN 
CFN 
CSFI 
CSEI 
CSAC 
CDAC 
CDEI 
CDFI 
CLNK_CTRL 
CSSA 
CDSA 
COLOR 
CCEN 
CCFN 
CDP 
CNDP 
CCDN 

Definition at line 322 of file dma.h.

Function Documentation

void omap_clear_dma ( int  lch)

Definition at line 867 of file dma.c.

void omap_disable_dma_irq ( int  ch,
u16  irq_bits 
)

Definition at line 602 of file dma.c.

int omap_dma_chain_a_transfer ( int  chain_id,
int  src_start,
int  dest_start,
int  elem_count,
int  frame_count,
void callbk_data 
)

omap_dma_chain_a_transfer - Get a free channel from a chain, set the params and start the transfer.

Parameters
chain_id
src_start- buffer start address
dest_start- Dest address
elem_count
frame_count
callbk_data- channel callback parameter data.
Returns
- Success : 0 Failure: -EINVAL/-EBUSY

Definition at line 1456 of file dma.c.

int omap_dma_chain_status ( int  chain_id)

omap_dma_chain_status - Check if the chain is in active / inactive state.

Parameters
chain_id
Returns
- Success : OMAP_DMA_CHAIN_ACTIVE/OMAP_DMA_CHAIN_INACTIVE Failure : -EINVAL

Definition at line 1419 of file dma.c.

void omap_dma_disable_irq ( int  lch)
void omap_dma_global_context_restore ( void  )

Definition at line 1982 of file dma.c.

void omap_dma_global_context_save ( void  )

Definition at line 1973 of file dma.c.

void omap_dma_link_lch ( int  lch_head,
int  lch_queue 
)

Definition at line 1140 of file dma.c.

int omap_dma_running ( void  )

Definition at line 1120 of file dma.c.

void omap_dma_set_global_params ( int  arb_rate,
int  max_fifo_depth,
int  tparams 
)

omap_dma_set_global_params : Set global priority settings for dma

Parameters
arb_rate
max_fifo_depth
tparams- Number of threads to reserve : DMA_THREAD_RESERVE_NORM DMA_THREAD_RESERVE_ONET DMA_THREAD_RESERVE_TWOT DMA_THREAD_RESERVE_THREET

Definition at line 809 of file dma.c.

int omap_dma_set_prio_lch ( int  lch,
unsigned char  read_prio,
unsigned char  write_prio 
)

omap_dma_set_prio_lch : Set channel wise priority settings

Parameters
lch
read_prio- Read priority
write_prio- Write priority Both of the above can be set with one of the following values : DMA_CH_PRIO_HIGH/DMA_CH_PRIO_LOW

Definition at line 841 of file dma.c.

void omap_dma_unlink_lch ( int  lch_head,
int  lch_queue 
)

Definition at line 1166 of file dma.c.

void omap_enable_dma_irq ( int  ch,
u16  irq_bits 
)

Definition at line 596 of file dma.c.

void omap_free_dma ( int  ch)

Definition at line 766 of file dma.c.

int omap_free_dma_chain ( int  chain_id)

omap_free_dma_chain - Free all the logical channels in a chain.

Parameters
chain_id
Returns
- Success : 0 Failure : -EINVAL

Definition at line 1375 of file dma.c.

int omap_get_dma_active_status ( int  lch)

Definition at line 1114 of file dma.c.

int omap_get_dma_chain_dst_pos ( int  chain_id)

omap_get_dma_chain_dst_pos - Get the destination position of the ongoing DMA in chain

Parameters
chain_id
Returns
- Success : Destination position Failure : -EINVAL

Definition at line 1748 of file dma.c.

int omap_get_dma_chain_index ( int  chain_id,
int ei,
int fi 
)

omap_get_dma_chain_index - Get the element and frame index of the ongoing DMA in chain

Parameters
chain_id
ei- Element index
fi- Frame index
Returns
- Success : 0 Failure : -EINVAL

Definition at line 1708 of file dma.c.

int omap_get_dma_chain_src_pos ( int  chain_id)

omap_get_dma_chain_src_pos - Get the source position of the ongoing DMA in chain

Parameters
chain_id
Returns
- Success : Destination position Failure : -EINVAL

Definition at line 1782 of file dma.c.

dma_addr_t omap_get_dma_dst_pos ( int  lch)

Definition at line 1083 of file dma.c.

int omap_get_dma_index ( int  lch,
int ei,
int fi 
)
dma_addr_t omap_get_dma_src_pos ( int  lch)

Definition at line 1044 of file dma.c.

void __init omap_init_consistent_dma_size ( void  )

Definition at line 34 of file common.c.

int omap_modify_dma_chain_params ( int  chain_id,
struct omap_dma_channel_params  params 
)

omap_modify_dma_chain_param : Modify the chain's params - Modify the params after setting it. Dont do this while dma is running!!

Parameters
chain_id- Chained logical channel id.
params
Returns
- Success : 0 Failure : -EINVAL

Definition at line 1334 of file dma.c.

int omap_request_dma ( int  dev_id,
const char dev_name,
void(*)(int lch, u16 ch_status, void *data callback,
void data,
int dma_ch 
)

Definition at line 689 of file dma.c.

int omap_request_dma_chain ( int  dev_id,
const char dev_name,
void(*)(int lch, u16 ch_status, void *data callback,
int chain_id,
int  no_of_chans,
int  chain_mode,
struct omap_dma_channel_params  params 
)

omap_request_dma_chain : Request a chain of DMA channels

Parameters
dev_id- Device id using the dma channel
dev_name- Device name
callback- Call back function - - Number of channels requested - Dynamic or static chaining : OMAP_DMA_STATIC_CHAIN OMAP_DMA_DYNAMIC_CHAIN - Channel parameters
Returns
- Success : 0 Failure: -EINVAL/-ENOMEM

Definition at line 1245 of file dma.c.

int omap_set_dma_callback ( int  lch,
void(*)(int lch, u16 ch_status, void *data callback,
void data 
)

Definition at line 1013 of file dma.c.

void omap_set_dma_channel_mode ( int  lch,
enum omap_dma_channel_mode  mode 
)

Definition at line 356 of file dma.c.

void omap_set_dma_color_mode ( int  lch,
enum omap_dma_color_mode  mode,
u32  color 
)

Definition at line 283 of file dma.c.

void omap_set_dma_dest_burst_mode ( int  lch,
enum omap_dma_burst_mode  burst_mode 
)

Definition at line 531 of file dma.c.

void omap_set_dma_dest_data_pack ( int  lch,
int  enable 
)

Definition at line 519 of file dma.c.

void omap_set_dma_dest_index ( int  lch,
int  eidx,
int  fidx 
)

Definition at line 509 of file dma.c.

void omap_set_dma_dest_params ( int  lch,
int  dest_port,
int  dest_amode,
unsigned long  dest_start,
int  dst_ei,
int  dst_fi 
)

Definition at line 484 of file dma.c.

void omap_set_dma_dst_endian_type ( int  lch,
enum end_type  etype 
)
void omap_set_dma_params ( int  lch,
struct omap_dma_channel_params params 
)

Definition at line 397 of file dma.c.

void omap_set_dma_priority ( int  lch,
int  dst_port,
int  priority 
)

Definition at line 178 of file dma.c.

void omap_set_dma_src_burst_mode ( int  lch,
enum omap_dma_burst_mode  burst_mode 
)

Definition at line 438 of file dma.c.

void omap_set_dma_src_data_pack ( int  lch,
int  enable 
)

Definition at line 426 of file dma.c.

void omap_set_dma_src_endian_type ( int  lch,
enum end_type  etype 
)
void omap_set_dma_src_index ( int  lch,
int  eidx,
int  fidx 
)

Definition at line 416 of file dma.c.

void omap_set_dma_src_params ( int  lch,
int  src_port,
int  src_amode,
unsigned long  src_start,
int  src_ei,
int  src_fi 
)

Definition at line 370 of file dma.c.

void omap_set_dma_transfer_params ( int  lch,
int  data_type,
int  elem_count,
int  frame_count,
int  sync_mode,
int  dma_trigger,
int  src_or_dst_synch 
)

Definition at line 220 of file dma.c.

void omap_set_dma_write_mode ( int  lch,
enum omap_dma_write_mode  mode 
)

Definition at line 343 of file dma.c.

void omap_start_dma ( int  lch)

Definition at line 877 of file dma.c.

int omap_start_dma_chain_transfers ( int  chain_id)

omap_start_dma_chain_transfers - Start the chain

Parameters
chain_id
Returns
- Success : 0 Failure : -EINVAL/-EBUSY

Definition at line 1593 of file dma.c.

void omap_stop_dma ( int  lch)

Definition at line 938 of file dma.c.

int omap_stop_dma_chain_transfers ( int  chain_id)

omap_stop_dma_chain_transfers - Stop the dma transfer of a chain.

Parameters
chain_id
Returns
- Success : 0 Failure : EINVAL

Definition at line 1645 of file dma.c.