xref: /freebsd/sys/dev/pms/freebsd/driver/common/lxproto.h (revision 069ac184)
1 /*******************************************************************************
2 *Copyright (c) 2014 PMC-Sierra, Inc.  All rights reserved.
3 *
4 *Redistribution and use in source and binary forms, with or without modification, are permitted provided
5 *that the following conditions are met:
6 *1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
7 *following disclaimer.
8 *2. Redistributions in binary form must reproduce the above copyright notice,
9 *this list of conditions and the following disclaimer in the documentation and/or other materials provided
10 *with the distribution.
11 *
12 *THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 *WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 *FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15 *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 *NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
17 *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18 *LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19 *SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
20 *
21 *
22 *******************************************************************************/
23 
24 /*******************************************************************************
25 Module Name:
26   lxproto.h
27 Abstract:
28   PMC-Sierra initiator/target driver common function prototype definition
29 Environment:
30   Kernel or loadable module
31 Notes:
32 
33 ******************************************************************************/
34 
35 #ifndef __LX_PROTO_H__
36 #define __LX_PROTO_H__
37 
38 void       agtiapi_DelayMSec(U32);
39 void       agtiapi_DelaySec(U32);
40 void       agtiapi_DisplayRsc(ag_card_info_t *);
41 agBOOLEAN  agtiapi_InitResource(ag_card_info_t *);
42 agBOOLEAN  agtiapi_typhAlloc(ag_card_info_t *);
43 int        agtiapi_ScopeDMARes(ag_card_info_t *);
44 void       agtiapi_ReleasePCIMem(ag_card_info_t *);
45 
46 STATIC agBOOLEAN agtiapi_MemAlloc( ag_card_info_t *thisCardInst,
47                                    void          **VirtAlloc,
48                                    vm_paddr_t     *pDmaAddr,
49                                    void          **VirtAddr,
50                                    U32            *pPhysAddrUp,
51                                    U32            *pPhysAddrLow,
52                                    U32             MemSize,
53                                    U32             Type,
54                                    U32             Align );
55 
56 void       agtiapi_MemFree(ag_card_info_t *);
57 U32        agtiapi_PCIMemSize(device_t, U32, U32);
58 void       agtiapi_Probe(void);
59 int        agtiapi_ProbeCard(device_t, ag_card_info_t *, int);
60 void       agtiapi_Setup(S08 *, S32 *);
61 
62 #ifdef CHAR_DEVICE
63 //int        agtiapi_Open(struct inode *, struct file *);
64 //int        agtiapi_Close(struct inode *, struct file *);
65 #endif
66 
67 #ifdef AGTIAPI_INCLUDE_PROCS
68 static void agtiapi_ProcDel(ag_card_info_t *pInfo);
69 static int  agtiapi_ProcAdd(ag_card_info_t *pInfo);
70 #endif
71 
72 #ifdef TEST_DUMP_FCTRACE_BUFFER
73 #if fcEnableTraceFunctions == 1
74 static void agtiapi_DumpTraceBuffer(ag_card_info_t *pInfo);
75 #endif
76 #endif
77 
78 
79 #endif
80