]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - drivers/net/npe/include/IxQMgrDispatcher_p.h
doc: SPI: Add qspi test details on AM43xx
[karo-tx-uboot.git] / drivers / net / npe / include / IxQMgrDispatcher_p.h
1 /**
2  * @file    IxQMgrDispatcher_p.h
3  *
4  * @author Intel Corporation
5  * @date    07-Feb-2002
6  *
7  * @brief   This file contains the internal functions for dispatcher
8  *
9  * 
10  * @par
11  * IXP400 SW Release version 2.0
12  * 
13  * -- Copyright Notice --
14  * 
15  * @par
16  * Copyright 2001-2005, Intel Corporation.
17  * All rights reserved.
18  * 
19  * @par
20  * SPDX-License-Identifier:     BSD-3-Clause
21  * @par
22  * -- End of Copyright Notice --
23 */
24
25 #ifndef IXQMGRDISPATCHER_P_H
26 #define IXQMGRDISPATCHER_P_H
27
28 /*
29  * User defined include files
30  */
31 #include "IxQMgr.h"
32
33 /*
34  * This structure defines the statistic data for a queue
35  */
36 typedef struct
37 {
38     unsigned callbackCnt;       /* Call count of callback                    */
39     unsigned priorityChangeCnt; /* Priority change count                     */
40     unsigned intNoCallbackCnt;  /* Interrupt fired but no callback set count */
41     unsigned intLostCallbackCnt;  /* Interrupt lost and detected ;  SCR541   */
42     BOOL notificationEnabled;    /* Interrupt enabled for this queue         */
43     IxQMgrSourceId srcSel;       /* interrupt source                         */
44     unsigned enableCount;        /* num times notif enabled by LLP           */
45     unsigned disableCount;       /* num of times notif disabled by LLP       */
46 } IxQMgrDispatcherQStats;
47
48 /*
49  * This structure defines statistic data for the disatcher
50  */
51 typedef struct
52  {
53     unsigned loopRunCnt;       /* ixQMgrDispatcherLoopRun count */
54
55     IxQMgrDispatcherQStats queueStats[IX_QMGR_MAX_NUM_QUEUES];
56
57 } IxQMgrDispatcherStats;
58
59 /*
60  * Initialise the dispatcher component
61  */
62 void
63 ixQMgrDispatcherInit (void);
64
65 /*
66  * Get the dispatcher statistics
67  */
68 IxQMgrDispatcherStats*
69 ixQMgrDispatcherStatsGet (void);
70
71 /**
72  * Retrieve the number of leading zero bits starting from the MSB 
73  * This function is implemented as an (extremely fast) asm routine 
74  * for XSCALE processor (see clz instruction) and as a (slower) C 
75  * function for other systems.
76  */
77 unsigned int
78 ixQMgrCountLeadingZeros(unsigned int value);
79
80 #endif/*IXQMGRDISPATCHER_P_H*/
81
82