Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:52

0001 #ifndef __DMA_IMAGE_H
0002 #define __DMA_IMAGE_H 1
0003 
0004 /******************************************************************************
0005 *
0006 * Copyright (c) 2004 Freescale Semiconductor, Inc.
0007 *
0008 * Permission is hereby granted, free of charge, to any person obtaining a
0009 * copy of this software and associated documentation files (the "Software"),
0010 * to deal in the Software without restriction, including without limitation
0011 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
0012 * and/or sell copies of the Software, and to permit persons to whom the
0013 * Software is furnished to do so, subject to the following conditions:
0014 *
0015 * The above copyright notice and this permission notice shall be included
0016 * in all copies or substantial portions of the Software.
0017 *
0018 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0019 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0020 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
0021 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
0022 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
0023 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0024 * OTHER DEALINGS IN THE SOFTWARE.
0025 *
0026 ******************************************************************************/
0027 
0028 
0029 #include "include/ppctypes.h"
0030 
0031 void init_dma_image_TASK_PCI_TX(uint8 *vMem_taskBar, sint64 vMemOffset);
0032 void init_dma_image_TASK_PCI_RX(uint8 *vMem_taskBar, sint64 vMemOffset);
0033 void init_dma_image_TASK_FEC_TX(uint8 *vMem_taskBar, sint64 vMemOffset);
0034 void init_dma_image_TASK_FEC_RX(uint8 *vMem_taskBar, sint64 vMemOffset);
0035 void init_dma_image_TASK_LPC(uint8 *vMem_taskBar, sint64 vMemOffset);
0036 void init_dma_image_TASK_ATA(uint8 *vMem_taskBar, sint64 vMemOffset);
0037 void init_dma_image_TASK_CRC16_DP_0(uint8 *vMem_taskBar, sint64 vMemOffset);
0038 void init_dma_image_TASK_CRC16_DP_1(uint8 *vMem_taskBar, sint64 vMemOffset);
0039 void init_dma_image_TASK_GEN_DP_0(uint8 *vMem_taskBar, sint64 vMemOffset);
0040 void init_dma_image_TASK_GEN_DP_1(uint8 *vMem_taskBar, sint64 vMemOffset);
0041 void init_dma_image_TASK_GEN_DP_2(uint8 *vMem_taskBar, sint64 vMemOffset);
0042 void init_dma_image_TASK_GEN_DP_3(uint8 *vMem_taskBar, sint64 vMemOffset);
0043 void init_dma_image_TASK_GEN_TX_BD(uint8 *vMem_taskBar, sint64 vMemOffset);
0044 void init_dma_image_TASK_GEN_RX_BD(uint8 *vMem_taskBar, sint64 vMemOffset);
0045 void init_dma_image_TASK_GEN_DP_BD_0(uint8 *vMem_taskBar, sint64 vMemOffset);
0046 void init_dma_image_TASK_GEN_DP_BD_1(uint8 *vMem_taskBar, sint64 vMemOffset);
0047 
0048 /* MBAR_TASK_TABLE is the first address of task table */
0049 #ifndef MBAR_TASK_TABLE
0050 #define MBAR_TASK_TABLE                     0xf0008000UL
0051 #endif
0052 
0053 /* MBAR_DMA_FREE is the first free address after task table */
0054 #define MBAR_DMA_FREE                       MBAR_TASK_TABLE + 0x00001500UL
0055 
0056 /* TASK_BAR is the first address of the Entry table */
0057 #define TASK_BAR                            MBAR_TASK_TABLE + 0x00000000UL
0058 #define TASK_BAR_OFFSET                     0x00000000UL
0059 
0060 typedef struct task_info0 {
0061     volatile uint32  TaskNum;
0062     volatile uint32 *PtrStartTDT;
0063     volatile uint32 *PtrEndTDT;
0064     volatile uint32 *PtrVarTab;
0065     volatile uint32 *PtrFDT;
0066     volatile uint32 *PtrCSave;
0067     volatile uint32  NumDRD;
0068     volatile uint32 *DRD[7];
0069     volatile uint32  NumVar;
0070     volatile uint32 *var;
0071     volatile uint32  NumInc;
0072     volatile uint32 *inc;
0073     volatile uint8  *TaskPragma;
0074     volatile uint32 *AddrDstFIFO;
0075     volatile sint16 *IncrBytes;
0076     volatile uint32 *AddrPktSizeReg;
0077     volatile sint16 *IncrSrc;
0078     volatile uint32 *AddrSCStatusReg;
0079     volatile uint32 *Bytes;
0080     volatile uint32 *IterExtra;
0081     volatile uint32 *StartAddrSrc;
0082 } TASK_PCI_TX_api_t;
0083 extern TASK_PCI_TX_api_t *TASK_PCI_TX_api;
0084 
0085 typedef struct task_info1 {
0086     volatile uint32  TaskNum;
0087     volatile uint32 *PtrStartTDT;
0088     volatile uint32 *PtrEndTDT;
0089     volatile uint32 *PtrVarTab;
0090     volatile uint32 *PtrFDT;
0091     volatile uint32 *PtrCSave;
0092     volatile uint32  NumDRD;
0093     volatile uint32 *DRD[5];
0094     volatile uint32  NumVar;
0095     volatile uint32 *var;
0096     volatile uint32  NumInc;
0097     volatile uint32 *inc;
0098     volatile uint8  *TaskPragma;
0099     volatile uint32 *AddrPktSizeReg;
0100     volatile sint16 *IncrBytes;
0101     volatile uint32 *AddrSrcFIFO;
0102     volatile sint16 *IncrDst;
0103     volatile uint32 *Bytes;
0104     volatile uint32 *IterExtra;
0105     volatile uint32 *StartAddrDst;
0106 } TASK_PCI_RX_api_t;
0107 extern TASK_PCI_RX_api_t *TASK_PCI_RX_api;
0108 
0109 typedef struct task_info2 {
0110     volatile uint32  TaskNum;
0111     volatile uint32 *PtrStartTDT;
0112     volatile uint32 *PtrEndTDT;
0113     volatile uint32 *PtrVarTab;
0114     volatile uint32 *PtrFDT;
0115     volatile uint32 *PtrCSave;
0116     volatile uint32  NumDRD;
0117     volatile uint32 *DRD[22];
0118     volatile uint32  NumVar;
0119     volatile uint32 *var;
0120     volatile uint32  NumInc;
0121     volatile uint32 *inc;
0122     volatile uint8  *TaskPragma;
0123     volatile uint32 *AddrDRD;
0124     volatile uint32  AddrDRDIdx;
0125     volatile sint16 *IncrBytes;
0126     volatile uint32 *AddrDstFIFO;
0127     volatile sint16 *IncrSrc;
0128     volatile uint32 *AddrEnable;
0129     volatile sint16 *IncrSrcMA;
0130     volatile uint32 *BDTableBase;
0131     volatile uint32 *BDTableLast;
0132     volatile uint32 *BDTableStart;
0133     volatile uint32 *Bytes;
0134 } TASK_FEC_TX_api_t;
0135 extern TASK_FEC_TX_api_t *TASK_FEC_TX_api;
0136 
0137 typedef struct task_info3 {
0138     volatile uint32  TaskNum;
0139     volatile uint32 *PtrStartTDT;
0140     volatile uint32 *PtrEndTDT;
0141     volatile uint32 *PtrVarTab;
0142     volatile uint32 *PtrFDT;
0143     volatile uint32 *PtrCSave;
0144     volatile uint32  NumDRD;
0145     volatile uint32 *DRD[13];
0146     volatile uint32  NumVar;
0147     volatile uint32 *var;
0148     volatile uint32  NumInc;
0149     volatile uint32 *inc;
0150     volatile uint8  *TaskPragma;
0151     volatile uint32 *AddrEnable;
0152     volatile sint16 *IncrBytes;
0153     volatile uint32 *AddrSrcFIFO;
0154     volatile sint16 *IncrDst;
0155     volatile uint32 *BDTableBase;
0156     volatile sint16 *IncrDstMA;
0157     volatile uint32 *BDTableLast;
0158     volatile uint32 *BDTableStart;
0159     volatile uint32 *Bytes;
0160 } TASK_FEC_RX_api_t;
0161 extern TASK_FEC_RX_api_t *TASK_FEC_RX_api;
0162 
0163 typedef struct task_info4 {
0164     volatile uint32  TaskNum;
0165     volatile uint32 *PtrStartTDT;
0166     volatile uint32 *PtrEndTDT;
0167     volatile uint32 *PtrVarTab;
0168     volatile uint32 *PtrFDT;
0169     volatile uint32 *PtrCSave;
0170     volatile uint32  NumDRD;
0171     volatile uint32 *DRD[4];
0172     volatile uint32  NumVar;
0173     volatile uint32 *var;
0174     volatile uint32  NumInc;
0175     volatile uint32 *inc;
0176     volatile uint8  *TaskPragma;
0177     volatile uint32 *Bytes;
0178     volatile sint16 *IncrBytes;
0179     volatile uint32 *IterExtra;
0180     volatile sint16 *IncrDst;
0181     volatile sint16 *IncrDstMA;
0182     volatile sint16 *IncrSrc;
0183     volatile uint32 *StartAddrDst;
0184     volatile sint16 *IncrSrcMA;
0185     volatile uint32 *StartAddrSrc;
0186 } TASK_LPC_api_t;
0187 extern TASK_LPC_api_t *TASK_LPC_api;
0188 
0189 typedef struct task_info5 {
0190     volatile uint32  TaskNum;
0191     volatile uint32 *PtrStartTDT;
0192     volatile uint32 *PtrEndTDT;
0193     volatile uint32 *PtrVarTab;
0194     volatile uint32 *PtrFDT;
0195     volatile uint32 *PtrCSave;
0196     volatile uint32  NumDRD;
0197     volatile uint32 *DRD[7];
0198     volatile uint32  NumVar;
0199     volatile uint32 *var;
0200     volatile uint32  NumInc;
0201     volatile uint32 *inc;
0202     volatile uint8  *TaskPragma;
0203     volatile uint32 *AddrEnable;
0204     volatile sint16 *IncrBytes;
0205     volatile uint32 *BDTableBase;
0206     volatile sint16 *IncrDst;
0207     volatile uint32 *BDTableLast;
0208     volatile sint16 *IncrSrc;
0209     volatile uint32 *BDTableStart;
0210     volatile uint32 *Bytes;
0211 } TASK_ATA_api_t;
0212 extern TASK_ATA_api_t *TASK_ATA_api;
0213 
0214 typedef struct task_info6 {
0215     volatile uint32  TaskNum;
0216     volatile uint32 *PtrStartTDT;
0217     volatile uint32 *PtrEndTDT;
0218     volatile uint32 *PtrVarTab;
0219     volatile uint32 *PtrFDT;
0220     volatile uint32 *PtrCSave;
0221     volatile uint32  NumDRD;
0222     volatile uint32 *DRD[9];
0223     volatile uint32  NumVar;
0224     volatile uint32 *var;
0225     volatile uint32  NumInc;
0226     volatile uint32 *inc;
0227     volatile uint8  *TaskPragma;
0228     volatile uint32 *Bytes;
0229     volatile sint16 *IncrBytes;
0230     volatile uint32 *IterExtra;
0231     volatile sint16 *IncrDst;
0232     volatile sint16 *IncrDstMA;
0233     volatile sint16 *IncrSrc;
0234     volatile uint32 *StartAddrDst;
0235     volatile sint16 *IncrSrcMA;
0236     volatile uint32 *StartAddrSrc;
0237 } TASK_CRC16_DP_0_api_t;
0238 extern TASK_CRC16_DP_0_api_t *TASK_CRC16_DP_0_api;
0239 
0240 typedef struct task_info7 {
0241     volatile uint32  TaskNum;
0242     volatile uint32 *PtrStartTDT;
0243     volatile uint32 *PtrEndTDT;
0244     volatile uint32 *PtrVarTab;
0245     volatile uint32 *PtrFDT;
0246     volatile uint32 *PtrCSave;
0247     volatile uint32  NumDRD;
0248     volatile uint32 *DRD[9];
0249     volatile uint32  NumVar;
0250     volatile uint32 *var;
0251     volatile uint32  NumInc;
0252     volatile uint32 *inc;
0253     volatile uint8  *TaskPragma;
0254     volatile uint32 *Bytes;
0255     volatile sint16 *IncrBytes;
0256     volatile uint32 *IterExtra;
0257     volatile sint16 *IncrDst;
0258     volatile sint16 *IncrDstMA;
0259     volatile sint16 *IncrSrc;
0260     volatile uint32 *StartAddrDst;
0261     volatile sint16 *IncrSrcMA;
0262     volatile uint32 *StartAddrSrc;
0263 } TASK_CRC16_DP_1_api_t;
0264 extern TASK_CRC16_DP_1_api_t *TASK_CRC16_DP_1_api;
0265 
0266 typedef struct task_info8 {
0267     volatile uint32  TaskNum;
0268     volatile uint32 *PtrStartTDT;
0269     volatile uint32 *PtrEndTDT;
0270     volatile uint32 *PtrVarTab;
0271     volatile uint32 *PtrFDT;
0272     volatile uint32 *PtrCSave;
0273     volatile uint32  NumDRD;
0274     volatile uint32 *DRD[4];
0275     volatile uint32  NumVar;
0276     volatile uint32 *var;
0277     volatile uint32  NumInc;
0278     volatile uint32 *inc;
0279     volatile uint8  *TaskPragma;
0280     volatile uint32 *Bytes;
0281     volatile sint16 *IncrBytes;
0282     volatile uint32 *IterExtra;
0283     volatile sint16 *IncrDst;
0284     volatile sint16 *IncrDstMA;
0285     volatile sint16 *IncrSrc;
0286     volatile uint32 *StartAddrDst;
0287     volatile sint16 *IncrSrcMA;
0288     volatile uint32 *StartAddrSrc;
0289 } TASK_GEN_DP_0_api_t;
0290 extern TASK_GEN_DP_0_api_t *TASK_GEN_DP_0_api;
0291 
0292 typedef struct task_info9 {
0293     volatile uint32  TaskNum;
0294     volatile uint32 *PtrStartTDT;
0295     volatile uint32 *PtrEndTDT;
0296     volatile uint32 *PtrVarTab;
0297     volatile uint32 *PtrFDT;
0298     volatile uint32 *PtrCSave;
0299     volatile uint32  NumDRD;
0300     volatile uint32 *DRD[4];
0301     volatile uint32  NumVar;
0302     volatile uint32 *var;
0303     volatile uint32  NumInc;
0304     volatile uint32 *inc;
0305     volatile uint8  *TaskPragma;
0306     volatile uint32 *Bytes;
0307     volatile sint16 *IncrBytes;
0308     volatile uint32 *IterExtra;
0309     volatile sint16 *IncrDst;
0310     volatile sint16 *IncrDstMA;
0311     volatile sint16 *IncrSrc;
0312     volatile uint32 *StartAddrDst;
0313     volatile sint16 *IncrSrcMA;
0314     volatile uint32 *StartAddrSrc;
0315 } TASK_GEN_DP_1_api_t;
0316 extern TASK_GEN_DP_1_api_t *TASK_GEN_DP_1_api;
0317 
0318 typedef struct task_info10 {
0319     volatile uint32  TaskNum;
0320     volatile uint32 *PtrStartTDT;
0321     volatile uint32 *PtrEndTDT;
0322     volatile uint32 *PtrVarTab;
0323     volatile uint32 *PtrFDT;
0324     volatile uint32 *PtrCSave;
0325     volatile uint32  NumDRD;
0326     volatile uint32 *DRD[4];
0327     volatile uint32  NumVar;
0328     volatile uint32 *var;
0329     volatile uint32  NumInc;
0330     volatile uint32 *inc;
0331     volatile uint8  *TaskPragma;
0332     volatile uint32 *Bytes;
0333     volatile sint16 *IncrBytes;
0334     volatile uint32 *IterExtra;
0335     volatile sint16 *IncrDst;
0336     volatile sint16 *IncrDstMA;
0337     volatile sint16 *IncrSrc;
0338     volatile uint32 *StartAddrDst;
0339     volatile sint16 *IncrSrcMA;
0340     volatile uint32 *StartAddrSrc;
0341 } TASK_GEN_DP_2_api_t;
0342 extern TASK_GEN_DP_2_api_t *TASK_GEN_DP_2_api;
0343 
0344 typedef struct task_info11 {
0345     volatile uint32  TaskNum;
0346     volatile uint32 *PtrStartTDT;
0347     volatile uint32 *PtrEndTDT;
0348     volatile uint32 *PtrVarTab;
0349     volatile uint32 *PtrFDT;
0350     volatile uint32 *PtrCSave;
0351     volatile uint32  NumDRD;
0352     volatile uint32 *DRD[4];
0353     volatile uint32  NumVar;
0354     volatile uint32 *var;
0355     volatile uint32  NumInc;
0356     volatile uint32 *inc;
0357     volatile uint8  *TaskPragma;
0358     volatile uint32 *Bytes;
0359     volatile sint16 *IncrBytes;
0360     volatile uint32 *IterExtra;
0361     volatile sint16 *IncrDst;
0362     volatile sint16 *IncrDstMA;
0363     volatile sint16 *IncrSrc;
0364     volatile uint32 *StartAddrDst;
0365     volatile sint16 *IncrSrcMA;
0366     volatile uint32 *StartAddrSrc;
0367 } TASK_GEN_DP_3_api_t;
0368 extern TASK_GEN_DP_3_api_t *TASK_GEN_DP_3_api;
0369 
0370 typedef struct task_info12 {
0371     volatile uint32  TaskNum;
0372     volatile uint32 *PtrStartTDT;
0373     volatile uint32 *PtrEndTDT;
0374     volatile uint32 *PtrVarTab;
0375     volatile uint32 *PtrFDT;
0376     volatile uint32 *PtrCSave;
0377     volatile uint32  NumDRD;
0378     volatile uint32 *DRD[8];
0379     volatile uint32  NumVar;
0380     volatile uint32 *var;
0381     volatile uint32  NumInc;
0382     volatile uint32 *inc;
0383     volatile uint8  *TaskPragma;
0384     volatile uint32 *AddrDstFIFO;
0385     volatile sint16 *IncrBytes;
0386     volatile uint32 *AddrEnable;
0387     volatile sint16 *IncrSrc;
0388     volatile uint32 *BDTableBase;
0389     volatile sint16 *IncrSrcMA;
0390     volatile uint32 *BDTableLast;
0391     volatile uint32 *BDTableStart;
0392     volatile uint32 *Bytes;
0393 } TASK_GEN_TX_BD_api_t;
0394 extern TASK_GEN_TX_BD_api_t *TASK_GEN_TX_BD_api;
0395 
0396 typedef struct task_info13 {
0397     volatile uint32  TaskNum;
0398     volatile uint32 *PtrStartTDT;
0399     volatile uint32 *PtrEndTDT;
0400     volatile uint32 *PtrVarTab;
0401     volatile uint32 *PtrFDT;
0402     volatile uint32 *PtrCSave;
0403     volatile uint32  NumDRD;
0404     volatile uint32 *DRD[7];
0405     volatile uint32  NumVar;
0406     volatile uint32 *var;
0407     volatile uint32  NumInc;
0408     volatile uint32 *inc;
0409     volatile uint8  *TaskPragma;
0410     volatile uint32 *AddrEnable;
0411     volatile sint16 *IncrBytes;
0412     volatile uint32 *AddrSrcFIFO;
0413     volatile sint16 *IncrDst;
0414     volatile uint32 *BDTableBase;
0415     volatile uint32 *BDTableLast;
0416     volatile uint32 *BDTableStart;
0417     volatile uint32 *Bytes;
0418 } TASK_GEN_RX_BD_api_t;
0419 extern TASK_GEN_RX_BD_api_t *TASK_GEN_RX_BD_api;
0420 
0421 typedef struct task_info14 {
0422     volatile uint32  TaskNum;
0423     volatile uint32 *PtrStartTDT;
0424     volatile uint32 *PtrEndTDT;
0425     volatile uint32 *PtrVarTab;
0426     volatile uint32 *PtrFDT;
0427     volatile uint32 *PtrCSave;
0428     volatile uint32  NumDRD;
0429     volatile uint32 *DRD[7];
0430     volatile uint32  NumVar;
0431     volatile uint32 *var;
0432     volatile uint32  NumInc;
0433     volatile uint32 *inc;
0434     volatile uint8  *TaskPragma;
0435     volatile uint32 *AddrEnable;
0436     volatile sint16 *IncrBytes;
0437     volatile uint32 *BDTableBase;
0438     volatile sint16 *IncrDst;
0439     volatile uint32 *BDTableLast;
0440     volatile sint16 *IncrSrc;
0441     volatile uint32 *BDTableStart;
0442     volatile uint32 *Bytes;
0443 } TASK_GEN_DP_BD_0_api_t;
0444 extern TASK_GEN_DP_BD_0_api_t *TASK_GEN_DP_BD_0_api;
0445 
0446 typedef struct task_info15 {
0447     volatile uint32  TaskNum;
0448     volatile uint32 *PtrStartTDT;
0449     volatile uint32 *PtrEndTDT;
0450     volatile uint32 *PtrVarTab;
0451     volatile uint32 *PtrFDT;
0452     volatile uint32 *PtrCSave;
0453     volatile uint32  NumDRD;
0454     volatile uint32 *DRD[7];
0455     volatile uint32  NumVar;
0456     volatile uint32 *var;
0457     volatile uint32  NumInc;
0458     volatile uint32 *inc;
0459     volatile uint8  *TaskPragma;
0460     volatile uint32 *AddrEnable;
0461     volatile sint16 *IncrBytes;
0462     volatile uint32 *BDTableBase;
0463     volatile sint16 *IncrDst;
0464     volatile uint32 *BDTableLast;
0465     volatile sint16 *IncrSrc;
0466     volatile uint32 *BDTableStart;
0467     volatile uint32 *Bytes;
0468 } TASK_GEN_DP_BD_1_api_t;
0469 extern TASK_GEN_DP_BD_1_api_t *TASK_GEN_DP_BD_1_api;
0470 
0471 
0472 #endif  /* __DMA_IMAGE_H */