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/*! \file saosapi.h 26285809Sscottl * \brief The file defines the declaration of OS APIs 27285809Sscottl * 28285809Sscottl */ 29285809Sscottl/*******************************************************************************/ 30285809Sscottl 31285809Sscottl#ifndef __SSDKOSAPI_H__ 32285809Sscottl#define __SSDKOSAPI_H__ 33285809Sscottl 34285809Sscottl#ifdef LINUX 35285809Sscottl#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18) 36285809Sscottl 37285809Sscottl#ifdef FORCEINLINE 38285809Sscottl#undef FORCEINLINE 39285809Sscottl#define FORCEINLINE 40285809Sscottl#endif 41285809Sscottl 42285809Sscottl#endif 43285809Sscottl#endif 44285809Sscottl 45285809Sscottl/*************************************************************************** 46285809Sscottl * Definition of register access related functions start * 47285809Sscottl ***************************************************************************/ 48285809Sscottl#ifndef ossaHwRegRead 49285809SscottlGLOBAL FORCEINLINE 50285809Sscottlbit32 ossaHwRegRead( 51285809Sscottl agsaRoot_t *agRoot, 52285809Sscottl bit32 regOffset 53285809Sscottl ); 54285809Sscottl#endif 55285809Sscottl 56285809Sscottl#ifndef ossaHwRegWrite 57285809SscottlGLOBAL FORCEINLINE 58285809Sscottlvoid ossaHwRegWrite( 59285809Sscottl agsaRoot_t *agRoot, 60285809Sscottl bit32 regOffset, 61285809Sscottl bit32 regValue 62285809Sscottl ); 63285809Sscottl#endif 64285809Sscottl 65285809Sscottl#ifndef ossaHwRegReadExt 66285809SscottlGLOBAL FORCEINLINE 67285809Sscottlbit32 ossaHwRegReadExt( 68285809Sscottl agsaRoot_t *agRoot, 69285809Sscottl bit32 busBaseNumber, 70285809Sscottl bit32 regOffset 71285809Sscottl ); 72285809Sscottl#endif 73285809Sscottl 74285809Sscottl#ifndef ossaHwRegWriteExt 75285809SscottlGLOBAL FORCEINLINE 76285809Sscottlvoid ossaHwRegWriteExt( 77285809Sscottl agsaRoot_t *agRoot, 78285809Sscottl bit32 busBaseNumber, 79285809Sscottl bit32 regOffset, 80285809Sscottl bit32 regValue 81285809Sscottl ); 82285809Sscottl#endif 83285809Sscottl 84285809Sscottl#ifndef ossaHwRegReadConfig32 85285809SscottlosGLOBAL bit32 ossaHwRegReadConfig32( 86285809Sscottl agsaRoot_t *agRoot, 87285809Sscottl bit32 regOffset 88285809Sscottl ); 89285809Sscottl#endif 90285809Sscottl 91285809Sscottl 92285809Sscottl/*************************************************************************** 93285809Sscottl * Definition of register access related functions end * 94285809Sscottl ***************************************************************************/ 95285809Sscottl 96285809Sscottl/*************************************************************************** 97285809Sscottl * Definition of thread related functions start * 98285809Sscottl ***************************************************************************/ 99285809Sscottl#ifndef ossaSingleThreadedEnter 100285809SscottlGLOBAL FORCEINLINE void ossaSingleThreadedEnter( 101285809Sscottl agsaRoot_t *agRoot, 102285809Sscottl bit32 syncLockId 103285809Sscottl ); 104285809Sscottl#endif 105285809Sscottl 106285809Sscottl#ifndef ossaSingleThreadedLeave 107285809SscottlGLOBAL FORCEINLINE void ossaSingleThreadedLeave( 108285809Sscottl agsaRoot_t *agRoot, 109285809Sscottl bit32 syncLockId 110285809Sscottl ); 111285809Sscottl#endif 112285809Sscottl 113285809Sscottl#ifndef ossaStallThread 114285809SscottlGLOBAL void ossaStallThread( 115285809Sscottl agsaRoot_t *agRoot, 116285809Sscottl bit32 microseconds 117285809Sscottl ); 118285809Sscottl#endif 119285809Sscottl/*************************************************************************** 120285809Sscottl * Definition of thread related functions end * 121285809Sscottl ***************************************************************************/ 122285809Sscottl 123285809Sscottl/*************************************************************************** 124285809Sscottl * Definition of interrupt related functions start * 125285809Sscottl ***************************************************************************/ 126285809Sscottl#ifndef ossaDisableInterrupts 127285809Sscottl#define ossaDisableInterrupts(agRoot, interruptVectorIndex) \ 128285809Sscottldo \ 129285809Sscottl{ \ 130285809Sscottl agsaLLRoot_t *saROOT = (agsaLLRoot_t *)(agRoot->sdkData);\ 131285809Sscottl saROOT->DisableInterrupts(agRoot, interruptVectorIndex); \ 132285809Sscottl} while(0) 133285809Sscottl#endif 134285809Sscottl 135285809Sscottl#ifndef ossaReenableInterrupts 136285809Sscottl#define ossaReenableInterrupts(agRoot, interruptVectorIndex) \ 137285809Sscottldo \ 138285809Sscottl{ \ 139285809Sscottl agsaLLRoot_t *saROOT = (agsaLLRoot_t *)(agRoot->sdkData); \ 140285809Sscottl saROOT->ReEnableInterrupts(agRoot, interruptVectorIndex); \ 141285809Sscottl} while(0) 142285809Sscottl#endif 143285809Sscottl 144285809Sscottl/*************************************************************************** 145285809Sscottl * Definition of interrupt related functions end * 146285809Sscottl ***************************************************************************/ 147285809Sscottl 148285809Sscottl/*************************************************************************** 149285809Sscottl * Definition of cache related functions start * 150285809Sscottl ***************************************************************************/ 151285809Sscottl#ifndef ossaCacheInvalidate 152285809SscottlGLOBAL FORCEINLINE void ossaCacheInvalidate( 153285809Sscottl agsaRoot_t *agRoot, 154285809Sscottl void *osMemHandle, 155285809Sscottl void *virtPtr, 156285809Sscottl bit32 length 157285809Sscottl ); 158285809Sscottl#endif 159285809Sscottl 160285809Sscottl#ifndef ossaCacheFlush 161285809SscottlGLOBAL FORCEINLINE void ossaCacheFlush( 162285809Sscottl agsaRoot_t *agRoot, 163285809Sscottl void *osMemHandle, 164285809Sscottl void *virtPtr, 165285809Sscottl bit32 length 166285809Sscottl ); 167285809Sscottl#endif 168285809Sscottl 169285809Sscottl#ifndef ossaCachePreFlush 170285809SscottlGLOBAL FORCEINLINE void ossaCachePreFlush( 171285809Sscottl agsaRoot_t *agRoot, 172285809Sscottl void *osMemHandle, 173285809Sscottl void *virtPtr, 174285809Sscottl bit32 length 175285809Sscottl ); 176285809Sscottl#endif 177285809Sscottl 178285809Sscottl/*************************************************************************** 179285809Sscottl * Definition of cache related functions end * 180285809Sscottl ***************************************************************************/ 181285809Sscottl 182285809Sscottl/*************************************************************************** 183285809Sscottl * Definition of hardware related functions start * 184285809Sscottl ***************************************************************************/ 185285809Sscottl#ifndef ossaHwCB 186285809SscottlGLOBAL void ossaHwCB( 187285809Sscottl agsaRoot_t *agRoot, 188285809Sscottl agsaPortContext_t *agPortContext, 189285809Sscottl bit32 event, 190285809Sscottl bit32 eventParm1, 191285809Sscottl void *eventParm2, 192285809Sscottl void *eventParm3 193285809Sscottl ); 194285809Sscottl#endif 195285809Sscottl 196285809Sscottl#ifndef ossaHwEventAckCB 197285809SscottlGLOBAL void ossaHwEventAckCB( 198285809Sscottl agsaRoot_t *agRoot, 199285809Sscottl agsaContext_t *agContext, 200285809Sscottl bit32 status 201285809Sscottl ); 202285809Sscottl#endif 203285809Sscottl/*************************************************************************** 204285809Sscottl * Definition of hardware related functions end * 205285809Sscottl ***************************************************************************/ 206285809Sscottl 207285809Sscottl/*************************************************************************** 208285809Sscottl * Definition of SATA related functions start * 209285809Sscottl ***************************************************************************/ 210285809Sscottl#ifndef ossaSATACompleted 211285809SscottlGLOBAL void ossaSATACompleted( 212285809Sscottl agsaRoot_t *agRoot, 213285809Sscottl agsaIORequest_t *agIORequest, 214285809Sscottl bit32 agIOStatus, 215285809Sscottl void *agFirstDword, 216285809Sscottl bit32 agIOInfoLen, 217285809Sscottl void *agParam 218285809Sscottl ); 219285809Sscottl 220285809Sscottl#endif 221285809Sscottl 222285809Sscottl#ifndef ossaSATAEvent 223285809SscottlGLOBAL void ossaSATAEvent( 224285809Sscottl agsaRoot_t *agRoot, 225285809Sscottl agsaIORequest_t *agIORequest, 226285809Sscottl agsaPortContext_t *agPortContext, 227285809Sscottl agsaDevHandle_t *agDevHandle, 228285809Sscottl bit32 event, 229285809Sscottl bit32 agIOInfoLen, 230285809Sscottl void *agParam 231285809Sscottl ); 232285809Sscottl#endif 233285809Sscottl 234285809Sscottl#ifndef ossaSATAAbortCB 235285809Sscottl GLOBAL void ossaSATAAbortCB( 236285809Sscottl agsaRoot_t *agRoot, 237285809Sscottl agsaIORequest_t *agIORequest, 238285809Sscottl bit32 flag, 239285809Sscottl bit32 status 240285809Sscottl ); 241285809Sscottl#endif 242285809Sscottl 243285809Sscottl/*************************************************************************** 244285809Sscottl * Definition of SATA related functions end * 245285809Sscottl ***************************************************************************/ 246285809Sscottl 247285809Sscottl 248285809Sscottl/*************************************************************************** 249285809Sscottl * Definition of SAS related functions start * 250285809Sscottl ***************************************************************************/ 251285809Sscottl#ifndef ossaSSPEvent 252285809SscottlGLOBAL void ossaSSPEvent( 253285809Sscottl agsaRoot_t *agRoot, 254285809Sscottl agsaIORequest_t *agIORequest, 255285809Sscottl agsaPortContext_t *agPortContext, 256285809Sscottl agsaDevHandle_t *agDevHandle, 257285809Sscottl bit32 event, 258285809Sscottl bit16 sspTag, 259285809Sscottl bit32 agIOInfoLen, 260285809Sscottl void *agParam 261285809Sscottl ); 262285809Sscottl#endif 263285809Sscottl 264285809SscottlosGLOBAL void 265285809SscottlossaSMPIoctlCompleted( 266285809Sscottl agsaRoot_t *agRoot, 267285809Sscottl agsaIORequest_t *agIORequest, 268285809Sscottl bit32 agIOStatus, 269285809Sscottl bit32 agIOInfoLen, 270285809Sscottl agsaFrameHandle_t agFrameHandle 271285809Sscottl ); 272285809Sscottl 273285809Sscottl#ifndef ossaSMPCompleted 274285809SscottlGLOBAL void ossaSMPCompleted( 275285809Sscottl agsaRoot_t *agRoot, 276285809Sscottl agsaIORequest_t *agIORequest, 277285809Sscottl bit32 agIOStatus, 278285809Sscottl bit32 agIOInfoLen, 279285809Sscottl agsaFrameHandle_t agFrameHandle 280285809Sscottl ); 281285809Sscottl#endif 282285809Sscottl 283285809Sscottl#ifndef ossaSMPReqReceived 284285809SscottlGLOBAL void ossaSMPReqReceived( 285285809Sscottl agsaRoot_t *agRoot, 286285809Sscottl agsaDevHandle_t *agDevHandle, 287285809Sscottl agsaFrameHandle_t agFrameHandle, 288285809Sscottl bit32 agFrameLength, 289285809Sscottl bit32 phyId 290285809Sscottl ); 291285809Sscottl#endif 292285809Sscottl 293285809Sscottl#ifndef ossaSSPCompleted 294285809SscottlGLOBAL FORCEINLINE void ossaSSPCompleted( 295285809Sscottl agsaRoot_t *agRoot, 296285809Sscottl agsaIORequest_t *agIORequest, 297285809Sscottl bit32 agIOStatus, 298285809Sscottl bit32 agIOInfoLen, 299285809Sscottl void *agParam, 300285809Sscottl bit16 sspTag, 301285809Sscottl bit32 agOtherInfo 302285809Sscottl ); 303285809Sscottl#endif 304285809Sscottl 305285809Sscottl#ifdef FAST_IO_TEST 306285809SscottlGLOBAL void ossaFastSSPCompleted( 307285809Sscottl agsaRoot_t *agRoot, 308285809Sscottl agsaIORequest_t *cbArg, 309285809Sscottl bit32 agIOStatus, 310285809Sscottl bit32 agIOInfoLen, 311285809Sscottl void *agParam, 312285809Sscottl bit16 sspTag, 313285809Sscottl bit32 agOtherInfo 314285809Sscottl ); 315285809Sscottl#endif 316285809Sscottl 317285809Sscottl#ifndef ossaSSPReqReceived 318285809SscottlGLOBAL void ossaSSPReqReceived( 319285809Sscottl agsaRoot_t *agRoot, 320285809Sscottl agsaDevHandle_t *agDevHandle, 321285809Sscottl agsaFrameHandle_t agFrameHandle, 322285809Sscottl bit16 agInitiatorTag, 323285809Sscottl bit32 parameter, 324285809Sscottl bit32 agFrameLen 325285809Sscottl ); 326285809Sscottl#endif 327285809Sscottl 328285809SscottlosGLOBAL void 329285809SscottlossaSSPIoctlCompleted( 330285809Sscottl agsaRoot_t *agRoot, 331285809Sscottl agsaIORequest_t *agIORequest, 332285809Sscottl bit32 agIOStatus, 333285809Sscottl bit32 agIOInfoLen, 334285809Sscottl void *agParam, 335285809Sscottl bit16 sspTag, 336285809Sscottl bit32 agOtherInfo 337285809Sscottl ); 338285809Sscottl 339285809Sscottl 340285809Sscottl#ifndef ossaSSPAbortCB 341285809SscottlGLOBAL void ossaSSPAbortCB( 342285809Sscottl agsaRoot_t *agRoot, 343285809Sscottl agsaIORequest_t *agIORequest, 344285809Sscottl bit32 flag, 345285809Sscottl bit32 status 346285809Sscottl ); 347285809Sscottl#endif 348285809Sscottl 349285809Sscottl#ifndef ossaSMPAbortCB 350285809SscottlGLOBAL void ossaSMPAbortCB( 351285809Sscottl agsaRoot_t *agRoot, 352285809Sscottl agsaIORequest_t *agIORequest, 353285809Sscottl bit32 flag, 354285809Sscottl bit32 status 355285809Sscottl ); 356285809Sscottl#endif 357285809Sscottl 358285809Sscottl#ifndef ossaReconfigSASParamsCB 359285809SscottlGLOBAL void ossaReconfigSASParamsCB( 360285809Sscottl agsaRoot_t *agRoot, 361285809Sscottl agsaContext_t *agContext, 362285809Sscottl bit32 status, 363285809Sscottl agsaSASReconfig_t *agSASConfig 364285809Sscottl); 365285809Sscottl#endif 366285809Sscottl 367285809Sscottl/*************************************************************************** 368285809Sscottl * Definition of SAS related functions end * 369285809Sscottl ***************************************************************************/ 370285809Sscottl 371285809Sscottl/*************************************************************************** 372285809Sscottl * Definition of Discovery related functions start * 373285809Sscottl ***************************************************************************/ 374285809Sscottl#ifndef ossaDiscoverSataCB 375285809SscottlGLOBAL void ossaDiscoverSataCB( 376285809Sscottl agsaRoot_t *agRoot, 377285809Sscottl agsaPortContext_t *agPortContext, 378285809Sscottl bit32 event, 379285809Sscottl void *pParm1, 380285809Sscottl void *pParm2 381285809Sscottl ); 382285809Sscottl#endif 383285809Sscottl 384285809Sscottl#ifndef ossaDiscoverSasCB 385285809SscottlGLOBAL void ossaDiscoverSasCB( 386285809Sscottl agsaRoot_t *agRoot, 387285809Sscottl agsaPortContext_t *agPortContext, 388285809Sscottl bit32 event, 389285809Sscottl void *pParm1, 390285809Sscottl void *pParm2 391285809Sscottl ); 392285809Sscottl#endif 393285809Sscottl 394285809Sscottl#ifndef ossaDeviceHandleAccept 395285809SscottlGLOBAL bit32 ossaDeviceHandleAccept( 396285809Sscottl agsaRoot_t *agRoot, 397285809Sscottl agsaDevHandle_t *agDevHandle, 398285809Sscottl agsaSASDeviceInfo_t *agDeviceInfo, 399285809Sscottl agsaPortContext_t *agPortContext, 400285809Sscottl bit32 *hostAssignedDeviceId 401285809Sscottl ); 402285809Sscottl#endif 403285809Sscottl 404285809Sscottl#ifndef ossaGetDeviceHandlesCB 405285809SscottlGLOBAL void ossaGetDeviceHandlesCB( 406285809Sscottl agsaRoot_t *agRoot, 407285809Sscottl agsaContext_t *agContext, 408285809Sscottl agsaPortContext_t *agPortContext, 409285809Sscottl agsaDevHandle_t *agDev[], 410285809Sscottl bit32 validDevs 411285809Sscottl ); 412285809Sscottl#endif 413285809Sscottl 414285809Sscottl#ifndef ossaGetDeviceInfoCB 415285809SscottlGLOBAL void ossaGetDeviceInfoCB( 416285809Sscottl agsaRoot_t *agRoot, 417285809Sscottl agsaContext_t *agContext, 418285809Sscottl agsaDevHandle_t *agDevHandle, 419285809Sscottl bit32 status, 420285809Sscottl void *agInfo 421285809Sscottl ); 422285809Sscottl#endif 423285809Sscottl 424285809Sscottl#ifndef ossaDeviceHandleRemovedEvent 425285809SscottlGLOBAL void ossaDeviceHandleRemovedEvent ( 426285809Sscottl agsaRoot_t *agRoot, 427285809Sscottl agsaDevHandle_t *agDevHandle, 428285809Sscottl agsaPortContext_t *agPortContext 429285809Sscottl ); 430285809Sscottl#endif 431285809Sscottl 432285809Sscottl#ifndef ossaGetDeviceStateCB 433285809SscottlGLOBAL void ossaGetDeviceStateCB( 434285809Sscottl agsaRoot_t *agRoot, 435285809Sscottl agsaContext_t *agContext, 436285809Sscottl agsaDevHandle_t *agDevHandle, 437285809Sscottl bit32 status, 438285809Sscottl bit32 deviceState 439285809Sscottl ); 440285809Sscottl#endif 441285809Sscottl 442285809Sscottl#ifndef ossaSetDeviceInfoCB 443285809SscottlGLOBAL void ossaSetDeviceInfoCB( 444285809Sscottl agsaRoot_t *agRoot, 445285809Sscottl agsaContext_t *agContext, 446285809Sscottl agsaDevHandle_t *agDevHandle, 447285809Sscottl bit32 status, 448285809Sscottl bit32 option, 449285809Sscottl bit32 param 450285809Sscottl ); 451285809Sscottl#endif 452285809Sscottl 453285809Sscottl#ifndef ossaSetDeviceStateCB 454285809SscottlGLOBAL void ossaSetDeviceStateCB( 455285809Sscottl agsaRoot_t *agRoot, 456285809Sscottl agsaContext_t *agContext, 457285809Sscottl agsaDevHandle_t *agDevHandle, 458285809Sscottl bit32 status, 459285809Sscottl bit32 newDeviceState, 460285809Sscottl bit32 previousDeviceState 461285809Sscottl ); 462285809Sscottl#endif 463285809Sscottl 464285809Sscottl/*************************************************************************** 465285809Sscottl * Definition of Discovery related functions end * 466285809Sscottl ***************************************************************************/ 467285809Sscottl 468285809Sscottl/*************************************************************************** 469285809Sscottl * Definition of Misc. related functions start * 470285809Sscottl ***************************************************************************/ 471285809Sscottl 472285809Sscottl#ifndef ossaTimeStamp 473285809SscottlGLOBAL bit32 ossaTimeStamp(agsaRoot_t *agRoot); 474285809Sscottl#endif /* ossaTimeStamp */ 475285809Sscottl 476285809Sscottl#ifndef ossaTimeStamp64 477285809SscottlGLOBAL bit64 ossaTimeStamp64(agsaRoot_t *agRoot); 478285809Sscottl#endif /* ossaTimeStamp64 */ 479285809Sscottl 480285809Sscottl 481285809Sscottl#ifndef ossaLocalPhyControlCB 482285809SscottlGLOBAL void ossaLocalPhyControlCB( 483285809Sscottl agsaRoot_t *agRoot, 484285809Sscottl agsaContext_t *agContext, 485285809Sscottl bit32 phyId, 486285809Sscottl bit32 phyOperation, 487285809Sscottl bit32 status, 488285809Sscottl void *parm); 489285809Sscottl#endif 490285809Sscottl 491285809Sscottl#ifndef ossaGetPhyProfileCB 492285809SscottlGLOBAL void ossaGetPhyProfileCB( 493285809Sscottl agsaRoot_t *agRoot, 494285809Sscottl agsaContext_t *agContext, 495285809Sscottl bit32 status, 496285809Sscottl bit32 ppc, 497285809Sscottl bit32 phyID, 498285809Sscottl void *parm ); 499285809Sscottl#endif 500285809Sscottl 501285809Sscottl#ifndef ossaSetPhyProfileCB 502285809SscottlGLOBAL void ossaSetPhyProfileCB( 503285809Sscottl agsaRoot_t *agRoot, 504285809Sscottl agsaContext_t *agContext, 505285809Sscottl bit32 status, 506285809Sscottl bit32 ppc, 507285809Sscottl bit32 phyID, 508285809Sscottl void *parm ); 509285809Sscottl#endif 510285809Sscottl 511285809Sscottl#ifndef ossaFwFlashUpdateCB 512285809SscottlGLOBAL void ossaFwFlashUpdateCB( 513285809Sscottl agsaRoot_t *agRoot, 514285809Sscottl agsaContext_t *agContext, 515285809Sscottl bit32 status); 516285809Sscottl#endif 517285809Sscottl 518285809Sscottl#ifndef ossaFlashExtExecuteCB 519285809SscottlGLOBAL void ossaFlashExtExecuteCB( 520285809Sscottl agsaRoot_t *agRoot, 521285809Sscottl agsaContext_t *agContext, 522285809Sscottl bit32 status, 523285809Sscottl bit32 command, 524285809Sscottl agsaFlashExtResponse_t *agFlashExtRsp); 525285809Sscottl 526285809Sscottl#endif 527285809Sscottl 528285809Sscottl#ifdef SPC_ENABLE_PROFILE 529285809SscottlGLOBAL void ossaFwProfileCB( 530285809Sscottl agsaRoot_t *agRoot, 531285809Sscottl agsaContext_t *agContext, 532285809Sscottl bit32 status, 533285809Sscottl bit32 len 534285809Sscottl ); 535285809Sscottl 536285809Sscottl#endif 537285809Sscottl#ifndef ossaEchoCB 538285809SscottlGLOBAL void ossaEchoCB( 539285809Sscottl agsaRoot_t *agRoot, 540285809Sscottl agsaContext_t *agContext, 541285809Sscottl void *echoPayload); 542285809Sscottl#endif 543285809Sscottl 544285809Sscottl#ifndef ossaGpioResponseCB 545285809SscottlGLOBAL void ossaGpioResponseCB( 546285809Sscottl agsaRoot_t *agRoot, 547285809Sscottl agsaContext_t *agContext, 548285809Sscottl bit32 status, 549285809Sscottl bit32 gpioReadValue, 550285809Sscottl agsaGpioPinSetupInfo_t *gpioPinSetupInfo, 551285809Sscottl agsaGpioEventSetupInfo_t *gpioEventSetupInfo); 552285809Sscottl#endif 553285809Sscottl 554285809Sscottl#ifndef ossaGpioEvent 555285809SscottlGLOBAL void ossaGpioEvent( 556285809Sscottl agsaRoot_t *agRoot, 557285809Sscottl bit32 gpioEvent); 558285809Sscottl#endif 559285809Sscottl 560285809Sscottl#ifndef ossaSASDiagExecuteCB 561285809SscottlGLOBAL void ossaSASDiagExecuteCB( 562285809Sscottl agsaRoot_t *agRoot, 563285809Sscottl agsaContext_t *agContext, 564285809Sscottl bit32 status, 565285809Sscottl bit32 command, 566285809Sscottl bit32 reportData); 567285809Sscottl#endif 568285809Sscottl 569285809Sscottl#ifndef ossaSASDiagStartEndCB 570285809SscottlGLOBAL void ossaSASDiagStartEndCB( 571285809Sscottl agsaRoot_t *agRoot, 572285809Sscottl agsaContext_t *agContext, 573285809Sscottl bit32 status); 574285809Sscottl#endif 575285809Sscottl 576285809Sscottl#ifndef ossaGetTimeStampCB 577285809SscottlGLOBAL void ossaGetTimeStampCB( 578285809Sscottl agsaRoot_t *agRoot, 579285809Sscottl agsaContext_t *agContext, 580285809Sscottl bit32 timeStampLower, 581285809Sscottl bit32 timeStampUpper); 582285809Sscottl#endif 583285809Sscottl 584285809Sscottl#ifndef ossaPortControlCB 585285809SscottlGLOBAL void ossaPortControlCB( 586285809Sscottl agsaRoot_t *agRoot, 587285809Sscottl agsaContext_t *agContext, 588285809Sscottl agsaPortContext_t *agPortContext, 589285809Sscottl bit32 portOperation, 590285809Sscottl bit32 status); 591285809Sscottl#endif 592285809Sscottl 593285809Sscottl#ifndef ossaGeneralEvent 594285809SscottlGLOBAL void ossaGeneralEvent( 595285809Sscottl agsaRoot_t *agRoot, 596285809Sscottl bit32 status, 597285809Sscottl agsaContext_t *agContext, 598285809Sscottl bit32 *msg); 599285809Sscottl#endif 600285809Sscottl 601285809Sscottl#ifndef ossaGetRegisterDumpCB 602285809Sscottlvoid ossaGetRegisterDumpCB( 603285809Sscottl agsaRoot_t *agRoot, 604285809Sscottl agsaContext_t *agContext, 605285809Sscottl bit32 status); 606285809Sscottl#endif 607285809Sscottl 608285809SscottlGLOBAL void ossaGetForensicDataCB ( 609285809Sscottl agsaRoot_t *agRoot, 610285809Sscottl agsaContext_t *agContext, 611285809Sscottl bit32 status, 612285809Sscottl agsaForensicData_t *forensicData 613285809Sscottl ); 614285809Sscottl 615285809Sscottl 616285809Sscottl#ifndef ossaGetNVMDResponseCB 617285809SscottlGLOBAL void ossaGetNVMDResponseCB( 618285809Sscottl agsaRoot_t *agRoot, 619285809Sscottl agsaContext_t *agContext, 620285809Sscottl bit32 status, 621285809Sscottl bit8 indirectPayload, 622285809Sscottl bit32 agInfoLen, 623285809Sscottl agsaFrameHandle_t agFrameHandle ); 624285809Sscottl#endif 625285809Sscottl 626285809Sscottl#ifndef ossaSetNVMDResponseCB 627285809SscottlGLOBAL void ossaSetNVMDResponseCB( 628285809Sscottl agsaRoot_t *agRoot, 629285809Sscottl agsaContext_t *agContext, 630285809Sscottl bit32 status ); 631285809Sscottl#endif 632285809Sscottl 633285809Sscottl#ifndef ossaQueueProcessed 634285809Sscottl#ifdef SALLSDK_TEST_SET_OB_QUEUE 635285809SscottlGLOBAL void ossaQueueProcessed(agsaRoot_t *agRoot, 636285809Sscottl bit32 queue, 637285809Sscottl bit32 obpi, 638285809Sscottl bit32 obci); 639285809Sscottl#else 640285809Sscottl#define ossaQueueProcessed(agRoot, queue, obpi, obci) 641285809Sscottl#endif 642285809Sscottl#endif 643285809Sscottl 644285809Sscottl#ifndef ossaSGpioCB 645285809SscottlGLOBAL void ossaSGpioCB( 646285809Sscottl agsaRoot_t *agRoot, 647285809Sscottl agsaContext_t *agContext, 648285809Sscottl agsaSGpioReqResponse_t *pSgpioResponse 649285809Sscottl ); 650285809Sscottl#endif 651285809Sscottl 652285809Sscottl#ifndef ossaPCIeDiagExecuteCB 653285809SscottlGLOBAL void ossaPCIeDiagExecuteCB( 654285809Sscottl agsaRoot_t *agRoot, 655285809Sscottl agsaContext_t *agContext, 656285809Sscottl bit32 status, 657285809Sscottl bit32 command, 658285809Sscottl agsaPCIeDiagResponse_t *resp ); 659285809Sscottl#endif 660285809Sscottl 661285809Sscottl#ifndef ossaGetDFEDataCB 662285809SscottlGLOBAL void ossaGetDFEDataCB( 663285809Sscottl agsaRoot_t *agRoot, 664285809Sscottl agsaContext_t *agContext, 665285809Sscottl bit32 status, 666285809Sscottl bit32 agInfoLen 667285809Sscottl ); 668285809Sscottl#endif 669285809Sscottl 670285809Sscottl#ifndef ossaVhistCaptureCB 671285809SscottlGLOBAL void ossaVhistCaptureCB( 672285809Sscottl agsaRoot_t *agRoot, 673285809Sscottl agsaContext_t *agContext, 674285809Sscottl bit32 status, 675285809Sscottl bit32 len); 676285809Sscottl#endif 677285809Sscottl 678285809Sscottl#ifndef ossaGetIOErrorStatsCB 679285809SscottlGLOBAL void ossaGetIOErrorStatsCB ( 680285809Sscottl agsaRoot_t *agRoot, 681285809Sscottl agsaContext_t *agContext, 682285809Sscottl bit32 status, 683285809Sscottl agsaIOErrorEventStats_t *stats 684285809Sscottl ); 685285809Sscottl#endif 686285809Sscottl 687285809Sscottl#ifndef ossaGetIOEventStatsCB 688285809SscottlGLOBAL void ossaGetIOEventStatsCB ( 689285809Sscottl agsaRoot_t *agRoot, 690285809Sscottl agsaContext_t *agContext, 691285809Sscottl bit32 status, 692285809Sscottl agsaIOErrorEventStats_t *stats 693285809Sscottl ); 694285809Sscottl#endif 695285809Sscottl 696285809Sscottl#ifndef ossaOperatorManagementCB 697285809SscottlGLOBAL void ossaOperatorManagementCB( 698285809Sscottl agsaRoot_t *agRoot, 699285809Sscottl agsaContext_t *agContext, 700285809Sscottl bit32 status, 701285809Sscottl bit32 eq 702285809Sscottl ); 703285809Sscottl#endif 704285809Sscottl 705285809Sscottl 706285809Sscottl#ifndef ossaEncryptSelftestExecuteCB 707285809SscottlGLOBAL void ossaEncryptSelftestExecuteCB ( 708285809Sscottl agsaRoot_t *agRoot, 709285809Sscottl agsaContext_t *agContext, 710285809Sscottl bit32 status, 711285809Sscottl bit32 type, 712285809Sscottl bit32 length, 713285809Sscottl void *TestResult 714285809Sscottl ); 715285809Sscottl 716285809Sscottl#endif 717285809Sscottl 718285809Sscottl#ifndef ossaGetOperatorCB 719285809SscottlGLOBAL void ossaGetOperatorCB( 720285809Sscottl agsaRoot_t *agRoot, 721285809Sscottl agsaContext_t *agContext, 722285809Sscottl bit32 status, 723285809Sscottl bit32 option, 724285809Sscottl bit32 num, 725285809Sscottl bit32 role, 726285809Sscottl agsaID_t *id 727285809Sscottl ); 728285809Sscottl 729285809Sscottl#endif 730285809Sscottl 731285809Sscottl#ifndef ossaSetOperatorCB 732285809SscottlGLOBAL void ossaSetOperatorCB( 733285809Sscottl agsaRoot_t *agRoot, 734285809Sscottl agsaContext_t *agContext, 735285809Sscottl bit32 status, 736285809Sscottl bit32 eq 737285809Sscottl ); 738285809Sscottl 739285809Sscottl#endif 740285809Sscottl 741285809Sscottl#ifndef ossaDIFEncryptionOffloadStartCB 742285809SscottlGLOBAL void ossaDIFEncryptionOffloadStartCB( 743285809Sscottl agsaRoot_t *agRoot, 744285809Sscottl agsaContext_t *agContext, 745285809Sscottl bit32 status, 746285809Sscottl agsaOffloadDifDetails_t *agsaOffloadDifDetails 747285809Sscottl ); 748285809Sscottl#endif 749285809Sscottl 750285809Sscottl/*************************************************************************** 751285809Sscottl * Definition of Misc related functions end * 752285809Sscottl ***************************************************************************/ 753285809Sscottl 754285809Sscottl/*************************************************************************** 755285809Sscottl * Definition of Debug related functions start * 756285809Sscottl ***************************************************************************/ 757285809Sscottl#ifndef ossaLogTrace0 758285809SscottlGLOBAL void ossaLogTrace0( 759285809Sscottl agsaRoot_t *agRoot, 760285809Sscottl bit32 traceCode 761285809Sscottl ); 762285809Sscottl#endif 763285809Sscottl 764285809Sscottl#ifndef ossaLogTrace1 765285809SscottlGLOBAL void ossaLogTrace1( 766285809Sscottl agsaRoot_t *agRoot, 767285809Sscottl bit32 traceCode, 768285809Sscottl bit32 value1 769285809Sscottl ); 770285809Sscottl#endif 771285809Sscottl 772285809Sscottl#ifndef ossaLogTrace2 773285809SscottlGLOBAL void ossaLogTrace2( 774285809Sscottl agsaRoot_t *agRoot, 775285809Sscottl bit32 traceCode, 776285809Sscottl bit32 value1, 777285809Sscottl bit32 value2 778285809Sscottl ); 779285809Sscottl#endif 780285809Sscottl 781285809Sscottl#ifndef ossaLogTrace3 782285809SscottlGLOBAL void ossaLogTrace3( 783285809Sscottl agsaRoot_t *agRoot, 784285809Sscottl bit32 traceCode, 785285809Sscottl bit32 value1, 786285809Sscottl bit32 value2, 787285809Sscottl bit32 value3 788285809Sscottl ); 789285809Sscottl#endif 790285809Sscottl 791285809Sscottl#ifndef ossaLogTrace4 792285809SscottlGLOBAL void ossaLogTrace4( 793285809Sscottl agsaRoot_t *agRoot, 794285809Sscottl bit32 traceCode, 795285809Sscottl bit32 value1, 796285809Sscottl bit32 value2, 797285809Sscottl bit32 value3, 798285809Sscottl bit32 value4 799285809Sscottl ); 800285809Sscottl#endif 801285809Sscottl 802285809Sscottl#ifndef ossaLogDebugString 803285809SscottlGLOBAL void ossaLogDebugString( 804285809Sscottl agsaRoot_t *agRoot, 805285809Sscottl bit32 level, 806285809Sscottl char *string, 807285809Sscottl void *ptr1, 808285809Sscottl void *ptr2, 809285809Sscottl bit32 value1, 810285809Sscottl bit32 value2 811285809Sscottl ); 812285809Sscottl#endif 813285809Sscottl 814285809Sscottl#ifdef SALLSDK_OS_IOMB_LOG_ENABLE 815285809SscottlGLOBAL void ossaLogIomb(agsaRoot_t *agRoot, 816285809Sscottl bit32 queueNum, 817285809Sscottl agBOOLEAN isInbound, 818285809Sscottl void *pMsg, 819285809Sscottl bit32 msgLength); 820285809Sscottl#else 821285809Sscottl#define ossaLogIomb(a, b,c,d,e ) 822285809Sscottl#endif 823285809Sscottl 824285809SscottlosGLOBAL void ossaPCI_TRIGGER(agsaRoot_t *agRoot ); 825285809Sscottl 826285809Sscottl#ifdef PERF_COUNT 827285809SscottlosGLOBAL void ossaEnter(agsaRoot_t *agRoot, int io); 828285809SscottlosGLOBAL void ossaLeave(agsaRoot_t *agRoot, int io); 829285809Sscottl#define OSSA_INP_ENTER(root) ossaEnter(root, 0) 830285809Sscottl#define OSSA_INP_LEAVE(root) ossaLeave(root, 0) 831285809Sscottl#define OSSA_OUT_ENTER(root) ossaEnter(root, 1) 832285809Sscottl#define OSSA_OUT_LEAVE(root) ossaLeave(root, 1) 833285809Sscottl#else 834285809Sscottl#define OSSA_INP_ENTER(root) 835285809Sscottl#define OSSA_INP_LEAVE(root) 836285809Sscottl#define OSSA_OUT_ENTER(root) 837285809Sscottl#define OSSA_OUT_LEAVE(root) 838285809Sscottl#endif 839285809Sscottl/*************************************************************************** 840285809Sscottl * Definition of Debug related functions end * 841285809Sscottl ***************************************************************************/ 842285809Sscottl 843285809Sscottl#endif /*__SSDKOSAPI_H__ */ 844