PMC-Sierra PM5358 User Manual

PM5358
S/UNI-4X622
PM5358 S/UNI-4x622 Driver Manual
DRIVER MANUAL
PROPRIETARY AND CONFIDENTIAL
PRELIMINARY
Proprietary and Confidential to PMC-Sierra, Inc. Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual

ABOUT THIS MA NUA L A ND S/UNI-4X622

This manual describes the S/UNI-4x622 (PM5358) device driver. It describes the driver’s functions, data structures, and architecture. This manual focuses on the driver’s interfaces and their relationship to your application, real-time operating system, and to the device. It also describes in general terms how to modify and port the driver to your software and hardware platform.
Audience
This manual was written for people who need to:
Evaluate and test the S/UNI-4x622 devices
Modify and add to the S/UNI-4x622 driver’s functions
Port the S/UNI-4x622 driver to a particular platform.
References
For more information about the S/UNI-4x622 driver, see the driver’s release notes. For more information about the S/UNI-4x622 device, see the documents listed in Table 1 and any related errata documents.
Table 1: Related Documents
Document Number Document Name
PMC-1991044 Saturn User Network Interface (4x622) Telecom Standard Product
Data Sheet
Note: Ensure that you use the document that PMC-Sierra issued for your version of the device and driver.
Revision History
Issue No. Issue Date Details of Change
Issue 1 April, 2001 Document created
Proprietary and Confidential to PMC-Sierra, Inc. 2 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Legal Issues
None of the information contained in this document constitutes an express or implied warranty by PMC-Sierra, Inc. as to the sufficiency, fitness or suitability for a particular purpose of any such information or the fitness, or suitability for a particular purpose, merchantability, performance, compatibility with other parts or systems, of any of the products of PMC-Sierra, Inc., or any portion thereof, referred to in this document. PMC-Sierra, Inc. expressly disclaims all representations and warranties of any kind regarding the contents or use of the information, including, but not limited to, express and implied warranties of accuracy, completeness, merchantability, fitness for a particular use, or non-infringement.
In no event will PMC-Sierra, Inc. be liable for any direct, indirect, special, incidental or consequential damages, including, but not limited to, lost profits, lost business or lost data resulting from any use of or reliance upon the information, whether or not PMC-Sierra, Inc. has been advised of the possibility of such damage.
The information is proprietary and confidential to PMC-Sierra, Inc., and for its customers’ internal use. In any event, no part of this document may be reproduced in any form without the express written consent of PMC-Sierra, Inc.
© 2001 PMC-Sierra, Inc.
PMC-2010419 (P1), ref PMC-2000459 (P2)
Contacting PMC-Sierra
PMC-Sierra 8555 Baxter Place Burnaby, BC Canada V5A 4V7
Tel: (604) 415-6000 Fax: (604) 415-6200
Document Information: document@pmc-sierra.com Corporate Information: info@pmc-sierra.com Technical Support: apps@pmc-sierra.com Web Site: http://www.pmc-sierra.com
Proprietary and Confidential to PMC-Sierra, Inc. 3 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
TABL E OF CONTENTS
About this Manual and S/UNI-4x622...................................................................................2
Audience....................................................................................................................2
References ................................................................................................................2
Revision History.........................................................................................................2
Legal Issues...............................................................................................................3
Contacting PMC-Sierra..............................................................................................3
Table of Contents.................................................................................................................4
List of Figures....................................................................................................................10
List of Tables......................................................................................................................11
1 Introduction .................................................................................................................13
2 Software Architecture..................................................................................................14
2.1 Driver External Interfaces ...........................................................................................14
Application Programming Interface .........................................................................14
Real-Time OS Interface...........................................................................................15
Hardware Interface..................................................................................................15
2.2 Main Components.......................................................................................................15
Module Data-Block and Device(s) Data-Blocks ......................................................16
Interrupt-Service Routine.........................................................................................17
Deferred-Processing Routine ..................................................................................17
Alarms, Status and Counts......................................................................................17
Section Overhead....................................................................................................18
Line Overhead .........................................................................................................18
Path Overhead.........................................................................................................18
Payload Processor...................................................................................................18
Interface Configuration ............................................................................................18
APS Configuration ...................................................................................................18
2.3 Software States...........................................................................................................19
Module States..........................................................................................................20
Device States...........................................................................................................20
2.4 Processing Flows........................................................................................................21
Module Management............................................................................................... 21
Device Management................................................................................................21
2.5 Interrupt Servicing.......................................................................................................22
Calling suni4x622ISR ..............................................................................................23
Calling suni4x622DPR.............................................................................................24
Calling suni4x622Poll ..............................................................................................24
3 Data Structures........................................................................................................... 26
3.1 Constants....................................................................................................................26
Proprietary and Confidential to PMC-Sierra, Inc. 4 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
3.2 Structures Passed by the Application .........................................................................26
Module Initialization Vector: MIV .............................................................................26
Device Initialization Vector: DIV...............................................................................27
ISR Enable/Disable Mask........................................................................................28
3.3 Structures in the Driver’s Allocated Memory...............................................................33
Module Data Block: MDB.........................................................................................33
Device Data Block: DDB..........................................................................................34
3.4 Structures Passed through RTOS Buffers..................................................................50
Interrupt-Service Vector: ISV...................................................................................50
Deferred-Processing Vector: DPV...........................................................................50
3.5 Global Variable............................................................................................................51
4 Application Programming Interface.............................................................................52
4.1 Module Management ..................................................................................................52
Opening the Driver Module: suni4x622ModuleOpen ..............................................52
Closing the Driver Module: suni4x622ModuleClose................................................52
Starting the Driver Module: suni4x622ModuleStart.................................................53
Stopping the Driver Module: suni4x622ModuleStop................................................53
4.2 Profile Management....................................................................................................54
Adding an Initialization Profile: suni4x622AddInitProfile .........................................54
Getting an Initialization Profile: suni4x622GetInitProfile..........................................54
Deleting an Initialization Profile: suni4x622DeleteInitProfile ...................................55
4.3 Device Management...................................................................................................55
Adding a Device: suni4x622Add..............................................................................55
Deleting a Device: suni4x622Delete........................................................................56
Initializing a Device: suni4x622Init...........................................................................56
Updating the Configuration of a Device: suni4x622Update.....................................57
Resetting a Device: suni4x622Reset.......................................................................57
Activating a Device: suni4x622Activate...................................................................58
De-Activating a Device: suni4x622DeActivate ........................................................58
4.4 Device Read and Write...............................................................................................59
Reading from Device Registers: suni4x622Read....................................................59
Writing to Device Registers: suni4x622Write ..........................................................59
Reading from a block of Device Registers: suni4x622ReadBlock ..........................60
Writing to a Block of Device Registers: suni4x622WriteBlock.................................60
4.5 Section Overhead (SOH)............................................................................................61
Writing the J0 Byte: suni4x622SOHWriteJ0............................................................61
Reading and Setting the Section Trace Message :
suni4x622SOHTraceMsg..................................................................................62
Forcing A1 Error : suni4x622SOHForceA1..............................................................62
Forcing B1 Error: suni4x622SOHForceB1 .............................................................. 63
Forcing OOF: suni4x622SOHForceOOF.................................................................63
Forcing LOS: suni4x622SOHForceLOS..................................................................64
4.6 Line Overhead (LOH)..................................................................................................64
Configuring SF Error Monitor: suni4x622LOHSFCfg ..............................................64
Configuring SD Error Monitor: suni4x622LOH SDCf g..............................................65
Proprietary and Confidential to PMC-Sierra, Inc. 5 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Writing the K1K2 Byte: suni4x622LOHWriteK1K2 ..................................................65
Reading the K1K2 Byte: suni4x622LOHReadK1K2................................................66
Writing the S1 Byte: suni4x622LOHWriteS1 ...........................................................66
Reading the S1 Byte: suni4x622LOHReadS1.........................................................67
Forcing Line AIS: suni4x622LOHForceAIS .............................................................67
Forcing B2 Error: suni4x622LOHForceB2...............................................................67
Forcing Line RDI: suni4x622LOHForceRDI ............................................................68
4.7 Path Overhead (RPOH, TPOH)..................................................................................68
Retrieving and Setting the Path Trace Messages: suni4x622POHTraceMsg.........69
Writing the J1 Byte: suni4x622TPOHWriteJ1..........................................................69
Writing the C2 Byte: suni4x622TPOHWriteC2 ........................................................70
Writing the New Data Flag Bits: suni4x622TPOHWriteNDF ...................................70
Writing SS Bits: suni4x622TPOHWriteSS ...............................................................71
Inserting a Pointer Value: suni4x622TPOHInsertTxPtr...........................................71
Force Path BIP-8 Errors: suni4x622TPOHForceB3................................................71
Forcing Pointer Justification: suni4x622TPOHForcePJ ..........................................72
Forcing Path RDI: suni4x622TPOHForceRDI.........................................................72
Forcing Path ERDI: suni4x622TPOHForceERDI ....................................................73
Forcing Path ARDI: suni4x622TPOHForceARDI ....................................................73
Forcing Path AIS: suni4x622TPOHForceAIS..........................................................74
4.8 Payload Processor......................................................................................................74
Setting Payload configuration parameters: suni4x622PyldCfg ...............................74
4.9 Interface Configuration................................................................................................75
Resetting the Receive/Transmit FIFO: suni4x622FIFOReset.................................75
Configuring the Receive and Transmit FIFO: suni4x622FIFOCfg...........................75
Configuring the System interfac e: suni4x 622 SysIntfCfg.........................................76
Configuring the Device-Wide Line interface: suni4x622IntfLineCfg........................76
Resetting the TFCLK DLL: suni4x622IntfSysResetTDLL........................................77
Resetting the RFCLK DLL: suni4x622IntfSysResetRDLL.......................................77
4.10 Automatic Protection Configuration.........................................................................78
Configuring APS Working/Protect Mate: suni4x622APSCfg ...................................78
Configuring the Source Channel for the Given Channel Receive Path:
suni4x622RPCfg ...............................................................................................78
Configuring the Source Channel for the Given Channel Transmit Path:
suni4x622TPCfg................................................................................................79
Enable or disable the channel APS cross connect: suni4x622APSXcnntCfg .........79
Resetting APS Receive Link: suni4x622APSResetRxLink......................................79
Resetting APS Transmit Link: suni4x622APSResetTxLink .....................................80
4.11 Interrupt Service Functions......................................................................................80
Configuring ISR Processing: suni4x 6 22I SRCo nf ig .................................................81
Getting Device Interrupt Enable Mask: suni4x622GetMask....................................81
Setting Device Interrupt Enable Mask: suni4x622SetMask ....................................81
Clearing Device Interrupt Enable Mask: suni4x622ClrMask...................................82
Getting SOH Interrupt Enable Mask: suni4x622GetMaskSOH ...............................82
Setting SOH Interrupt Enable Mask: suni4x622SetMaskSOH................................83
Clearing SOH Interrupt Enable Mask: suni4x622ClrMaskSOH ..............................83
Getting LOH Interrupt Enable Mask: suni4x622GetMaskLOH................................84
Setting LOH Interrupt Enable Mask: suni4x622SetMaskLOH.................................84
Clearing LOH Interrupt Enable Mask: suni4x622ClrMaskLOH ...............................85
Getting RPOH Interrupt Enable Mask: suni4x622GetMaskRPOH..........................85
Setting RPOH Interrupt Enable Mask: suni4x622SetMaskRPOH...........................86
Proprietary and Confidential to PMC-Sierra, Inc. 6 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Clearing RPOH Interrupt Enable Mask: suni4x622ClrMaskRPOH .........................86
Getting PYLD Interrupt Enable Mask: suni4x622GetMaskPYLD............................87
Setting PYLD Interrupt Enable Mask: suni4x622SetMaskPYLD.............................87
Clearing PYLD Interrupt Enable Mask: suni4x622ClrMaskPYLD ...........................88
Getting FIFO Interrupt Enable Mask: suni4x622GetMaskFIFO ..............................88
Setting FIFO Interrupt Enable Mask: suni4x622SetMaskFIFO...............................89
Clearing FIFO Interrupt Enable Mask: suni4x622ClrMaskFIFO..............................89
Getting Line Interface Interrupt Enable Mask: suni4x622GetMaskIntfLine.............90
Setting Line Interface Interrupt Enable Mask: suni4x622SetMaskIntfLine..............90
Clearing Line Interface Interrupt Enable Mask: suni4x622ClrMaskIntfLine ............91
Getting System Interface Interrupt Enable Mask: suni4x622GetMaskSysIntf.........91
Setting System Interface Interrupt Enable Mask: suni4x622SetMaskSysIntf .........92
Clearing System Interface Interrupt Enable Mask:
suni4x622ClrMaskSysIntf..................................................................................92
Getting APS Interrupt Enable Mask: suni4x622GetMaskAPS.................................93
Setting APS Interrupt Enable Mask: suni4x622SetMask APS .................................93
Clearing APS Interrupt Enable Mask: suni4x622ClrMaskAPS................................94
Polling the Interrupt Status Registers: suni4x622Poll..............................................94
Interrupt-Service Routine: suni4x622ISR................................................................95
Deferred-Processing Routine: suni4x6 22D PR ........................................................95
4.12 Alarm, Status and Counts Functions.......................................................................96
Getting the Device Status: suni4x622GetStatusChan.............................................96
Getting the Device Status: suni4x622GetStatusSOH..............................................96
Getting the Device Status: suni4x622GetStatusLOH ..............................................97
Getting the Device Status: suni4x622GetStatusRPOH ...........................................97
Getting the Device Status: suni4x622GetStatusIntfLine..........................................98
Getting the Device Status: suni4x622GetStatusPYLD ............................................98
Getting the Device Counts: suni4x622GetCountsChan ..........................................99
Getting the Device Counts: suni4x622GetCountsSOH...........................................99
Getting the Device Counts: suni4x622GetCountsLOH .........................................100
Getting the Device Counts: suni4x622GetCountsRPOH ......................................100
Getting the Device Counts: suni4x622GetCountsPYLD .......................................101
4.13 Device Diagnostics................................................................................................101
Testing Register Accesses: suni4x622DiagTestReg.............................................101
Enabling Line Loopbacks: suni4x622DiagLineLoop..............................................102
Enabling Path Diagnostic Loopbacks: suni4x622DiagPathLoop ..........................102
Enabling Data Diagnostic Loopbacks: suni4x622DiagDataLoop ..........................102
Enabling Parallel Diagnostics Loopbacks: suni4x622DiagParaLoop....................103
Enabling Serial Diagnostics Loopbacks: suni4x622DiagSerialLoop.....................103
4.14 Callback Functions ................................................................................................104
Notifying the Application of SOH Events: cbackSuni4x622SOH...........................104
Notifying the Application of LOH Events: cbackSuni4x622LOH............................105
Notifying the Application of RPOH Events: cbackSuni4x622RPOH......................105
Notifying the Application of PYLD Events: cbackSuni4x622PYLD........................106
Notifying the Application of SYSINTF Events: cbackSuni4x622SysIntf ................106
Notifying the Application of FIFO Events: cbackSuni4x622FIFO ..........................107
5 Hardware Interface ...................................................................................................108
5.1 Device I/O .................................................................................................................108
Reading from a Device Register: sysSuni4x622Read ..........................................108
Writing to a Device Register: sysSuni4x622Write .................................................108
Polling a Bit: sysSuni4x622PollBit.........................................................................109
Proprietary and Confidential to PMC-Sierra, Inc. 7 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
5.2 System-Specific Interrupt Servicing..........................................................................109
Installing the ISR Handler: sysSuni4x622ISRHandlerInstall .................................109
ISR Handler: sysSuni4x622ISRHandler................................................................110
DPR Task: sysSuni4x622DPRTask.......................................................................1 10
Removing the ISR Handler: sysSuni4x622ISR Han dl erRemove........................... 111
6 RTOS Interface.........................................................................................................112
6.1 Memory Allocation / De-Allocation............................................................................112
Allocating Memory: sysSuni4x622MemAlloc.........................................................112
Initialize Memory: sysSuni4x 622 MemSet ..............................................................112
Copy Memory: sysSuni4x622MemCpy .................................................................112
Freeing Memory: sysSuni4x622MemFree ............................................................113
6.2 Buffer Management ..................................................................................................113
Starting Buffer Management: sysSuni4x622BufferStart ........................................113
Getting an ISV Buffer: sysSuni4x622ISVBufferGet...............................................114
Returning an ISV Buffer: sysSuni4x622ISVBufferRtn...........................................114
Getting a DPV Buffer: sysSuni4x622DPVBufferGet..............................................114
Returning a DPV Buffer: sysSuni4x622DPVBufferRtn..........................................115
Stopping Buffer Management: sysSuni4x622BufferStop.......................................115
6.3 Timers.......................................................................................................................115
Sleeping a Task: sysSuni4x622TimerSleep...........................................................115
6.4 Preemption................................................................................................................116
Disabling Preemption: s ysSuni4x 622 PreemptDisable ..........................................116
Re-Enabling Preemption: sysSuni4x622PreemptEnable......................................116
7 Porting the S/UNI-4x622 Driver ................................................................................117
7.1 Driver Source Files ...................................................................................................117
7.2 Driver Porting Procedures.........................................................................................117
Procedure 1: Porting Driver OS Extensions ..........................................................118
Procedure 2: Porting Drivers to Hardware Platforms ............................................119
Procedure 3: Porting Driver Application-Specific Elements...................................119
Procedure 4: Building the Driver............................................................................120
Appendix A: Coding Conventions....................................................................................121
V ariable T ype Definitions.......................................................................................121
Naming Conventions .............................................................................................121
Macros...................................................................................................................122
Constants...............................................................................................................122
Structures...............................................................................................................122
Functions ...............................................................................................................123
Variables................................................................................................................123
File Organization....................................................................................................123
Appendix B: Error Codes.................................................................................................125
Appendix C: S/UNI-4x622 Events...................................................................................126
Section Overhead Events (SOH)...........................................................................126
Line Overhead Events (LOH) ................................................................................126
Path Overhead Events (RPOH).............................................................................127
Proprietary and Confidential to PMC-Sierra, Inc. 8 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Payload Events (PYLD).........................................................................................128
Line Interface Events (INTF_LINE) .......................................................................128
System Interface Events (SYS_INTF)...................................................................128
Automatic Protection Switchin g Events (APS) ......................................................129
List of Terms ....................................................................................................................130
Acronyms.........................................................................................................................131
Index................................................................................................................................132
Proprietary and Confidential to PMC-Sierra, Inc. 9 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual

