/* * Copyright © 2006, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * */ #ifndef _ADMA_H #define _ADMA_H #include #include #include #include /* Memory copy units */ #define DMA_CCR(chan) (chan->mmr_base + 0x0) #define DMA_CSR(chan) (chan->mmr_base + 0x4) #define DMA_DAR(chan) (chan->mmr_base + 0xc) #define DMA_NDAR(chan) (chan->mmr_base + 0x10) #define DMA_PADR(chan) (chan->mmr_base + 0x14) #define DMA_PUADR(chan) (chan->mmr_base + 0x18) #define DMA_LADR(chan) (chan->mmr_base + 0x1c) #define DMA_BCR(chan) (chan->mmr_base + 0x20) #define DMA_DCR(chan) (chan->mmr_base + 0x24) /* Application accelerator unit */ #define AAU_ACR(chan) (chan->mmr_base + 0x0) #define AAU_ASR(chan) (chan->mmr_base + 0x4) #define AAU_ADAR(chan) (chan->mmr_base + 0x8) #define AAU_ANDAR(chan) (chan->mmr_base + 0xc) #define AAU_SAR(src, chan) (chan->mmr_base + (0x10 + ((src) << 2))) #define AAU_DAR(chan) (chan->mmr_base + 0x20) #define AAU_ABCR(chan) (chan->mmr_base + 0x24) #define AAU_ADCR(chan) (chan->mmr_base + 0x28) #define AAU_SAR_EDCR(src_edc) (chan->mmr_base + (0x02c + ((src_edc-4) << 2))) #define AAU_EDCR0_IDX 8 #define AAU_EDCR1_IDX 17 #define AAU_EDCR2_IDX 26 #define DMA0_ID 0 #define DMA1_ID 1 #define AAU_ID 2 struct iop3xx_aau_desc_ctrl { unsigned int int_en:1; unsigned int blk1_cmd_ctrl:3; unsigned int blk2_cmd_ctrl:3; unsigned int blk3_cmd_ctrl:3; unsigned int blk4_cmd_ctrl:3; unsigned int blk5_cmd_ctrl:3; unsigned int blk6_cmd_ctrl:3; unsigned int blk7_cmd_ctrl:3; unsigned int blk8_cmd_ctrl:3; unsigned int blk_ctrl:2; unsigned int dual_xor_en:1; unsigned int tx_complete:1; unsigned int zero_result_err:1; unsigned int zero_result_en:1; unsigned int dest_write_en:1; }; struct iop3xx_aau_e_desc_ctrl { unsigned int reserved:1; unsigned int blk1_cmd_ctrl:3; unsigned int blk2_cmd_ctrl:3; unsigned int blk3_cmd_ctrl:3; unsigned int blk4_cmd_ctrl:3; unsigned int blk5_cmd_ctrl:3; unsigned int blk6_cmd_ctrl:3; unsigned int blk7_cmd_ctrl:3; unsigned int blk8_cmd_ctrl:3; unsigned int reserved2:7; }; struct iop3xx_dma_desc_ctrl { unsigned int pci_transaction:4; unsigned int int_en:1;