| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
PM5372 DRIVER MANUAL PROPRIETARY CONFIDENTIAL RELEASE ISSUE
Top Searches for this datasheet(PM5372) Driver Manual PM5372 DRIVER MANUAL PROPRIETARY CONFIDENTIAL RELEASE ISSUE NOVEMBER, Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Introduction ABOUT THIS MANUAL This manual describes device driver. describes driver's functions, data structures, architecture. This manual focuses driver's interfaces their relationship your application, real-time operating system, device. also describes general terms modify port driver your software hardware platform. Audience This manual written people need Evaluate test devices Modify driver's functions Port driver particular platform. References more information about driver, driver's release Notes. more information about device, documents listed Table related errata documents. Table Related Documents Document Number PMC-1991258 Document Name PM5372 Transmission Switch Element Telecom Standard Product Data Sheet Note: Ensure that document that PMC-Sierra issued your version device driver. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Introduction REVISION HISTORY Issue Issue Issue Issue Date October 2000 November 2001 Details Change Document created Added APIs: tseSetOnePage(), tseGetOnePage(), tsePortSetMaskMode() tseSetPage() tseGetPage() descriptions updated. tseRmSlot() tseClrSlot() descriptions updated. tseInit() uses defaults when pdiv parameter NULL. Documented error codes replacing <TSE_ERROR CODE> with explicit return values. Legal Issues None information contained this document constitutes express implied warranty PMC-Sierra, Inc. sufficiency, fitness suitability particular purpose such information fitness, suitability particular purpose, merchantability, performance, compatibility with other parts systems, products PMC-Sierra, Inc., portion thereof, referred this document. PMC-Sierra, Inc. expressly disclaims representations warranties kind regarding contents information, including, limited express implied warranties accuracy, completeness, merchantability, fitness particular use, non-infringement. event will PMC-Sierra, Inc. liable direct, indirect, special, incidental consequential damages, including, limited lost profits, lost business lost data resulting from reliance upon information, whether PMC-Sierra, Inc. been advised possibility such damage. information proprietary confidential PMC-Sierra, Inc., customers' internal use. event, part this document reproduced form without express written consent PMC-Sierra, Inc. 2001 PMC-Sierra, Inc. PMC-2001402 (R2), PMC-991543 (P1) Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Introduction Contacting PMC-Sierra PMC-Sierra, Inc. 8555 Baxter Place Burnaby, Canada Tel: +1-604-415-6000 Fax: +1-604-415-6200 Document Information: document@pmc-sierra.com Corporate Information: info@pmc-sierra.com Technical Support: apps@pmc-sierra.com Site: http://www.pmc-sierra.com Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Introduction TABLE CONTENTS About this Manual Audience References Revision History Legal Issues Contacting PMC-Sierra Table Contents List Figures. List Tables Introduction Driver Functions Features General Driver Functions. Open/Close Driver Module Start/Stop Driver Module Add/Delete Device. Device Initialization. Device Update. Activate/De-Activate Device Read/Write Device Registers Interrupt Servicing/Polling Statistics Collection Traffic control configuration Specific Driver Functions Time Slot Interchange Space Switch Port Alarm, Status Statistics Device Alarm, Status Statistics Device Configuration Port Configuration 8b/10b Decoder/Encoder Receive 8b/10b Frame Aligner Transmit 8b/10b Disparity Encoder Device Diagnostics. Specific Callback Functions Software Architecture Driver External Interfaces Application Programming Interface Real-Time Interface. Hardware Interface. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Introduction Main Components. Module Data-Block Device(s) Data-Blocks Interrupt-Service Routine Deferred-Processing Routine Time Slot Interchange Space Switch Port Alarm, Status Statistics Device Alarm, Status Statistics Device Configuration Port Configuration 8b/10b Decoder/Encoder Software States. Module States. Device States Processing Flows Module Management. Device Management Interrupt Servicing Calling tseISR. Calling tseDPR Calling tsePoll. Theory Operation. Time Slot Mapping. Data Structures Constants. Data Structures Structures Passed Application. Module Initialization Vector: Device Initialization Vector: Connection Map: CONMAP. Connection Map: CONPAGE. Connection Map: SPTSLOT Enable/Disable Mask. Structures Driver's Allocated Memory Module Data Block: Device Data Block: Counts Block: PORT COUNTS Statistics Block: PORT STATS Counts Block: DEVICE COUNTS Statistics Block: DEVICE STATS. Device Status Port Status Port Configuration Block: PORT CONFIG Device Configuration Block: DEVICE CONFIG Structures Passed through RTOS Buffers. Interrupt Service Vector: Deferred Processing Vector: DPV. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Introduction Global Variable Application Programming Interface Module Management. Opening Driver Module: tseModuleOpen. Closing Driver Module: tseModuleClose Starting Driver Module: tseModuleStart. Stopping Driver Module: tseModuleStop Device Management. Adding Device: tseAdd Deleting Device: tseDelete Initializing Device: tseInit Updating Configuration Device: tseUpdate Resetting Device: tseReset Activating Device: tseActivate De-Activating Device: tseDeActivate. Device Read Write. Reading from Device Registers: tseRead Writing Device Registers: tseWrite. Reading from block Device Registers: tseReadBlock. Writing Block Device Registers: tseWriteBlock Indirect reading from Device Register: tseReadIndirect Indirect writing Device Registers: tseWriteIndirect. Time Slot Interchange Space Switch. Setting global mapping mode: tseSetMapMode Getting global mapping mode: tseGetMapMode. Setting active connection page: tseSetPage. Getting active connection page: tseGetPage. Setting active connection page: tseSetOnePage. Getting active connection page: tseGetOnePage Copying connection from page another tseCopyPage. Mapping source destination slots(s): tseMapSlot. Removing established connection: tseRmSlot. Clearing connections: tseClrSlot Getting source space-time Slot: tseGetSrcSlot. Getting destination space-time Slot: tseGetDestSlot Verifying multicast connection: tseIsMulticast Inserting Idle Data: tseInsIdleData Port Alarm, Status Statistics. Getting port cumulative statistics: tsePortGetStats Getting port status: tsePortGetStatus. Getting port delta statistics: tsePortGetDelta Getting port interrupt callback threshold: tsePortGetThresh. Setting port interrupt callback threshold: tsePortSetThresh. Clear port statistics: tsePortClrStats Device Alarm, Status Statistics Getting device cumulative statistics: tseDeviceGetStats. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Introduction Getting device status: tseDeviceGetStatus Getting device delta statistics: tseDeviceGetDelta. Getting device interrupt callback threshold: tseDeviceGetThresh Setting device interrupt callback threshold: tseDeviceSetThresh Clear device statistics: tseDeviceClrStats. Device Configuration Setting device configuration: tseDeviceSetConfig Getting device configuration: tseDeviceGetConfig Port Configuration. Setting port configuration: tsePortSetConfig Getting port configuration: tsePortGetConfig Setting Masking mode: tsePortSetMaskMode 8b/10b Decoder/Encoder. Forcing port alignment: tseForceOutOfChar. Forcing port alignment: tseForceOutOfFrame Forcing port AIS: tseForceAIS. Forcing port LCV: tseForceLcv. 5.10 Interrupt Service Functions Configuring Processing: tseISRConfig. Getting Interrupt Status Mask: tseGetMask Setting Interrupt Enable Mask: tseSetMask Clearing Interrupt Enable Mask: tseClearMask. Polling Interrupt Status Registers: tsePoll Interrupt-Service Routine: tseISR Deferred-Processing Routine: tseDPR 5.11 Device Diagnostics. Testing Register Accesses: tseTestReg Testing Accesses: tseTestRAM 5.12 Callback Functions Calling Back Application device level events: cbackTSEDevice Calling Back Application port level events: cbackTSEPort Hardware Interface Device Reading from Device Register: sysTSERead Writing Device Register: sysTSEWrite. System-Specific Interrupt Servicing. Installing Handler: sysTSEISRHandlerInstall Handler: sysTSEISRHandler. Removing Handler: sysTSEISRHandlerRemove. RTOS Interface. Memory Allocation/De-Allocation. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Introduction Allocating Memory: sysTSEMemAlloc Freeing Memory: sysTSEMemFree Buffer Management Starting Buffer Management: sysTSEBufferStart Getting Buffer: sysTSEISVBufferGet. Returning Buffer: sysTSEISVBufferRtn. Getting Buffer: sysTSEDPVBufferGet Returning Buffer: sysTSEDPVBufferRtn. Stopping Buffer Management: sysTSEBufferStop System-Specific Routine Task: sysTSEDPRTask Porting Driver. Driver Source Files Driver Porting Procedures Step Porting Driver Extensions Step Porting Drivers Hardware Platforms Step Porting Driver Application Specific Elements Step Building Driver. Appendix Coding Conventions Variable Type Definitions Naming Conventions Macros. Constants Structures Functions Variables. File Organization Files Hardware Dependent Files. RTOS Dependent Files Other Driver Files Appendix Error Codes Appendix Event Codes List Terms Acronyms Index. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Introduction LIST FIGURES Figure Driver External Interfaces Figure Driver Architecture. Figure Driver Software States. Figure Module Management Flow Diagram. Figure Device Management Flow Diagram. Figure Interrupt Service Model. Figure Polling Service Model Figure Time Slot Interchange Space Switch Model. Figure Space-time Slot Mapping, Multicast Unicast Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Introduction LIST TABLES Table Module Initialization Vector: sTSE_MIV Table Device Initialization Vector: sTSE_DIV. Table connection data structure: sTSE_ CONMAP. Table connection page data structure: sTSE_ CONPAGE. Table space-time slot data structure: sTSE_SPTSLOT Table Mask: sTSE_MASK Table Module Data Block: sTSE_MDB Table Device Data Block: sTSE_DDB Table Port Counts Block: sTSE_CNTR_PORT. Table Port Statistics Block: sTSE_STAT_PORT Table Device Counts Block: sTSE_CNTR_DEVICE. Table Port Statistics Block: sTSE_STAT_DEVICE Table Device Status: sTSE_STATUS_DEVICE. Table Port Status: sTSE_STATUS_PORT Table Port Configuration Block: sTSE_CFG_PORT. Table Device Configuration Block: sTSE_CFG_DEVICE Table Interrupt Service Vector: sTSE_ISV Table Deferred Processing Vector: sTSE_DPV Table Variable Type Definitions. Table Naming Conventions. Table File Naming Conventions Table Error Codes Table Event Codes Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Introduction INTRODUCTION following sections driver manual describe device driver. code provided throughout this document written language. This been done promote greater driver portability other embedded hardware Real-Time Operating System environments. Section this document, Software Architecture, defines software architecture device driver including discussion driver's external interfaces main components. Data Structure information Section describes elements driver that either configure control behavior. Included here constants, variables, structures that device driver uses store initialization, configuration, status information. Section provides detailed description each function that member driver Application Programming Interface (API). This section outlines: function calls that hide device-specific details application callbacks that notify user significant device events. your convenience, this manual provides brief guide porting device driver your hardware RTOS platform (page 91). addition, extensive Appendix (beginning page Index (page 108), provide with useful reference information. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Driver Functions Features DRIVER FUNCTIONS FEATURES This section describes main functions features supported driver. General Driver Functions Open/Close Driver Module Opening driver module allocates memory needed driver initializes module level data structures. Closing driver module shuts down driver module gracefully after deleting devices that currently registered with driver, releases memory allocated driver. Start/Stop Driver Module Starting driver module involves allocating RTOS resources needed driver such timers semaphores (except memory, which allocated during Open call). Closing driver module involves de-allocating RTOS resources allocated driver without changing amount memory allocated Add/Delete Device Adding device involves verifying that device exists, associating device handle device, storing context information about driver uses this context information control monitor device. Deleting device involves shutting down device clearing memory used storing context information about this device. Device Initialization initialization function first resets then initializes device associated context information about driver uses this context information control monitor device. Device Update function provided update device's configuration without forcing hardware reset. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Driver Functions Features Activate/De-Activate Device Activating device puts into normal mode operation enabling interrupts other global registers. successful device activation also enables other invocations. contrary, de-activating device removes from operating state disables interrupts other global registers. Read/Write Device Registers These functions provide `raw' interface device. Device registers that both directly indirectly accessible available both inspection modification these functions. applicable, block reads writes also available. Interrupt Servicing/Polling Interrupt Servicing optional feature. user disable device interrupts instead poll device periodically monitor status check alarm/error conditions. Both polling interrupt driven approaches detect change device status report status Deferred-Processing Routine (DPR). then invokes application callback functions based status information retrieved. This allows driver report significant events that occur within device application. Statistics Collection Functions provided retrieve snapshot various counts that accumulated device. Routines should invoked often enough avoid letting counters rollover. Traffic control configuration Functions available control data flow to/from LVDS serial links. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Driver Functions Features Specific Driver Functions These functions provide control monitoring various sections device. These sections generally enabled disabled configured MODE specified during device initialization. Changes these registers that would violate characteristics initialized mode should disallowed. Time Slot Interchange Space Switch Time Slot Interchange (TSI) where space-time slot relationship across defined manipulated. Set/Get mode Set/Get active memory page Copy memory page Remove/Clear mapping source given destination destination TSIs given source multicast idle fill data Port Alarm, Status Statistics device driver capability collect report both port device level status statistics. following functions enable collection reporting both port level status statistics. port statistics status port delta statistics Get/Set port thresholds Clear port statistics Device Alarm, Status Statistics device driver capability collect report both port device level status statistics. following functions enable collection reporting both device level status statistics. device statistics status device delta statistics Get/Set device thresholds Clear device statistics Clear port statistics Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Driver Functions Features Device Configuration device several device level modes. following APIs allow these modes reconfigured: Set/Get device configuration Port Configuration device ports each direction (ingress egress). following APIs allow these ports reconfigured: Set/Get port configuration 8b/10b Decoder/Encoder device driver capability force certain errors 8b/10b ports. following APIs intended give access these features. Force character alignment Force frame alignment Force line code violation Receive 8b/10b Frame Aligner Functions control frame aligners that perform 8b/10b character alignment STS-12 frame alignment: Insertion high order path alarm Control active polarity incoming data stream Report number line code violation Force error operations device diagnostics: out-of-character alignment, out-of-frame alignment Transmit 8b/10b Disparity Encoder Functions configure control following: FIFO centering Test pattern byte insertion Device Diagnostics Device register read write test Specific Callback Functions Callback functions available application event notification from device driver. Application will notified callback functions selected events interest such Stuck-at condition Monitor Inactivity system clock activity Lock state change clock synthesis unit Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Driver Functions Features Change active page space switch stage, ingress time switch element egress time switch element Line code violation, out-of-character, out-of-frame alignment error, FIFO underrun/overrun errors from receive 8b/10b frame aligner FIFO underrun/overrun errors from transmit 8b/10b disparity encoder Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture SOFTWARE ARCHITECTURE This section describes software architecture device driver. This includes discussion driver's external interfaces main components. Driver External Interfaces Figure illustrates external interfaces defined device driver. Figure Driver External Interfaces Application Function Calls Application Callbacks Service Callbacks Device Driver RTOS Service Calls Hardware Interrupts Register Accesses Devices Application Programming Interface driver Application Programming Interface (API) list high-level functions that invoked application programmers configure, control monitor devices. functions perform operations that more meaningful from system's perspective. includes functions that: Initialize device(s) Perform diagnostic tests Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture Validate configuration information Retrieve status statistics information. driver functions services other driver components provide this systemlevel functionality application programmer. driver also consists callback routines that used notify application significant events that take place within device(s) module. Real-Time Interface driver's RTOS interface provides functions that driver RTOS services. driver requires memory, interrupt, preemption services from RTOS. RTOS interface functions perform following tasks driver: Allocate de-allocate memory Manage buffers RTOS interface also includes service callbacks. These functions installed driver using RTOS service calls such installing interrupts. These service callbacks invoked when interrupt occurs. Note: must modify RTOS interface code suit your RTOS. Hardware Interface hardware interface provides functions that read from write device registers. hardware interface also provides template that driver calls when device raises hardware interrupt. must modify this function based interrupt configuration your system. Main Components Figure illustrates level architectural components device driver. This architecture supports both polled interrupt-driven operation driver. polled operation, called periodically. interrupt operation, interrupt directly triggers ISR. driver includes main components: Module device(s) data-blocks Interrupt-service routine Deferred-processing routine Alarm, status statistics Time Slot Interchange Device Alarm, Status Statistics Port Alarm, Status Statistics Device Configuration Port Configuration Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture 8b/10b Decoder/Encoder Figure Driver Architecture Application Function Calls Service Callbacks RTOS Interface Service Calls RTOS Application Callbacks Driver Deferred Processing Routine Alarm, Status Statistics Time Slot Interchange Port Alarm, Status Statistics Device Alarm, Status Statistics Port Configuration Device Configuration 8b/10b Decoder/ Encoder Interrupt Context Module Data Block Device Data Blocks Interrupt Service Routine Hardware Interface Hardware Interrupts Devices Register Accesses Module Data-Block Device(s) Data-Blocks Module Data-Block (MDB) layer data structure, created driver store context information about driver module, such Module state Maximum number devices DDB(s) Device Data-Block (DDB) contained MDB, initialized driver module each device that registered. There device there limit number DDBs available. This limit user when module initialized. used store context information about device, such Device state Control information Initialization parameters Callback function pointers Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture Interrupt-Service Routine driver provides called tseISR that checks there valid interrupt condition present device. This function used system-specific interrupt-handler function service interrupts raised device. low-level interrupt-handler function that traps hardware interrupt calls tseISR system RTOS dependent. Therefore, outside scope driver. Example implementations interrupt handler functions that install remove provided reference section 6.2. customize these example implementations suit your specific needs. section detailed explanation interrupt-servicing model. Deferred-Processing Routine driver provides called tseDPR that processes interrupt condition gathered that device. Typically, system-specific function, which runs separate task within RTOS, will call tseDPR. Example implementations task functions that install remove provided reference section 7.3. customize these example implementations suit your specific needs. section detailed explanation interrupt-servicing model. Time Slot Interchange Space Switch Time Slot Interchange (TSI) where space-time slot relationship across defined manipulated. Port Alarm, Status Statistics device driver capability collect report both port level status statistics. Device Alarm, Status Statistics device driver capability collect report both device level status statistics. Device Configuration device several device level modes that configured. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture Port Configuration device ports each direction. These ports reconfigured. Configurations include controls like line inversion enabling/disabling ports. 8b/10b Decoder/Encoder device driver capability force errors 8b/10b ports. Software States Figure shows software state diagram driver. State transitions occur successful execution corresponding transition functions shown. State information helps maintain integrity DDB(s) controlling operations allowed each state. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture Figure Driver Software States tseModuleOpen Idle tseModuleClose Start tseModuleStop tseModuleStart tseModuleClose Ready MODULE STATES Start tseAdd tseDelete Present tseReset tseInit tseActivate Inactive tseDeActivate PER-DEVICE STATES Active tseReset Module States following description module states. section detailed description functions that used change module state. Start driver module been initialized. this state driver does hold RTOS resources (memory, timers, etc), running tasks, performs actions. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture Idle driver module been initialized successfully. Module Initialization Vector (MIV) been validated, Module Data Block (MDB) been allocated loaded with current data, per-device data structures have been allocated, RTOS responded without error requests sent driver. Ready This normal operating state driver module. This means that RTOS resources have been allocated driver ready devices added. driver module remains this state while devices operation. Device States following description per-device states. state that mentioned here software state maintained driver, maintained inside device itself. section detailed description functions that used change per-device state. Start device been initialized. this state device unknown driver performs actions. There separate flow each device that added, they start here. Present device been successfully added. Device Data Block (DDB) been associated with device updated with user context, device handle been given user. this state, driver performs actions. Inactive this state device configured data functions de-activated, including interrupts alarms, status statistics functions. Active This normal operating state device. this state, interrupt servicing polling enabled. Processing Flows This section describes main processing flows driver components. flow diagrams presented here illustrate sequence operations that take place different driver functions. diagrams also serve guide application programmer illustrating sequence which application must invoke driver API. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture Module Management following diagram illustrates typical function call sequences that occur when initializing shutting down driver module. Figure Module Management Flow Diagram START Performs module level initialization driver. Validates Module Initialization Vector (MIV). Allocates memory components (i.e. memory needed driver) then initializes contents with validated MIV. Performs module level startup driver. This involves allocating RTOS resources such semaphores timers installing handler task. tseModuleOpen tseModuleStart Perform device level functions here (add, init, activate, de-activate, reset, delete,.) tseModuleStop Performs Module level shutdown driver. This involves deleting devices currently installed de-allocating timers semaphores well removing handler task. Performs module level shutdown driver. De-allocates driver's memory. tseModuleClose Device Management following figure shows typical function call sequences that driver uses add, initialize, re-initialize, delete device. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture Figure Device Management Flow Diagram START tseAdd Detects hardware, assigns stores user's context TSE. Returns handle user. tseInit Applies reset initializes registers associated RAMs based passed user. tseActivate Prepares normal operation enabling interrupts other global enables. routines installed when module started using sysTseISRInstallHandler. operational other APIs invoked. tseReset order re-initialize TSE, reset using tseReset through initialization sequence again. tseDeactivate De-activates removes from normal operation. This involves disabling interrupts. routines this removed using sysTseISRRemoveHandler when module closed. tseReset Applies software reset default startup state. tseDelete Removes from list TSEs being controlled driver. This function de-allocates context information being deleted. Interrupt Servicing driver services device interrupts using interrupt service routine (ISR) that traps interrupts deferred processing routine (DPR) that actually processes interrupt conditions clears them. This lets execute quickly exit. Most time-consuming processing interrupt conditions deferred queuing necessary interrupt-context information task. function runs context separate task within RTOS. Note: Since task processes potentially serious interrupt conditions, should task's priority higher than application task interacting with driver. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture driver provides system-independent functions, tseISR tseDPR. must fill corresponding system-specific functions, sysTSEISRHandler sysTSEDPRTask. system-specific functions isolate system-specific communication mechanism (between DPR) from system-independent functions, tseISR tseDPR. Figure illustrates interrupt service model used driver design. Figure Interrupt Service Model Interrupt Context Information sysTseISRHandler tseISR sysTseDPRTask tseDPR Indication Callbacks Application Note: Instead using interrupt service model, polling service model driver process device's event-indication registers (see page 32). Calling tseISR interrupt handler function, which system dependent, must call tseISR. first, low-level interrupt-handler function must trap device interrupts. must implement this function your system. reference, example implementation interrupt handler (sysTSEISRHandler) appears page customize this example implementation suit your needs. interrupt handler that implement (sysTSEISRHandler) installed interrupt vector table system processor. called when more devices interrupt processor. interrupt handler then calls tseISR each device active state that interrupt processing enabled. tseISR function reads from master interrupt-status disables interrupt cause. least valid interrupt condition found, then tseISR fills Interrupt Service Vector (ISV) with this status information well current device handle. tseISR function also clears disables device interrupts they detected. causes cleared task. sysTSEISRHandler function then responsible sending this buffer task. Note: Normally should save status information deferred processing implementing message queue. interrupt handler sends status information queue sysTSEISRHandler. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture Calling tseDPR sysTSEDPRTask function system-specific function that runs separate task within RTOS. should task's priority higher than application task(s) interacting with driver. message-queue implementation model, this task associated message queue. task waits messages from this message queue. When message arrives, sysTSEDPRTask calls (tseDPR) with received ISV. Then tseDPR processes status information takes appropriate action based specific interrupt condition detected reads miscellaneous interrupt-status registers then reenables interrupt cause. nature this processing differ from system system. Therefore, tseDPR calls different indication callbacks different interrupt conditions. Typically, should implement these callback functions simple message posting functions that post messages application task. However, implement indication callback perform processing within task context return without sending messages. this case, ensure that this callback function does call functions that would change driver's state, such tseDelete. Also, ensure that callback function non-blocking because task executes while interrupts disabled. customize these callbacks suit your system. page example implementations callback functions. Note: Since tseISR tseDPR routines themselves specify communication mechanism, have full flexibility choosing communication mechanism between two. convenient implement this communication mechanism message queue, which service that most RTOSs provide. must implement system-specific functions, sysTSEISRHandler sysTSEDPRTask. When driver calls sysTSEISRHandlerInstall, application installs sysTSEISRHandler interrupt vector table processor, sysTSEDPRTask function spawned task application. sysTSEISRHandlerInstall function also creates communication channel between sysTSEISRHandler sysTSEDPRTask. This communication channel most commonly message queue associated with sysTSEDPRTask. Similarly, during removal interrupts, driver removes sysTSEISRHandler from microprocessor's interrupt vector table deletes task associated with sysTSEDPRTask. reference, this manual provides example implementations interrupt installation removal functions pages customize these prototypes suit your specific needs. Calling tsePoll Instead using interrupt service model, polling service model driver process device's event-indication registers. Figure illustrates polling service model used driver design. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture Figure Polling Service Model Interrupt Context Information tseDPR tsePoll tseISR Indication Callbacks Application polling mode, application responsible calling tsePoll often enough service pending error alarm conditions. When tsePoll called, tseISR function called internally. tseISR function reads from master interrupt-status registers miscellaneous interrupt-status registers TSE. least valid interrupt condition found then tseISR fills Interrupt Service Vector (ISV) with this status information well current device handle. tseISR function also clears disables device's interrupts detected. polling mode, this buffer passed task calling tseDPR internally. Theory Operation Time Slot Mapping Figure Time Slot Interchange Space Switch Model Space Switch timeslot# timeslot# Ingress inPort outPort Egress timeslot# inPort outPort timeslot# Ingress timeslot# inPort outPort timeslot# Egress timeslot# inPort outPort timeslot# total time slot interchange units (TSI) time slot mapping ingress egress. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture Mapping defined STS-1 granularity; however, valid mapping must still into required time slot manner mandated data rate channel. user responsible maintaining data integrity when redefining connection map. Time slot mapping viewed process mapping source space timeslot destination space timeslot through both ingress space switch, egress TSI. equivalent establishing one-to-one mapping one-to-many mapping between source slots destination slots, depending whether connection unicast multicast. Figure Space-time Slot Mapping, Multicast Unicast source slots Unicast destination slots Multicast tseMapSlot establishes such mapping between source space-time slot destination space-time slot(s). tseRmSlot disconnects established connection between given source destination slots. tseClrSlot clears connections given source slot. mode TSIs device. There valid modes, user-defined bypass. Bypass mode puts chip through mode time-slot rearrangement will take place. userdefined mode selected, time slots will re-arranged based connection inside device. tseSetMapMode retrieves current mapping mode device. Function tseGetDestSlot returns destination slot(s) given source slot. tseGetSrcSlot returns source slot given destination slot. tseIsMulticast verifies given slot mapped multiple destination slots. tseSetMapMode sets global mapping There connection pages each TSI, page tseSetPage provides software control active connection memory page TSI. given page exclusive-ORed with either hardware TCMP (controls ingress TSIs) OCMP (controls egress TSIs) determine which active page currently active. tseGetPage queries current active connection page. connection page synchronization, tseCopyPage overwrites connection page with other within block. Software select page Hardware xCMP Active page Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Software Architecture Software select page Error Insertion Hardware xCMP Active page User force line code violation (LCV) 8B/10B encoders disparity encoders. tseForceLcv invoked force 8B/10B encoders. User insert known test patterns into following blocks further diagnostics: disparity encoders transmit TSIs. transmit TSIs, tseInsIdleData introduces known data pattern into data stream. User also introduce series synchronization conditions 8B/10B decoders. tseForceOutOfChar forces character alignment block which will then attempt realign with alignment character (K28.5) data stream. addition, out-of-frame error introduced invoking tseForceOutOfFrame. decoder will again attempt resynchronize with alignment character (K28.5). Thresholds threshold mechanism allows user reduce number callbacks given statistic such line code violation. call back application will made when specified threshold reached. application functions defined members cbackTsePort cbackTseDevice will invoked based configured thresholds. threshold dynamically changed tsePortSetThresh tseDeviceSetThresh. threshold values retrieved tsePortGetThresh tseDeviceGetThresh. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Data Structures DATA STRUCTURES This section describes elements driver that configure control behavior therefore should interest application programmer. Included here constants, variables structures that device driver uses store initialization, configuration statistics information. more information naming conventions, section Constants following Constants used throughout driver code: <TSE ERROR CODES>: error codes used throughout driver code, returned functions used global error number field DDB. TSE_MAX_DEVS: defines maximum number devices that supported this driver. This constant must changed without thorough analysis consequences driver code. TSE_MOD_START, TSE_MOD_IDLE, TSE_MOD_READY: three possible module states (stored stateModule). TSE_START, TSE_PRESENT, TSE_ACTIVE, TSE_INACTIVE: four possible device states (stored stateDevice). TSE_MAX_PORTS: maximum number ports. TSE_MAX_IE_BLOCKS: maximum number Ingress/Egress blocks. TSE_MAX_TSLOTS: maximum number timeslots. TSE_MAX_CSU_BLOCKS: maximum number CSUs. TSE_J0MASK_ALLOW, TSE_J0MASK_DENY, TSE_J0MASK_DENY_REORDER: possible masking modes enum eTSE_J0MASK_MODE Data Structures following main data structures used driver. They three types: Structures that passed application Structures that driver's allocated memory Structures that passed through RTOS buffers Structures Passed Application These structures defined application passed argument functions within driver. These structures Module Initialization Vector (MIV), Device Initialization Vector (DIV) mask. Module Initialization Vector: Passed tseModuleOpen call, this structure contains information needed driver initialize connect RTOS. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Data Structures during this session. number used calculate amount memory that will allocated driver. maximum value that passed TSE_MAX_DEVS (see section 4.1). maxDevs used inform driver many devices will operating concurrently Table Module Initialization Vector: sTSE_MIV Field Name perrModule maxDevs Field Type INT4 UINT2 Field Description output: pointer errModule Maximum number devices supported during this session Device Initialization Vector: Passed tseInit call, this structure contains information needed driver initialize device. pollISR flag that indicates type interrupt servicing driver use. choices `polling' (TSE_POLL_MODE), `interrupt driven' (TSE_ISR_MODE). When configured polling Interrupt capability device used, user responsible calling devicePoll periodically. actual processing event information same both modes. cbackTseDevice, cbackTsePort used pass address application functions that will used inform application code pending events. these fields NULL, then events that might cause `call back' application will processed during processing ignored DPR. Table Device Initialization Vector: sTSE_DIV Field Name pollISR Field Type eTSE_POLL Field Description Indicates type polling Address callback function Device Events Address callback function Port Events port configuration block device configuration block port threshold configuration cbackTseDevice sTSE_CBACK cbackTsePort sTSE_CBACK iCfgPort [TSE_MAX_PORTS] iCfgDevice iThreshPort [TSE_MAX_PORTS] sTSE_CFG_PORT sTSE_CFG_DEVICE sTSE_CNTR_PORT Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Data Structures Field Name iThreshDevice Field Type sTSE_CNTR_DEVICE Field Description device threshold configuration Connection Map: CONMAP Used storing connection mapping device Table connection data structure: sTSE_ CONMAP Field Name [TSE_MAX_PAGE] Field Type sTSE_CONPAGE Field Description Connection maps consist multiple connection pages Connection Map: CONPAGE Used CONMAP storing connection mapping device Table connection page data structure: sTSE_ CONPAGE Field Name dstSlot [TSE_MAX_PORTS+1] [TSE_MAX_TSLOTS+1] Field Type sTSE_SLOT Field Description Connection pages consist slots mapping (both arrays start indexing from Connection Map: SPTSLOT Used APIs representing port timeslot relationships device. Table space-time slot data structure: sTSE_SPTSLOT Field Name numPort numTS spaceSwPort Field Type UINT1 UINT1 UINT1 Field Description Port number (1-64) Time slot number (1-12) Space switch port number (1-64) (must within same TSI) Space switch time slot number (1-12) spaceSwTS UINT1 Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Data Structures Enable/Disable Mask Passed tseSetMask, tseGetMask tseClearMask calls, this structure contains information needed driver enable disable interrupts Table Mask: sTSE_MASK Field Name csulocke[TSE_MAX_CSU_BLOCKS] Field Type UINT1 Field Description Interrupt lock status interrupts disable, enable) Interrupt enable SSWT page switch disable, enable) Interrupt enable R8FA character alignment disable, enable) Interrupt enable R8FA frame alignment disable, enable) Interrupt enable R8FA line code violation disable, enable) Interrupt enable R8FA FIFO underrun/overrun disable, enable) Interrupt enable ingress TSIs interrupts disable, enable) Interrupt enable egress TSIs interrupts disable, enable) Interrupt enable T8DE FIFO underrun/overrun disable, enable) sswtpage UINT1 r8faooc[TSE_MAX_PORTS] UINT1 r8faoof[TSE_MAX_PORTS] UINT1 r8falcv[TSE_MAX_PORTS] UINT1 r8fafifo[TSE_MAX_PORTS] UINT1 itsepage[TSE_MAX_IE_BLOCKS] UINT1 etsepage[TSE_MAX_IE_BLOCKS] UINT1 t8defifo[TSE_MAX_PORTS] UINT1 Structures Driver's Allocated Memory These structures defined used driver part context memory allocated when driver opened. These structures Module Data Block (MDB), Device Data Block (DDB). Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Data Structures Module Data Block: top-level structure module. contains configuration data about module level code pointers configuration data about device level codes. mSignature: When this field contains TSE_MDB_SIGNATURE, indicates that this structure been properly initialized read user. errModule: Most module functions return specific error code directly. When returned code TSE_FAILURE, this indicates that top-level function able carry specified error code back application. Under those circumstances, proper error code recorded this element. stateModule: Contains current state module could TSE_MOD_START, TSE_MOD_IDLE TSE_MOD_READY. Table Module Data Block: sTSE_MDB Field Name mSignature Field Type UINT4 Field Description indicator that this structure initialized valid. Global error Indicator module calls Maximum number devices supported Number devices currently registered Module state; TSE_MOD_START, TSE_MOD_IDLE TSE_MOD_READY Semaphore that locks access array (for adding deleting) (array Device Data Blocks (DDB) context memory errModule maxDevs numDevs stateModule INT4 UINT2 UINT2 eTSE_MOD_STATE pmDDBSem void pddb sTSE_DDB Device Data Block: top-level structure each device. contains configuration data about device level code pointers configuration data about device level sub-blocks. dSignature: When this field contains TSE_DDB_SIGNATURE, indicates that this structure been properly initialized read user. errDevice: Most device functions return specific error code directly. When returned code TSE_FAILURE, this indicates that top-level function able carry specific error code back application. addition, some device functions return error code. Under those circumstances, proper error code recorded this element. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Data Structures stateDevice: Contains current state device could TSE_START, TSE_PRESENT, TSE_ACTIVE TSE_INACTIVE. usrCtxt: value that used user identify device during execution callback functions. passed driver when tseAdd called returned user when callback function invoked. element unused driver itself contain value. Table Device Data Block: sTSE_DDB Field Name dSignature Field Type UINT4 Field Description indicator that this structure initialized valid Global error indicator device calls Base address device Application defined parameter Device State; following: TSE_START, TSE_PRESENT, TSE_ACTIVE TSE_INACTIVE Device Initialization Vector Interrupt enable mask Device statistics update semaphore Port statistics update semaphore Device statistics Port statistics Specifies bypass user configurable mode SSWT connection ITSE connection ETSE connection Current active page errDevice baseAddr usrCtxt stateDevice INT4 UINT2 sTSE_USR_CTXT eTSE_DEV_STATE dDiv dMask pdStatDevSem pdStatPortSem dStatsDevice dStatPort [TSE_MAX_PORTS] mapMode dSswt dItse dEtse dPageNum sTSE_DIV sTSE_MASK void void sTSE_STAT_DEVICE sTSE_STAT_PORT eTSE_TSIMODE sTSE_CONMAP sTSE_CONMAP sTSE_CONMAP UINT1 Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Data Structures Field Name dItPrevInsIdle [TSE_MAX_PORTS] dEtPrevInsIdle [TSE_MAX_PORTS] Field Type UINT2 UINT2 Field Description Previous ITSE mapping before tseInsIdleData() called Previous ETSE mapping before tseInsIdleData() called Counts Block: PORT COUNTS sTSE_CNTR_PORT structure accumulating port counts. Table Port Counts Block: sTSE_CNTR_PORT Field Name cpLCVhwreg cpLineCodeVio cpOutOfChar cpOutOfFrame cpRxFifoErr cpTxFifoErr Field Type UINT4 UINT4 UINT4 UINT4 UINT4 UINT4 Field Description linecode violation counts from register Line code violation interrupts character interrupts frame interrupts FIFO error interrupts FIFO error interrupts Statistics Block: PORT STATS sTSE_STAT_PORT top-level structure port statistics. Table Port Statistics Block: sTSE_STAT_PORT Field Name ipThresh ipCount ipDelta Field Type sTSE_CNTR_PORT sTSE_CNTR_PORT sTSE_CNTR_PORT Field Description Thresholds Counts Delta counts Counts Block: DEVICE COUNTS sTSE_CNTR_DEVICE structure accumulating device counts. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Data Structures Table Device Counts Block: sTSE_CNTR_DEVICE Field Name cdLocke[TSE_MAX_CSU_BLOCKS] cdSswtpage Field Type UINT4 UINT4 Field Description lock interrupts SSWT active memory page switch interrupts ITSE page switch interrupts ETSE page switch interrupts cdItsepage[TSE_MAX_IE_BLOCKS] cdEtsepage[TSE_MAX_IE_BLOCKS] UINT4 UINT4 Statistics Block: DEVICE STATS sTSE_STAT_DEVICE top-level structure device statistics. Table Port Statistics Block: sTSE_STAT_DEVICE Field Name idThresh idCount idDelta Field Type sTSE_CNTR_DEVICE sTSE_CNTR_DEVICE sTSE_CNTR_DEVICE Field Description Thresholds Counts Delta counts Device Status Device Status structure stores instantaneous device status. Table Device Status: sTSE_STATUS_DEVICE Field Name sdLockv[TSE_MAX_CSU_BLOCKS] sdSswtpage sdSysClkA Field Type UINT1 UINT1 UINT1 Field Description lock status SSWT active page SYSCLK active Port Status Port Status structure stores instantaneous port status. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Data Structures Table Port Status: sTSE_STATUS_PORT Field Name spOutOfChar spOutOfFrame Field Type UINT1 UINT1 Field Description character alignment frame alignment Port Configuration Block: PORT CONFIG sTSE_CFG_PORT top-level structure configuring ports. Table Port Configuration Block: sTSE_CFG_PORT Field Name rxInvert forceAis forceOutOfChar forceOutOfFrame analogReset druEnable rxEnable txEnable testPatEnb testPattern centerFifo j0Insert forceLineCodeV pisoEnable Field Type UINT1 UINT1 UINT1 UINT1 UINT1 UINT1 UINT1 UINT1 UINT1 UINT2 UINT1 UINT1 UINT1 UINT1 Field Description data invert Force device frame state) Force character alignment Force frame alignment Analog reset enable Receiver enable Transmitter enable Test pattern enable Test pattern Center FIFO insertion enable force line code violation error PISO enable Device Configuration Block: DEVICE CONFIG sTSE_CFG_DEVICE top-level structure configuring device. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Data Structures Table Device Configuration Block: sTSE_CFG_DEVICE Field Name csuEnable[TSE_MAX_CSU_BLOCKS] csuReset[TSE_MAX_CSU_BLOCKS] etseDisable itseDisable rxJ0Delay txJ0Delay Field Type UINT1 UINT1 UINT1 UINT1 UINT2 UINT2 Field Description enable reset Egress disable Ingress disable Receive delay Transmit delay Structures Passed through RTOS Buffers Interrupt Service Vector: This buffer structure used capture status device (during poll processing) Deferred-Processing Routine (DPR). template device registers that involved exception processing. application's responsibility create pool buffers (using this template determine buffer's size) when driver calls user-supplied sysTSEBufferStart function. individual buffer then obtained driver sysTSEISVBufferGet returned `pool' sysTSEISVBufferRtn. Table Interrupt Service Vector: sTSE_ISV Field Name deviceHandle whichints Field Type sTSE_HNDL sTSE_MASK Field Description Handle device cause Mask interrupts that have occurred Deferred Processing Vector: This block used ways. First used determine size buffer required RTOS driver. Second template data that assembled sent application code. Note: application code responsible returning this buffer RTOS buffer pool, which typically done callback routines before they return. Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Data Structures Table Deferred Processing Vector: sTSE_DPV Field Name dpEvent dpCause Field Type eTSE_DPR_EVENT UINT2 Field Description Event being reported Depends event. Either port number, number, ITSE number ETSE number Global Variable Although most variables within driver meant used application code, there global variable that great application code. tseMdb: global pointer Module Data Block (MDB). content this global variable should considered read-only application. errModule: This structure element used store error code that specifies reason function's failure. field only valid functions that return error code when value TSE_FAILURE returned. stateModule: This structure element used store module state shown Figure pddb[ array pointers individual Device Data Blocks. user cautioned that only valid dSignature field correct. Note that array DDBs particular order. errDevice: This structure element used store error code that specifies reason function's failure. field only valid functions that return error code when value TSE_FAILURE returned. stateDevice: This structure element used store device state shown Figure Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface APPLICATION PROGRAMMING INTERFACE This section provides detailed description each function that member driver Application Programming Interface (API). functions typically execute context application task. Note: These functions re-entrant. This means that application tasks cannot invoke same same time. However driver protects data structures from concurrent accesses application task. Module Management module management functions that used application open, start, stop close driver module. These functions will take care initializing driver, allocating memory other RTOS resources needed driver. They also used change module state. more information module states state diagram page typical module management flow diagram page Opening Driver Module: tseModuleOpen This function performs module level initialization device driver. This involves allocating memory needed driver initializing internal structures. Prototype Inputs Outputs Returns INT4 tseModuleOpen(sTSE_MIV *pmiv) pmiv (pointer Module Initialization Vector Places address into passed application. Success TSE_SUCCESS Failure TSE_ERR_MODULE_ALREADY_INIT TSE_ERR_INVALID_MIV TSE_ERR_MEM_ALLOC Valid States Side Effects TSE_MOD_START Changes MODULE state TSE_MOD_IDLE Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Closing Driver Module: tseModuleClose This function performs module level shutdown driver. This involves deleting devices being controlled driver calling tseDelete each device) de-allocating memory allocated driver. Prototype Inputs Outputs Returns INT4 tseModuleClose(void) None None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_FAILURE Valid States Side Effects STATES Changes MODULE state TSE_MOD_START Starting Driver Module: tseModuleStart This function connects RTOS resources driver. This involves allocating semaphores timers, initializing buffers installing handler task. Upon successful return from this function driver ready devices. Prototype Inputs Outputs Returns INT4 tseModuleStart(void) None None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_WRONG_STATE TSE_ERR_SEMAPHORE TSE_ERR_STAT_INSTALL Valid States Side Effects TSE_MOD_IDLE Changes MODULE state TSE_MOD_READY Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Stopping Driver Module: tseModuleStop This function disconnects RTOS resources from driver. This involves de-allocating semaphores timers, freeing-up buffers uninstalling handler task. there registered devices, tseDelete called each. Prototype Inputs Outputs Returns INT4 tseModuleStop(void) None None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_WRONG_STATE TSE_ERR_DEVS_EMPTY TSE_ERR_SEMAPHORE Valid States Side Effects TSE_MOD_READY Changes MODULE state TSE_MOD_IDLE Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Device Management device management functions that used application control device. These functions take care initializing device specific configuration, enabling device general activity well enabling interrupt processing that device. They also used change software state that device. more information device states state diagram page typical device management flow diagram page Adding Device: tseAdd This function verifies presence device hardware then returns handle back user. device handle passed parameter most device Functions. It's used driver identify device which operation performed. Prototype Inputs sTSE_HNDL tseAdd(void *usrCtxt, UINT2 *baseAddr, INT4 **pperrDevice) usrCtxt user context this device baseAddr base address device pperrDevice (pointer area memory pperrDevice (pointer errDevice (inside MDB) Outputs ERROR code written tseMdb->errModule failure TSE_ERR_INVALID_ARG TSE_ERR_NULL_BASE_ADDR TSE_ERR_MODULE_NOT_INIT TSE_ERR_DEVS_FULL TSE_ERR_SEMAPHORE TSE_ERR_DEV_ALREADY_ADDED TSE_ERR_DEV_NOT_DETECTED Returns Valid States Side Effects Pointer device handle NULL case failure. TSE_MOD_READY Changes DEVICE state TSE_PRESENT Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Deleting Device: tseDelete This function used remove specified device from list devices being controlled driver. Deleting device involves un-validating that device releasing associated device handle. Prototype Inputs Outputs Returns INT4 tseDelete(sTSE_HNDL deviceHandle) deviceHandle device handle (from tseAdd) None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_DIV TSE_ERR_INVALID_ARG TSE_ERR_SEMAPHORE Valid States Side Effects TSE_PRESENT, TSE_ACTIVE, TSE_INACTIVE Changes DEVICE state TSE_PRESENT Initializing Device: tseInit This function initializes Device Data Block (DDB) associated with that device during tseAdd, applies soft reset device configures according passed Application. This routine take 100ms execute because waits CSUs lock. pdiv parameter NULL, then defaults used instead DIV. Prototype Inputs INT4 tseInit(sTSE_HNDL deviceHandle, sTSE_DIV *pdiv, UINT1 profileNum)) deviceHandle pdiv profileNum device handle (from tseAdd) pointer Device Initialization Vector profile number ignored this driver Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_DIV TSE_ERR_INVALID_ARG Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Valid States Side Effects TSE_PRESENT Changes DEVICE state TSE_INACTIVE Updating Configuration Device: tseUpdate This function updates configuration device well Device Data Block (DDB) associated with that device according passed application. only difference between tseUpdate tseInit that soft reset will applied device. Prototype Inputs INT4 tseUpdate(sTSE_HNDL deviceHandle, sTSE_DIV *pdiv, UINT1 profileNum) deviceHandle pdiv profileNum device handle (from tseAdd) pointer Device Initialization Vector profile number ignored this driver Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_DIV TSE_ERR_INVALID_ARG Valid States Side Effects TSE_ACTIVE, TSE_INACTIVE None Resetting Device: tseReset This function applies software reset device. Also resets contents (except user context). This function typically called before re-initializing device (via tseInit). Prototype Inputs Outputs Returns INT4 tseReset(sTSE_HNDL deviceHandle) deviceHandle device handle (from tseAdd) None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Valid States Side Effects TSE_PRESENT, TSE_ACTIVE, TSE_INACTIVE Changes DEVICE state TSE_PRESENT Activating Device: tseActivate This function restores state device after de-activate. Interrupts re-enabled. Prototype Inputs Outputs Returns INT4 tseActivate(sTSE_HNDL deviceHandle) deviceHandle device handle (from tseAdd) None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE Valid States Side Effects TSE_INACTIVE Changes DEVICE state TSE_ACTIVE De-Activating Device: tseDeActivate This function de-activates device from operation. Interrupts masked device into quiet state enable bits. Prototype Inputs Outputs Returns INT4 tseDeActivate(sTSE_HNDL deviceHandle) deviceHandle device handle (from tseAdd) None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE Valid States Side Effects TSE_ACTIVE Changes DEVICE state TSE_INACTIVE Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Device Read Write Reading from Device Registers: tseRead This function used read register specific device providing register number. This function derives actual address location based device handle register number inputs. then reads contents this address location using system-specific macro, sysTSERead. Note that failure read returns zero error indication written associated DDB. Prototype Inputs Outputs UINT2 tseRead(sTSE_HNDL deviceHandle, UINT2 regNum) deviceHandle regNum device handle (from tseAdd) register number field .errDevice contains Success TSE_SUCCESS Failure TSE_ERR_INVALID_DEV TSE_ERR_INVALID_REG Returns Valid States Side Effects Value read TSE_PRESENT, TSE_ACTIVE, TSE_INACTIVE affect registers that change after read operation Writing Device Registers: tseWrite This function used write register specific device providing register number. This function derives actual address location based device handle register number inputs. then writes contents this address location using system-specific macro, sysTSEWrite. Prototype Inputs UINT2 tseWrite(sTSE_HNDL deviceHandle, UINT2 regNum, UINT2 value) deviceHandle regNum value device handle (from tseAdd) register number value written Outputs field .errDevice contains Success TSE_SUCCESS Failure TSE_ERR_INVALID_DEV TSE_ERR_INVALID_REG Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Returns Valid States Side Effects Value written TSE_PRESENT, TSE_ACTIVE, TSE_INACTIVE change configuration device Reading from block Device Registers: tseReadBlock This function used read register block specific device providing starting register number, size read. This function derives actual start address location based device handle starting register number inputs. then reads contents this data block using multiple calls system-specific macro, sysTSERead. user's responsibility allocate enough memory block read. Prototype Inputs UINT2 tseReadBlock(sTSE_HNDL deviceHandle, UINT2 startRegNum, UINT2 numu2, UINT2 *pblock) deviceHandle startRegNum numu2 pblock pblock device handle (from tseAdd) starting register number number registers read (pointer block read (pointer block read Outputs field .errDevice contains: Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_INVALID_REG Returns Valid States Side Effects none TSE_PRESENT, TSE_ACTIVE, TSE_INACTIVE affect registers that change after read operation Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Writing Block Device Registers: tseWriteBlock This function used write register block specific device providing starting register number block size. This function derives actual starting address location based device handle starting register number inputs. then writes contents this data block using multiple calls system-specific macro, sysTSEWrite. from passed block only modified device's registers corresponding passed mask. Prototype Inputs UINT2 tseWriteBlock(sTSE_HNDL deviceHandle, UINT2 startRegNum, UINT2 numu2, UINT2 *pblock, UINT2 *pmask) deviceHandle startRegNum numu2 pblock pmask device handle (from tseAdd) starting register number number registers write (pointer block write (pointer mask Outputs field .errDevice contains Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_INVALID_REG Returns Valid States Side Effects None TSE_PRESENT, TSE_ACTIVE, TSE_INACTIVE change configuration device Indirect reading from Device Register: tseReadIndirect This function used perform indirect read from indirect register device providing register location indirect address read from. This function derives actual start address location based device handle. then reads data pointed indirect address using calls system-specific macro, sysTseRead. Note that failure read returns zero error indication written DDB. Prototype Inputs INT4 tseReadIndirect(sTSE_HNDL deviceHandle, UINT2 iaddrReg, UINT2 iaddr, UINT2 *pData) deviceHandle iaddrReg iaddr device handle (from tseAdd) indirect address register number indirect address read Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface pData (pointer data read (pointer block read Outputs Returns pData Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_ARG TSE_ERR_POLL_TIMEOUT Valid States Side Effects TSE_PRESENT, TSE_ACTIVE, TSE_INACTIVE affect registers that change after read operation Indirect writing Device Registers: tseWriteIndirect This function used perform indirect write indirect access register device providing register location indirect address written This function derives actual start address location based device handle. then writes data location pointed indirect address using calls system-specific macro, sysTseWrite. Note that failure write returns zero error indication written DDB. Prototype Inputs INT4 tseWriteIndirect(sTSE_HNDL deviceHandle, UINT2 iaddrReg, UINT2 iaddr, UINT2 data) deviceHandle iaddrReg iaddr data device handle (from tseAdd) indirect address register number indirect address read data Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_ARG TSE_ERR_POLL_TIMEOUT Valid States Side Effects TSE_PRESENT, TSE_ACTIVE, TSE_INACTIVE affect registers that change after read operation Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Time Slot Interchange Space Switch Each connection memory pages, Mapping defined STS-1 granularity; however, valid mapping must still into required time slot mandated data rate channel. higher lever application responsible maintaining data integrity when redefining connection map. Time slot interchange seen process mapping source space timeslots destination space timeslots. This used establish one-to-one mapping one-to-many mapping between source slots destination slots, depending whether unicast multicast connection. following functions allow configuration Time Slot Interchange Space Switch. Setting global mapping mode: tseSetMapMode This function used global mapping mode TSIs device. There valid modes: user-defined bypass. Bypass mode puts chip through mode timeslot rearrangement will occur. user-defined mode selected valid time slot will required. Prototype Inputs Outputs Returns INT4 tseSetMapMode (sTSE_HNDL deviceHandle, eTSE_TSIMODE mode) deviceHandle mode device handle (from tseAdd) mode None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_POLL_TIMEOUT Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Getting global mapping mode: tseGetMapMode This function used global mapping mode TSIs device. There valid modes: user-defined bypass. Bypass mode puts chip through mode timeslot rearrangement will occur. user-defined mode selected valid time slot will required. Prototype Inputs Outputs Returns INT4 tseGetMapMode (sTSE_HNDL deviceHandle, eTSE_TSIMODE *pmode) deviceHandle pmode device handle (from tseAdd) pointer mode Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Setting active connection page: tseSetPage This function sets specified page number active connection memory pages TSIs. total thirty-three pages numbers will changed; Space Switch (SSWT), sixteen Ingress Time Switch Elements (ITSE) sixteen Egress Time Switch Elements (ETSE). Prototype Inputs Outputs Returns INT4 tseSetPage (sTSE_HNDL deviceHandle, UINT2 pgNum) deviceHandle pgNum device handle (from tseAdd) active page number None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Getting active connection page: tseGetPage This function gets active connection memory page that stored driver's database. routine tseGetOnePage individual memory page number directly from device. Prototype Inputs Outputs Returns INT4 tseGetPage (sTSE_HNDL deviceHandle, UINT2 *ppgNum) deviceHandle ppgNum ppgNum device Handle (from tseAdd) location store page number pointer active page number Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Setting active connection page: tseSetOnePage This function sets individual connection memory page. following TSIs changed: Space Switch (SSWT), sixteen Ingress Time Switch Elements (ITSE) sixteen Egress Time Switch Elements (ETSE). Prototype Inputs INT4 tseSetOnePage (sTSE_HNDL deviceHandle, eTSE_BLOCK blockType, UINT1 blockNum, UINT2 pgNum) deviceHandle blockType blockNum pgNum device Handle (from tseAdd) block read page number from (SSWT, ITSE, ETSE) block within read page number from (ignored SSWT, otherwise must TSE_MAX_IE_BLOCKS) active page number Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Getting active connection page: tseGetOnePage This function gets individual connection memory from device. Prototype Inputs INT4 tseGetOnePage (sTSE_HNDL deviceHandle, eTSE_BLOCK blockType, UINT1 blockNum, UINT2 *ppgNum) deviceHandle blockType blockNum ppgNum device Handle (from tseAdd) block read page number from (SSWT, ITSE, ETSE) block within read page number from (ignored SSWT, otherwise must TSE_MAX_IE_BLOCKS) location store page number active page number Outputs Returns ppgNum Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Copying connection from page another tseCopyPage This function used synchronize (overwrite) given page using other connection page. Prototype Inputs INT4 tseCopyPage (sTSE_HNDL deviceHandle, UINT2 src, UINT2 dest) deviceHandle dest device handle (from tseAdd) source page number destination page number Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_INVALID_MODE TSE_ERR_POLL_TIMEOUT Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Mapping source destination slots(s): tseMapSlot This function used source space-time slot destination space-time slots. number destinations less than equal connection unicast; otherwise multicast. Prototype INT4 tseMapSlot (sTSE_HNDL deviceHandle, UINT2 pgNum, sTSE_SPTSLOT *psrcSlot, sTSE_SPTSLOT destSlot[], UINT4 numSlots) deviceHandle pgNum psrcSlot destSlot numSlots Inputs device handle (from tseAdd) connection page pointer source space-time slot array destination space-time slots number destination space-time slots Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_INVALID_MODE Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface TSE_ERR_CONNECT_EXIST TSE_ERR_POLL_TIMEOUT Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Removing established connection: tseRmSlot This function used remove connection between source space-time slot destination space-time slots. Note: connection removed from driver's database only. possible remove connection from device because does support concept "no-connection", output always connected input. Prototype INT4 tseRmSlot (sTSE_HNDL deviceHandle, UINT2 pgNum, sTSE_SPTSLOT *psrcSlot, sTSE_SPTSLOT destSlot[], UINT4 numSlots) deviceHandle pgNum psrcSlot destSlot numSlots Inputs device handle (from tseAdd) connection page pointer source space-time slot array destination space-time slots number destination space-timeslots Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_INVALID_MODE TSE_ERR_CONNECT_EXIST Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Clearing connections: tseClrSlot This function removes given mapping source space-time. Note: connection removed from driver's database only. possible remove connection from device because does support concept "no-connection", output always connected input. Prototype Inputs INT4 tseClrSlot (sTSE_HNDL deviceHandle, UINT2 pgNum, sTSE_SPTSLOT *psrcSlot) deviceHandle pgNum psrcSlot device handle (from tseAdd) connection page pointer source space-time slot Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_INVALID_MODE TSE_ERR_CONNECT_EXIST Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Getting source space-time Slot: tseGetSrcSlot This function used space-time slot mappings given specific destination space-time slot. number destinations less than equal connection unicast; otherwise multicast. Prototype Inputs INT4 tseGetSrcSlot (sTSE_HNDL deviceHandle, UINT2 pgNum, sTSE_SPTSLOT *psrcSlot, sTSE_SPTSLOT *pdestSlot) deviceHandle pgNum pdestSlot psrcSlot device handle (from tseAdd) connection page pointer destination space-time slots pointer source space-time slot Outputs Returns Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Getting destination space-time Slot: tseGetDestSlot This function used space-time slot mappings given specific source space-time slot. number destinations less than equal one, connection unicast; otherwise, multicast. Prototype INT4 tseGetDestSlot (sTSE_HNDL deviceHandle, UINT2 pgNum, sTSE_SPTSLOT *psrcSlot, sTSE_SPTSLOT destSlot[], UINT4 *pNumSlots) deviceHandle pgNum psrcSlot destSlot pNumSlots Inputs device handle (from tseAdd) connection page pointer source space-time slot array pointers destination space-time slots pointer number destination space- time slots Outputs Returns Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Verifying multicast connection: tseIsMulticast This function given source space-time slot discovers this connection multicast. Prototype Inputs INT4 tseIsMulticast (sTSE_HNDL deviceHandle, UINT2 pgNum, sTSE_SPTSLOT *psrcSlot) deviceHandle pgNum psrcSlot device handle (from tseAdd) connection page pointer source space-time slot Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Inserting Idle Data: tseInsIdleData This function given destination space-time slot inserts idle data into that time slot. Prototype INT4 tseInsIdleData (sTSE_HNDL deviceHandle, UINT2 pgNum, UINT2 blk, sTSE_SPTSLOT *pSlot, BOOLEAN insert, UINT2 idleData) deviceHandle pgNum pSlot insert idleData Inputs device handle (from tseAdd) connection page ITSE, ETSE pointer source space-time slot enable/disable insertion idle data inserted Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_POLL_TIMEOUT Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Port Alarm, Status Statistics device driver capability collect report both port device level status statistics. functions described this section collection reporting port level status statistics. device level information, section 5.6. Getting port cumulative statistics: tsePortGetStats This function retrieves port statistical counts that kept Device Data Block (DDB). Prototype Inputs Outputs Returns INT4 tsePortGetStats (sTSE_HNDL deviceHandle, UINT2 port, sTSE_CNTR_PORT *pCnts) deviceHandle port pCnts device handle (from tseAdd) port number pointer statistics Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_ARG TSE_ERR_SEMAPHORE TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Getting port status: tsePortGetStatus This function retrieves port status information directly from device. Prototype Inputs INT4 tsePortGetStatus (sTSE_HNDL deviceHandle, UINT2 port, sTSE_STATUS_PORT *pStatus) deviceHandle port device handle (from tseAdd) port number Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Outputs Returns pStatus pointer status Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Getting port delta statistics: tsePortGetDelta This function retrieves port delta statistical counts that kept Device Data Block (DDB). Prototype Inputs Outputs Returns INT4 tsePortGetDelta (sTSE_HNDL deviceHandle, UINT2 port, sTSE_CNTR_PORT *pCnts) deviceHandle port pCnts device handle (from tseAdd) port number pointer statistics Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_SEMAPHORE Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Getting port interrupt callback threshold: tsePortGetThresh This function retrieves port thresholds that kept Device Data Block (DDB). Prototype Inputs Outputs INT4 tsePortGetThresh(sTSE_HNDL deviceHandle, UINT2 port, sTSE_CNTR_PORT *pCnts) deviceHandle port pCnts device handle (from tseAdd) port number pointer thresholds Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Returns Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Setting port interrupt callback threshold: tsePortSetThresh This function configures port thresholds that kept Device Data Block (DDB). threshold controls often driver calls back application event. threshold means driver will call back once every such events. Prototype Inputs INT4 tsePortSetThresh(sTSE_HNDL deviceHandle, UINT2 port, sTSE_CNTR_PORT *pCnts) deviceHandle port pCnts device handle (from tseAdd) port number pointer thresholds Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Clear port statistics: tsePortClrStats This function clears cumulative delta counts port that kept Device Data Block (DDB). Prototype Inputs Outputs Returns INT4 tsePortClrStats(sTSE_HNDL deviceHandle, UINT2 port) deviceHandle port device handle (from tseAdd) port number None Success TSE_SUCCESS MODULE INIT Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_SEMAPHORE Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Device Alarm, Status Statistics device driver capability collect report both port device level status statistics. functions described this section collection reporting device level status statistics: port level information, section 5.5. Getting device cumulative statistics: tseDeviceGetStats This function retrieves device statistical counts that kept Device Data Block (DDB). Prototype Inputs Outputs Returns INT4 tseDeviceGetStats (sTSE_HNDL deviceHandle, sTSE_CNTR_DEVICE *pCnts) deviceHandle pCnts device handle (from tseAdd) pointer statistics Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_SEMAPHORE Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Getting device status: tseDeviceGetStatus This function retrieves device status information directly from device. Prototype Inputs Outputs Returns INT4 tseDeviceGetStatus (sTSE_HNDL deviceHandle, sTSE_STATUS_DEVICE *pStatus) deviceHandle pStatus device handle (from tseAdd) pointer status Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Getting device delta statistics: tseDeviceGetDelta This function retrieves device delta statistical counts that kept Device Data Block (DDB). Prototype Inputs Outputs Returns INT4 tseDeviceGetDelta (sTSE_HNDL deviceHandle, sTSE_CNTR_DEVICE *pCnts) deviceHandle pCnts device handle (from tseAdd) pointer statistics Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_SEMAPHORE Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Getting device interrupt callback threshold: tseDeviceGetThresh This function retrieves device thresholds that kept Device Data Block (DDB). Prototype Inputs Outputs Returns INT4 tseDeviceGetThresh(sTSE_HNDL deviceHandle, sTSE_CNTR_DEVICE *pCnts) deviceHandle pCnts device handle (from tseAdd) pointer thresholds Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Setting device interrupt callback threshold: tseDeviceSetThresh This function configures device thresholds that kept Device Data Block (DDB). threshold controls often driver calls back application event. threshold means driver will call back once every such events. Prototype Inputs Outputs Returns INT4 tseDeviceSetThresh(sTSE_HNDL deviceHandle, sTSE_CNTR_DEVICE *pCnts) deviceHandle pCnts device handle (from tseAdd) pointer thresholds None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Clear device statistics: tseDeviceClrStats This function clears device statistics that kept Device Data Block (DDB). Prototype Inputs Outputs Returns INT4 tseDeviceClrStats(sTSE_HNDL deviceHandle) deviceHandle device handle (from tseAdd) None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_SEMAPHORE Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Device Configuration device several device level modes. following APIs allow these modes configured. Setting device configuration: tseDeviceSetConfig This function allows configuration device dynamically changed. Prototype Inputs Outputs Returns INT4 tseDeviceSetConfig (sTSE_HNDL sTSE_CFG_DEVICE *pDevConfig) deviceHandle pDevConfig device handle (from tseAdd) pointer device configuration None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Getting device configuration: tseDeviceGetConfig This function allows configuration 8b/10b device. Prototype Inputs Outputs Returns INT4 tseDeviceGetConfig (sTSE_HNDL deviceHandle, sTSE_CFG_DEVICE *pDevConfig) deviceHandle pDevConfig device handle (from tseAdd) pointer device configuration Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_ACTIVE TSE_INACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Port Configuration device ports each direction (ingress egress). following APIs allow these ports configured. Setting port configuration: tsePortSetConfig This function allows configuration 8b/10b port. Prototype Inputs INT4 tsePortSetConfig (sTSE_HNDL deviceHandle, UINT2 port, sTSE_CFG_PORT *pconfig) deviceHandle port pconfig device handle (from tseAdd) port number pointer port configuration Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Getting port configuration: tsePortGetConfig This function allows configuration 8b/10b port. Prototype Inputs Outputs Returns INT4 tsePortGetConfig (sTSE_HNDL deviceHandle, UINT2 port, sTSE_CFG_PORT *pconfig) deviceHandle port pconfig device handle (from tseAdd) port number pointer port configuration Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States TSE_ACTIVE TSE_INACTIVE Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Side Effects None Setting Masking mode: tsePortSetMaskMode This function defines three modes filtering characters from time-space-time switch core. TSE_J0MASK_ALLOW mode will allow good J0's into switch core available revisions device. also default mode device when brought reset. TSE_J0MASK_DENY mode will allow good characters into switch. This mode only available revision later, devices. TSE_J0MASK_DENY_REORDER mode will allow good characters into switch core J0/Z0 bytes re-ordered ITSE/ETSE. This mode only available revision later, devices. Prototype Inputs INT4 tsePortSetMaskMode (sTSE_HNDL deviceHandle, UINT2 portSet, eTSE_MASK_MODE mode) deviceHandle portSet mode device Handle (from tseAdd) first port number ports masking mode (Allow, Deny, Deny_Reorder) Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_DEV_VERSION Valid States Side Effects Notes TSE_INACTIVE TSE_ACTIVE None Ports only into these modes time because ITSE/ETSE applies masking configuration globally ports feeding them. Depending mode, following bits will cleared: J0MASK R8FA ports IJ0RORDR ITSE block EJ0RORDR ETSE block J0INS T8DE ports Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface 8b/10b Decoder/Encoder device driver capability force certain errors 8b/10b ports. following functions intended give access these features. Forcing port alignment: tseForceOutOfChar This function allows forcing character alignment 8b/10b port. Prototype Inputs INT4 tseForceOutOfChar (sTSE_HNDL deviceHandle, UINT2 port, UINT2 force) deviceHandle port force device handle (from tseAdd) port number force Character with 0->1 transistion R8FA_FOCA force, write R8FA_FOCA Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Forcing port alignment: tseForceOutOfFrame This function allows forcing frame alignment 8b/10b port. Prototype Inputs INT4 tseForceOutOfFrame(sTSE_HNDL deviceHandle, UINT2 port, UINT2 force) deviceHandle port force device handle (from tseAdd) port number force Frame with 0->1 transistion R8FA_FOFA force, write R8FA_FOFA Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Forcing port AIS: tseForceAIS This function allows forcing frame Alarm Indication Signal. documented Engineering document PMC-1990713, will only inserted corresponding R8FA block out-of-frame state. Prototype Inputs INT4 tseForceAIS(sTSE_HNDL deviceHandle, UINT2 port, UINT2 force) deviceHandle port force device handle (from tseAdd) port number force Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Forcing port LCV: tseForceLcv This function allows forcing line character violation 8b/10b port. Prototype Inputs INT4 tseForceLcv(sTSE_HNDL deviceHandle, UINT2 port, UINT2 force) deviceHandle port force device handle (from tseAdd) port number force Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_INACTIVE TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface 5.10 Interrupt Service Functions This Section describes interrupt-service functions that perform following tasks: Set, clear interrupt enable mask Read process interrupt-status registers Poll process interrupt-status registers page explanation interrupt servicing architecture. Configuring Processing: tseISRConfig This function allows user configure processing handled: polling (TSE_POLL_MODE) interrupt driven (TSE_ISR_MODE). polling selected, user responsible periodically calling devicePoll collect exception data from Device. Prototype Inputs INT4 tseISRConfig(sTSE_HNDL deviceHandle, UINT2 mode) deviceHandle mode device handle (from tseAdd) mode operation (TSE_ISR_MODE TSE_POLL_MODE) Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_SEMAPHORE Valid States Side Effects TSE_PRESENT, TSE_ACTIVE, TSE_INACTIVE None Getting Interrupt Status Mask: tseGetMask This function returns contents interrupt mask registers device. Prototype Inputs Outputs Returns INT4 tseGetMask(sTSE_HNDL deviceHandle, sTSE_MASK *pmask) deviceHandle pmask device handle (from tseAdd) (pointer updated mask structure Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface TSE_ERR_INVALID_ARG Valid States Side Effects TSE_ACTIVE, TSE_INACTIVE None Setting Interrupt Enable Mask: tseSetMask This function sets contents interrupt mask registers device. bits that passed structure associated registers. bits that left device. Prototype Inputs Outputs Returns INT4 tseSetMask(sTSE_HNDL deviceHandle, sTSE_MASK *pmask) deviceHandle pmask device handle (from tseAdd) (pointer mask structure None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Valid States Side Effects TSE_ACTIVE, TSE_INACTIVE change operation ISR/DPR Clearing Interrupt Enable Mask: tseClearMask This function clears individual interrupt bits registers device. bits that passed structure cleared associated registers. bits that left device. Prototype Inputs Outputs Returns INT4 tseClearMask(sTSE_HNDL deviceHandle, sTSE_MASK *pmask) deviceHandle pmask device handle (from tseAdd) (pointer mask structure None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Valid States Side Effects TSE_ACTIVE, TSE_INACTIVE change operation ISR/DPR Polling Interrupt Status Registers: tsePoll This function commands driver poll interrupt registers Device. call will fail unless device initialized (via tseInit) configured (via tseISRConfig) into polling mode. Prototype Inputs Outputs Returns INT4 tsePoll(sTSE_HNDL deviceHandle) deviceHandle device handle (from tseAdd) None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_INVALID_ARG TSE_ERR_MODE TSE_FAILURE Valid States Side Effects TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Interrupt-Service Routine: tseISR This function reads state interrupt registers stores them ISV. Performs whatever functions needed clear interrupt, from simply clearing bits complex functions. This routine called application code from within sysTSEISRHandler. mode configured, interrupts that were detected disabled returned application. Note that application then responsible sending this buffer task. polling mode selected, returned application called directly with ISV. Note: When designing these functions, keep mind possible issues that arise when multiple devices present some polling mode some mode. Prototype Inputs Outputs Returns Valid States Side Effects void tseISR(sTSE_HNDL deviceHandle) deviceHandle device handle (from tseAdd) None (pointer buffer send DPR) NULL (pointer) TSE_ACTIVE None Deferred-Processing Routine: tseDPR This function acts data contained passed ISV, allocates more buffers (via sysTSEDPVBufferGet) invokes more callbacks defined enabled). This routine called application code, within sysTSEDPRTask. Note that callbacks responsible releasing passed DPV. recommended that this done soon possible avoid running buffers. Note: When designing these functions, keep mind possible issues that arise when multiple devices present some polling mode some mode. Prototype Inputs Outputs Returns Valid States void tseDPR(void *pivec) pivec (pointer buffer None None TSE_ACTIVE Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Side Effects None 5.11 Device Diagnostics Testing Register Accesses: tseTestReg This function verifies hardware access device registers writing reading back values. original register contents restored after test. Prototype INT4 tseTestReg(sTSE_HNDL deviceHandle, UINT2 pErrorRegNum, UINT2 pErrorWrite, UINT2 pErrorRead, UINT2 pErrorMask) deviceHandle pErrorRegNum pErrorWrite pErrorRead pErrorMask Inputs device handle (from tseAdd) pointer register number test failed pointer value written pointer value read pointer mask applied test value Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_FAILRAMTEST Valid States Side Effects TSE_PRESENT, TSE_INACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Testing Accesses: tseTestRAM This function performs test read/write registers inside device's memory space verify address data connections between device. Prototype INT4 tseTestRAM(sTSE_HNDL deviceHandle, UINT2 iaddrReg, UINT1 timeSlotStart, UINT1 timeSlotEnd, UINT1 bpStart, UINT1 bpEnd) deviceHandle iaddrReg timeSlotStart timeSlotEnd bpStart bpEnd Inputs device handle (from tseAdd) indirect address register time slot start test (1-12) time slot test (1-12) block port start test block port test Outputs Returns None Success TSE_SUCCESS Failure TSE_ERR_MODULE_NOT_INIT TSE_ERR_INVALID_DEV TSE_ERR_INVALID_STATE TSE_ERR_FAILRAMTEST Valid States Side Effects TSE_PRESENT, TSE_INACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface 5.12 Callback Functions driver capability call back functions within user code when certain events occur. These events their associated callback routine declarations detailed below. There user code action that required driver these callbacks user free implement these callbacks manner else they deleted from driver. names given callback functions given examples only. addresses callback functions invoked tseDPR function passed during tseInit call (inside DIV). However user shall exact same prototype. application left responsible releasing passed soon possible avoid running buffers) calling sysTSEDPVBufferRtn either within callback function later inside application code. Once number events exceeds specified threshold DIV) callback application made. thresholds changed dynamically calling tseDeviceSetThresh() tsePortSetThresh(). Setting threshold count means that callback will occur every such event. Calling Back Application device level events: cbackTSEDevice This callback function provided user used report significant device level section events back application. This function should non-blocking. Typically, callback routine sends message another task with event identifier other context information. task that receives this message then process this information according system requirements. NOTE: callback function's addresses passed driver doing tseInit call. address callback function passed NULL initialization, callback will made. Prototype Inputs Outputs Returns Valid States Side Effects void cbackTSEDevice(sTSE_USR_CTXT usrCtxt, void *pdpv) usrCtxt pdpv user context (from tseAdd) (pointer that describes this event None None TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Application Programming Interface Calling Back Application port level events: cbackTSEPort This callback function provided user used report significant port level section events back application. This function should non-blocking. Typically, callback routine sends message another task with event identifier other context information. task that receives this message then process this information according system requirements. NOTE: callback function's addresses passed driver doing tseInit call. address callback function passed NULL initialization, callback will made. Prototype Inputs Outputs Returns Valid States Side Effects void cbackTSEPort(sTSE_USR_CTXT usrCtxt, void *pdpv) usrCtxt pdpv user context (from tseAdd) (pointer that describes this event None None TSE_ACTIVE None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Hardware Interface HARDWARE INTERFACE driver interfaces directly with user's hardware. this section, listing each point interface shown, along with declaration specific porting instructions. responsibility user connect these requirements into hardware, either defining macro writing function each item listed. Care should taken when matching parameters return values. Device Reading from Device Register: sysTSERead sysTseRead provides most basic kind hardware access; reads contents specific register location. This macro should defined user according target system's addressing logic. There need error recovery this function. Format Prototype Inputs Outputs Returns #define sysTSERead(base, offset) UINT2 sysTSERead(UINT2 *base, UINT2 offset) base offset base address device offset register from base address None value read from addressed register location Writing Device Register: sysTSEWrite sysTseWrite provides most basic kind hardware access; writes supplied value specific register location. This macro should defined user according target system's addressing logic. There need error recovery this function. Format Prototype Inputs #define sysTSEWrite(base, offset, value) void sysTSEWrite(UINT2 *base, UINT2 offset, UINT2 value) base offset data base address device offset register from base address data written Outputs Returns None None Proprietary Confidential PMC-Sierra, Inc., Customers' Internal Document PMC-2001402, Issue (PM5372) Driver Manual Hardware Interface System-Specific Interrupt Servicing porting routine between platforms rather difficult task. There many different implementations these hardware level routines. this driver, user responsible installing interrupt handler (sysTSEISRHandler) interrupt vector table system processor. This handler shall call tseISR each device that interrupt servicing enabled, perform related housekeeping required each device. During execution function tseModuleStart tseModuleStop driver informs application that time install uninstall this shell sysTSEISRHandlerInstall sysTSEISRHandlerRemove, which needs supplied user. Note: device initialized with disabled. that mode, user should periodically invoke provided `polling' routine (tsePoll) that turn calls tseISR. Installing Handler: sysTSEISRHandlerInstall This routine installs user-supplied Interrupt-Service Routine (ISR), sysTSEISRHandler into proce Other recent searchesSTR750F - STR750F STR750F Datasheet SN74LVC1G374 - SN74LVC1G374 SN74LVC1G374 Datasheet SiI9261 - SiI9261 SiI9261 Datasheet KSZ8692MPB - KSZ8692MPB KSZ8692MPB Datasheet KSZ8692XPB - KSZ8692XPB KSZ8692XPB Datasheet ELC-770-25 - ELC-770-25 ELC-770-25 Datasheet DS14C232A - DS14C232A DS14C232A Datasheet CV9790 - CV9790 CV9790 Datasheet BFCN-7900+ - BFCN-7900+ BFCN-7900+ Datasheet
Privacy Policy | Disclaimer |