LIST OF FIGURES

Figure 1: Driver External Interfaces...................................................................................14
Figure 2: Driver Architecture .............................................................................................16
Figure 3: Driver Software States .......................................................................................19
Figure 4: Module Management Flow Diagram..................................................................21
Figure 5: Device Management Flow Diagram...................................................................22
Figure 6: Interrupt Service Mode.......................................................................................23
Figure 7: Polling Service Model .........................................................................................25
Proprietary and Confidential to PMC-Sierra, Inc. 10 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual

LIST OF TABLES

Table 1: S/UNI-4x622 Module Initialization Vector: sSUNI4x622_MIV.............................27
Table 2: S/UNI-4x622 Device Initializa tion Vec tor: sSUNI4x 6 22_ DIV..............................27
Table 3: S/UNI-4x622 Section Overhead (SOH) ISR Mask:
sSUNI4x622_MASK_ISR_SOH................................................................................29
Table 4: S/UNI-4x622 Line Overhead (LOH) ISR Mask:
sSUNI4x622_MASK_ISR_LOH.................................................................................29
Table 5: S/UNI-4x622 Receive Path Overhead (RPOH) ISR Mask:
sSUNI4x622_MASK__ISR_RPOH............................................................................30
Table 6: S/UNI-4x622 ISR Mask: sSUNI4x622_MASK_ISR_PYLD.................................31
Table 7: S/UNI-4x622 ISR Mask: sSUNI4x622_MASK_ISR_FIFO ..................................31
Table 8: S/UNI-4x622 Module Data Block: sSUNI4x622_MDB........................................33
Table 9: S/UNI-4x622 Device Data Block: sSUNI4x622_DDB .........................................34
Table 10: S/UNI-4x622 Input/Output Configuration: sSUNI4x622_CFG_GLOBAL..........36
Table 11: S/UNI-4x622 Channel Configuration: sSUNI4x622_CFG_CHAN.....................36
Table 12: S/UNI-4x622 Section Overhead Configuration:
sSUNI4x622_CFG_SOH...........................................................................................37
Table 13: S/UNI-4x622 Line Overhead Configuration: sSUNI4x622_CFG_LOH.............37
Table 14: S/UNI-4x622 Receive Path Overhead Configuration:
sSUNI4x622_CFG_RPOH ........................................................................................38
Table 15: S/UNI-4x622 Transmit Path Overhead Configuration:
sSUNI4x622_CFG_TPOH.........................................................................................38
Table 16: S/UNI-4x622 Payload Processor: sSUNI4x622_CFG_PYLD...........................40
Table 17: S/UNI-4x622 FIFO Configuration: sSUNI4x622_CFG_FIFO............................41
Table 18: S/UNI-4x622 Clock Interface Configuration: sSUNI4x622_CFG_CLK.............41
Table 19: S/UNI-4x622 Clock Interface Configuration:
sSUNI4x622_CFG_RALRM......................................................................................42
Table 20: S/UNI-4x622 Line Interface Configuration:
sSUNI4x622_CFG_INTF_LINE.................................................................................42
Table 21: S/UNI-4x622 Global System Interface Configuration:
sSUNI4x622_CFG_INTF_SYS_GLOBAL.................................................................43
Proprietary and Confidential to PMC-Sierra, Inc. 11 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Table 22: S/UNI-4x622 Global Line Interface Configuration:
sSUNI4x622_CFG_INTF_LINE_GLOBAL................................................................44
Table 23: S/UNI-4x622 Signal Failure Configuration: sSUNI4x622_CFG_SF..................44
Table 24: S/UNI-4x622 Signal Defect Configuration: sSUNI4x622_CFG_SD..................44
Table 25: S/UNI-4x622 Channel Status Block: sSUNI4x622_STATUS_CHAN ...............45
Table 26: S/UNI-4x622 Section Overhead Status: sSUNI4x622_STATUS_SOH............45
Table 27: S/UNI-4x622 Line Overhead Status: sSUNI4x622_STATUS_LOH..................46
Table 28: S/UNI-4x622 Receive Path Overhead Processor Status:
sSUNI4x622_STATUS_RPOH..................................................................................46
Table 29: S/UNI-4x622 Clock Status: sSUNI4x622_STATUS_CLK.................................47
Table 30: S/UNI-4x622 Line Interface Status: sSUNI4x622_STATUS_INTF_LINE.........48
Table 31: S/UNI-4x622 Counters: sSUNI4x622_CNTR_CHAN .......................................48
Table 32: S/UNI-4x622 Section Overhead (SOH) Counters:
sSUNI4x622_CNTR_SOH ........................................................................................48
Table 33: S/UNI-4x622 Line Overhead (LOH) Counters:
sSUNI4x622_CNTR_LOH.........................................................................................49
Table 34: S/UNI-4x622 Receive Path Overhead (RPOH) Counters:
sSUNI4x622_CNTR_RPOH......................................................................................49
Table 35: S/UNI-4x622 Payload Processor Counters: sSUNI4x622_CNTR_PYLD.........49
Table 36: S/UNI-4x622 Interrupt-Service Vector: sSUNI4x622_ISV ................................50
Table 37: S/UNI-4x622 Deferred-Processing Vector: sSUNI4x622_DPV ........................51
Table 38: Variable Type Definitions ................................................................................121
Table 39: Naming Conventions.......................................................................................121
Proprietary and Confidential to PMC-Sierra, Inc. 12 Document ID: PMC-2010419, Issue 1
1 INTRODUCTION
The following sections of the S/UNI-4x622 Device Driver Design Specification describe the S/UNI-4x622 device driver. The code provided throughout this document is written in ANSI-C. This has been done to promote greater driver portability to other embedded hardware (Section 5) and Real-Time Operating System (RTOS) environments (Section 6).
Section 2 of this document, Software Architecture, defines the software architecture of the S/UNI-4x622 device driver by including a discussion of the driver’s external interfaces and its main components. The Data Structure information in Section 3 describes the elements of the driver that either configure or control its behavior. Included here are the constants, variables, and structures that the S/UNI-4x622 device driver uses to store initialization, configuration, and status information. Section 4 provides a detailed description of each function that is a member of the S/UNI-4x622 driver Application Programming Interface (API). This section outlines function calls that hide device-specific details and application callbacks that notify the user of significant device events.
PM5358 S/UNI-4x622 Driver Manual

