lxproto.h revision 285809
1285809Sscottl/******************************************************************************* 2285809Sscottl*Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved. 3285809Sscottl* 4285809Sscottl*Redistribution and use in source and binary forms, with or without modification, are permitted provided 5285809Sscottl*that the following conditions are met: 6285809Sscottl*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the 7285809Sscottl*following disclaimer. 8285809Sscottl*2. Redistributions in binary form must reproduce the above copyright notice, 9285809Sscottl*this list of conditions and the following disclaimer in the documentation and/or other materials provided 10285809Sscottl*with the distribution. 11285809Sscottl* 12285809Sscottl*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED 13285809Sscottl*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14285809Sscottl*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 15285809Sscottl*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 16285809Sscottl*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 17285809Sscottl*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 18285809Sscottl*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 19285809Sscottl*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 20285809Sscottl* 21285809Sscottl* $FreeBSD$ 22285809Sscottl* 23285809Sscottl*******************************************************************************/ 24285809Sscottl 25285809Sscottl/******************************************************************************* 26285809SscottlModule Name: 27285809Sscottl lxproto.h 28285809SscottlAbstract: 29285809Sscottl PMC-Sierra initiator/target driver common function prototype definition 30285809SscottlEnvironment: 31285809Sscottl Kernel or loadable module 32285809SscottlNotes: 33285809Sscottl 34285809Sscottl******************************************************************************/ 35285809Sscottl 36285809Sscottl#ifndef __LX_PROTO_H__ 37285809Sscottl#define __LX_PROTO_H__ 38285809Sscottl 39285809Sscottlvoid agtiapi_DelayMSec(U32); 40285809Sscottlvoid agtiapi_DelaySec(U32); 41285809Sscottlvoid agtiapi_DisplayRsc(ag_card_info_t *); 42285809SscottlagBOOLEAN agtiapi_InitResource(ag_card_info_t *); 43285809SscottlagBOOLEAN agtiapi_typhAlloc(ag_card_info_t *); 44285809Sscottlint agtiapi_ScopeDMARes(ag_card_info_t *); 45285809Sscottlvoid agtiapi_ReleasePCIMem(ag_card_info_t *); 46285809Sscottl 47285809SscottlSTATIC agBOOLEAN agtiapi_MemAlloc( ag_card_info_t *thisCardInst, 48285809Sscottl void **VirtAlloc, 49285809Sscottl vm_paddr_t *pDmaAddr, 50285809Sscottl void **VirtAddr, 51285809Sscottl U32 *pPhysAddrUp, 52285809Sscottl U32 *pPhysAddrLow, 53285809Sscottl U32 MemSize, 54285809Sscottl U32 Type, 55285809Sscottl U32 Align ); 56285809Sscottl 57285809Sscottlvoid agtiapi_MemFree(ag_card_info_t *); 58285809SscottlU32 agtiapi_PCIMemSize(device_t, U32, U32); 59285809Sscottlvoid agtiapi_Probe(void); 60285809Sscottlint agtiapi_ProbeCard(device_t, ag_card_info_t *, int); 61285809Sscottlvoid agtiapi_Setup(S08 *, S32 *); 62285809Sscottl 63285809Sscottl#ifdef CHAR_DEVICE 64285809Sscottl//int agtiapi_Open(struct inode *, struct file *); 65285809Sscottl//int agtiapi_Close(struct inode *, struct file *); 66285809Sscottl#endif 67285809Sscottl 68285809Sscottl#ifdef AGTIAPI_INCLUDE_PROCS 69285809Sscottlstatic void agtiapi_ProcDel(ag_card_info_t *pInfo); 70285809Sscottlstatic int agtiapi_ProcAdd(ag_card_info_t *pInfo); 71285809Sscottl#endif 72285809Sscottl 73285809Sscottl#ifdef TEST_DUMP_FCTRACE_BUFFER 74285809Sscottl#if fcEnableTraceFunctions == 1 75285809Sscottlstatic void agtiapi_DumpTraceBuffer(ag_card_info_t *pInfo); 76285809Sscottl#endif 77285809Sscottl#endif 78285809Sscottl 79285809Sscottl 80285809Sscottl#endif 81