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 * $FreeBSD$ 22 * 23 *******************************************************************************/ 24 25 /******************************************************************************* 26 Module Name: 27 lxproto.h 28 Abstract: 29 PMC-Sierra initiator/target driver common function prototype definition 30 Environment: 31 Kernel or loadable module 32 Notes: 33 34 ******************************************************************************/ 35 36 #ifndef __LX_PROTO_H__ 37 #define __LX_PROTO_H__ 38 39 void agtiapi_DelayMSec(U32); 40 void agtiapi_DelaySec(U32); 41 void agtiapi_DisplayRsc(ag_card_info_t *); 42 agBOOLEAN agtiapi_InitResource(ag_card_info_t *); 43 agBOOLEAN agtiapi_typhAlloc(ag_card_info_t *); 44 int agtiapi_ScopeDMARes(ag_card_info_t *); 45 void agtiapi_ReleasePCIMem(ag_card_info_t *); 46 47 STATIC agBOOLEAN agtiapi_MemAlloc( ag_card_info_t *thisCardInst, 48 void **VirtAlloc, 49 vm_paddr_t *pDmaAddr, 50 void **VirtAddr, 51 U32 *pPhysAddrUp, 52 U32 *pPhysAddrLow, 53 U32 MemSize, 54 U32 Type, 55 U32 Align ); 56 57 void agtiapi_MemFree(ag_card_info_t *); 58 U32 agtiapi_PCIMemSize(device_t, U32, U32); 59 void agtiapi_Probe(void); 60 int agtiapi_ProbeCard(device_t, ag_card_info_t *, int); 61 void agtiapi_Setup(S08 *, S32 *); 62 63 #ifdef CHAR_DEVICE 64 //int agtiapi_Open(struct inode *, struct file *); 65 //int agtiapi_Close(struct inode *, struct file *); 66 #endif 67 68 #ifdef AGTIAPI_INCLUDE_PROCS 69 static void agtiapi_ProcDel(ag_card_info_t *pInfo); 70 static int agtiapi_ProcAdd(ag_card_info_t *pInfo); 71 #endif 72 73 #ifdef TEST_DUMP_FCTRACE_BUFFER 74 #if fcEnableTraceFunctions == 1 75 static void agtiapi_DumpTraceBuffer(ag_card_info_t *pInfo); 76 #endif 77 #endif 78 79 80 #endif 81