Introduction

Proprietary and Confidential to PMC-Sierra, Inc. 13 Document ID: PMC-2010419, Issue 1
2 SOFTWARE ARCHITECTURE
This section describes the software architecture of the S/UNI-4x622 device driver. This includes a discussion of the driver’s external interfaces and its main components.
2.1 Driver External Interfaces
Figure 1 illustrates the external interfaces defined for the S/UNI-4x622 device driver.
Figure 1: Driver External Interfaces
Application
PM5358 S/UNI-4x622 Driver Manual

Software Architecture

Function Calls Application Callbacks
Service Callbacks
S/UNI-4x622 Device Driver
Service Calls
Hardware Interrupts
S/UNI-4x622 Devices
Register
Accesses
RTOS
Application Programming Interface
The driver Application Programming Interface (API) is a list of high-level functions that can be invoked by application programmers to configure, control and monitor S/UNI-4x622 devices. The API functions perform operations that are more meaningful from a system’s perspective. The API includes functions such as:
Proprietary and Confidential to PMC-Sierra, Inc. 14 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Software Architecture
Initialize the device(s)
Perform diagnostic tests
Validate configuration information
Retrieve status and counts information
The driver API functions use the services of the other driver components to provide this system­level functionality to the application programmer.
The driver API also consists of callback routines that are used to notify the application of significant events that take place within the device(s) and module.
Real-Time OS Interface
The driver’s RTOS interface provides functions that let the driver use RTOS services. The driver requires the memory, interrupt, and preemption services from the RTOS. The RTOS interface functions perform the following tasks for the driver:
Allocate and de-allocate memory
Manage buffers for the ISR and the DPR
Enable and disable preemption
The RTOS interface also includes service callbacks. These are functions installed by the driver using RTOS service calls such as installing interrupts. These service callbacks are invoked when an interrupt occurs.
Note: You must modify RTOS interface code to suit your RTOS.
Hardware Interface
The hardware interface provides functions that read from and write to the device registers. The hardware interface also provides a template for an ISR that the driver calls when the device raises a hardware interrupt. You must modify this function based on the interrupt configuration of your system.
2.2 Main Components
Figure 2 illustrates the top level architectural components of the S/UNI-4x622 device driver. This applies in both polled and interrupt driven operation. In polled operation the ISR is called periodically. In interrupt operation the interrupt directly triggers the ISR.
The driver includes eight main components:
Module and device(s) data-blocks
Interrupt-service routine
Deferred-processing routine
Proprietary and Confidential to PMC-Sierra, Inc. 15 Document ID: PMC-2010419, Issue 1
Alarm, status and counts
Section Overhead
Line Overhead
Path Overhead
Payload Processor
Interface Configuration
APS Configuration
Figure 2: Driver Architecture
PM5358 S/UNI-4x622 Driver Manual
Software Architecture
Application
Function
Calls
Application
Callbacks
Deferred
Processing
Routine
Interrupt
Context
Interrupt
Service Routine
Hardware Interrupts
Driver API
Alarm, Status &
Statistics
Diagnostics
Module
Data Block
Device Data Blocks
.......
Hardware Interface
S/UNI-4x622 Devices
APS Configuration
Section Overhead
Line Overhead
Path Overhead
Payload Processor
Interface Configuration
Register
Accesses
Service
Callbacks
RTOS
RTOS Interface
Service
Calls
Module Data-Block and Device(s) Data-Blocks
The Module Data-Block (MDB) is the top layer data structure, created by the S/UNI-4x622 driver to store context information about the driver module, such as:
Module state
Proprietary and Confidential to PMC-Sierra, Inc. 16 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Software Architecture
Maximum number of devices
The DDB(s)
The Device Data-Block (DDB) is contained in the MDB, and initialized by the driver module for each S/UNI-4x622 device that is registered. There is one DDB per device and there is a limit on the number of DDBs, and that limit is set by the USER when the module is initialized. The DDB is used to store context information about one device, such as:
Device state
Control information
Initialization parameters
Callback function pointers
Interrupt-Service Routine
The S/UNI-4x622 driver provides an ISR called suni4x622ISR that checks if there is any valid interrupt condition present for the device. This function can be used by a system-specific interrupt-handler function to service interrupts raised by the device.
The low-level interrupt-handler function that traps the hardware interrupt and calls
suni4x622ISR is system and RTOS dependent. Therefore, it is outside the scope of the driver.
Example implementations of an interrupt handler and functions that install and remove it are provided as a reference in section 5.2. You can customize these example implementations to suit your specific needs.
See section 2.5 for a detailed explanation of the ISR and interrupt-servicing model.
Deferred-Processing Routine
The S/UNI-4x622 driver provides a DPR called suni4x622DPR that processes any interrupt condition gathered by the ISR for that device. Typically, a system specific function, which runs as a separate task within the RTOS, will call
suni4x622DPR.
Example implementations of a DPR task and functions that install and remove it are provided as a reference in section 5.2. You can customize these example implementations to suit your specific needs.
See section 2.5 for a detailed explanation of the DPR and interrupt-servicing model.
Alarms, Status and Counts
The alarm, status and counts section is responsible for monitoring alarms, tracking devices status information and retrieving counts for each device registered with (added to) the driver.
Proprietary and Confidential to PMC-Sierra, Inc. 17 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Software Architecture
Section Overhead
The Section Overhead section provides functions to control and monitor the section overhead processing. Read / Write access is given to the section trace message (J0). This message is compared with a configurable reference and mismatches are reported. Section BIP-8 (B1) errors are accumulated in a counter that can be read. Section overhead alarms are detected and reported. For diagnostic purposes, errors can be introduced in the section overhead bytes.
Line Overhead
The Line Overhead section provides functions to configure and monitor the line overhead on both the receive and transmit sides. Read / Write access is given to the APS bytes (K1 and K2) and most other overhead bytes. Line BIP-8 (B2) errors are accumulated in a counter that can be read. Line overhead alarms are detected and reported. For diagnostic purposes, errors can be introduced in the line overhead bytes. Additional functions are provided to automatically insert line RDI and line AIS.
Path Overhead
The Path Overhead section provides functions to configure and monitor the path overhead on both the receive and transmit sides. Read / Write access is given to the path trace message (J1) and the path signal label (C2). Both are compared with a configurable reference and mismatches are reported. Path BIP-8 (B3) errors and REI are accumulated in a counter that can be read. Path overhead alarms are detected and reported. For diagnostic purposes, errors can be introduced in the path overhead bytes. Additional functions are provided to automatically insert path AIS, and force generation of individual outgoing justification events.
Payload Processor
The Payload Processor section provides functions to configuring the payload for ATM or POS processing. Function is provided to configure ATM/POS processing.
Interface Configuration
The Interface Configuration section provides functions to configure the FIFO, line and system side interface for ATM or POS mode. Functions are provided for FIFO management to separate the line side timing from the higher layer ATM/POS link layer timing. The Line interface is responsible for receive/transmit line clock configuration. The System interface is responsible for configuring the system to UTOPIA Level 3 or POS-PHY Level 3 interface for either ATM or POS application.
APS Configuration
The APS Configuration section provides function to configure the operating mode for the device to either a protect or working mate in a APS failover condition.
Proprietary and Confidential to PMC-Sierra, Inc. 18 Document ID: PMC-2010419, Issue 1
2.3 Software States
Figure 3 shows the software state diagram for the S/UNI-4x622 driver. State transitions occur on the successful execution of the corresponding transition functions shown. State information helps maintain the integrity of the MDB and DDB(s) by controlling the set of operations allowed in each state.
Figure 3: Driver Software States
suni4x622ModuleOpen
PM5358 S/UNI-4x622 Driver Manual
Software Architecture
Idle
suni4x622ModuleStart
MODULE STATES
suni4x622ModuleClose
suni4x622ModuleStop
Ready
suni4x622Reset
Start
suni4x622ModuleClose
Start
suni4x622Add suni4x622Delete
Present
suni4x622Init
suni4x622Activate
Inactive
suni4x622Reset
Active
suni4x622DeActivate
PER-DEVICE STATES
Proprietary and Confidential to PMC-Sierra, Inc. 19 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Software Architecture
Module States
The following is a description of the S/UNI-4x622 module states. See section 4.1 for a detailed description of the API functions that are used to change the module state.
Start
The driver module has not been initialized. In this state the driver does not hold any RTOS resources (memory, timers, etc); has no running tasks, and performs no actions.
Idle
The driver module has been initialized successfully. The Module Initialization Vector (MIV) has been validated, the Module Data Block (MDB) has been allocated and loaded with current data, the per-device data structures have been allocated, and the RTOS has responded without error to all the requests sent to it by the driver.
Ready
This is the normal operating state for the driver module. This means that all RTOS resources have been allocated and the driver is ready for devices to be added. The driver module remains in this state while devices are in operation.
Device States
The following is a description of the S/UNI-4x622 per-device states. The state that is mentioned here is the software state as maintained by the driver, and not as maintained inside the device itself. See section 4.3 for a detailed description of the API functions that are used to change the per-device state.
Start
The device has not been initialized. In this state the device is unknown by the driver and performs no actions. There is a separate flow for each device that can be added, and they all start here.
Present
The device has been successfully added. A Device Data Block (DDB) has been associated to the device and updated with the user context, and a device handle has been given to the USER. In this state the device performs no actions.
Inactive
In this state the device is configured but all data functions are de-activated including interrupts and alarms, as well as status and counts functions.
Active
This is the normal operating state for the device. In this state, interrupt servicing or polling is enabled.
Proprietary and Confidential to PMC-Sierra, Inc. 20 Document ID: PMC-2010419, Issue 1
2.4 Processing Flows
This section describes the main processing flows of the S/UNI-4x622 driver components.
The flow diagrams presented here illustrate the sequence of operations that take place for different driver functions. The diagrams also serve as a guide to the application programmer by illustrating the sequence in which the application must invoke the driver API.
Module Management
The following diagram illustrates the typical function call sequences that occur when initializing or shutting down the S/UNI-4x622 driver module.
Figure 4: Module Management Flow Diagram
START
suni4x622ModuleOpen
PM5358 S/UNI-4x622 Driver Manual
Software Architecture
Performs module level initializat ion of the driver. Validates the Module Initialization Vector (MIV). Allocates memory for the MDB and all its components (i.e. all the memory needed by the driver) and then initializes the contents of the MDB with the validated MIV.
suni4x622ModuleStart
suni4x622AddInitProfile
suni4x622DeleteInitProfile
suni4x622ModuleStop
suni4x622ModuleClose
END
Performs module level startup of the dri ver. This involves allocating RTOS resources such as semaphores and timers and installing the ISR handler and DPR task.
Register an initialization profile. This allows the user to store pre-defined parameter vectors that are validated ahead of time. When the device­initialization function is in voked only a profile number need t o be passed. This method simplifies and expedites the above operations.
Perform all device level functions here (add, init, acti vate, de-activate, reset, delete,...)
De-register an initialization profile previously registered with the driver.
Performs Module level shutdown of the driver. This involves deleting all devices currently installed and de-allocating all timers and s emaphores as well as removing the IS R handler and DPR task.
Performs module level shutdown of the driver. De-allocates all the driver's memory.
Device Management
The following figure shows the typica l func tion ca ll sequ ence s that the dr iv er uses to add, initialize, re-initialize, and delete the S/UNI-4x622 device.
Proprietary and Confidential to PMC-Sierra, Inc. 21 Document ID: PMC-2010419, Issue 1
Figure 5: Device Management Flow Diagram
START
PM5358 S/UNI-4x622 Driver Manual
Software Architecture
suni4x622Add
suni4x622Init
suni4x622Activate
suni4x622Reset
suni4x622DeActivate
suni4x622Reset
Detects the new device in hardware, assigns a DDB to the new device andstores the user's context for the device. Returns a device handle to the user
Applies a reset to the device and initializes the device registers and associated RA Ms based on the DIV passed by the user. The user may only pass a profile number, which corresponds to a previously saved & validated set of configurations (by using
suni4x622AddInitProfile
Prepares the device f or normal operation by enabling interrupts and other global enables. ISR routines are installed when the module is started using operational and all other API can be invoked.
In order to re-initi alize the device, reset the device using
suni4x622Reset
again.
De-activates the device and removes it from normal operation. This involves disabling the device interrupts. ISR routines for this device are removed when the module is closed.
Applies a software reset to the device to put it in its def ault startup state.
sysSuni4x622ISRHandlerInstall
and go through the initialization sequence
usingsysSuni4x622ISRHandlerRemove
)
. The device is now
suni4x622Delete
END
Removes the device from the list of devices being controlled by the S/UNI-4x622 driver. This function de-allocates the device context information for the device being deleted.
2.5 Interrupt Servicing
The S/UNI-4x622 driver services device interrupts using an Interrupt-Service Routine (ISR) that traps interrupts, and a Deferred-Processing Routine (DPR) that actually processes the interrupt conditions and clears them. This lets the ISR execute quickly and exit. Most of the time-consuming processing of the interrupt conditions is deferred to the DPR by queuing the necessary interrupt- c ont ext information to the DPR task. The DPR function runs in the context of a separate task within the RTOS.
Note: Since the DPR task processes potentially serious interrupt conditions, you should set the DPR task’s priority higher than the application task interacting with the S/UNI-4x622 driver.
Proprietary and Confidential to PMC-Sierra, Inc. 22 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Software Architecture
The driver provides system-independent functions, suni4x622ISR and suni4x622DPR. You must fill in the corresponding system-specific functions,
sysSuni4x622DPRTask. The system-specific funct ions iso la te the sy stem-specific
sysSuni4x622ISRHandler and
communication mechanism (between the ISR and DPR) from the system-independent functions,
suni4x622ISR and suni4x622DPR.
Figure 6 illustrates the interrupt service model used in the S/UNI-4x622 driver design.
Figure 6: Interrupt Service Mode
sysSuni4x622ISRHandler
suni4x622ISR
Interrupt
Context
Information
sysSuni4x622DPRTask
suni4x622DPR
Indication Callbacks
Application
Note: Instead of using an interrupt service model, you can use a polling service model in the S/UNI-4x622 driver to process the device’s event-indication registers (see page 26).
Calling suni4x622ISR
An interrupt handler function, which is system dependent, must call suni4x622ISR. But first, the low-level interrupt-handler function must trap the device interrupts. You must implement this function to fit your own system. As a reference, an example implementation of the interrupt handler (sysSuni4x622ISRHandler) appears on page 110. You can customize this example implementation to suit your needs.
The interrupt handler that you implement ( interrupt vector table of the system processor. It is called when one or more S/UNI-4x622 devices interrupt the processor. The interrupt handler then calls active state that has interrupt processing enabled.
sysSuni4x622ISRHandler) is installed in the
suni4x622ISR for each device in the
The
suni4x622ISR function reads from the master interrupt-status registers and the
miscellaneous interrupt-status registers of the S/UNI-4x622. If at least one valid interrupt condition is found then information as well as the current device handle. The disables all the device’s interrupts detected. The
suni4x622ISR fills an Interrupt-Service Vector (ISV) with this status
suni4x622ISR function also clears and
sysSuni4x622ISRHandler function is then
responsible to send this ISV buffer to the DPR task.
Note: Normally you should save the status information for deferred processing by implementing a message queue. The interrupt hand le r sends the sta tus information to the queue by the
sysSuni4x622ISRHandler.
Proprietary and Confidential to PMC-Sierra, Inc. 23 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Software Architecture
Calling suni4x622DPR
The sysSuni4x622DPRTask function is a system specific function that runs as a separate task within the RTOS. You should set the DPR task’s priority higher than the application task(s) interacting with the S/UNI-4x622 driver. In the message-queue implementation model, this task has an associated message queue. The task waits for messages from the ISR on this message queue. When a message arrives, the received ISV.
suni4x622DPR processes the status information and takes appropriate action based on the
Then specific interrupt condition detected. The nature of this processing can differ from system to system. Therefore,
suni4x622DPR calls different indication callbacks for different interrupt
conditions.
Typically, you should implement these callback functions as simple message posting functions that post messages to an application task. However, you can implement the indication callback to perform processing within the DPR task context and return without sending any messages. In this case, ensure that this callback function does not call any API functions that would change the driver’s state, such as
suni4x622Delete. Also, ensure that the callback function is
non-blocking because the DPR task executes while S/UNI-4x622 interrupts are disabled. You can customize these callbacks to suit your system. See page 103 for example implementations of the callback functions.
sysSuni4x622DPRTask calls the DPR (suni4x622DPR) with
Note: Since the
suni4x622ISR and suni4x622DPR routines themselves do not specify a
communication mechanism, you have full flexibility in choosing a communication mechanism between the two. A convenient way to implement this communication mechanism is to use a message queue, which is a service that most RTOSs provide.
You must implement the two system specific functions,
sysSuni4x622DPRTask. When the driver calls sysSuni4x622ISRHandlerInstall, the
application installs and the
sysSuni4x622ISRHandlerInstall function also creates the communication chann el betwe en sysSuni4x622ISRHandler and sysSuni4x622DPRTask. This communication channe l is
sysSuni4x622DPRTask function is spawned as a task by the application. The
sysSuni4x622ISRHandler in the interrupt vector table of the processor,
most commonly a message queue associated with the
Similarly, during removal of interrupts, the driver removes
sysSuni4x622ISRHandler and
sysSuni4x622DPRTask.
sysSuni4x622ISRHandler from
the microprocessor’s interrupt vector table and deletes the task associated with
sysSuni4x622DPRTask.
As a reference, this manual provides example implementations of the interrupt installation and removal functions on pages 109 and 111. You can customize these prototypes to suit your specific needs.
Calling suni4x622Poll
Instead of using an interrupt service model, you can use a polling service model in the S/UNI­4x622 driver to process the device’s event-indication registers.
Figure 7 illustrates the polling service model used in the S/UNI-4x622 driver design.
Proprietary and Confidential to PMC-Sierra, Inc. 24 Document ID: PMC-2010419, Issue 1
Figure 7: Polling Service Model
PM5358 S/UNI-4x622 Driver Manual
Software Architecture
suni4x622Poll
Interrupt Context
Information
suni4x622DPRsuni4x622ISR
In polling mode, the application is responsible for calling service any pending error or alarm conditions. When
Indication Callbacks
Application
suni4x622Poll often enough to
suni4x622Poll is called, the
suni4x622ISR function is called internally.
The
suni4x622ISR function reads from the master interrupt-status registers and the
miscellaneous interrupt-status registers of the S/UNI-4x622. If at least one valid interrupt condition is found then
suni4x622ISR fills an Interrupt-Service Vector (ISV) with this status
information as well as the current device handle. In polling mode, this ISV buffer is passed to the DPR task by calling
suni4x622DPR internally.
Proprietary and Confidential to PMC-Sierra, Inc. 25 Document ID: PMC-2010419, Issue 1
3 DATA STRUCTURES
This section describes the elements of the driver that configure or control its behavior, and should therefore be of interest to the application programmer. Included here are the constants, variables and structures that the S/UNI-4x622 device driver uses to store initialization, configuration and counts information. The channel number starts from 0. The structure contains arrays of four elements, where index 0 corresponds to the first channel and index 3 corresponds to the fourth channel. For more information on our naming convention, the reader is referred to Appendix A (page 121).
3.1 Constants
The following Constants are used throughout the driver code:
<S/UNI-4x622 ERROR CODES>: error codes used throughout the driver code, returned by
the API functions and used in the global error number field of the MDB and DDB. For a complete list of error codes, see Appendix B (page 125).
PM5358 S/UNI-4x622 Driver Manual

