PM5358 S/UNI-4x622 Driver Manual

Hardware Interface

5HARDWARE INTERFACE

The S/UNI-4x622 driver interfaces directly with the USER’s hardware. In this section, a listing of each point of interface is shown, along with a declaration and any specific porting instructions. It is the responsibility of the USER to connect these requirements into the hardware, either by defining a macro or by writing a function for each item listed. Care should be taken when matching parameters and return values.

5.1Device I/O

Reading from a Device Register: sysSuni4x622Read

This function is the most basic hardware connection. It reads the contents of a specific register location. This macro should be UINT1 oriented and should be defined by the user to reflect the target system’s addressing logic. There is no need for error recovery in this function.

Format

Prototype

Inputs

Outputs Returns

#define sysSuni4x622Read(ba, offset)

UINT1 sysSuni4x622Read(void * ba, UINT2 offset)

ba

: base address

offset

: offset from the base address

None

 

value read from the addressed register location

Writing to a Device Register: sysSuni4x622Write

This function is the most basic hardware connection. It writes the supplied value to the specific register location. This macro should be UINT1 oriented and should be defined by the user to reflect the target system’s addressing logic. There is no need for error recovery in this function.

Format

#define sysSuni4x622Write(ba, offset, data)

Prototype

UINT1 sysSuni4x622Write(void * ba, UINT2 offset,

 

UINT1 data)

 

Inputs

ba

: base address

 

offset

: offset from the base address

 

data

: data to be written

Outputs

None

 

Returns

Value written to the addressed register location

Proprietary and Confidential to PMC-Sierra, Inc.

108

Document ID: PMC-2010419, Issue 1

 

Page 108
Image 108
PMC-Sierra PM5358 S/UNI 4x622 manual Device I/O, Reading from a Device Register sysSuni4x622Read, Format