#ifndef __DSL_HAL_API_H__ #define __DSL_HAL_API_H__ 1 /******************************************************************************* * FILE PURPOSE: DSL HAL to Application Interface for Sangam * ******************************************************************************** * FILE NAME: dsl_hal_api.h * * DESCRIPTION: * DSL-Application Interface Structures * * * By: Ramakrishnan Parasuraman * * (C) Copyright 2003, Texas Instruments, Inc. * History * Data Version By Notes * 06Feb03 0.00 RamP Initial Version Written * 07Apr03 0.01 RamP Commented out typedefs * 09Apr03 0.02 RamP Added deviceContext and extended * dspVer to include bugfixes * 14Apr03 0.03 RamP Added stateTransition to structure * 16Apr03 0.04 RamP Removed typedefs; changed dspVer * 22Apr03 0.05 RamP Moved acknowledgeInterrupt from * (alpha) support module into this * 24Apr03 0.06 RamP Moved the RSTATE enum from register * * 28Apr03 0.07 RamP Added additional parameter to the * (alpha +) handleInterrupt function for intrSrc * 14May03 0.08 RamP Added hybrid switching APIs * (alpha ++) Added statistics fields in AppData * Added netService identifier * 20May03 0.09 RamP Added Inner/Outer pair API support. * Added dying gasp message. * 29May03 0.10 RamP Added coProfile structure * 04Jun03 0.11 RamP Added margin per tone statistics, * Added timing counters, added train * failure functions,added config flags * 06Jun03 0.12 RamP Added LED, STM Bert, dGasp LPR * config API functions * 09Jun03 0.13 RamP Added ATM Bert function, CO stats * Moved stateTransition to ITIDSLHW * (Beta) Moved configFlag to ITIDSLHW, * Cleaned up fifoInfo structure * Added US/DS R/S FEC parameters * 21Aug03 0.14 RamP Added g.hs message buffer, us/ds * bits n gains table, negoMsgs struct * (act) bitswap stucts/indices, trainstate, * Added functions for advanced config * Added gross gain and line length * 29Sep03 0.15 RamP Added tokens for advanced config * module api functions * 12Oct03 0.16 RamP Added adsl2Msgs structure with worst * case size for variable length msgs * Added API function prototypes * 21Oct03 0.17 RamP Added typedef for current modem * user settings * 28Oct03 0.18 RamP Added function to config blackout * bitmap in the RMSGPCB message * 20Nov03 0.19 RamP Added functions for generic and * host interface read - write * 24Nov03 0.20 RamP Added enum for detailed state track * Added element for state bit fields * Addded rState for encoded main state * Added blackout valid flag * 26Dec03 0.21 RamP Added defines for oamFeature masks * 30Dec03 0.22 RamP Increased sizes for cMsgPcb,RMsgPcb * to incorporate DELT mode messages * 30Dec03 0.23 RamP Added generic mailbox command fxn * 02Mar04 0.24 RamP Removed NUM_PAGES define and referenced * host interface define instead * 03Mar04 0.25 RamP Added downstream noise to statistics * 20Apr04 0.26 RamP Expanded CO Profile structure for scratch * memory & added a counter for numProfiles * 29Apr04 0.27 RamP Increased size of arrays for ADSL2+ * 14May04 0.28 RamP Increased size of B&G tables for ADSL2+ * added advanced statistics API function * 26Aug04 0.29 Brian Made changes to support switching DSP * frequency to 250Mhz * 06Oct04 0.30 RamP Added API functions to configure DSL PHY * features and to set DSP/MIPS as controller * for these features * 29Dec04 0.31 DW CQ 9356: Added definitions for Interop feature lists. * 09Feb05 0.32 YH CQ 9459: Added definitions for Interop feature lists. * 10Mar05 0.33 CPH Added IPE-Interop Patch Engine. * 02Mar05 0.33 YH Added additional definitions for Interop feature lists. * 15Mar05 0.31 T.Leyrer Added support for maxBits configuration * in each direction. Keep backward compatiility * with orig function. * 31Mar05 --- R. Pappu No CQ. Added definition for new interop * feature bit for QWEST_US_1M_RATE_FIX. * 10May05 Arvind V CQ 9605:Added a new variable useBitField * in the tagTIOIDINFO structure, * for allowing the user to select from * the dsl modes using bitfields. * 16May05 --- Madhu Hegde CQ 9620. Added definition for new interop feature bit * to enable higher US rates for ADI by reducing quant noise. * 23May05 H. Liu CQ9500: Added OAMFEATURE_DISABLE_SAFEMODE_FOR_G992_3_5. * 6June05 Peter Hou Added AnnexB(ISDN) & AnnexM support * 17June05 Peter Hou Remove dslhal_advcfg_getSnrPerBin() * 23June05 Peter Hou - Change cMsgs1 length from 6 to 10 bytes to sync with * dev_host_interface.h * - Increase coProfiles[] from 4 to 5 to accomodate coProfile_ptr * & 4 scratchmem_ptrs. * 30June05 Peter Hou Change 2nd parameter of dslhal_advcfg_configDsTones() from unsigned int * to unsigned char. * 13July05 Peter Hou Added IOP-Feature Control bit definition * OAMFEATURE_ENABLE_BELGACOM_ANXB_FAST_TRAINING * 10May05 Arvind V CQ 9605:Added a new variable useBitField * in the tagTIOIDINFO structure, * for allowing the user to select from * the dsl modes using bitfields. * 16May05 --- Madhu Hegde CQ 9620. Added definition for new interop feature bit * to enable higher US rates for ADI by reducing quant noise. * 23May05 H. Liu CQ9500: Added OAMFEATURE_DISABLE_SAFEMODE_FOR_G992_3_5. * 18Jul05 --- C. Urrutia CQ9787: Added new interop bit for Westell RFI issue * Added new interop bit for OHIO hybrid 4 * 24July05 Peter Hou -Change bCMsgs1 size to 12 based on MAX_CMSGPCB2_LENGTH from dev_host_interface.h * -Change OAMFEATURE_ENABLE_BELGACOM_ANXB_FAST_TRAINING to Bit14 * 29July05 Peter Hou Add max_ds_tones & max_us_tones * 1Sept05 Peter Hou CQ9613: Change OAMFEATURE_ENABLE_OHIO_HYBRID4_REWIRE (removed) * to * 5Sept05 Peter Hou CQ9776: Added dslhal_api_getHLOGpsds(), dslhal_api_getQLNpsds(), * and dslhal_api_getSNRpsds(). * 21Sept05 Peter Hou Change coProfiles[5] to coProfiles[6]. * 7 Oct05 AV/CPH Changed dprintf to dgprintf and compile time * selection of dslhal_api_getQLNpsds() dslhal_api_getSNRpsds() * and for code size reduction. * 31Oct05 Ram CQ10012: Added new Interop bit for OAMFEATURE_ENABLE_REPORT_AVG_MARGIN * recycled & reused the Belgacom AnnexB Fast training API bit * 08Nov05 Peter Hou Added LPR in TIOIDINFO. * 30Nov05 KM/JZ CQ10226: Added LOF errors and errored_seconds in TIOIDINFO. * 18Jan06 CPH CQ9885: Added OAMFEATURE_DISABLE_CNXT_OVHD_PATCH * 7 Jan06 Hanyu Liu CQ10173: Added API IOP bit17, OAMFEATURE_ENABLE_TELEFONICA_FIXED_MARGIN * 27Jan06 Raghu M CQ10045: Added API bit OAMFEATURE_ENABLE_MAXIMIZE_INP_SUPPORT * and OAMFEATURE_ENABLE_MINIMIZE_INTERLEAVER_DELAY * 03Feb06 Madhu H CQ10198: Added API IOP bit19 to extend AnnexB US to bin 28 * 03Feb06 Peter Hou CQ10280: Add extended PHY feature bit support. * 08Feb06 GPet CQ10242: Added CLI redirect * 10Feb06 Peter Hou CQ10280: Change ENABLE_EXTENDED_FRAMING_SUPPORT & ENABLE_EXTENDED_INP_SUPPORT * to DISABLE_. * 01Feb07 EP Added DSL interrupt acknowledgement API for entry/exit. * 07Feb07 ManjulaK CQ11344: Added OAMFEATURE_PHY_ENABLE_GHSCABMODE API bit. * 23Feb07 EP CQ11512: Added variable for storing DSP heartbeat info. *******************************************************************************/ #ifdef INTERNAL_BUILD #include #endif // Definitions for PARAM ID0 #define OAMFEATURE_AUTORETRAIN_MASK 0x00000001 #define OAMFEATURE_TC_SYNC_DETECT_MASK 0x00000002 #define OAMFEATURE_EOCAOC_INTERRUPT_MASK 0x00000004 #define OAMFEATURE_CONS_DISP_DISABLE_MASK 0x00000008 #define OAMFEATURE_GHSMSG_INTERRUPT_MASK 0x00000010 // DW CQ 9356: Definitions for PARAM ID2 (Interop features) #define DSL_PHY_FEATURELIST0_PARAMID 0x00000000 //CQ10280 #define DSL_PHY_FEATURELIST1_PARAMID 0x00000001 //CQ10280 #define INTEROP_FEATURELIST0_PARAMID 0x00000002 #define INTEROP_FEATURELIST1_PARAMID 0x00000003 #define OAMFEATURE_PHY_DISABLE_EXTENDED_FRAMING_SUPPORT 0x00000080 // Bit7, CQ10280 #define OAMFEATURE_PHY_ENABLE_EXTENDED_INP_SUPPORT 0x00000100 // Bit8, CQ10280 #define OAMFEATURE_PHY_ENABLE_GHSCABMODE 0x00010000 // Bit16,CQ11344 #define OAMFEATURE_DISABLE_GSPV_T1413_RETRAIN 0x00000001 #define OAMFEATURE_ENABLE_SHORT_LOOP_US_ERR_REDUCTION 0x00000002 #define OAMFEATURE_ENABLE_T1413_LONG_LOOP_ACTIVATION 0x00000004 #define OAMFEATURE_ENABLE_QWEST_ALCATEL_US_LOW_RATE_FIX 0x00000008 #define OAMFEATURE_ENABLE_ASB_ETSIB_HIGH_BER_FIX 0x00000010 #define OAMFEATURE_ENABLE_BELL_CANADA_DOUBLE_BRIDGE_TAP_FIX 0x00000020 #define OAMFEATURE_ENABLE_BELGACOM_DS_FIX 0x00000040 #define OAMFEATURE_ENABLE_CINCINNATI_BELL_FIX 0x00000080 #define OAMFEATURE_ENABLE_FRANCE_TELECOM_FIX 0x00000100 #define OAMFEATURE_ENABLE_QWEST_US_1M_RATE_FIX 0x00000200 #define OAMFEATURE_DISABLE_SAFEMODE_FOR_G992_3_5 0x00000400 #define OAMFEATURE_ENABLE_ADI_UPSTREAM_RATES_FIX 0x00000800 //CQ 9620 MH 05/16/05 #define OAMFEATURE_ENABLE_NOKIA_D50_GDMT_RETRAIN_FIX 0x00001000 //CQ9613 #define OAMFEATURE_ENABLE_WESTELL_RFI_OPTION 0x00002000 // CQ9787 - Westell RFI option #define OAMFEATURE_ENABLE_REPORT_AVG_MARGIN 0x00004000 // CQ10012 - Avg Margin Reporting; removed unused AnnexB bit #define OAMFEATURE_DISABLE_CNXT_OVHD_PATCH 0x00008000 // CQ9885 #define OAMFEATURE_ENABLE_MAXIMIZE_INP_SUPPORT 0x00010000 // CQ10045 - Maximize INP #define OAMFEATURE_ENABLE_TELEFONICA_FIXED_MARGIN 0x00020000 // CQ10173 - Force to drop line if margin < targetmargin #define OAMFEATURE_ENABLE_MINIMIZE_INTERLEAVER_DELAY 0x00040000 // CQ10045 - Minimize interleaver delay #define OAMFEATURE_ENABLE_ANNEXB_US_STARTBIN 0x00080000 // CQ10198 - Extend Annex B US to bin 28 typedef struct tagT1413Info { unsigned char VendorId[2]; unsigned char t1413Revision; unsigned char VendorRevision; } T1413INFO; typedef struct tagTIOIDINFO { unsigned int bState; /* addr->bDSPATURState */ unsigned int clear_eoc; /* 1: clearEOC msg indicator; 0: otherwise */ unsigned int USConRate; /* US Conection Rates */ unsigned int DSConRate; /* DS Connection Rates */ unsigned int USPayload; /* ennic_tx_pullup*/ unsigned int DSPayload; /* ennic_indicate_receive_packet*/ unsigned int FrmMode; /* addr->atur_msg.framing_mode*/ unsigned int MaxFrmMode; unsigned int TrainedPath; /* Status of the Modem in which trained (Fast or Interleaved Path) */ unsigned int StdMode; unsigned int TrainedMode; /* Status of the mode in which the modem is trained (G.dmt, T1.413, etc) */ unsigned short annex_selected; unsigned short psd_mask_qualifier; unsigned int max_ds_tones; unsigned int max_us_tones; /* Superframe Count */ unsigned int usSuperFrmCnt; /* Num of US Superframes */ unsigned int dsSuperFrmCnt; /* Num of DS Superframes */ /* LOS & SEF Stats */ unsigned int LOS_errors; /* Num of ADSL frames where loss-of-sync */ unsigned int coLosErrors; /* CO LOS Defects */ #if 1 // LOF CQ10226 unsigned int LOF_errors; /* Number of times Loss Of Framing happened */ unsigned int coLofErrors; /* Number of times Loss Of Framing happened in CO */ unsigned int LOF_f; /* Loss Of Framing flag. 1=set, 0=clear */ unsigned int coLOF_f; /* CO Loss Of Framing flag. 1=set, 0=clear */ unsigned int erroredSeconds; /* Downstream errored seconds. Currently support only downstream and ADSL2/ADSL2+. 11/2005 */ // unsigned int coErroredSeconds; /* CO errored seconds */ #endif unsigned int SEF_errors; /* Num of severly errored ADSL frames - LOS > MAXBADSYNC ADSL frames */ unsigned int coRdiErrors; /* CO RDI defects */ /* CRC Stats */ unsigned int usICRC_errors; /* Num of Upstream CRC errored ADSL frames on Interleaved Path */ unsigned int usFCRC_errors; /* Num of Upstream CRC errored ADSL frames on Fast Path */ unsigned int dsICRC_errors; /* Num of Downstream CRC errored ADSL frames on Interleaved Path */ unsigned int dsFCRC_errors; /* Num of Downstream CRC errored ADSL frames on Fast Path */ /* FEC Stats */ unsigned int usIFEC_errors; /* Num of Upstream FEC errored (corrected) ADSL frames on Interleaved Path */ unsigned int usFFEC_errors; /* Num of Upstream FEC errored (corrected) ADSL frames on Fast Path */ unsigned int dsIFEC_errors; /* Num of Downstream FEC errored (corrected) ADSL frames on Interleaved Path */ unsigned int dsFFEC_errors; /* Num of Downstream FEC errored (corrected) ADSL frames on Fast Path */ /* NCD Stats */ unsigned int usINCD_error; /* UpStream No Cell Delineation on Interleaved Path */ unsigned int usFNCD_error; /* UpStream No Cell Delineation on Fast Path */ unsigned int dsINCD_error; /* Downstream No Cell Delineation on Interleaved Path */ unsigned int dsFNCD_error; /* Downstream No Cell Delineation on Fast Path */ /* LCD Stats */ unsigned int usILCD_errors; /* UpStream Loss of Cell Delineation (within the same connection) on Interleaved Path */ unsigned int usFLCD_errors; /* UpStream Loss of Cell Delineation (within the same connection) on Fast Path */ unsigned int dsILCD_errors; /* Downstream Loss of Cell Delineation (within the same connection) on Interleaved Path */ unsigned int dsFLCD_errors; /* Downstream Loss of Cell Delineation (within the same connection) on Fast Path */ /* HEC Stats */ unsigned int usIHEC_errors; /* Num of Upstream HEC errored ADSL frames on Interleaved Path */ unsigned int usFHEC_errors; /* Num of Upstream HEC errored ADSL frames on Fast Path */ unsigned int dsIHEC_errors; /* Num of Downstream HEC errored ADSL frames on Interleaved Path */ unsigned int dsFHEC_errors; /* Num of Downstream HEC errored ADSL frames on Fast Path */ /* Upstream ATM Stats */ unsigned int usAtm_count[2]; /* Upstream Good Cell Count */ unsigned int usIdle_count[2]; /* Upstream Idle Cell Count */ unsigned int usPdu_count[2]; /* UpStream PDU Count */ /* Downstream ATM Stats */ unsigned int dsGood_count[2]; /* Downstream Good Cell Count */ unsigned int dsIdle_count[2]; /* Downstream Idle Cell Count */ unsigned int dsBadHec_count[2]; /* Downstream Bad Hec Cell Count */ unsigned int dsOVFDrop_count[2]; /* Downstream Overflow Dropped Cell Count */ unsigned int dsPdu_count[2]; /* Downstream PDU Count */ /* (only looks for end of pdu on good atm cells received, */ /* not on Bad_Hec or Overflow cell) */ unsigned int dsLineAttn; /* DS Line Attenuation */ unsigned int dsMargin; /* Measured DS MArgin */ unsigned int usLineAttn; unsigned int usMargin; unsigned char bCMsgs1[12]; // (was 6) used by both cMsgs1 & cMsg-PCB now, sync from dev_host_interface.h unsigned char bRMsgs1[6]; unsigned char bCRates2; unsigned char bRRates2; unsigned char bCMsgs2[4]; unsigned char bRMsgs2[4]; unsigned int atucVendorId; unsigned char currentHybridNum; unsigned char atucRevisionNum; unsigned int idleTick; unsigned int initTick; unsigned int showtimeTick; unsigned char dsFastParityBytesPerSymbol; unsigned char dsIntlvParityBytesPerSymbol; unsigned char dsSymbolsPerCodeWord; unsigned int dsInterleaverDepth; unsigned char usFastParityBytesPerSymbol; unsigned char usIntlvParityBytesPerSymbol; unsigned char usSymbolsPerCodeWord; unsigned int usInterleaverDepth; unsigned int atmBertBitCountLow; unsigned int atmBertBitCountHigh; unsigned int atmBertBitErrorCountLow; unsigned int atmBertBitErrorCountHigh; unsigned int lineLength; unsigned int grossGain; int showtimeCount; int trellis; unsigned int useBitField; /* Use of bitfields without translation for backward compatibility. */ unsigned int LPR; /* Loss of Power- dying gasp occurred */ #if 1 // added for TR69 unsigned char ghsATUCVendorId[8]; /* country code(2) + VID(4) + Vendor Specific(2) */ unsigned char ghsATURVendorId[8]; /* country code(2) + VID(4) + Vendor Specific(2) */ T1413INFO t1413ATUC; T1413INFO t1413ATUR; #endif /*** EP modified ***/ /* DSP_CRATES1 */ unsigned char bCRates1[4][30]; unsigned char bRRates1[4][11]; /* DSP_SNR */ short rxSnrPerBin0[512]; /* Band plan */ short rxSnrPerBin1[512]; /* Band plan */ short rxSnrPerBin2[512]; /* Band plan */ /* Statistics */ /* DEV_HOST_dspWrSharedTables_t */ unsigned char rBng[1024]; /* Band plan */ unsigned char cBng[128]; /* Band plan */ unsigned char BitAllocTblDstrm[512]; /* Band plan */ unsigned char BitAllocTblUstrm[128]; /* Band plan */ signed char marginTblDstrm[512]; /* Band plan */ int dsNoise[512]; /* Band plan */ int usTxPower; int dsTxPower; #ifndef NO_DIAG int rxNoisePower0[512]; /* Band plan */ int rxNoisePower1[512]; /* Band plan */ #endif unsigned int trainFails; unsigned int trainFailStates[30]; #ifdef NOT_DRV_BUILD /* DSP_GHSMSG */ unsigned int ghsBufIndex; unsigned char dsl_ghsRxBuf[10][64]; #endif #if 0 /*obsolete*/ unsigned char dsl_GHS_msg_type[2]; unsigned int dsl_modulation; unsigned int dsl_status; unsigned int USPeakCellRate; unsigned int vci_vpi_val; int TxVCs[12]; int RxVCs[12]; #endif /* New */ /* ADSL1 only */ unsigned char rMsgRa[12]; unsigned char cMsgRa[6]; unsigned char usBitSwap; unsigned char dsBitSwap; }TIOIDINFO,*PTIOIDINFO; typedef struct{ unsigned char bCMsgs1[6]; unsigned char bCRates2; unsigned char bRRates2; unsigned char bRRates1[4][11]; unsigned char bCMsgs2[4]; unsigned char bCRates1[4][30]; unsigned char bCRatesRA[4][30]; unsigned char bRMsgs2[4]; unsigned char bRRatesRA[4]; unsigned char bRMsgsRA[12]; unsigned char bCMsgsRA[6]; }negoMsgs; typedef struct{ unsigned char cMsgFmt[2]; unsigned char rMsgFmt[2]; unsigned char cMsgPcb[12]; unsigned char rMsgPcb[70]; unsigned char dummy1[2]; unsigned char cMsg1[40]; unsigned char rMsg1[4]; unsigned char cMsg2[8]; unsigned char rMsg2[64]; unsigned char cParams[264]; unsigned char rParams[2088]; unsigned short cMsgPcbLen; unsigned short rMsgPcbLen; unsigned short cMsg1Len; unsigned short rMsg1Len; unsigned short cMsg2Len; unsigned short rMsg2Len; unsigned short cParamsLen; unsigned short rParamsLen; }adsl2Msgs; typedef struct{ unsigned char rMsg1Ld[16]; unsigned char rMsg2Ld[260]; unsigned char rMsg3Ld[260]; unsigned char rMsg4Ld[260]; unsigned char rMsg5Ld[260]; unsigned char rMsg6Ld[260]; unsigned char rMsg7Ld[260]; unsigned char rMsg8Ld[260]; unsigned char rMsg9Ld[260]; unsigned char rMsg10Ld[260]; unsigned char rMsg11Ld[260]; unsigned char rMsg12Ld[260]; unsigned char rMsg13Ld[260]; unsigned char rMsg14Ld[260]; unsigned char rMsg15Ld[260]; unsigned char rMsg16Ld[260]; unsigned char rMsg17Ld[260]; unsigned char cMsg1Ld[16]; unsigned char cMsg2Ld[260]; unsigned char cMsg3Ld[132]; unsigned char cMsg4Ld[68]; unsigned char cMsg5Ld[68]; unsigned short rMsg1LdLen; unsigned short rMsgxLdLen; unsigned short cMsg1LdLen; unsigned short cMsg2LdLen; unsigned short cMsg3LdLen; unsigned short cMsg4LdLen; unsigned short cMsg5LdLen; unsigned short dummy8; }adsl2DeltMsgs; typedef struct{ unsigned char trellisFlag; unsigned char rateAdaptFlag; unsigned char marginMonitorTraining; unsigned char marginMonitorShowtime; signed char marginThreshold; unsigned char disableLosFlag; unsigned char aturConfig[30]; unsigned char eocVendorId[8]; unsigned char eocSerialNumber[32]; unsigned char eocRevisionNumber[4]; }currentPhySettings; typedef struct { unsigned int PmemStartWtAddr; /* source address in host memory */ unsigned int OverlayXferCount; /* number of 32bit words to be transfered */ unsigned int BinAddr; /* destination address in dsp's pmem */ unsigned int overlayHostAddr; unsigned int olayPageCrc32; unsigned int SecOffset; } OlayDP_Def; typedef struct { unsigned char major; /* Major revision */ unsigned char minor; /* Minor revision */ unsigned char bugFix; /* BugFix revision */ unsigned char buildNum; /* BuildNum revision */ }dspVer; typedef struct{ unsigned char major; unsigned char minor; unsigned char bugfix; unsigned char buildNum; unsigned int timeStamp; }dslVer; typedef struct{ unsigned char bitSwapCommand[6]; unsigned char bitSwapBinNum[6]; unsigned char bitSwapSFrmCnt; }dslBitSwapDef; typedef struct{ unsigned int aturState; unsigned int subStateIndex; unsigned int timeStamp; }trainStateInfo; typedef struct{ unsigned char ctrlBits; unsigned char infoBits; }eocMessageDef; typedef struct{ unsigned int phyControlWord; unsigned int phyEnableDisableWord; }phySettings; enum { RSTATE_IDLE, RSTATE_INIT, RSTATE_HS, RSTATE_SHOWTIME, }; typedef enum { ATU_RZERO1 = 100, ATU_RTEST = 101, ATU_RIDLE = 102, ATU_RINIT = 103, ATU_RRESET = 104, GDMT_NSFLR = 105, GDMT_TONE = 106, GDMT_SILENT = 107, GDMT_NEGO = 108, GDMT_FAIL = 109, GDMT_ACKX = 110, GDMT_QUIET2 = 111, ATU_RZERO2 = 200, T1413_NSFLR = 201, T1413_ACTREQ = 202, T1413_ACTMON = 203, T1413_FAIL = 204, T1413_ACKX = 205, T1413_QUIET2 = 206, ATU_RQUIET2 = 207, ATU_RREVERB1 = 208, ATU_RQUIET3 = 209, ATU_RECT = 210, ATU_RREVERB2 = 211, ATU_RSEGUE1 = 212, ATU_RREVERB3 = 213, ATU_RSEGUE2 = 214, ATU_RRATES1 = 215, ATU_RMSGS1 = 216, ATU_RMEDLEY = 217, ATU_RREVERB4 = 218, ATU_RSEGUE3 = 219, ATU_RMSGSRA = 220, ATU_RRATESRA = 221, ATU_RREVERBRA = 222, ATU_RSEGUERA = 223, ATU_RMSGS2 = 224, ATU_RRATES2 = 225, ATU_RREVERB5 = 226, ATU_RSEGUE4 = 227, ATU_RBNG = 228, ATU_RREVERB6 = 229, ATU_RSHOWTIME = 230, ATU_RZERO3 = 300, ADSL2_QUIET1 = 301, ADSL2_COMB1 = 302, ADSL2_QUIET2 = 303, ADSL2_COMB2 = 304, ADSL2_ICOMB1 = 305, ADSL2_LINEPROBE = 306, ADSL2_QUIET3 = 307, ADSL2_COMB3 = 308, ADSL2_ICOMB2 = 309, ADSL2_RMSGFMT = 310, ADSL2_RMSGPCB = 311, ADSL2_REVERB1 = 312, ADSL2_QUIET4 = 313, ADSL2_REVERB2 = 314, ADSL2_QUIET5 = 315, ADSL2_REVERB3 = 316, ADSL2_ECT = 317, ADSL2_REVERB4 = 318, ADSL2_SEGUE1 = 319, ADSL2_REVERB5 = 320, ADSL2_SEGUE2 = 321, ADSL2_RMSG1 = 322, ADSL2_MEDLEY = 323, ADSL2_EXCHANGE = 324, ADSL2_RMSG2 = 325, ADSL2_REVERB6 = 326, ADSL2_SEGUE3 = 327, ADSL2_RPARAMS = 328, ADSL2_REVERB7 = 329, ADSL2_SEGUE4 = 330, ATU_RZERO4 = 400, DELT_SEGUE1 = 401, DELT_REVERB5 = 402, DELT_SEGUE2 = 403, DELT_EXCHANGE = 404, DELT_SEGUELD = 405, DELT_RMSGLD = 406, DELT_QUIET1LD = 407, DELT_QUIET2LD = 408, DELT_RACK1 = 409, DELT_RNACK1 = 410, DELT_QUIETLAST = 411 } modemStates_t; enum { DSLTRAIN_NO_MODE, DSLTRAIN_MULTI_MODE, DSLTRAIN_T1413_MODE, DSLTRAIN_GDMT_MODE, DSLTRAIN_GLITE_MODE }; enum { ID_RESTORE_DEFAULT_LED, ID_DSL_LINK_LED, ID_DSL_ACT_LED }; enum { CONFIG_FLAG_NOFLAG, /* 00 */ CONFIG_FLAG_TRELLIS, /* 01 */ CONFIG_FLAG_EC, /* 02 */ CONFIG_FLAG_RS /* 03 */ }; typedef struct _ITIDSLHW { /* struct _TIDSL_IHwVtbl * pVtbl; */ unsigned char* fwimage; int imagesize; void* pOsContext; unsigned int ReferenceCount; void* pmainAddr; void* pIntAddr; unsigned int netService; unsigned int lConnected; unsigned int reasonForDrop; TIOIDINFO AppData; /* DSP_TRAINING_MSGS */ adsl2Msgs adsl2TrainingMessages; adsl2DeltMsgs adsl2DiagnosticMessages; #ifdef INTERNAL_BUILD internalParameters internalVars; #endif /*** EP modified ***/ #define NUMBER_OF_BITFIELDS 4 unsigned int rState; unsigned int modemStateBitField[NUMBER_OF_BITFIELDS]; #ifndef NO_ACT unsigned int trainStateInx; trainStateInfo trainHistory[120]; unsigned int blackOutValid_f; unsigned char blackOutBits[64]; /* DSP_RCVBITSWAP */ unsigned int dsBitSwapInx; dslBitSwapDef dsBitSwap[30]; /* DSP_XMITBITSWAP */ unsigned int usBitSwapInx; dslBitSwapDef usBitSwap[30]; /* DSP_EOC */ unsigned int usEocMsgInx; eocMessageDef usEocMsgBuf[30]; unsigned int dsEocMsgInx; eocMessageDef dsEocMsgBuf[30]; #endif #ifndef YAMUNA unsigned int bAutoRetrain; volatile unsigned bOverlayPageLoaded; unsigned int numProfiles; unsigned int numOlayPages; OlayDP_Def olayDpPage[32]; OlayDP_Def coProfiles[5]; OlayDP_Def constDisplay; #endif #if 0 /*obsolete*/ unsigned int configFlag; unsigned int bStatisticsInitialized; unsigned int stateTransition; int InitFlag; unsigned int bShutdown; #endif unsigned hybrid_selected; unsigned stateLog[4]; } ITIDSLHW_T, *PITIDSLHW_T, tidsl_t; /********************************************************************************** * API proto type defines **********************************************************************************/ /****************************************************************************************** * FUNCTION NAME: dslhal_api_dslStartup * ******************************************************************************************* * DESCRIPTION: Entry point to initialize and load ax5 daughter board * * INPUT: PITIDSLHW_T *ppIHw * * RETURN: 0 --succeeded * 1 --Failed * * Notes: external function osAllocateMemory(), osZeroMemory(), osLoadFWImage() are required *****************************************************************************************/ int dslhal_api_dslStartup ( PITIDSLHW_T *ppIHw ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_gatherStatistics * ********************************************************************************************* * DESCRIPTION: Read statistical infromation from ax5 modem daugter card. * Input: tidsl_t *ptidsl * * Return: 0 success * 1 failed * ********************************************************************************************/ void dslhal_api_gatherStatistics ( tidsl_t * ptidsl ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_initStatistics * ********************************************************************************************* * DESCRIPTION: init statistical infromation of ax5 modem daugter card. * * Input: tidsl_t *ptidsl * * Return: NULL * ********************************************************************************************/ void dslhal_api_initStatistics ( tidsl_t * ptidsl ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_getDslDriverVersion * ******************************************************************************************* * DESCRIPTION: This routine supply DSL Driver version. * * INPUT: tidsl_t * ptidsl * void *pVer, DSP Driver Version Pointer * * RETURN: 0 --succeeded * 1 --Failed * Note: See verdef_u.h for version structure definition. *****************************************************************************************/ void dslhal_api_getDslHalVersion ( void *pVer ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_dslShutdown * ******************************************************************************************* * DESCRIPTION: routine to shutdown ax5 modem and free the resource * * INPUT: tidsl_t *ptidsl * * RETURN: NULL * * Notes: external function osFreeMemory() is required. *****************************************************************************************/ int dslhal_api_dslShutdown ( tidsl_t *ptidsl ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_getDspVersion * ******************************************************************************************* * DESCRIPTION: This routine supply AX5 daugther card DSP version. * * INPUT: tidsl_t * ptidsl * void *pVer, DSP version struct is returned starting at this pointer * * RETURN: 0 --succeeded * 1 --Failed * *****************************************************************************************/ int dslhal_api_getDspVersion ( tidsl_t *ptidsl, void *pVer ); /******************************************************************************************** * FUNCTION NAME: dslhal_diags_digi_memTestA() * ********************************************************************************************* * DESCRIPTION: This function does the digital tests on the DSP. It does the DSP ID test, * memory tests on the external and internal memories of DSP, Codec Interconnect * test and Interrupt Test. * * Input: Test selects the test to be performed based on the elements set of 9 element * array passed the the parameter. * * Return: Status of the Tests Failed * ********************************************************************************************/ unsigned int dslhal_diags_digi_memTestA ( unsigned int* Test ); /******************************************************************************************** * FUNCTION NAME: dslhal_diags_digi_memTestB() * ********************************************************************************************* * DESCRIPTION: This function does the digital tests on the DSP. It does the DSP ID test, * memory tests on the external and internal memories of DSP, Codec Interconnect * test and Interrupt Test. * * Input: Test selects the digital test to be performed. * * Return: Status of the Tests Failed * ********************************************************************************************/ unsigned int dslhal_diags_digi_memTestB ( unsigned int Test, unsigned int *Status ); /******************************************************************************************** * FUNCTION NAME: dslhal_diags_anlg_tonesTestA() * ********************************************************************************************* * DESCRIPTION: This function instructs the Transciever to transmit the Reverb with missing * tones and Medley's with missing tones. These signals are defined in ITU * G.992.1 ADSL Standards. * * Input: Test selects between the Reverb or Medley tests. 0 - Reverb, 1 - Medley * Array is a 64 element unsigned integer type array. The element of this array * describe which tones are to be generated by selecting the element of * the array to be non zero. * Return: NULL * ********************************************************************************************/ void dslhal_diags_anlg_tonesTestA ( unsigned int Test, unsigned int* Array ); /******************************************************************************************** * FUNCTION NAME: dslhal_diags_anlg_tonesTestB() * ********************************************************************************************* * DESCRIPTION: This function instructs the Transciever to transmit the Reverb with missing * tones and Medley's with missing tones. These signals are defined in ITU * G.992.1 ADSL Standards. * * Input: Test selects between the Reverb or Medley tests. 0 - Reverb, 1 - Medley * Array is a 64 element unsigned integer type array. The element of this array * describe which tones are to be generated by selecting the element of * the array to be non zero. * Return: NULL * ********************************************************************************************/ void dslhal_diags_anlg_tonesTestB ( unsigned int Test, unsigned int Tones ); /******************************************************************************************** * FUNCTION NAME: dslhal_diags_anlg_rxNoiseTest() * ********************************************************************************************* * DESCRIPTION: This function instructs the Transciever to transmit the Reverb with missing * tones and Medley's with missing tones. These signals are defined in ITU * G.992.1 ADSL Standards. * * Input: Test selects between the Reverb or Medley tests. 0 - Reverb, 1 - Medley * Tones selects the . * Return: NULL * ********************************************************************************************/ void dslhal_diags_anlg_rxNoiseTest (int agcFlag, short pga1, short pga2, short pga3, short aeq ); /******************************************************************************************** * FUNCTION NAME: dslhal_diags_anlg_ecNoiseTest() * ********************************************************************************************* * DESCRIPTION: This function instructs the Transciever to transmit the Reverb with missing * tones and Medley's with missing tones. These signals are defined in ITU * G.992.1 ADSL Standards. * * Input: Test selects between the Reverb or Medley tests. 0 - Reverb, 1 - Medley * Tones selects the . * Return: NULL * ********************************************************************************************/ void dslhal_diags_anlg_ecNoiseTest (int agcFlag, short pga1, short pga2, short pga3, short aeq ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_pollTrainingStatus() * ********************************************************************************************* * DESCRIPTION: code to decode modem status and to start modem training * * Input: tidsl_t *ptidsl * * Return: 0-? status mode training * -1 failed * ********************************************************************************************/ int dslhal_api_pollTrainingStatus ( tidsl_t *ptidsl ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_handleTrainingInterrupt() * ********************************************************************************************* * DESCRIPTION: Code to handle ax5 hardware interrupts * * Input: tidsl_t *ptidsl * int *pMsg, pointer to returned hardware messages. Each byte represent a messge * int *pTag, pointer to returned hardware message tags. Each byte represent a tag. * Return: 0 success * 1 failed * ********************************************************************************************/ int dslhal_api_handleTrainingInterrupt ( tidsl_t *ptidsl, int intrSource ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_setEocSerialNumber(tidsl_t *ptidsl,char *SerialNumber) * ******************************************************************************************* * DESCRIPTION: This fuction Sets the EOC Serial Number * * INPUT: PITIDSLHW_T *ptidsl * char *SerialNumber : Input EOC Serial Number * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_setEocSerialNumber ( tidsl_t *ptidsl, char *SerialNumber ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_setEocVendorId(tidsl_t *ptidsl,char *VendorID) * ******************************************************************************************* * DESCRIPTION: This fuction Sets the EOC Serial Number * * INPUT: PITIDSLHW_T *ptidsl * char *VendorID : EOC Vendor ID * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_setEocVendorId ( tidsl_t *ptidsl, char *VendorID ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_setEocRevisionNumber(tidsl_t *ptidsl,char *RevNum) * ******************************************************************************************* * DESCRIPTION: This fuction Sets the EOC Revision Number * * INPUT: PITIDSLHW_T *ptidsl * char *RevNum : Input EOC Revision Number * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_setEocRevisionNumber ( tidsl_t *ptidsl, char *RevNumber ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_boostDspFrequency(void) * ******************************************************************************************* * DESCRIPTION: This fuction will boost DSP frequency to 250Mhz * * INPUT: none * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_boostDspFrequency(void); /****************************************************************************************** * FUNCTION NAME: dslhal_api_setAturConfig(tidsl_t *ptidsl,char *ATURConfig) * ******************************************************************************************* * DESCRIPTION: This fuction Sets the EOC ATUR Config Register * * INPUT: PITIDSLHW_T *ptidsl * char *RevNum : Input EOC ATUR Config Register * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_setAturConfig ( tidsl_t *ptidsl, char *ATURConfig ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_disableLosAlarm(tidsl_t *ptidsl, unsigned int set) * ******************************************************************************************* * DESCRIPTION: This fuction disables all the LOS alarms * * INPUT: PITIDSLHW_T *ptidsl * unsigned int set // if set == TRUE : Disable LOS alarms, else enable * * RETURN: 0 SUCCESS * 1 FAILED * NOTES: Currently not supported in any version other than MR4 Patch release.. *****************************************************************************************/ unsigned int dslhal_api_disableLosAlarm ( tidsl_t *ptidsl, unsigned int ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_sendIdle(tidsl_t *ptidsl) * ******************************************************************************************* * DESCRIPTION: This fuction sends the CMD_IDLE message to the DSP * * INPUT: PITIDSLHW_T *ptidsl * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_sendIdle ( tidsl_t *ptidsl ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_sendQuiet(tidsl_t *ptidsl) * ******************************************************************************************* * DESCRIPTION: This fuction sends the CMD_QUIET message to the DSP * * INPUT: PITIDSLHW_T *ptidsl * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_sendQuiet ( tidsl_t *ptidsl ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_sendDgasp(tidsl_t *ptidsl) * ******************************************************************************************* * DESCRIPTION: This fuction sends the HOST_DGASP message to the DSP * * INPUT: PITIDSLHW_T *ptidsl * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_sendDgasp ( tidsl_t *ptidsl ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_setMarginThreshold(tidsl_t *ptidsl, int threshold) * ******************************************************************************************* * DESCRIPTION: This fuction does sets the Margin threshold * * INPUT: PITIDSLHW_T *ptidsl * int threshold * * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_setMarginThreshold ( tidsl_t *ptidsl, int threshold ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_setMarginMonitorFlags(tidsl_t *ptidsl, unsigned int trainflag,unsigned int shwtflag) * ******************************************************************************************* * DESCRIPTION: This fuction does sets the Margin monitoring flag * * INPUT: PITIDSLHW_T *ptidsl * unsigned int trainflag * unsigned int shwtflag * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_setMarginMonitorFlags ( tidsl_t *ptidsl, unsigned int trainflag, unsigned int shwtflag ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_setRateAdaptFlag(tidsl_t *ptidsl) * ******************************************************************************************* * DESCRIPTION: This fuction Sets the Rate Adapt Enable Flag * * INPUT: PITIDSLHW_T *ptidsl * unsigned int flag //if flag = TRUE set flag else reset * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_setRateAdaptFlag ( tidsl_t *ptidsl, unsigned int flag ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_setTrellisFlag(tidsl_t *ptidsl, unsigned int flag) * ******************************************************************************************* * DESCRIPTION: This fuction Sets the Trellis Coding Enable Flag * * INPUT: PITIDSLHW_T *ptidsl * unsigned int flag //if flag = TRUE set flag else reset * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_setTrellisFlag ( tidsl_t *ptidsl, unsigned int flag ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_setMaxBitsPerCarrierDownstream(tidsl_t *ptidsl,unsigned int maxbits) * ******************************************************************************************* * DESCRIPTION: This fuction Sets the Maximum bits per carrier value in downstream band * * INPUT: PITIDSLHW_T *ptidsl * unsigned int maxbits : should be a value between 0-15 * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_setMaxBitsPerCarrierDownstream ( tidsl_t *ptidsl, unsigned int maxbits ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_setMaxBitsPerCarrierUpstream(tidsl_t *ptidsl,unsigned int maxbits) * ******************************************************************************************* * DESCRIPTION: This fuction Sets the Maximum bits per carrier value in upstream band * * INPUT: PITIDSLHW_T *ptidsl * unsigned int maxbits : should be a value between 0-15 * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ #define dslhal_api_setMaxBitsPerCarrier dslhal_api_setMaxBitsPerCarrierUpstream unsigned int dslhal_api_setMaxBitsPerCarrierUpstream(tidsl_t *ptidsl, unsigned maxbits); /****************************************************************************************** * FUNCTION NAME: dslhal_api_setMaxInterleaverDepth(tidsl_t *ptidsl,unsigned int maxdepth) * ******************************************************************************************* * DESCRIPTION: This fuction Sets the Maximum Interleave Depth Supported * * INPUT: PITIDSLHW_T *ptidsl * unsigned int maxdepth : Should be between 0 and 3 depending on intlv buffer * size 64-512 * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_setMaxInterleaverDepth ( tidsl_t *ptidsl, unsigned int maxdepth ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_setTrainingMode(tidsl_t *ptidsl,unsigned int trainmode) * ******************************************************************************************* * DESCRIPTION: This fuction Sets the desired training mode(none/T1.413/G.dmt/G.lite) * * INPUT: PITIDSLHW_T *ptidsl * unsigned int trainmode :Should be between 0 and 4; 0:No Mode 1:Multimode * 2: T1.413, 3:G.dmt, 4: G.lite * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_setTrainingMode ( tidsl_t *ptidsl, unsigned int trainmode ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_dslRetrain(tidsl_t *ptidsl) * ******************************************************************************************* * DESCRIPTION: This fuction sends the CMD_QUIET message to the DSP * * INPUT: PITIDSLHW_T *ptidsl * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_dslRetrain ( tidsl_t *ptidsl ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_acknowledgeInterrupt() * ********************************************************************************************* * DESCRIPTION: * Sets the host interrupt bit masks * * Return: 0 success * 1 failed * * NOTE: * DSP image is based on LITTLE endian * ********************************************************************************************/ unsigned int dslhal_api_acknowledgeInterrupt (tidsl_t * ptidsl ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_disableDspHybridSelect() * ********************************************************************************************* * DESCRIPTION: * Sets the host interrupt bit masks * * Return: 0 success * 1 failed * * NOTE: * DSP image is based on LITTLE endian * ********************************************************************************************/ unsigned int dslhal_api_disableDspHybridSelect (tidsl_t * ptidsl, unsigned int disable ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_disableDspHybridSelect() * ********************************************************************************************* * DESCRIPTION: * Sets the host interrupt bit masks * * Return: 0 success * 1 failed * * NOTE: * DSP image is based on LITTLE endian * ********************************************************************************************/ unsigned int dslhal_api_selectHybrid (tidsl_t * ptidsl, unsigned int hybridNum ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_reportHybridMetrics() * ********************************************************************************************* * DESCRIPTION: * Sets the host interrupt bit masks * * Return: 0 success * 1 failed * * NOTE: * DSP image is based on LITTLE endian * ********************************************************************************************/ unsigned int dslhal_api_reportHybridMetrics (tidsl_t * ptidsl, int *metric ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_selectInnerOuterPair(tidsl_t *ptidsl, unsigned int pairSelect) * ******************************************************************************************* * DESCRIPTION: This fuction sends the CMD_QUIET message to the DSP * * INPUT: PITIDSLHW_T *ptidsl * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_selectInnerOuterPair (tidsl_t *ptidsl, unsigned int pairSelect ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_controlLed() * ********************************************************************************************* * DESCRIPTION: * Sets the host interrupt bit masks * * Return: 0 success * 1 failed * * NOTE: * DSP image is based on LITTLE endian * ********************************************************************************************/ unsigned int dslhal_api_configureLed (tidsl_t * ptidsl, unsigned int idLed, unsigned int onOff ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_configureExternBert() * ********************************************************************************************* * DESCRIPTION: * Sets the host interrupt bit masks * * Return: 0 success * 1 failed * * NOTE: * DSP image is based on LITTLE endian * ********************************************************************************************/ unsigned int dslhal_api_configureExternBert (tidsl_t * ptidsl, unsigned int configParm, unsigned int parmVal ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_configureAtmBert() * ********************************************************************************************* * DESCRIPTION: * Sets the host interrupt bit masks * * Return: 0 success * 1 failed * * NOTE: * DSP image is based on LITTLE endian * ********************************************************************************************/ unsigned int dslhal_api_configureAtmBert (tidsl_t * ptidsl, unsigned int configParm, unsigned int parmVal ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_configureDgaspLpr() * ********************************************************************************************* * DESCRIPTION: * Sets the host interrupt bit masks * * Return: 0 success * 1 failed * * NOTE: * DSP image is based on LITTLE endian * ********************************************************************************************/ unsigned int dslhal_api_configureDgaspLpr (tidsl_t * ptidsl, unsigned int configParm, unsigned int parmVal ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_getAdvancedStats() * ********************************************************************************************* * DESCRIPTION: Read statistical infromation from ax5 modem daugter card. * Input: tidsl_t *ptidsl * * Return: 0 success * 1 failed * ********************************************************************************************/ unsigned int dslhal_api_getAdvancedStats (tidsl_t * ptidsl); /******************************************************************************************** * FUNCTION NAME: dslhal_api_genericDspRead() * ********************************************************************************************* * DESCRIPTION: * Reads from a generic location in the host interface * * Return: 0 success * 1 failed * * NOTE: * DSP image is based on LITTLE endian * ********************************************************************************************/ unsigned int dslhal_api_genericDspRead (tidsl_t * ptidsl, unsigned int offset1, unsigned int offset2, unsigned int offset3, unsigned char* localBuffer, unsigned int numBytes ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_genericDspWrite() * ********************************************************************************************* * DESCRIPTION: * Writes to a generic location in the host interface * * Return: 0 success * 1 failed * * NOTE: * DSP image is based on LITTLE endian * ********************************************************************************************/ unsigned int dslhal_api_genericDspWrite (tidsl_t * ptidsl, unsigned int offset1, unsigned int offset2, unsigned int offset3, unsigned char* localBuffer, unsigned int numBytes ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_dspInterfaceRead() * ********************************************************************************************* * DESCRIPTION: * Reads from a generic location in the host interface * * Return: 0 success * 1 failed * * NOTE: * DSP image is based on LITTLE endian * ********************************************************************************************/ unsigned int dslhal_api_dspInterfaceRead (tidsl_t * ptidsl, unsigned int baseAddr, unsigned int numOffsets, unsigned int *offsets, unsigned char * localBuffer, unsigned int numBytes ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_dspInterfaceWrite() * ********************************************************************************************* * DESCRIPTION: * Writes to a generic location in the host interface * * Return: 0 success * 1 failed * * NOTE: * DSP image is based on LITTLE endian * ********************************************************************************************/ unsigned int dslhal_api_dspInterfaceWrite (tidsl_t * ptidsl, unsigned int baseAddr, unsigned int numOffsets, unsigned int *offsets, unsigned char * localBuffer, unsigned int numBytes ); /****************************************************************************************** * FUNCTION NAME: dslhal_api_sendMailboxCommand(tidsl_t *ptidsl, unsigned int cmd) * ******************************************************************************************* * DESCRIPTION: This fuction sends the passed mailbox command to the DSP * * INPUT: PITIDSLHW_T *ptidsl * unsigned int cmd * * RETURN: 0 SUCCESS * 1 FAILED * *****************************************************************************************/ unsigned int dslhal_api_sendMailboxCommand (tidsl_t *ptidsl, unsigned int cmd ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_setPhyFeatureController() * ********************************************************************************************* * DESCRIPTION: * This function configures those PHY features that will be controlled by the MIPS. * This will over-ride DSP defaults. * * Return: DSLHAL_ERROR_NO_ERRORS : Success * DSLHAL_ERROR_BLOCK_READ: DSP Read failed * DSLHAL_ERROR_BLOCK_WRITE: DSP Write failed * DSLHAL_ERROR_INVALID_PARAM: Invalid parameters supplied * Notes: * The dslhal_api_enableDisablePhyFeature function should be called after this fxn * to actually turn on/off the specific features * ********************************************************************************************/ unsigned int dslhal_api_setPhyFeatureController (tidsl_t * ptidsl, unsigned int paramId, unsigned int phyCtrlWord ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_enableDisablePhyFeatures() * ********************************************************************************************* * DESCRIPTION: * This function configures those PHY features that will be controlled by the MIPS. * This will over-ride DSP-defaults * * Return: DSLHAL_ERROR_NO_ERRORS : Success * DSLHAL_ERROR_BLOCK_READ: DSP Read failed * DSLHAL_ERROR_BLOCK_WRITE: DSP Write failed * DSLHAL_ERROR_INVALID_PARAM: Invalid parameters supplied * Notes: * This function is useless if called on its own. The dslhal_api_supplyPhyFeatureCodeWord * and the dslhal_api_setPhyFeatureController function should be called with reqd params * to enable this function to turn on/off DSP features ********************************************************************************************/ unsigned int dslhal_api_enableDisablePhyFeatures (tidsl_t * ptidsl, unsigned int paramId, unsigned int phyFeatureSet ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_readPhyFeatureSettings() * ********************************************************************************************* * DESCRIPTION: * This function reads the PHY features control & enable/disable settings * * Return: DSLHAL_ERROR_NO_ERRORS : Success * DSLHAL_ERROR_BLOCK_READ: DSP Read failed * DSLHAL_ERROR_BLOCK_WRITE: DSP Write failed * DSLHAL_ERROR_INVALID_PARAM: Invalid parameters supplied * Notes: * The input to this function will be a pointer to a structure that consists of two integers * one each to hold the control word and the enableDisable word. * ********************************************************************************************/ unsigned int dslhal_api_readPhyFeatureSettings (tidsl_t * ptidsl, unsigned int paramId, void *phyFeature ); /******************************************************************************************** * FUNCTION NAME: dslhal_api_getHLOGpsds() * ********************************************************************************************* * DESCRIPTION: * Get downstream HLOGpsds in ADSL2/2+ mode, as defined in g.997.1. * * Input: PITIDSLHW_T *ptidsl * unsigned short *outbuf: Output buffer supplied from caller. * for ADSL2 mode, 2*256=512 bytes are expected. * for ADSL2+ mode, 2*512=1k bytes are expected. * int flag: 0: training HLOGpsds. 1: showtime HLOGpsds. * **Note: Currently only training HLOGpsds is supported. * * Return: DSLHAL_ERROR_NO_ERRORS success * otherwise failed * ********************************************************************************************/ unsigned int dslhal_api_getHLOGpsds(tidsl_t * ptidsl, unsigned short *outbuf, int flag); /******************************************************************************************** * FUNCTION NAME: dslhal_api_getQLNpsds() * ********************************************************************************************* * DESCRIPTION: * Get downstream Quiet Line Noise (QLNpsds) in ADSL2/2+ mode, as defined in g.997.1. * * Input: PITIDSLHW_T *ptidsl * unsigned short *outbuf: Output buffer supplied from caller. * for ADSL2 mode, 1*256=256 bytes are expected. * for ADSL2+ mode, 1*512=512 bytes are expected. * int flag: 0: training QLNpsds. (1: showtime QLNpsds). * **Note: Currently only training QLNpsds is supported. * * Return: DSLHAL_ERROR_NO_ERRORS success * otherwise failed * ********************************************************************************************/ #ifndef NO_ADV_STATS unsigned int dslhal_api_getQLNpsds(tidsl_t * ptidsl, unsigned char *outbuf, int flag); #endif /******************************************************************************************** * FUNCTION NAME: dslhal_api_getSNRpsds() * ********************************************************************************************* * DESCRIPTION: * Get downstream SNRpsds in ADSL2/2+ mode, as defined in g.997.1. * * Input: PITIDSLHW_T *ptidsl * unsigned short *outbuf: Output buffer supplied from caller. * for ADSL2 mode, 1*256=256 bytes are expected. * for ADSL2+ mode, 1*512=512 bytes are expected. * int flag: (0: training SNRpsds). 1: showtime SNRpsds. * **Note: Currently only showtime SNRpsds is supported. * * Return: DSLHAL_ERROR_NO_ERRORS success * otherwise failed * ********************************************************************************************/ #ifndef NO_ADV_STATS unsigned int dslhal_api_getSNRpsds(tidsl_t * ptidsl, unsigned char *outbuf, int flag); #endif /** * \brief Read/Write Upstream Bit Swap fields in the Host Interface * * @param ptidsl Pointer to main DSL HAL data structure. * @param rw 1 - read; 0 - write. * @param byte data to be written (unused if read). * @return ErrCode */ unsigned dslhal_api_usBitSwap(tidsl_t *ptidsl, unsigned rw, unsigned byte); /** * \brief Read/Write Downstream Bit Swap fields in the Host Interface * * @param ptidsl Pointer to main DSL HAL data structure. * @param rw 1 - read; 0 - write. * @param byte data to be written (unused if read). * @return ErrCode */ unsigned dslhal_api_dsBitSwap(tidsl_t *ptidsl, unsigned rw, unsigned byte); /** * \brief Set Fine Gain Control fields in the Host Interface * * @param ptidsl Pointer to main DSL HAL data structure. * @param value data to be written. * @return ErrCode */ unsigned dslhal_api_setFineGainCtrl(tidsl_t *ptidsl, unsigned value); /** * \brief Set Fine Gain Value fields in the Host Interface * * @param ptidsl Pointer to main DSL HAL data structure. * @param value data to be written. * @return ErrCode */ unsigned dslhal_api_setFineGainValue(tidsl_t *ptidsl, unsigned value); /** * \brief Write OAM Feature fields in the Host Interface * * @param ptidsl Pointer to main DSL HAL data structure. * @param value data to be written. * @return ErrCode */ unsigned dslhal_api_setOamFeature(tidsl_t *ptidsl, unsigned value); /** * \brief Clear DSL interrupt. * * @param ptidsl Main DSL HAL data structure. * @return None. */ void dslhal_api_acknowledgeInterrupt_entry(tidsl_t * ptidsl); /** * \brief Re-enable DSL interrupt. * * @param ptidsl Main DSL HAL data structure. * @return None. */ void dslhal_api_acknowledgeInterrupt_exit(tidsl_t * ptidsl); #ifdef INTERNAL_BUILD #include #endif #ifdef AFE_DIAG #define AFE_TEST_DEFAULT 0 #define AFE_TEST_START 1 #define AFE_TEST_STOP 2 /** * \brief Config AFE diagnostics. * * @param ptidsl Pointer to main DSL HAL data structure. * @param pConfig Pointer to config data structure. * * @return 0: Success * other: Failure */ unsigned dslhal_api_afeDiagConfig(tidsl_t *ptidsl, void *pConfig); /** * \brief Fetch AFE diagnostics. * * @param ptidsl Pointer to main DSL HAL data structure. * @param pBuf Pointer to test out data buffer. * @param pLen Pointer to the length (in bytes) of the buffer. * * @return 0: Success * other: Failure */ unsigned dslhal_api_afeDiagFetch(tidsl_t *ptidsl, void *pBuf, unsigned *pLen); #endif // #ifdef AFE_DIAG #endif /* pairs #ifndef __DSL_APPLICATION_INTERFACE_H__ */