Data Structures

SUNI4x622_MAX_DEVS: defines the maximum number of devices that can be supported by
this driver. This constant must not be changed without a thorough analysis of the consequences to the driver code
SUNI4x622_MOD_START, SUNI4x622_MOD_IDLE, SUNI4x622_MOD_READY: the three
possible module states (stored in
SUNI4x622_START, SUNI4x622_PRESENT, SUNI4x622_ACTIVE,
SUNI4x622_INACTIVE: the four possible device states (stored in stateDevice)
stateModule)

3.2 Structures Passed by the Application

These structures are defined for use by the application and are passed as argument to functions within the driver. These structures are the Module Initialization Vector (MIV), the Device Initialization Vector (DIV) and the ISR mask.
Module Initialization Vector: MIV
Passed via the suni4x622ModuleOpen call, this structure contains all the in formation needed by the driver to initialize and connect to the RTOS.
maxDevs is used to inform the driver how many devices will be operating concurrently
during this session. The number is used to calculate the amount of memory that will be allocated to the driver. The maximum value that can be passed is (see section 3.1).
SUNI4x622_MAX_DEVS
Proprietary and Confidential to PMC-Sierra, Inc. 26 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Table 1: S/UNI-4x622 Module Initialization Vector: sSUNI4x622_MIV
Field Name Field Type Field Description
Data Structures
perrModule INT4 *
maxDevs UINT2
maxInitProfs UINT2
(pointer to) errModule (see descript ion in the MDB)
Maximum number of devices supported during this session
Maximum number of initialization profiles
Device Initialization Vector: DIV
Passed via the suni4x622Init call, this structure contains all the information needed by the driver to initialize a S/UNI-4x622 device. This structure is also passed via the
suni4x622SetInitProfile call when used as an initialization profile.
valid indicates that this initialization profile has been properly initialized and may be used
by the USER. This field should be ignored when the DIV is passed directly.
pollISR is a flag that indicates the type of interrupt servicing the driver is to use. The
choices are ‘polling’ ( (
SUNI4x622_ISR_MODE). When configured in polling the interrupt capability of the device
is NOT used, and the USER is responsible for calling actual processing of the event information is the same for both modes.
cbackSOH, cbackLOH, cbackRPOH, cbackPYLD, cbackFIFO, cbackIntfSys, cbackIntfLine
will be used by the DPR to inform the application code of pending events. If these fields are set as NULL, then any events that might cause the DPR to ‘call back’ the application will be processed during ISR processing but ignored by the DPR.
SUNI4x622_POLL_MODE), and ‘interrupt driven’
suni4x622Poll periodically. The
and cbackAPS are used to pass the address of application functions that
Table 2: S/UNI-4x622 Device Initialization Vector: sSUNI4x622_DIV
Field Name Field Type Field Description
valid UINT2
pollISR eSUNI4x622_ISR_MODE
cbackSOH sSUNI4x622_CBACK
Indicates that this structure is valid
Indicates the type of ISR / polling to do
Address for the callback function for SOH events
cbackLOH sSUNI4x622_CBACK
Address for the callback function for LOH events
cbackRPOH sSUNI4x622_CBACK
Address for the callback function for RPOH events
Proprietary and Confidential to PMC-Sierra, Inc. 27 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Field Name Field Type Field Description
Data Structures
cbackPYLD sSUNI4x622_CBACK
cbackFIFO sSUNI4x622_CBACK
cbackIntfLine sSUNI4x622_CBACK
cbackIntfSys sSUNI4x622_CBACK
cbackAPS sSUNI4x622_CBACK
cfgGlobal sSUNI4x622_CFG_GLOBAL
cfgChan[4] sSUNI4x622_CFG_CHAN
ISR Enable/Disable Mask
Address for the callback function for PYLD events
Address for the callback function for FIFO events
Address for the callback function for Line Interface events
Address for the callback function for System Interface events
Address for the callback function for APS events
Global configuration block
Channel configuration block (4 channels per device)
Passed via the suni4x622SetMask, suni4x622GetMask and suni4x622ClrMask calls, this structure contains all the information needed by the driver to enable and disable any of the interrupts in the S/UNI-4x622.
Table 3: S/UNI-4x622 ISR Mask: sSUNI4x622_MASK_ISR
Field Name Field Type Field Description
maskIntfSys sSUNI4x622_MASK_ISR
_INTF_SYS
maskChan[4] sSUNI4x622_MASK_ISR
_CHAN
maskAPS[4] sSUNI4x622_MASK_ISR
_APS
Interrupt mask for System Interface
Interrupt mask for each channel (4 channels per device)
Interrupt mask for each channel in the APS link (4 APS channels per device)
Proprietary and Confidential to PMC-Sierra, Inc. 28 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Table 4: S/UNI-4x622 ISR Mask: sSUNI4x622_MASK_ISR_CHAN
Field Name Field Type Field Description
Data Structures
maskSOH sSUNI4x622_MASK_ISR_
SOH
maskLOH sSUNI4x622_MASK_ISR_
LOH
maskRPOH sSUNI4x622_MASK_ISR_
RPOH
maskPYLD sSUNI4x622_MASK_ISR_
PYLD
maskFIFO sSUNI4x622_MASK_ISR_
FIFO
maskIntfLine sSUNI4x622_MASK_ISR_
INTF_LINE
Interrupt mask for Section Overhead section
Interrupt mask for Line Overhead section
Interrupt mask for Receive Path Overhead section
Interrupt mask for Payload Processor section
Interrupt mask for FIFO Configuration section
Interrupt mask for Line Interface section
Table 3: S/UNI-4x622 Section Overhead (SOH) ISR Mask: sSUNI4x622_MASK_ISR_SOH
Field Name Field Type Field Description
oof UINT2
lof UINT2
los UINT2
sbipe UINT2
tiu UINT2
tim UINT2
Out of frame
Loss of frame
Loss of signal
Section BIP error
Section trace unstable
Section trace mismatch
Table 4: S/UNI-4x622 Line Overhead (LOH) ISR Mask: sSUNI4x622_MASK_ISR_LOH
Field Name Field Type Field Description
lais UINT2
lrdi UINT2
Line alarm signal
Line remote defect
Proprietary and Confidential to PMC-Sierra, Inc. 29 Document ID: PMC-2010419, Issue 1
PM5358 S/UNI-4x622 Driver Manual
Field Name Field Type Field Description
Data Structures
psbf UINT2
coaps UINT2
coz1s1 UINT2
lbipe UINT2
lreie UINT2
sdber UINT2
sfber UINT2
APS byte failure
Change of APS bytes
Change of synchronization status message
Line BIP error
Line REI error
Signal Defect
Signal Failure
Table 5: S/UNI-4x622 Receive Path Overhead (RPOH) ISR Mask: sSUNI4x622_MASK__ISR_RPOH
Field Name Field Type Field Description
tiu UINT2
Path trace unstable
tim UINT2
prpslmi UINT2
prpslui UINT2
prdi UINT2
perdi UINT2
pbipe UINT2
pfebe UINT2
pais UINT2
ppse UINT2
pnse UINT2
ploptr UINT2
ardi UINT2
Path trace mismatch
Path signal label mismatch
Path signal label unstable
Path remote defect indication
Path enhanced remote defect indication
Path BIP-8 error
Path REI error
Path AIS state changes
Positive Pointer Justification
Negative Pointer Justification
Path Loss of pointer state changes
AuxRDI state changes
uneq UINT2
Proprietary and Confidential to PMC-Sierra, Inc. 30 Document ID: PMC-2010419, Issue 1
Trace identifier equipped state changes
Loading...
+ 106 hidden pages