source: svn/trunk/newcon3bcm2_21bu/magnum/portinginterface/dma/7552/bdma_pci.c

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 25.8 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2003-2011, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: bdma_pci.c $
11 * $brcm_Revision: Hydra_Software_Devel/12 $
12 * $brcm_Date: 3/21/11 6:38p $
13 *
14 * Module Description:
15 *
16 *
17 * Revision History:
18 * $brcm_Log: /magnum/portinginterface/dma/7400/bdma_pci.c $
19 *
20 * Hydra_Software_Devel/12   3/21/11 6:38p vanessah
21 * SW7420-1431: support oflarge DMA descriptor list subset
22 *
23 * Hydra_Software_Devel/11   2/2/11 10:28a vanessah
24 * SW7550-670: add Sharf DMA support
25 *
26 * Hydra_Software_Devel/10   1/7/11 2:58p vanessah
27 * SWBLURAY-23683:
28 * DMA PI link error fix
29 *
30 * Hydra_Software_Devel/9   11/17/10 4:12p vanessah
31 * SW7231-18:  Add DMA support for 7231 7344 7346
32 *
33 * Hydra_Software_Devel/8   11/4/10 1:42p vanessah
34 * SW7552-14:  Add DMA PI support
35 *
36 * Hydra_Software_Devel/7   11/1/10 1:57p yuxiaz
37 * SW7358-15: Added DMA PI support on 7358.
38 *
39 * Hydra_Software_Devel/6   8/31/10 2:36p tdo
40 * SW7422-62: Add DMA PI
41 *
42 * Hydra_Software_Devel/5   2/2/10 3:07p syang
43 * SW7408-68: add 7408 support
44 *
45 * Hydra_Software_Devel/4   12/4/09 10:54a rpan
46 * SW7468-19: Fixed a 7468 compile error.
47 *
48 * Hydra_Software_Devel/3   9/16/09 6:05p tdo
49 * SW7630-13: Fix 7630 compiling error
50 *
51 * Hydra_Software_Devel/2   7/30/08 11:53a syang
52 * PR 45128: fix ptr over-run caused by using BDMA_MemDmaEngine_eUnknown
53 * for engine handle array boundary
54 *
55 * Hydra_Software_Devel/15   7/11/08 11:50a syang
56 * PR 43729:  make bdma.h chip independent
57 *
58 * Hydra_Software_Devel/14   12/7/07 4:09p syang
59 * PR 34606: rewrite more than half of code to support hw sharing for
60 * kernel and user-mode sides
61 *
62 * Hydra_Software_Devel/13   10/15/07 3:38p syang
63 * PR 35947: add "_isr" to call back func name
64 *
65 * Hydra_Software_Devel/12   3/16/07 12:31p syang
66 * PR 28173: add dynamic link support (not turn on yet)
67 *
68 * Hydra_Software_Devel/11   10/3/06 4:01p syang
69 * PR 24634: replace critical section with private mutex for
70 * mem/pci_dma_handle create/destroy.
71 *
72 * Hydra_Software_Devel/10   5/13/05 4:26p syang
73 * PR 15269: added implementation of BDMA_Mem_Tran_GetMaxNumBlocks and
74 * BDMA_Pci_Tran_GetMaxNumBlocks
75 *
76 * Hydra_Software_Devel/9   3/8/04 3:15p syang
77 * PR 10012: fix a typo in SetMaxBurstSize
78 *
79 * Hydra_Software_Devel/8   2/4/04 3:01p syang
80 * PR 9608: 1). added init for hMemDma / hPciDma of Channel, hDma of
81 * MemDma / PciDma and hChannel of Queue; 2). split CallBackFunc type def
82 * to mem and pci versions; 3). fixed typo in TranHandle def; 4).leave
83 * critical section before calling BINT func; 5). fixed a bug with
84 * nextDesc in Desc info setting; 6). use wake to start dma as in sleep
85 * mode; 7). corrected typo in the asserts of Queue_CreateTran.
86 *
87 * Hydra_Software_Devel/7   10/24/03 2:53p syang
88 * changed to use PciBusAddr and MemBusAddr from SrcBusAddr and
89 * DstBusAddr. I think the new addr model is more natural to the way how
90 * user gets the addr
91 *
92 * Hydra_Software_Devel/6   10/23/03 6:18p syang
93 * to make linux comipler silent
94 *
95 * Hydra_Software_Devel/5   10/23/03 4:20p syang
96 * adjusted sub-module implementaion overview
97 *
98 * Hydra_Software_Devel/4   10/23/03 3:16p syang
99 * added real pci dma implementation
100 *
101 * Hydra_Software_Devel/3   10/10/03 4:06p syang
102 * added peStatus to StartAndWait
103 *
104 * Hydra_Software_Devel/2   10/3/03 6:14p syang
105 * added real code
106 *
107 * Hydra_Software_Devel/1   9/25/03 7:01p syang
108 * init version, from scratch
109 *
110 ***************************************************************************/
111#if (BCHP_CHIP != 3548) && (BCHP_CHIP != 3556) && (BCHP_CHIP != 7630) && (BCHP_CHIP != 7640) && (BCHP_CHIP != 7468) \
112    && (BCHP_CHIP != 7408) && (BCHP_CHIP != 7422) && (BCHP_CHIP != 7425) \
113    && (BCHP_CHIP != 7358) && (BCHP_CHIP != 7552) \
114    && (BCHP_CHIP != 7231) && (BCHP_CHIP != 7344) && (BCHP_CHIP != 7346) \
115    && (BCHP_CHIP != 7550)
116#include "bdma_pci_priv.h"
117#include "bkni.h"
118
119BDBG_MODULE(BDMA_PCI);
120
121/***************************************************************************
122 * Implementation Overview:
123 *
124 * The corresponding API functions of both interrupt handler (or critical
125 * session) and non-interrupt handler context version call the same
126 * corresponding private function to do the real job. However, a non-
127 * interrupt handler context version API function enters critical session
128 * before calling its private function, and leave critical session afterwards.
129 * But interrupt handler is already not interruptable, a interrupt handler
130 * context version of API functions call their private functions without
131 * entering critical session
132 ****************************************************************************/
133
134/* Default settings. */
135static const BDMA_Pci_Settings s_stDefaultPciDmaSettings =
136{
137        BDMA_P_NUM_QUEUE_ENTRIES,
138        BDMA_P_MAX_NUM_BLOCKS,
139
140        /* deafult for the case that only one BDMA instance exists in the system */
141        NULL, NULL, NULL, 0, true
142};
143
144/***************************************************************************
145 *
146 */
147BERR_Code BDMA_Pci_Create2(
148        BDMA_Handle           hDma,
149        BDMA_PciDmaEngine     eEngine,
150        BDMA_Pci_Settings *   pSettings,
151        BDMA_Pci_Handle *     phPciDma )
152{
153        BERR_Code  eResult = BERR_SUCCESS;
154        BDMA_P_Context  *pDma;
155
156        BDMA_P_MAIN_GET_CONTEXT( hDma, pDma );
157        if (NULL == pDma)
158        {
159                eResult = BERR_TRACE(BERR_INVALID_PARAMETER);
160                goto BDMA_Err_Pci_Create;
161        }
162
163        /* hDma passed the magic check, we trust every thing pointed by it now */
164        eResult = BKNI_AcquireMutex(pDma->hMutex);
165        if (BERR_SUCCESS == eResult)
166        {
167                if (NULL != pSettings)
168                        eResult = BDMA_P_Pci_Create( hDma, eEngine, pSettings, phPciDma );
169                else
170                        eResult = BDMA_P_Pci_Create( hDma, eEngine, &s_stDefaultPciDmaSettings, phPciDma );
171                BKNI_ReleaseMutex(pDma->hMutex);
172        }
173
174  BDMA_Err_Pci_Create:
175        return BERR_TRACE(eResult);
176}
177
178/***************************************************************************
179 *
180 */
181BERR_Code BDMA_Pci_Destroy(
182        BDMA_Pci_Handle       hPciDma )
183{
184        BKNI_MutexHandle  hMutex;
185        BERR_Code  eResult = BERR_SUCCESS;
186
187        eResult = BDMA_P_Pci_AcquireMutex(hPciDma, &hMutex );
188        if (BERR_SUCCESS == eResult)
189        {
190                eResult = BDMA_P_Pci_Destroy( hPciDma );
191                BKNI_ReleaseMutex(hMutex);
192        }
193
194        return BERR_TRACE(eResult);
195}
196
197/***************************************************************************
198 *
199 */
200BERR_Code BDMA_Pci_GetDefaultSettings
201        ( BDMA_Pci_Settings     *pDefSettings )
202{
203        if (NULL != pDefSettings)
204        {
205                *pDefSettings = s_stDefaultPciDmaSettings;
206                return BERR_SUCCESS;
207        }
208        else
209        {
210                return BERR_TRACE(BERR_INVALID_PARAMETER);
211        }
212}
213
214/***************************************************************************
215 *
216 */
217BERR_Code BDMA_Pci_SetSwapMode(
218        BDMA_Pci_Handle       hPciDma,
219        BDMA_SwapMode         eSwapMode )
220{
221        BERR_Code  eResult = BERR_SUCCESS;
222
223        BKNI_EnterCriticalSection();
224        eResult = BDMA_P_Pci_SetSwapMode_isr( hPciDma, eSwapMode );
225        BKNI_LeaveCriticalSection();
226
227        return BERR_TRACE(eResult);
228}
229
230/***************************************************************************
231 *
232 */
233BERR_Code BDMA_Pci_SetMaxBurstSize(
234        BDMA_Pci_Handle       hPciDma,
235        BDMA_MaxBurstSize     eMaxBurstSize )
236{
237        BERR_Code  eResult = BERR_SUCCESS;
238
239        BKNI_EnterCriticalSection();
240        eResult = BDMA_P_Pci_SetMaxBurstSize_isr( hPciDma, eMaxBurstSize );
241        BKNI_LeaveCriticalSection();
242
243        return BERR_TRACE(eResult);
244}
245
246/***************************************************************************
247 *
248 */
249BERR_Code BDMA_Pci_Tran_Create2(
250        BDMA_Pci_Handle          hPciDma,
251        uint32_t                 ulNumBlocks,
252        bool                     bCachedDesc,
253        BDMA_Pci_Tran_Handle  *  phTran )
254{
255        BERR_Code  eResult = BERR_SUCCESS;
256
257        BKNI_EnterCriticalSection();
258        eResult = BDMA_P_Pci_Tran_Create_isr( hPciDma, ulNumBlocks, bCachedDesc, phTran );
259
260        BKNI_LeaveCriticalSection();
261
262        return BERR_TRACE(eResult);
263}
264
265/***************************************************************************
266 *
267 */
268BERR_Code BDMA_Pci_Tran_GetMaxNumBlocks(
269        BDMA_Pci_Handle          hPciDma,
270        uint32_t *               pulMaxNumBlocks )
271{
272        BERR_Code  eResult = BERR_SUCCESS;
273
274        if ( (NULL == hPciDma) || (NULL == pulMaxNumBlocks) )
275        {
276                eResult = BERR_TRACE(BERR_INVALID_PARAMETER);
277                goto BDMA_Done_Pci_Tran_GetMaxNumBlocks;
278        }
279        *pulMaxNumBlocks = BDMA_P_MAX_NUM_BLOCKS;
280
281  BDMA_Done_Pci_Tran_GetMaxNumBlocks:
282
283        return BERR_TRACE(eResult);
284}
285
286/***************************************************************************
287 *
288 */
289BERR_Code BDMA_Pci_Tran_SetBlockInfo(
290        BDMA_Pci_Tran_Handle     hTran,
291        uint32_t                 ulBlockId,
292        uint32_t                 ulMemBusAddr,
293        uint32_t                 ulPciBusAddr,
294        uint32_t                 ulBlockSize,
295        BDMA_TranDir             eTranDirection )
296{
297        BERR_Code  eResult = BERR_SUCCESS;
298
299        BKNI_EnterCriticalSection();
300        eResult = BDMA_P_Pci_Tran_SetBlockInfo_isr( hTran, ulBlockId,
301                                                                                        ulMemBusAddr, ulPciBusAddr,
302                                                                                        ulBlockSize,
303                                                                                        eTranDirection );
304        BKNI_LeaveCriticalSection();
305
306        return BERR_TRACE(eResult);
307}
308
309/***************************************************************************
310 *
311 */
312BERR_Code BDMA_Pci_Tran_StartDma(
313        BDMA_Pci_Tran_Handle     hTran,
314        uint32_t                 ulNumActBlocks )
315{
316        BERR_Code  eResult = BERR_SUCCESS;
317
318        BKNI_EnterCriticalSection();
319        eResult = BDMA_P_Pci_Tran_Start_isr( hTran, ulNumActBlocks, NULL, NULL );
320        BKNI_LeaveCriticalSection();
321
322        return BERR_TRACE(eResult);
323}
324
325/***************************************************************************
326 *
327 */
328
329BERR_Code BDMA_Pci_Tran_StartDmaSubset(
330        BDMA_Mem_Tran_Handle     hTran,
331        uint32_t                 ulFirstBlock,
332        uint32_t                 ulNumActBlocks )
333{
334        BERR_Code  eResult = BERR_SUCCESS;
335
336        BKNI_EnterCriticalSection();
337        eResult = BDMA_P_Pci_Tran_StartSubset_isr( hTran, ulFirstBlock, ulNumActBlocks, NULL, NULL );
338        BKNI_LeaveCriticalSection();
339
340        return BERR_TRACE(eResult);
341}
342
343/***************************************************************************
344 *
345 */
346BERR_Code BDMA_Pci_Tran_StartDmaAndCallBack(
347        BDMA_Pci_Tran_Handle     hTran,
348        uint32_t                 ulNumActBlocks,
349        BDMA_Pci_CallbackFunc    pCallBackFunc_isr,
350        void *                   pUserCallBackParam )
351{
352        BERR_Code  eResult = BERR_SUCCESS;
353
354        BKNI_EnterCriticalSection();
355        eResult = BDMA_P_Pci_Tran_Start_isr( hTran, ulNumActBlocks, pCallBackFunc_isr, pUserCallBackParam );
356        BKNI_LeaveCriticalSection();
357
358        return BERR_TRACE(eResult);
359}
360
361/***************************************************************************
362 *
363 */
364BERR_Code BDMA_Pci_Tran_GetStatus(
365        BDMA_Pci_Tran_Handle     hTran,
366        BDMA_TranStatus *        peTranStatus )
367{
368        BERR_Code  eResult = BERR_SUCCESS;
369
370        BKNI_EnterCriticalSection();
371        eResult = BDMA_P_Pci_Tran_GetStatus_isr( hTran, peTranStatus );
372        BKNI_LeaveCriticalSection();
373
374        return BERR_TRACE(eResult);
375
376}
377
378/***************************************************************************
379 *
380 */
381BERR_Code BDMA_Pci_Tran_Destroy(
382        BDMA_Pci_Tran_Handle     hTran )
383{
384        BERR_Code  eResult = BERR_SUCCESS;
385
386        BKNI_EnterCriticalSection();
387        eResult = BDMA_P_Pci_Tran_Destroy_isr( hTran );
388        BKNI_LeaveCriticalSection();
389
390        return BERR_TRACE(eResult);
391}
392
393/***************************************************************************
394 *
395 */
396BERR_Code BDMA_Pci_Tran_Reset(
397        BDMA_Pci_Tran_Handle     hTran )
398{
399        BERR_Code  eResult = BERR_SUCCESS;
400
401        BKNI_EnterCriticalSection();
402        eResult = BDMA_P_Pci_Tran_Reset_isr( hTran );
403        BKNI_LeaveCriticalSection();
404
405        return BERR_TRACE(eResult);
406}
407
408/***************************************************************************
409 *
410 */
411BERR_Code BDMA_Pci_Tran_Create2_isr(
412        BDMA_Pci_Handle          hPciDma,
413        uint32_t                 ulNumBlocks,
414        bool                     bCachedDesc,
415        BDMA_Pci_Tran_Handle  *  phTran )
416{
417        BERR_Code  eResult = BERR_SUCCESS;
418
419        eResult = BDMA_P_Pci_Tran_Create_isr( hPciDma, ulNumBlocks, bCachedDesc, phTran );
420
421        return BERR_TRACE(eResult);
422}
423
424/***************************************************************************
425 *
426 */
427BERR_Code BDMA_Pci_Tran_SetBlockInfo_isr(
428        BDMA_Pci_Tran_Handle     hTran,
429        uint32_t                 ulBlockId,
430        uint32_t                 ulMemBusAddr,
431        uint32_t                 ulPciBusAddr,
432        uint32_t                 ulBlockSize,
433        BDMA_TranDir             eTranDirection )
434{
435        BERR_Code  eResult = BERR_SUCCESS;
436
437        eResult = BDMA_P_Pci_Tran_SetBlockInfo_isr( hTran, ulBlockId,
438                                                                                        ulMemBusAddr, ulPciBusAddr,
439                                                                                        ulBlockSize,
440                                                                                        eTranDirection );
441
442        return BERR_TRACE(eResult);
443}
444
445/***************************************************************************
446 *
447 */
448BERR_Code BDMA_Pci_Tran_StartDmaAndCallBack_isr(
449        BDMA_Pci_Tran_Handle     hTran,
450        uint32_t                 ulNumActBlocks,
451        BDMA_Pci_CallbackFunc    pCallBackFunc_isr,
452        void *                   pUserCallBackParam )
453{
454        BERR_Code  eResult = BERR_SUCCESS;
455
456        eResult = BDMA_P_Pci_Tran_Start_isr( hTran, ulNumActBlocks, pCallBackFunc_isr, pUserCallBackParam );
457
458        return BERR_TRACE(eResult);
459}
460
461/***************************************************************************
462 *
463 */
464BERR_Code BDMA_Pci_Tran_GetStatus_isr(
465        BDMA_Pci_Tran_Handle     hTran,
466        BDMA_TranStatus *        peTranStatus )
467{
468        BERR_Code  eResult = BERR_SUCCESS;
469
470        eResult = BDMA_P_Pci_Tran_GetStatus_isr( hTran, peTranStatus );
471
472        return BERR_TRACE(eResult);
473
474}
475
476/***************************************************************************
477 *
478 */
479BERR_Code BDMA_Pci_Tran_Destroy_isr(
480        BDMA_Pci_Tran_Handle     hTran )
481{
482        BERR_Code  eResult = BERR_SUCCESS;
483
484        eResult = BDMA_P_Pci_Tran_Destroy_isr( hTran );
485
486        return BERR_TRACE(eResult);
487}
488
489/***************************************************************************
490 *
491 */
492BERR_Code BDMA_Pci_Tran_Reset_isr(
493        BDMA_Pci_Tran_Handle     hTran )
494{
495        BERR_Code  eResult = BERR_SUCCESS;
496
497        eResult = BDMA_P_Pci_Tran_Reset_isr( hTran );
498
499        return BERR_TRACE(eResult);
500}
501
502
503/***************************************************************************
504 * Obsolete Pci Dma API:
505 **************************************************************************/
506
507/***************************************************************************
508 *
509 */
510BERR_Code BDMA_Pci_Create(
511        BDMA_Handle           hDma,
512        BDMA_Pci_Handle *     phPciDma )
513{
514        BERR_Code  eResult = BERR_SUCCESS;
515        BDMA_P_Context  *pDma;
516        BDMA_P_Pci_Context  *pPciDma = NULL;
517        BDMA_PciDmaEngine  eEngine;
518
519        BDMA_P_MAIN_GET_CONTEXT( hDma, pDma );
520        if (NULL == pDma)
521        {
522                eResult = BERR_TRACE(BERR_INVALID_PARAMETER);
523                goto BDMA_Err_Pci_Create;
524        }
525
526        /* hDma passed the magic check, we trust every thing pointed by it now */
527        *phPciDma = NULL;
528        eResult = BKNI_AcquireMutex(pDma->hMutex);
529        if (BERR_SUCCESS == eResult)
530        {
531                for (eEngine = BDMA_PciDmaEngine_e0; eEngine < BDMA_P_SUPPORT_PCI_DMA_ENGINE; eEngine ++)
532                {
533                        pPciDma = BDMA_P_GetPciDmaHandle( hDma, eEngine );
534                        if (NULL == pPciDma)
535                                break;
536                }
537
538                if ( NULL == pPciDma )
539                {
540                        /* eEngine is not used yet */
541                        eResult = BDMA_P_Pci_Create( hDma, eEngine, &s_stDefaultPciDmaSettings, phPciDma );
542                }
543                else
544                {
545                        /* all pci dma engine are used */
546                        eResult = BDMA_ERR_ENGINE_OCCUPIED;
547                }
548                BKNI_ReleaseMutex(pDma->hMutex);
549        }
550
551  BDMA_Err_Pci_Create:
552        return BERR_TRACE(eResult);
553}
554
555/***************************************************************************
556 *
557 */
558BERR_Code BDMA_Pci_Tran_Create(
559        BDMA_Pci_Handle          hPciDma,
560        uint32_t                 ulNumBlocks,
561        BDMA_Pci_Tran_Handle  *  phTran )
562{
563        BERR_Code  eResult = BERR_SUCCESS;
564
565        BKNI_EnterCriticalSection();
566        eResult = BDMA_P_Pci_Tran_Create_isr( hPciDma, ulNumBlocks, false, phTran );
567        BKNI_LeaveCriticalSection();
568
569        return BERR_TRACE(eResult);
570}
571
572/***************************************************************************
573 *
574 */
575BERR_Code BDMA_Pci_Tran_Start(
576        BDMA_Pci_Tran_Handle     hTran )
577{
578        BERR_Code  eResult = BERR_SUCCESS;
579
580        BKNI_EnterCriticalSection();
581        eResult = BDMA_P_Pci_Tran_Start_isr(
582                hTran, hTran->QueueEntry.ulNumTranBlocks, NULL, NULL );
583        BKNI_LeaveCriticalSection();
584
585        return BERR_TRACE(eResult);
586}
587
588/***************************************************************************
589 *
590 */
591BERR_Code BDMA_Pci_Tran_StartAndCallBack(
592        BDMA_Pci_Tran_Handle     hTran,
593        BDMA_Pci_CallbackFunc    pCallBackFunc_isr,
594        void *                   pUserCallBackParam )
595{
596        BERR_Code  eResult = BERR_SUCCESS;
597
598        BKNI_EnterCriticalSection();
599        eResult = BDMA_P_Pci_Tran_Start_isr( hTran, hTran->QueueEntry.ulNumTranBlocks,
600                                                                                 pCallBackFunc_isr, pUserCallBackParam );
601        BKNI_LeaveCriticalSection();
602
603        return BERR_TRACE(eResult);
604}
605
606/***************************************************************************
607 *
608 */
609BERR_Code BDMA_Pci_Tran_Create_isr(
610        BDMA_Pci_Handle          hPciDma,
611        uint32_t                 ulNumBlocks,
612        BDMA_Pci_Tran_Handle  *  phTran )
613{
614        BERR_Code  eResult = BERR_SUCCESS;
615
616        eResult = BDMA_P_Pci_Tran_Create_isr( hPciDma, ulNumBlocks, false, phTran );
617
618        return BERR_TRACE(eResult);
619}
620
621/***************************************************************************
622 *
623 */
624BERR_Code BDMA_Pci_Tran_StartAndCallBack_isr(
625        BDMA_Pci_Tran_Handle     hTran,
626        BDMA_Pci_CallbackFunc    pCallBackFunc_isr,
627        void *                   pUserCallBackParam )
628{
629        BERR_Code  eResult = BERR_SUCCESS;
630
631        eResult = BDMA_P_Pci_Tran_Start_isr( hTran, hTran->QueueEntry.ulNumTranBlocks,
632                                                                                 pCallBackFunc_isr, pUserCallBackParam );
633
634        return BERR_TRACE(eResult);
635}
636
637
638#else /*of #if (BCHP_CHIP != 3548) && (BCHP_CHIP != 3556)*/
639
640#include "bdma.h"
641#include "bdma_errors.h"
642#include "bkni.h"
643
644BDBG_MODULE(BDMA_PCI);
645
646/***************************************************************************
647 *
648 */
649BERR_Code BDMA_Pci_Create2(
650        BDMA_Handle           hDma,
651        BDMA_PciDmaEngine     eEngine,
652        BDMA_Pci_Settings *   pSettings,
653        BDMA_Pci_Handle *     phPciDma )
654{
655        BSTD_UNUSED(hDma);
656        BSTD_UNUSED(eEngine);
657        BSTD_UNUSED(pSettings);
658        BSTD_UNUSED(phPciDma);
659        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
660}
661
662/***************************************************************************
663 *
664 */
665BERR_Code BDMA_Pci_Destroy(
666        BDMA_Pci_Handle       hPciDma )
667{
668        BSTD_UNUSED(hPciDma);
669        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
670}
671
672/***************************************************************************
673 *
674 */
675BERR_Code BDMA_Pci_GetDefaultSettings
676        ( BDMA_Pci_Settings     *pDefSettings )
677{
678        BSTD_UNUSED(pDefSettings);
679        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
680}
681
682/***************************************************************************
683 *
684 */
685BERR_Code BDMA_Pci_SetSwapMode(
686        BDMA_Pci_Handle       hPciDma,
687        BDMA_SwapMode         eSwapMode )
688{
689        BSTD_UNUSED(hPciDma);
690        BSTD_UNUSED(eSwapMode);
691        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
692}
693
694/***************************************************************************
695 *
696 */
697BERR_Code BDMA_Pci_SetMaxBurstSize(
698        BDMA_Pci_Handle       hPciDma,
699        BDMA_MaxBurstSize     eMaxBurstSize )
700{
701        BSTD_UNUSED(hPciDma);
702        BSTD_UNUSED(eMaxBurstSize);
703        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
704}
705
706/***************************************************************************
707 *
708 */
709BERR_Code BDMA_Pci_Tran_Create2(
710        BDMA_Pci_Handle          hPciDma,
711        uint32_t                 ulNumBlocks,
712        bool                     bCachedDesc,
713        BDMA_Pci_Tran_Handle  *  phTran )
714{
715        BSTD_UNUSED(hPciDma);
716        BSTD_UNUSED(ulNumBlocks);
717        BSTD_UNUSED(bCachedDesc);
718        BSTD_UNUSED(phTran);
719
720return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
721}
722
723/***************************************************************************
724 *
725 */
726BERR_Code BDMA_Pci_Tran_GetMaxNumBlocks(
727        BDMA_Pci_Handle          hPciDma,
728        uint32_t *               pulMaxNumBlocks )
729{
730        BSTD_UNUSED(hPciDma);
731        BSTD_UNUSED(pulMaxNumBlocks);
732        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
733}
734
735/***************************************************************************
736 *
737 */
738BERR_Code BDMA_Pci_Tran_SetBlockInfo(
739        BDMA_Pci_Tran_Handle     hTran,
740        uint32_t                 ulBlockId,
741        uint32_t                 ulMemBusAddr,
742        uint32_t                 ulPciBusAddr,
743        uint32_t                 ulBlockSize,
744        BDMA_TranDir             eTranDirection )
745{
746        BSTD_UNUSED(hTran);
747        BSTD_UNUSED(ulBlockId);
748        BSTD_UNUSED(ulMemBusAddr);
749        BSTD_UNUSED(ulPciBusAddr);
750        BSTD_UNUSED(ulBlockSize);
751        BSTD_UNUSED(eTranDirection);
752        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
753}
754
755/***************************************************************************
756 *
757 */
758BERR_Code BDMA_Pci_Tran_StartDma(
759        BDMA_Pci_Tran_Handle     hTran,
760        uint32_t                 ulNumActBlocks )
761{
762        BSTD_UNUSED(hTran);
763        BSTD_UNUSED(ulNumActBlocks);
764        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
765}
766
767/***************************************************************************
768 *
769 */
770BERR_Code BDMA_Pci_Tran_StartDmaAndCallBack(
771        BDMA_Pci_Tran_Handle     hTran,
772        uint32_t                 ulNumActBlocks,
773        BDMA_Pci_CallbackFunc    pCallBackFunc_isr,
774        void *                   pUserCallBackParam )
775{
776        BSTD_UNUSED(hTran);
777        BSTD_UNUSED(ulNumActBlocks);
778        BSTD_UNUSED(pCallBackFunc_isr);
779        BSTD_UNUSED(pUserCallBackParam);
780        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
781}
782
783/***************************************************************************
784 *
785 */
786BERR_Code BDMA_Pci_Tran_GetStatus(
787        BDMA_Pci_Tran_Handle     hTran,
788        BDMA_TranStatus *        peTranStatus )
789{
790        BSTD_UNUSED(hTran);
791        BSTD_UNUSED(peTranStatus);
792        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
793}
794
795/***************************************************************************
796 *
797 */
798BERR_Code BDMA_Pci_Tran_Destroy(
799        BDMA_Pci_Tran_Handle     hTran )
800{
801        BSTD_UNUSED(hTran);
802        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
803}
804
805/***************************************************************************
806 *
807 */
808BERR_Code BDMA_Pci_Tran_Reset(
809        BDMA_Pci_Tran_Handle     hTran )
810{
811        BSTD_UNUSED(hTran);
812        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
813}
814
815/***************************************************************************
816 *
817 */
818BERR_Code BDMA_Pci_Tran_Create2_isr(
819        BDMA_Pci_Handle          hPciDma,
820        uint32_t                 ulNumBlocks,
821        bool                     bCachedDesc,
822        BDMA_Pci_Tran_Handle  *  phTran )
823{
824        BSTD_UNUSED(hPciDma);
825        BSTD_UNUSED(ulNumBlocks);
826        BSTD_UNUSED(bCachedDesc);
827        BSTD_UNUSED(phTran);
828        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
829}
830
831/***************************************************************************
832 *
833 */
834BERR_Code BDMA_Pci_Tran_SetBlockInfo_isr(
835        BDMA_Pci_Tran_Handle     hTran,
836        uint32_t                 ulBlockId,
837        uint32_t                 ulMemBusAddr,
838        uint32_t                 ulPciBusAddr,
839        uint32_t                 ulBlockSize,
840        BDMA_TranDir             eTranDirection )
841{
842        BSTD_UNUSED(hTran);
843        BSTD_UNUSED(ulBlockId);
844        BSTD_UNUSED(ulMemBusAddr);
845        BSTD_UNUSED(ulPciBusAddr);
846        BSTD_UNUSED(ulBlockSize);
847        BSTD_UNUSED(eTranDirection);
848        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
849}
850
851/***************************************************************************
852 *
853 */
854BERR_Code BDMA_Pci_Tran_StartDmaAndCallBack_isr(
855        BDMA_Pci_Tran_Handle     hTran,
856        uint32_t                 ulNumActBlocks,
857        BDMA_Pci_CallbackFunc    pCallBackFunc_isr,
858        void *                   pUserCallBackParam )
859{
860        BSTD_UNUSED(hTran);
861        BSTD_UNUSED(ulNumActBlocks);
862        BSTD_UNUSED(pCallBackFunc_isr);
863        BSTD_UNUSED(pUserCallBackParam);
864        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
865}
866
867/***************************************************************************
868 *
869 */
870BERR_Code BDMA_Pci_Tran_GetStatus_isr(
871        BDMA_Pci_Tran_Handle     hTran,
872        BDMA_TranStatus *        peTranStatus )
873{
874        BSTD_UNUSED(hTran);
875        BSTD_UNUSED(peTranStatus);
876        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
877
878}
879
880/***************************************************************************
881 *
882 */
883BERR_Code BDMA_Pci_Tran_Destroy_isr(
884        BDMA_Pci_Tran_Handle     hTran )
885{
886        BSTD_UNUSED(hTran);
887        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
888}
889
890/***************************************************************************
891 *
892 */
893BERR_Code BDMA_Pci_Tran_Reset_isr(
894        BDMA_Pci_Tran_Handle     hTran )
895{
896        BSTD_UNUSED(hTran);
897        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
898}
899
900
901/***************************************************************************
902 * Obsolete Pci Dma API:
903 **************************************************************************/
904
905/***************************************************************************
906 *
907 */
908BERR_Code BDMA_Pci_Create(
909        BDMA_Handle           hDma,
910        BDMA_Pci_Handle *     phPciDma )
911{
912        BSTD_UNUSED(hDma);
913        BSTD_UNUSED(phPciDma);
914        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
915}
916
917/***************************************************************************
918 *
919 */
920BERR_Code BDMA_Pci_Tran_Create(
921        BDMA_Pci_Handle          hPciDma,
922        uint32_t                 ulNumBlocks,
923        BDMA_Pci_Tran_Handle  *  phTran )
924{
925        BSTD_UNUSED(hPciDma);
926        BSTD_UNUSED(ulNumBlocks);
927        BSTD_UNUSED(phTran);
928        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
929}
930
931/***************************************************************************
932 *
933 */
934BERR_Code BDMA_Pci_Tran_Start(
935        BDMA_Pci_Tran_Handle     hTran )
936{
937        BSTD_UNUSED(hTran);
938        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
939}
940
941/***************************************************************************
942 *
943 */
944BERR_Code BDMA_Pci_Tran_StartAndCallBack(
945        BDMA_Pci_Tran_Handle     hTran,
946        BDMA_Pci_CallbackFunc    pCallBackFunc_isr,
947        void *                   pUserCallBackParam )
948{
949        BSTD_UNUSED(hTran);
950        BSTD_UNUSED(pCallBackFunc_isr);
951        BSTD_UNUSED(pUserCallBackParam);
952        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
953}
954
955/***************************************************************************
956 *
957 */
958BERR_Code BDMA_Pci_Tran_Create_isr(
959        BDMA_Pci_Handle          hPciDma,
960        uint32_t                 ulNumBlocks,
961        BDMA_Pci_Tran_Handle  *  phTran )
962{
963        BSTD_UNUSED(hPciDma);
964        BSTD_UNUSED(ulNumBlocks);
965        BSTD_UNUSED(phTran);
966        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
967}
968
969/***************************************************************************
970 *
971 */
972BERR_Code BDMA_Pci_Tran_StartAndCallBack_isr(
973        BDMA_Pci_Tran_Handle     hTran,
974        BDMA_Pci_CallbackFunc    pCallBackFunc_isr,
975        void *                   pUserCallBackParam )
976{
977        BSTD_UNUSED(hTran);
978        BSTD_UNUSED(pCallBackFunc_isr);
979        BSTD_UNUSED(pUserCallBackParam);
980        return BERR_TRACE(BDMA_ERR_ENGINE_NOT_SUPPORTED);
981}
982
983#endif
984
985/* End of File */
Note: See TracBrowser for help on using the repository browser.